1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6799],{38:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFilterLogs=a;let n=r(4466),i=r(10205);async function a(e,{filter:t}){let r=t.strict??!1,a=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(e=>(0,i.formatLog)(e));return t.abi?(0,n.parseEventLogs)({abi:t.abi,logs:a,strict:r}):a}},188:(e,t,r)=>{let n=r(21823),i=r(22584),a=r(55634),s=r(92093),o=r(17207),l=r(14029),c=r(23981),u=r(32511),d=r(82469),h=r(45250),p=r(25940),f=r(17129),m=r(46720);function g(e,t,r){let n,i,a=e.size,s=p.getEncodedBits(t,r);for(n=0;n<15;n++)i=(s>>n&1)==1,n<6?e.set(n,8,i,!0):n<8?e.set(n+1,8,i,!0):e.set(a-15+n,8,i,!0),n<8?e.set(8,a-n-1,i,!0):n<9?e.set(8,15-n-1+1,i,!0):e.set(8,15-n-1,i,!0);e.set(a-8,8,1,!0)}t.create=function(e,t){let r,p;if(void 0===e||""===e)throw Error("No input text");let y=i.M;return void 0!==t&&(y=i.from(t.errorCorrectionLevel,i.M),r=h.from(t.version),p=c.from(t.maskPattern),t.toSJISFunc&&n.setToSJISFunction(t.toSJISFunc)),function(e,t,r,i){let p;if(Array.isArray(e))p=m.fromArray(e);else if("string"==typeof e){let n=t;if(!n){let t=m.rawSplit(e);n=h.getBestVersionForData(t,r)}p=m.fromString(e,n||40)}else throw Error("Invalid data");let y=h.getBestVersionForData(p,r);if(!y)throw Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<y)throw Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+y+".\n")}else t=y;let b=function(e,t,r){let i=new a;r.forEach(function(t){i.put(t.mode.bit,4),i.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(i)});let s=(n.getSymbolTotalCodewords(e)-u.getTotalCodewordsCount(e,t))*8;for(i.getLengthInBits()+4<=s&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);let o=(s-i.getLengthInBits())/8;for(let e=0;e<o;e++)i.put(e%2?17:236,8);return function(e,t,r){let i,a,s=n.getSymbolTotalCodewords(t),o=s-u.getTotalCodewordsCount(t,r),l=u.getBlocksCount(t,r),c=s%l,h=l-c,p=Math.floor(s/l),f=Math.floor(o/l),m=f+1,g=p-f,y=new d(g),b=0,w=Array(l),v=Array(l),E=0,C=new Uint8Array(e.buffer);for(let e=0;e<l;e++){let t=e<h?f:m;w[e]=C.slice(b,b+t),v[e]=y.encode(w[e]),b+=t,E=Math.max(E,t)}let A=new Uint8Array(s),x=0;for(i=0;i<E;i++)for(a=0;a<l;a++)i<w[a].length&&(A[x++]=w[a][i]);for(i=0;i<g;i++)for(a=0;a<l;a++)A[x++]=v[a][i];return A}(i,e,t)}(t,r,p),w=new s(n.getSymbolSize(t));!function(e,t){let r=e.size,n=l.getPositions(t);for(let t=0;t<n.length;t++){let i=n[t][0],a=n[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1)&&!(r<=i+t))for(let n=-1;n<=7;n++)a+n<=-1||r<=a+n||(t>=0&&t<=6&&(0===n||6===n)||n>=0&&n<=6&&(0===t||6===t)||t>=2&&t<=4&&n>=2&&n<=4?e.set(i+t,a+n,!0,!0):e.set(i+t,a+n,!1,!0))}}(w,t);let v=w.size;for(let e=8;e<v-8;e++){let t=e%2==0;w.set(e,6,t,!0),w.set(6,e,t,!0)}return!function(e,t){let r=o.getPositions(t);for(let t=0;t<r.length;t++){let n=r[t][0],i=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(n+t,i+r,!0,!0):e.set(n+t,i+r,!1,!0)}}(w,t),g(w,r,0),t>=7&&function(e,t){let r,n,i,a=e.size,s=h.getEncodedBits(t);for(let t=0;t<18;t++)r=Math.floor(t/3),n=t%3+a-8-3,i=(s>>t&1)==1,e.set(r,n,i,!0),e.set(n,r,i,!0)}(w,t),!function(e,t){let r=e.size,n=-1,i=r-1,a=7,s=0;for(let o=r-1;o>0;o-=2)for(6===o&&o--;;){for(let r=0;r<2;r++)if(!e.isReserved(i,o-r)){let n=!1;s<t.length&&(n=(t[s]>>>a&1)==1),e.set(i,o-r,n),-1==--a&&(s++,a=7)}if((i+=n)<0||r<=i){i-=n,n=-n;break}}}(w,b),isNaN(i)&&(i=c.getBestMask(w,g.bind(null,w,r))),c.applyMask(i,w),g(w,r,i),{modules:w,version:t,errorCorrectionLevel:r,maskPattern:i,segments:p}}(e,r,y,p)}},527:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readContract=l;let n=r(72431),i=r(25230),a=r(38297),s=r(95847),o=r(10989);async function l(e,t){let{abi:r,address:l,args:c,functionName:u,...d}=t,h=(0,i.encodeFunctionData)({abi:r,args:c,functionName:u});try{let{data:t}=await (0,s.getAction)(e,o.call,"call")({...d,data:h,to:l});return(0,n.decodeFunctionResult)({abi:r,args:c,functionName:u,data:t||"0x"})}catch(e){throw(0,a.getContractError)(e,{abi:r,address:l,args:c,docsPath:"/docs/contract/readContract",functionName:u})}}},620:(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(...e){let[t,r]=(()=>{if(Array.isArray(e[0])){let[t,r]=e;return[o(t),r]}return e})(),{bytecode:n}=r;if(t.inputs?.length===0)return;let i=r.data.replace(n,"0x");return a.decode(t.inputs,i)},t.encode=function(...e){let[t,r]=(()=>{if(Array.isArray(e[0])){let[t,r]=e;return[o(t),r]}return e})(),{bytecode:n,args:i}=r;return s.concat(n,t.inputs?.length&&i?.length?a.encode(t.inputs,i):"0x")},t.format=function(e){return n.formatAbiItem(e)},t.from=function(e){return i.from(e)},t.fromAbi=o;let n=r(65222),i=r(91315),a=r(57300),s=r(70259);function o(e){let t=e.find(e=>"constructor"===e.type);if(!t)throw new i.NotFoundError({name:"constructor"});return t}},920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OffchainLookupSenderMismatchError=t.OffchainLookupResponseMalformedError=t.OffchainLookupError=void 0;let n=r(68508),i=r(45226),a=r(5636);class s extends i.BaseError{constructor({callbackSelector:e,cause:t,data:r,extraData:n,sender:i,urls:s}){super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],t.metaMessages?.length?"":[],"Offchain Gateway Call:",s&&[" Gateway URL(s):",...s.map(e=>` ${(0,a.getUrl)(e)}`)],` Sender: ${i}`,` Data: ${r}`,` Callback selector: ${e}`,` Extra data: ${n}`].flat(),name:"OffchainLookupError"})}}t.OffchainLookupError=s;class o extends i.BaseError{constructor({result:e,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,a.getUrl)(t)}`,`Response: ${(0,n.stringify)(e)}`],name:"OffchainLookupResponseMalformedError"})}}t.OffchainLookupResponseMalformedError=o;class l extends i.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}`],name:"OffchainLookupSenderMismatchError"})}}t.OffchainLookupSenderMismatchError=l},1107:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidBytesLengthError=t.SizeExceedsPaddingSizeError=t.SliceOffsetOutOfBoundsError=void 0;let n=r(45226);class i extends n.BaseError{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}}t.SliceOffsetOutOfBoundsError=i;class a extends n.BaseError{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}t.SizeExceedsPaddingSizeError=a;class s extends n.BaseError{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.`,{name:"InvalidBytesLengthError"})}}t.InvalidBytesLengthError=s},1145:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseGwei=function(e,t="wei"){return(0,i.parseUnits)(e,n.gweiUnits[t])};let n=r(9949),i=r(1932)},1399:(e,t)=>{t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},1529:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareAuthorization=c;let n=r(83562),i=r(85926),a=r(18978),s=r(95847),o=r(80517),l=r(4200);async function c(e,t){let{account:r=e.account,chainId:c,nonce:u}=t;if(!r)throw new i.AccountNotFoundError({docsPath:"/docs/eip7702/prepareAuthorization"});let d=(0,n.parseAccount)(r),h=(()=>{if(t.executor)return"self"===t.executor?t.executor:(0,n.parseAccount)(t.executor)})(),p={address:t.contractAddress??t.address,chainId:c,nonce:u};return void 0===p.chainId&&(p.chainId=e.chain?.id??await (0,s.getAction)(e,o.getChainId,"getChainId")({})),void 0===p.nonce&&(p.nonce=await (0,s.getAction)(e,l.getTransactionCount,"getTransactionCount")({address:d.address,blockTag:"pending"}),("self"===h||h?.address&&(0,a.isAddressEqual)(h.address,d.address))&&(p.nonce+=1)),p}},1607:(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidWrappedSignatureError=t.universalSignatureValidatorAbi=t.universalSignatureValidatorBytecode=t.magicBytes=void 0,t.assert=s,t.from=function(e){return"string"==typeof e?o(e):e},t.unwrap=o,t.wrap=function(e){let{data:r,signature:i,to:s}=e;return a.concat(n.encode(n.from("address, bytes, bytes"),[s,r,i]),t.magicBytes)},t.validate=function(e){try{return s(e),!0}catch{return!1}};let n=r(57300),i=r(53937),a=r(70259);function s(e){if(a.slice(e,-32)!==t.magicBytes)throw new l(e)}function o(e){s(e);let[t,r,i]=n.decode(n.from("address, bytes, bytes"),e);return{data:r,signature:i,to:t}}t.magicBytes="0x6492649264926492649264926492649264926492649264926492649264926492",t.universalSignatureValidatorBytecode="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848
1603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",t.universalSignatureValidatorAbi=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];class l extends i.BaseError{constructor(e){super(`Value \`${e}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}t.InvalidWrappedSignatureError=l},1682:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecursiveReadLimitExceededError=t.PositionOutOfBoundsError=t.NegativeOffsetError=void 0,t.create=function(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(i);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r};let n=r(53937),i={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 o({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new s({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new a({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 a({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++}};class a extends n.BaseError{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}t.NegativeOffsetError=a;class s extends n.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:"Cursor.PositionOutOfBoundsError"})}}t.PositionOutOfBoundsError=s;class o extends n.BaseError{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:"Cursor.RecursiveReadLimitExceededError"})}}t.RecursiveReadLimitExceededError=o},1690:(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.packetToBytes=function(e){let t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);let r=new Uint8Array((0,n.stringToBytes)(t).byteLength+2),s=0,o=t.split(".");for(let e=0;e<o.length;e++){let t=(0,n.stringToBytes)(o[e]);t.byteLength>255&&(t=(0,n.stringToBytes)((0,i.encodeLabelhash)((0,a.labelhash)(o[e])))),r[s]=t.length,r.set(t,s+1),s+=t.length+1}return r.byteLength!==s+1?r.slice(0,s+1):r};let n=r(60037),i=r(47890),a=r(17456)},1771:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});class n extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&(super.delete(e),super.set(e,t)),t}set(e,t){if(super.has(e)&&super.delete(e),super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=super.keys().next().value;void 0!==e&&super.delete(e)}return this}}},1893:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transferSync=t.transfer=t.getTotalSupply=t.getMetadata=t.getBalance=t.getAllowance=t.approveSync=t.approve=void 0;var n=r(95216);Object.defineProperty(t,"approve",{enumerable:!0,get:function(){return n.approve}});var i=r(76583);Object.defineProperty(t,"approveSync",{enumerable:!0,get:function(){return i.approveSync}});var a=r(86301);Object.defineProperty(t,"getAllowance",{enumerable:!0,get:function(){return a.getAllowance}});var s=r(31515);Object.defineProperty(t,"getBalance",{enumerable:!0,get:function(){return s.getBalance}});var o=r(68936);Object.defineProperty(t,"getMetadata",{enumerable:!0,get:function(){return o.getMetadata}});var l=r(20438);Object.defineProperty(t,"getTotalSupply",{enumerable:!0,get:function(){return l.getTotalSupply}});var c=r(17732);Object.defineProperty(t,"transfer",{enumerable:!0,get:function(){return c.transfer}});var u=r(93107);Object.defineProperty(t,"transferSync",{enumerable:!0,get:function(){return u.transferSync}})},1932:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseUnits=function(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new n.InvalidDecimalNumberError({value:e});let[r,i="0"]=e.split("."),a=r.startsWith("-");if(a&&(r=r.slice(1)),i=i.replace(/(0+)$/,""),0===t)1===Math.round(Number(`.${i}`))&&(r=`${BigInt(r)+1n}`),i="";else if(i.length>t){let[e,n,a]=[i.slice(0,t-1),i.slice(t-1,t),i.slice(t)],s=Math.round(Number(`${n}.${a}`));(i=s>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${s}`).length>t&&(i=i.slice(1),r=`${BigInt(r)+1n}`),i=i.slice(0,t)}else i=i.padEnd(t,"0");return BigInt(`${a?"-":""}${r}${i}`)};let n=r(83289)},1953:(e,t)=>{"use strict";function r(e){let r=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:r=>t.set(e,r)}),n=r(e,t.promiseCache),i=r(e,t.responseCache);return{clear:()=>{n.clear(),i.clear()},promise:n,response:i}}async function n(e,{cacheKey:t,cacheTime:n=1/0}){let i=r(t),a=i.response.get();if(a&&n>0&&Date.now()-a.created.getTime()<n)return a.data;let s=i.promise.get();s||(s=e(),i.promise.set(s));try{let e=await s;return i.response.set({created:new Date,data:e}),e}finally{i.promise.clear()}}Object.defineProperty(t,"__esModule",{value:!0}),t.responseCache=t.promiseCache=void 0,t.getCache=r,t.withCache=n,t.promiseCache=new Map,t.responseCache=new Map},2022:(e,t,r)=>{"use strict";r.d(t,{Ak:()=>l,UT:()=>v,Xf:()=>b,fH:()=>y,hT:()=>g,u0:()=>o});var n=r(40537),i=r(14319);let a=BigInt(0),s=BigInt(1);function o(e,t){let r=t.negate();return e?r:t}function l(e,t){let r=(0,i.pS)(e.Fp,t.map(e=>e.Z));return t.map((t,n)=>e.fromAffine(t.toAffine(r[n])))}function c(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function u(e,t){c(e,t);let r=Math.ceil(t/e)+1,i=2**(e-1),a=2**e;return{windows:r,windowSize:i,mask:(0,n.OG)(e),maxNumber:a,shiftBy:BigInt(e)}}function d(e,t,r){let{windowSize:n,mask:i,maxNumber:a,shiftBy:o}=r,l=Number(e&i),c=e>>o;l>n&&(l-=a,c+=s);let u=t*n,d=u+Math.abs(l)-1,h=0===l;return{nextN:c,offset:d,isZero:h,isNeg:l<0,isNegF:t%2!=0,offsetF:u}}let h=new WeakMap,p=new WeakMap;function f(e){return p.get(e)||1}function m(e){if(e!==a)throw Error("invalid wNAF")}class g{constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}_unsafeLadder(e,t,r=this.ZERO){let n=e;for(;t>a;)t&s&&(r=r.add(n)),n=n.double(),t>>=s;return r}precomputeWindow(e,t){let{windows:r,windowSize:n}=u(t,this.bits),i=[],a=e,s=a;for(let e=0;e<r;e++){s=a,i.push(s);for(let e=1;e<n;e++)s=s.add(a),i.push(s);a=s.double()}return i}wNAF(e,t,r){if(!this.Fn.isValid(r))throw Error("invalid scalar");let n=this.ZERO,i=this.BASE,a=u(e,this.bits);for(let e=0;e<a.windows;e++){let{nextN:s,offset:l,isZero:c,isNeg:u,isNegF:h,offsetF:p}=d(r,e,a);r=s,c?i=i.add(o(h,t[p])):n=n.add(o(u,t[l]))}return m(r),{p:n,f:i}
1}wNAFUnsafe(e,t,r,n=this.ZERO){let i=u(e,this.bits);for(let e=0;e<i.windows&&r!==a;e++){let{nextN:a,offset:s,isZero:o,isNeg:l}=d(r,e,i);if(r=a,!o){let e=t[s];n=n.add(l?e.negate():e)}}return m(r),n}getPrecomputes(e,t,r){let n=h.get(t);return n||(n=this.precomputeWindow(t,e),1!==e&&("function"==typeof r&&(n=r(n)),h.set(t,n))),n}cached(e,t,r){let n=f(e);return this.wNAF(n,this.getPrecomputes(n,e,r),t)}unsafe(e,t,r,n){let i=f(e);return 1===i?this._unsafeLadder(e,t,n):this.wNAFUnsafe(i,this.getPrecomputes(i,e,r),t,n)}createCache(e,t){c(t,this.bits),p.set(e,t),h.delete(e)}hasCache(e){return 1!==f(e)}}function y(e,t,r,n){let i=t,o=e.ZERO,l=e.ZERO;for(;r>a||n>a;)r&s&&(o=o.add(i)),n&s&&(l=l.add(i)),i=i.double(),r>>=s,n>>=s;return{p1:o,p2:l}}function b(e,t,r,i){if(!Array.isArray(r))throw Error("array expected");r.forEach((t,r)=>{if(!(t instanceof e))throw Error("invalid point at index "+r)});if(!Array.isArray(i))throw Error("array of scalars expected");i.forEach((e,r)=>{if(!t.isValid(e))throw Error("invalid scalar at index "+r)});let a=r.length,s=i.length;if(a!==s)throw Error("arrays of points and scalars must have equal length");let o=e.ZERO,l=(0,n.dJ)(BigInt(a)),c=1;l>12?c=l-3:l>4?c=l-2:l>0&&(c=2);let u=(0,n.OG)(c),d=Array(Number(u)+1).fill(o),h=Math.floor((t.BITS-1)/c)*c,p=o;for(let e=h;e>=0;e-=c){d.fill(o);for(let t=0;t<s;t++){let n=Number(i[t]>>BigInt(e)&u);d[n]=d[n].add(r[t])}let t=o;for(let e=d.length-1,r=o;e>0;e--)r=r.add(d[e]),t=t.add(r);if(p=p.add(t),0!==e)for(let e=0;e<c;e++)p=p.double()}return p}function w(e,t,r){if(!t)return(0,i.D0)(e,{isLE:r});if(t.ORDER!==e)throw Error("Field.ORDER must match order: Fp == p, Fn == n");return(0,i.jr)(t),t}function v(e,t,r={},n){if(void 0===n&&(n="edwards"===e),!t||"object"!=typeof t)throw Error(`expected valid ${e} CURVE object`);for(let e of["p","n","h"]){let r=t[e];if(!("bigint"==typeof r&&r>a))throw Error(`CURVE.${e} must be positive bigint`)}let i=w(t.p,r.Fp,n),s=w(t.n,r.Fn,n);for(let r of["Gx","Gy","a","weierstrass"===e?"b":"d"])if(!i.isValid(t[r]))throw Error(`CURVE.${r} must be valid field element of CURVE.Fp`);return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:i,Fn:s}}},2076:(e,t,r)=>{"use strict";r.d(t,{z8:()=>n,tt:()=>c,Zv:()=>a.Z,AH:()=>d.AH,EM:()=>u.E,RF:()=>i.RF,JX:()=>i.JX,ds:()=>i.ds,f:()=>d.f});let n={interpolate(e,t,r){if(2!==e.length||2!==t.length)throw Error("inputRange and outputRange must be an array of length 2");let n=e[0]||0,i=e[1]||0,a=t[0]||0,s=t[1]||0;return r<n?a:r>i?s:(s-a)/(i-n)*(r-n)+a}};var i=r(46756),a=r(55405),s=r(3048);let o=["receive","deposit","borrow","claim"],l=["withdraw","repay","burn"],c={getTransactionGroupTitle(e,t){let r=s.r.getYear(),n=s.r.getMonthNameByIndex(t);return e===r?n:`${n} ${e}`},getTransactionImages(e){let[t]=e;return e?.length>1?e.map(e=>this.getTransactionImage(e)):[this.getTransactionImage(t)]},getTransactionImage:e=>({type:c.getTransactionTransferTokenType(e),url:c.getTransactionImageURL(e)}),getTransactionImageURL(e){let t,r=!!e?.nft_info,n=!!e?.fungible_info;return e&&r?t=e?.nft_info?.content?.preview?.url:e&&n&&(t=e?.fungible_info?.icon?.url),t},getTransactionTransferTokenType:e=>e?.fungible_info?"FUNGIBLE":e?.nft_info?"NFT":void 0,getTransactionDescriptions(e,t){let r=e?.metadata?.operationType,n=t||e?.transfers,i=n&&n.length>0,s=n&&n.length>1,c=i&&n.every(e=>!!e?.fungible_info),[u,d]=n||[],h=this.getTransferDescription(u),p=this.getTransferDescription(d);if(!i)return("send"===r||"receive"===r)&&c?[h=a.Z.getTruncateString({string:e?.metadata.sentFrom,charsStart:4,charsEnd:6,truncate:"middle"}),a.Z.getTruncateString({string:e?.metadata.sentTo,charsStart:4,charsEnd:6,truncate:"middle"})]:[e.metadata.status];if(s)return n?.map(e=>this.getTransferDescription(e));let f="";return o.includes(r)?f="+":l.includes(r)&&(f="-"),[h=f.concat(h)]},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},mergeTransfers(e){if(e?.length<=1)return e;let t=this.filterGasFeeTransfers(e).reduce((e,t)=>
1{let r=t?.fungible_info?.name,n=e.find(({fungible_info:e,direction:n})=>r&&r===e?.name&&n===t.direction);if(n){let e=Number(n.quantity.numeric)+Number(t.quantity.numeric);n.quantity.numeric=e.toString(),n.value=(n.value||0)+(t.value||0)}else e.push(t);return e},[]),r=t;return t.length>2&&(r=t.sort((e,t)=>(t.value||0)-(e.value||0)).slice(0,2)),r=r.sort((e,t)=>"out"===e.direction&&"in"===t.direction?-1:+("in"===e.direction&&"out"===t.direction))},filterGasFeeTransfers(e){let t=e?.reduce((e,t)=>{let r=t?.fungible_info?.name;return r&&(e[r]||(e[r]=[]),e[r].push(t)),e},{}),r=[];return Object.values(t??{}).forEach(e=>{if(1===e.length){let t=e[0];t&&r.push(t)}else{let t=e.filter(e=>"in"===e.direction),n=e.filter(e=>"out"===e.direction);if(1===t.length&&1===n.length){let i=t[0],a=n[0],s=!1;if(i&&a){let e=Number(i.quantity.numeric),t=Number(a.quantity.numeric);t<.1*e?(r.push(i),s=!0):e<.1*t&&(r.push(a),s=!0)}s||r.push(...e)}else{let t=this.filterGasFeesFromTokenGroup(e);r.push(...t)}}}),e?.forEach(e=>{e?.fungible_info?.name||r.push(e)}),r},filterGasFeesFromTokenGroup(e){if(e.length<=1)return e;let t=e?.map(e=>Number(e.quantity.numeric)),r=Math.max(...t);if(Math.min(...t)<.01*r)return e?.filter(e=>Number(e.quantity.numeric)>=.01*r);let n=e?.filter(e=>"in"===e.direction),i=e?.filter(e=>"out"===e.direction);if(1===n.length&&1===i.length){let e=n[0],t=i[0];if(e&&t){let r=Number(e.quantity.numeric),n=Number(t.quantity.numeric);if(n<.1*r)return[e];if(r<.1*n)return[t]}}return e},getQuantityFixedValue:e=>e?parseFloat(e).toFixed(3):null};var u=r(63412);r(62457);var d=r(91392)},2122:(e,t,r)=>{let n=r(98407);t.render=function(e,t,r){var i;let a=r,s=t;void 0!==a||t&&t.getContext||(a=t,t=void 0),t||(s=function(){try{return document.createElement("canvas")}catch(e){throw Error("You need to specify a canvas element")}}()),a=n.getOptions(a);let o=n.getImageWidth(e.modules.size,a),l=s.getContext("2d"),c=l.createImageData(o,o);return n.qrToImageData(c.data,e,a),i=s,l.clearRect(0,0,i.width,i.height),i.style||(i.style={}),i.height=o,i.width=o,i.style.height=o+"px",i.style.width=o+"px",l.putImageData(c,0,0),s},t.renderToDataURL=function(e,r,n){let i=n;void 0!==i||r&&r.getContext||(i=r,r=void 0),i||(i={});let a=t.render(e,r,i),s=i.type||"image/png",o=i.rendererOpts||{};return a.toDataURL(s,o.quality)}},2205:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.namehash=function(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,a.bytesToHex)(t);let r=e.split(".");for(let e=r.length-1;e>=0;e-=1){let a=(0,o.encodedLabelToLabelhash)(r[e]),l=a?(0,i.toBytes)(a):(0,s.keccak256)((0,i.stringToBytes)(r[e]),"bytes");t=(0,s.keccak256)((0,n.concat)([t,l]),"bytes")}return(0,a.bytesToHex)(t)};let n=r(26504),i=r(60037),a=r(27083),s=r(4319),o=r(15027)},2310:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPublicClient=function(e){let{key:t="public",name:r="Public Client"}=e;return(0,n.createClient)({...e,key:t,name:r,type:"publicClient"}).extend(i.publicActions)};let n=r(85583),i=r(77794)},2404:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fillTransaction=p;let n=r(83562),i=r(75445),a=r(5449),s=r(48674),o=r(93771),l=r(53520),c=r(95847),u=r(61609),d=r(70200),h=r(80517);async function p(e,t){let{account:r=e.account,accessList:p,authorizationList:f,chain:m=e.chain,blobVersionedHashes:g,blobs:y,data:b,gas:w,gasPrice:v,maxFeePerBlobGas:E,maxFeePerGas:C,maxPriorityFeePerGas:A,nonce:x,nonceManager:I,to:S,type:T,value:P,...O}=t,_=await (async()=>{if(!r||!I||void 0!==x)return x;let t=(0,n.parseAccount)(r),i=m?m.id:await (0,c.getAction)(e,h.getChainId,"getChainId")({});return await I.consume({address:t.address,chainId:i,client:e})})();(0,u.assertRequest)(t);let N=m?.formatters?.transactionRequest?.format,k=(N||l.formatTransactionRequest)({...(0,s.extract)(O,{format:N}),account:r?(0,n.parseAccount)(r):void 0,accessList:p,authorizationList:f,blobs:y,blobVersionedHashes:g,data:b,gas:w,gasPrice:v,maxFeePerBlobGas:E,maxFeePerGas:C,maxPriorityFeePerGas:A,nonce:_,to:S,type:T,value:P},"fillTransaction");try{let r=await e.request({method:"eth_fillTransaction",params:[k]}),n=(m?.formatters?.transaction?.format||o.formatTransaction)(r.tx);delete n.blockHash,delete n.blockNumber,delete n.r,delete n.s,delete n.transactionIndex,delete n.v,delete n.yParity,n.data=n.input,n.gas&&(n.gas=t.gas??n.gas),n.gasPrice&&(n.gasPrice=t.gasPrice??n.gasPrice),n.maxFeePerBlobGas&&(n.maxFeePerBlobGas=t.maxFeePerBlobGas??n.maxFeePerBlobGas),n.maxFeePerGas&&(n.maxFeePerGas=t.maxFeePerGas??n.maxFeePerGas),n.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=t.maxPriorityFeePerGas??n.maxPriorityFeePerGas),void 0!==n.nonce&&(n.nonce=t.nonce??n.nonce);let a=await (async()=>
1{if("function"==typeof m?.fees?.baseFeeMultiplier){let r=await (0,c.getAction)(e,d.getBlock,"getBlock")({});return m.fees.baseFeeMultiplier({block:r,client:e,request:t})}return m?.fees?.baseFeeMultiplier??1.2})();if(a<1)throw new i.BaseFeeScalarError;let s=a.toString().split(".")[1]?.length??0,l=10**s,u=e=>e*BigInt(Math.ceil(a*l))/BigInt(l);return n.feePayerSignature||(n.maxFeePerGas&&!t.maxFeePerGas&&(n.maxFeePerGas=u(n.maxFeePerGas)),n.gasPrice&&!t.gasPrice&&(n.gasPrice=u(n.gasPrice))),{raw:r.raw,transaction:{from:k.from,...n},...r.capabilities?{capabilities:r.capabilities}:{}}}catch(r){throw(0,a.getTransactionError)(r,{...t,chain:e.chain})}}},2438:(e,t,r)=>{"use strict";r.d(t,{R:()=>n});let n="solana:signAndSendTransaction"},2880:(e,t,r)=>{"use strict";r.d(t,{N:()=>n});let n=(0,r(21644).x)({id:56,name:"BNB Smart Chain",blockTime:750,nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://56.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0xf2f12c}}})},3048:(e,t,r)=>{"use strict";r.d(t,{r:()=>c});var n=r(42585),i=r(89802),a=r(9395),s=r(82689);n.extend(a),n.extend(s);let o={...i,name:"en-web3-modal",relativeTime:{future:"in %s",past:"%s ago",s:"%d 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"}},l=["January","February","March","April","May","June","July","August","September","October","November","December"];n.locale("en-web3-modal",o);let c={getMonthNameByIndex:e=>l[e],getYear:(e=new Date().toISOString())=>n(e).year(),getRelativeDateFromNow:e=>n(e).locale("en-web3-modal").fromNow(!0),formatDate:(e,t="DD MMM")=>n(e).format(t)}},3053:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverMessageAddress=a;let n=r(39091),i=r(41636);async function a({message:e,signature:t}){return(0,i.recoverAddress)({hash:(0,n.hashMessage)(e),signature:t})}},3063:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.minInt120=t.minInt112=t.minInt104=t.minInt96=t.minInt88=t.minInt80=t.minInt72=t.minInt64=t.minInt56=t.minInt48=t.minInt40=t.minInt32=t.minInt24=t.minInt16=t.minInt8=t.maxInt256=t.maxInt248=t.maxInt240=t.maxInt232=t.maxInt224=t.maxInt216=t.maxInt208=t.maxInt200=t.maxInt192=t.maxInt184=t.maxInt176=t.maxInt168=t.maxInt160=t.maxInt152=t.maxInt144=t.maxInt136=t.maxInt128=t.maxInt120=t.maxInt112=t.maxInt104=t.maxInt96=t.maxInt88=t.maxInt80=t.maxInt72=t.maxInt64=t.maxInt56=t.maxInt48=t.maxInt40=t.maxInt32=t.maxInt24=t.maxInt16=t.maxInt8=t.integerRegex=t.bytesRegex=t.arrayRegex=void 0,t.maxUint256=t.maxUint248=t.maxUint240=t.maxUint232=t.maxUint224=t.maxUint216=t.maxUint208=t.maxUint200=t.maxUint192=t.maxUint184=t.maxUint176=t.maxUint168=t.maxUint160=t.maxUint152=t.maxUint144=t.maxUint136=t.maxUint128=t.maxUint120=t.maxUint112=t.maxUint104=t.maxUint96=t.maxUint88=t.maxUint80=t.maxUint72=t.maxUint64=t.maxUint56=t.maxUint48=t.maxUint40=t.maxUint32=t.maxUint24=t.maxUint16=t.maxUint8=t.minInt256=t.minInt248=t.minInt240=t.minInt232=t.minInt224=t.minInt216=t.minInt208=t.minInt200=t.minInt192=t.minInt184=t.minInt176=t.minInt168=t.minInt160=t.minInt152=t.minInt144=t.minInt136=t.minInt128=void 0,t.arrayRegex=/^(.*)\[([0-9]*)\]$/,t.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,t.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)?$/,t.maxInt8=2n**(8n-1n)-1n,t.maxInt16=2n**(16n-1n)-1n,t.maxInt24=2n**(24n-1n)-1n,t.maxInt32=2n**(32n-1n)-1n,t.maxInt40=2n**(40n-1n)-1n,t.maxInt48=2n**(48n-1n)-1n,t.maxInt56=2n**(56n-1n)-1n,t.maxInt64=2n**(64n-1n)-1n,t.maxInt72=2n**(72n-1n)-1n,t.maxInt80=2n**(80n-1n)-1n,t.maxInt88=2n**(88n-1n)-1n,t.maxInt96=2n**(96n-1n)-1n,t.maxInt104=2n**(104n-1n)-1n,t.maxInt112=2n**(112n-1n)-1n,t.maxInt120=2n**(120n-1n)-1n,t.maxInt128=2n**(128n-1n)-1n,t.maxInt136=2n**(136n-1n)-1n,t.maxInt144=2n**(144n-1n)-1n,t.maxInt152=2n**(152n-1n)-1n,t.maxInt160=2n**(160n-1n)-1n,t.maxInt168=2n**(168
1n-1n)-1n,t.maxInt176=2n**(176n-1n)-1n,t.maxInt184=2n**(184n-1n)-1n,t.maxInt192=2n**(192n-1n)-1n,t.maxInt200=2n**(200n-1n)-1n,t.maxInt208=2n**(208n-1n)-1n,t.maxInt216=2n**(216n-1n)-1n,t.maxInt224=2n**(224n-1n)-1n,t.maxInt232=2n**(232n-1n)-1n,t.maxInt240=2n**(240n-1n)-1n,t.maxInt248=2n**(248n-1n)-1n,t.maxInt256=2n**(256n-1n)-1n,t.minInt8=-(2n**(8n-1n)),t.minInt16=-(2n**(16n-1n)),t.minInt24=-(2n**(24n-1n)),t.minInt32=-(2n**(32n-1n)),t.minInt40=-(2n**(40n-1n)),t.minInt48=-(2n**(48n-1n)),t.minInt56=-(2n**(56n-1n)),t.minInt64=-(2n**(64n-1n)),t.minInt72=-(2n**(72n-1n)),t.minInt80=-(2n**(80n-1n)),t.minInt88=-(2n**(88n-1n)),t.minInt96=-(2n**(96n-1n)),t.minInt104=-(2n**(104n-1n)),t.minInt112=-(2n**(112n-1n)),t.minInt120=-(2n**(120n-1n)),t.minInt128=-(2n**(128n-1n)),t.minInt136=-(2n**(136n-1n)),t.minInt144=-(2n**(144n-1n)),t.minInt152=-(2n**(152n-1n)),t.minInt160=-(2n**(160n-1n)),t.minInt168=-(2n**(168n-1n)),t.minInt176=-(2n**(176n-1n)),t.minInt184=-(2n**(184n-1n)),t.minInt192=-(2n**(192n-1n)),t.minInt200=-(2n**(200n-1n)),t.minInt208=-(2n**(208n-1n)),t.minInt216=-(2n**(216n-1n)),t.minInt224=-(2n**(224n-1n)),t.minInt232=-(2n**(232n-1n)),t.minInt240=-(2n**(240n-1n)),t.minInt248=-(2n**(248n-1n)),t.minInt256=-(2n**(256n-1n)),t.maxUint8=2n**8n-1n,t.maxUint16=2n**16n-1n,t.maxUint24=2n**24n-1n,t.maxUint32=2n**32n-1n,t.maxUint40=2n**40n-1n,t.maxUint48=2n**48n-1n,t.maxUint56=2n**56n-1n,t.maxUint64=2n**64n-1n,t.maxUint72=2n**72n-1n,t.maxUint80=2n**80n-1n,t.maxUint88=2n**88n-1n,t.maxUint96=2n**96n-1n,t.maxUint104=2n**104n-1n,t.maxUint112=2n**112n-1n,t.maxUint120=2n**120n-1n,t.maxUint128=2n**128n-1n,t.maxUint136=2n**136n-1n,t.maxUint144=2n**144n-1n,t.maxUint152=2n**152n-1n,t.maxUint160=2n**160n-1n,t.maxUint168=2n**168n-1n,t.maxUint176=2n**176n-1n,t.maxUint184=2n**184n-1n,t.maxUint192=2n**192n-1n,t.maxUint200=2n**200n-1n,t.maxUint208=2n**208n-1n,t.maxUint216=2n**216n-1n,t.maxUint224=2n**224n-1n,t.maxUint232=2n**232n-1n,t.maxUint240=2n**240n-1n,t.maxUint248=2n**248n-1n,t.maxUint256=2n**256n-1n},3340:(e,t,r)=>{"use strict";r.d(t,{$R:()=>$,AK:()=>F,B_:()=>G,Bn:()=>D,CN:()=>I,Cm:()=>h,FB:()=>w,Ft:()=>L,J3:()=>j,JD:()=>R,Jz:()=>A,Lk:()=>E,MD:()=>d,MS:()=>p,P:()=>V,P4:()=>M,VG:()=>N,Yj:()=>U,_e:()=>f,_p:()=>u,a_:()=>q,df:()=>H,ef:()=>C,fn:()=>_,gq:()=>O,hT:()=>z,ko:()=>T,l0:()=>k,lf:()=>W,mZ:()=>K,pV:()=>c,uB:()=>x,uj:()=>B,wN:()=>P});var n=r(34410),i=r(51844),a=r(79681),s=r(33811),o=r(14663),l=r(89596);let c=a.j.bytes(n.wn).transform({validate:e=>{let t="string"==typeof e?e:(0,s.n)(e);if(!t||!(0,n.AP)((0,n.t4)(t)))throw Error(`Invalid Sui address ${t}`)},input:e=>"string"==typeof e?(0,s.a)((0,n.t4)(e)):e,output:e=>(0,n.t4)((0,s.n)(e))}),u=a.j.byteVector().transform({name:"ObjectDigest",input:e=>(0,o.n)(e),output:e=>(0,o.g)(new Uint8Array(e)),validate:e=>{if(32!==(0,o.n)(e).length)throw Error("ObjectDigest must be 32 bytes")}}),d=a.j.struct("SuiObjectRef",{objectId:c,version:a.j.u64(),digest:u}),h=a.j.struct("SharedObjectRef",{objectId:c,initialSharedVersion:a.j.u64(),mutable:a.j.bool()}),p=a.j.enum("ObjectArg",{ImmOrOwnedObject:d,SharedObject:h,Receiving:d}),f=a.j.enum("Owner",{AddressOwner:c,ObjectOwner:c,Shared:a.j.struct("Shared",{initialSharedVersion:a.j.u64()}),Immutable:null,ConsensusAddressOwner:a.j.struct("ConsensusAddressOwner",{startVersion:a.j.u64(),owner:c})}),m=a.j.enum("Reservation",{MaxAmountU64:a.j.u64()}),g=a.j.enum("WithdrawalType",{Balance:a.j.lazy(()=>E)}),y=a.j.enum("WithdrawFrom",{Sender:null,Sponsor:null}),b=a.j.struct("FundsWithdrawal",{reservation:m,typeArg:g,withdrawFrom:y}),w=a.j.enum("CallArg",{Pure:a.j.struct("Pure",{bytes:a.j.byteVector().transform({input:e=>"string"==typeof e?(0,l.E)(e):e,output:e=>(0,l.n)(new Uint8Array(e))})}),Object:p,FundsWithdrawal:b}),v=a.j.enum("TypeTag",{bool:null,u8:null,u64:null,u128:null,address:null,signer:null,vector:a.j.lazy(()=>v),struct:a.j.lazy(()=>P),u16:null,u32:null,u256:null}),E=v.transform({input:e=>"string"==typeof e?i.r.parseFromStr(e,!0):e,output:e=>i.r.tagToString(e)}),C=a.j.enum("Argument",{GasCoin:null,Input:a.j.u16(),Result:a.j.u16(),NestedResult:a.j.tuple([a.j.u16(),a.j.u16()])}),A=a.j.struct("ProgrammableMoveCall",{package:c,module:a.j.string(),function:a.j.string(),typeArguments:a.j.vector(E),arguments:a.j.vector(C)}),x=a.j.enum("Command",{MoveCall:A,TransferObjects:a.j.struct("TransferObjects",{objects:a.j.vector(C),address:C}),SplitCoins:a.j.struct("SplitCoins",{coin:C,amounts:a.j.vector(C)}),MergeCoins:a.j.struct("MergeCoins",{destination:C,sources:a.j.vector(C)}),Publish:a.j.struct("Publish",{modules:a.j.vector(a.j.byteVector().transform({input:e=>"string"==typeof e?(0,l.E)(e):e,output:e=>(0,l.n)(new Uint8Array(e))})),dependencies:a.j.vector(c)}),MakeMoveVec:a.j.struct("MakeMoveVec",{type:a.j.enum("Option",{None:null,Some:E}).transform({input:e=>null===e?{None:!0}:{Some:e},output:e=>e.Some??null}),elements:a.j.vector(C)}),Upgrade:a.j.struct("Upgrade",{modules:a.j.vector(a.j.byteVector().transform({input:e=>"string"==typeof e?(0,l.E)(e):e,output:e=>(0,l.n)(new Uint8Array(e))})),dependencies:a.j.vector(c),package:c,ticket:C})}),I=a.j.struct("ProgrammableTransaction",{inputs:a.j.vector(w),commands:a.j.vector(x)}),S=a.j.struct("ValidDuring",{minEpoch:a.j.option(a.j.u64()),maxEpoch:a.j.option(a.j.u64()),minTimestamp:a.j.option(a.j.u64()),maxTimestamp:a.j.option(a.j.u64()),chain:u,nonce:a.j.u32()}),T=a.j.enum("TransactionExpiration",{None:null,Epoch:a.j.u64({name:"unsafe_u64",...void 0}).transform({input:e=>e,output:e=>Number(e)}),ValidDuring:S}),P=a.j.struct("StructTag",{address:c,module:a.j.string(),name:a.j.string(),typeParams:a.j.vector(v)}),O=a.j.struct("GasData",{payment:a.j.vector(d),owner:c,price:a.j.u64(),budget:a.j.u64()}),_=a.j.enum("IntentScope",{TransactionData:null,TransactionEffects:null,CheckpointSummary:null,PersonalMessage:null}),N=a.j.enum("IntentVersion",{V0:null}),k=a.j.enum("AppId",{Sui:null}
1),R=a.j.struct("Intent",{scope:_,version:N,appId:k});function M(e){return a.j.struct(`IntentMessage<${e.name}>`,{intent:R,value:e})}let B=a.j.enum("CompressedSignature",{ED25519:a.j.bytes(64),Secp256k1:a.j.bytes(64),Secp256r1:a.j.bytes(64),ZkLogin:a.j.byteVector(),Passkey:a.j.byteVector()}),j=a.j.enum("PublicKey",{ED25519:a.j.bytes(32),Secp256k1:a.j.bytes(33),Secp256r1:a.j.bytes(33),ZkLogin:a.j.byteVector(),Passkey:a.j.bytes(33)}),U=a.j.struct("MultiSigPkMap",{pubKey:j,weight:a.j.u8()}),$=a.j.struct("MultiSigPublicKey",{pk_map:a.j.vector(U),threshold:a.j.u16()}),L=a.j.struct("MultiSig",{sigs:a.j.vector(B),bitmap:a.j.u16(),multisig_pk:$}),D=a.j.byteVector().transform({input:e=>"string"==typeof e?(0,l.E)(e):e,output:e=>(0,l.n)(new Uint8Array(e))}),F=a.j.struct("PasskeyAuthenticator",{authenticatorData:a.j.byteVector(),clientDataJson:a.j.string(),userSignature:a.j.byteVector()}),H=a.j.enum("MoveObjectType",{Other:P,GasCoin:null,StakedSui:null,Coin:E,AccumulatorBalanceWrapper:null}),z=a.j.struct("TypeOrigin",{moduleName:a.j.string(),datatypeName:a.j.string(),package:c}),W=a.j.struct("UpgradeInfo",{upgradedId:c,upgradedVersion:a.j.u64()}),q=a.j.struct("MovePackage",{id:c,version:a.j.u64(),moduleMap:a.j.map(a.j.string(),a.j.byteVector()),typeOriginTable:a.j.vector(z),linkageTable:a.j.map(c,W)}),V=a.j.struct("MoveObject",{type:H,hasPublicTransfer:a.j.bool(),version:a.j.u64(),contents:a.j.byteVector()}
1),G=a.j.enum("Data",{Move:V,Package:q}),K=a.j.struct("ObjectInner",{data:G,owner:f,previousTransaction:u,storageRebate:a.j.u64()})},3383:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Eip712DomainNotFoundError=void 0;let n=r(45226);class i extends n.BaseError{constructor({address:e}){super(`No EIP-712 domain found on contract "${e}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${e}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}t.Eip712DomainNotFoundError=i},3532:(e,t,r)=>{"use strict";r.r(t),r.d(t,{WebSocket:()=>n});let n=function(){if("undefined"!=typeof WebSocket)return WebSocket;if(void 0!==global.WebSocket)return global.WebSocket;if(void 0!==window.WebSocket)return window.WebSocket;if(void 0!==self.WebSocket)return self.WebSocket;throw Error("`WebSocket` is not supported in this environment")}()},3562:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromBytes=function(e,t){let r="string"==typeof t?{to:t}:t,n=r.to;return"number"===n?c(e,r):"bigint"===n?o(e,r):"boolean"===n?l(e,r):"string"===n?u(e,r):(0,s.bytesToHex)(e,r)},t.bytesToBigInt=o,t.bytesToBool=l,t.bytesToNumber=c,t.bytesToString=u;let n=r(51674),i=r(62704),a=r(14972),s=r(27083);function o(e,t={}){void 0!==t.size&&(0,a.assertSize)(e,{size:t.size});let r=(0,s.bytesToHex)(e,t);return(0,a.hexToBigInt)(r,t)}function l(e,t={}){let r=e;if(void 0!==t.size&&((0,a.assertSize)(r,{size:t.size}),r=(0,i.trim)(r)),r.length>1||r[0]>1)throw new n.InvalidBytesBooleanError(r);return!!r[0]}function c(e,t={}){void 0!==t.size&&(0,a.assertSize)(e,{size:t.size});let r=(0,s.bytesToHex)(e,t);return(0,a.hexToNumber)(r,t)}function u(e,t={}){let r=e;return void 0!==t.size&&((0,a.assertSize)(r,{size:t.size}),r=(0,i.trim)(r,{dir:"right"})),new TextDecoder().decode(r)}},3603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTransport=function({key:e,methods:t,name:r,request:a,retryCount:s=3,retryDelay:o=150,timeout:l,type:c},u){let d=(0,i.uid)();return{config:{key:e,methods:t,name:r,request:a,retryCount:s,retryDelay:o,timeout:l,type:c},request:(0,n.buildRequest)(a,{methods:t,retryCount:s,retryDelay:o,uid:d}),value:u}};let n=r(77898),i=r(57191)},3669:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pad=function(e,{dir:t,size:r=32}={}){return"string"==typeof e?i(e,{dir:t,size:r}):a(e,{dir:t,size:r})},t.padHex=i,t.padBytes=a;let n=r(1107);function i(e,{dir:t,size:r=32}={}){if(null===r)return e;let a=e.replace("0x","");if(a.length>2*r)throw new n.SizeExceedsPaddingSizeError({size:Math.ceil(a.length/2),targetSize:r,type:"hex"});return`0x${a["right"===t?"padEnd":"padStart"](2*r,"0")}`}function a(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new n.SizeExceedsPaddingSizeError({size:e.length,targetSize:r,type:"bytes"});let i=new Uint8Array(r);for(let n=0;n<r;n++){let a="right"===t;i[a?n:r-n-1]=e[a?n:e.length-n-1]}return i}},3731:(e,t,r)=>{"use strict";var n,i=r(56059),a=r(81767),s=r(3048),o=r(82376),l=r(61438),c=r(33432),u=r(26274),d=r(18627),h=r(42242),p=r(89188),f=r(2076);r(6647),r(23833),r(9266),r(66803);var m=r(55284);r(83627);var g=r(46756);!function(e){e.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"}(n||(n={}));var y=r(63412);r(79909),r(39909),r(86921);var b=r(91392);let w=(0,b.AH)` 2 :host > wui-flex { 3 display: flex; 4 justify-content: center; 5 align-items: center; 6 position: relative; 7 width: 40px; 8 height: 40px; 9 box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.core.glass010}; 10 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 11 } 12 13 :host([data-no-images='true']) > wui-flex { 14 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 15 border-radius: ${({borderRadius:e})=>e[3]} !important; 16 } 17 18 :host > wui-flex wui-image { 19 display: block; 20 } 21 22 :host > wui-flex, 23 :host > wui-flex wui-image, 24 .swap-images-container, 25 .swap-images-container.nft, 26 wui-image.nft { 27 border-top-left-radius: var(--local-left-border-radius); 28 border-top-right-radius: var(--local-right-border-radius); 29 border-bottom-left-radius: var(--local-left-border-radius); 30 border-bottom-right-radius: var(--local-right-border-radius); 31 } 32 33 .swap-images-container { 34 position: relative; 35 width: 40px; 36 height: 40px; 37 overflow: hidden; 38 } 39 40 .swap-images-container wui-image:first-child { 41 position: absolute; 42 width: 40px; 43 height: 40px; 44 top: 0; 45 left: 0%; 46 clip-path: inset(0px calc(50% + 2px) 0px 0%); 47 } 48 49 .swap-images-container wui-image:last-child { 50 clip-path: inset(0px 0px 0px calc(50% + 2px)); 51 } 52 53 .swap-fallback-container { 54 position: absolute; 55 inset: 0; 56 width: 40px; 57 height: 40px; 58 display: flex; 59 align-items: center; 60 justify-content: center; 61 } 62 63 .swap-fallback-container.first { 64 clip-path: inset(0px calc(50% + 2px) 0px 0%); 65 } 66 67 .swap-fallback-container.last { 68 clip-path: inset(0px 0px 0px calc(50% + 2px)); 69 } 70 71 wui-flex.status-box { 72 position: absolute; 73 right: 0; 74 bottom: 0; 75 transform: translate(20%, 20%); 76 border-radius: ${({borderRadius:e})=>e[4]}; 77 background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; 78 box-shadow: 0 0 0 2px ${({tokens:e})=>e.theme.backgroundPrimary}; 79 overflow: hidden; 80 width: 16px; 81 height: 16px; 82 } 83`;var v=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let E=class extends i.WF{constructor(){super(...arguments),this.images=[],this.secondImage={type:void 0,url:""},this.failedImageUrls=new Set}handleImageError(e){return t=>{t.stopPropagation(),this.failedImageUrls.add(e),this.requestUpdate()}}render(){let[e,t]=this.images;this.images.length||(this.dataset.noImages="true");let r=e?.type==="NFT",n=t?.url?"NFT"===t.type:r;return this.style.cssText=` 84 --local-left-border-radius: ${r?"var(--apkt-borderRadius-3)":"var(--apkt-borderRadius-5)"}; 85 --local-right-border-radius: ${n?"var(--apkt-borderRadius-3)":"var(--apkt-borderRadius-5)"}; 86 `,(0,i.qy)`<wui-flex> ${this.templateVisual()} ${this.templateIcon()} </wui-flex>`}templateVisual(){let[e,t]=this.images;return 2===this.images.length&&(e?.url||t?.url)?this.renderSwapImages(e,t):e?.url&&!this.failedImageUrls.has(e.url)?this.renderSingleImage(e):e?.type==="NFT"?this.renderPlaceholderIcon("nftPlaceholder"):this.renderPlaceholderIcon("coinPlaceholder")}renderSwapImages(e,t){return(0,i.qy)`<div class="swap-images-container"> 87 ${e?.url?this.renderImageOrFallback(e,"first",!0):null} 88 ${t?.url?this.renderImageOrFallback(t,"last",!0):null} 89 </div>`}renderSingleImage(e){return this.renderImageOrFallback(e,void 0,!1)}renderImageOrFallback(e,t,r=!1){return e.url?this.failedImageUrls.has(e.url)?r&&t?this.renderFallbackIconInContainer(t):this.renderFallbackIcon():(0,i.qy)`<wui-image 90 src=${e.url} 91 alt="Transaction image" 92 @onLoadError=${this.handleImageError(e.url)} 93 ></wui-image>`:null}renderFallbackIconInContainer(e){return(0,i.qy)`<div class="swap-fallback-container ${e}">${this.renderFallbackIcon()}</div>`}renderFallbackIcon(){return(0,i.qy)`<wui-icon 94 size="xl" 95 weight="regular" 96 color="default" 97 name="networkPlaceholder" 98 ></wui-icon>`}renderPlaceholderIcon(e){return(0,i.qy)`<wui-icon size="xl" weight="regular" color="default" name=${e}></wui-icon>`}templateIcon(){let e,t="accent-primary";return(e=this.getIcon(),this.status&&(t=this.getStatusColor()),e)?(0,i.qy)` 99 <wui-flex alignItems="center" justifyContent="center" class="status-box"> 100 <wui-icon-box size="sm" color=${t} icon=${e}></wui-icon-box> 101 </wui-flex> 102 `:null}getDirectionIcon(){switch(this.direction){case"in":return"arrowBottom";case"out":return"arrowTop";default:return}}getIcon(){return this.onlyDirectionIcon?this.getDirectionIcon():"trade"===this.type?"swapHorizontal":"approve"===this.type?"checkmark":"cancel"===this.type?"close":this.getDirectionIcon()}getStatusColor(){switch(this.status){case"confirmed":return"success";case"failed":return"error";
102case"pending":return"inverse";default:return"accent-primary"}}};E.styles=[w],v([(0,a.MZ)()],E.prototype,"type",void 0),v([(0,a.MZ)()],E.prototype,"status",void 0),v([(0,a.MZ)()],E.prototype,"direction",void 0),v([(0,a.MZ)({type:Boolean})],E.prototype,"onlyDirectionIcon",void 0),v([(0,a.MZ)({type:Array})],E.prototype,"images",void 0),v([(0,a.MZ)({type:Object})],E.prototype,"secondImage",void 0),v([(0,a.wk)()],E.prototype,"failedImageUrls",void 0),E=v([(0,y.E)("wui-transaction-visual")],E);let C=(0,b.AH)` 103 :host { 104 width: 100%; 105 } 106 107 :host > wui-flex:first-child { 108 align-items: center; 109 column-gap: ${({spacing:e})=>e[2]}; 110 padding: ${({spacing:e})=>e[1]} ${({spacing:e})=>e[2]}; 111 width: 100%; 112 } 113 114 :host > wui-flex:first-child wui-text:nth-child(1) { 115 text-transform: capitalize; 116 } 117 118 wui-transaction-visual { 119 width: 40px; 120 height: 40px; 121 } 122 123 wui-flex { 124 flex: 1; 125 } 126 127 :host wui-flex wui-flex { 128 overflow: hidden; 129 } 130 131 :host .description-container wui-text span { 132 word-break: break-all; 133 } 134 135 :host .description-container wui-text { 136 overflow: hidden; 137 } 138 139 :host .description-separator-icon { 140 margin: 0px 6px; 141 } 142 143 :host wui-text > span { 144 overflow: hidden; 145 display: -webkit-box; 146 -webkit-box-orient: vertical; 147 -webkit-line-clamp: 1; 148 } 149`;var A=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let x=class extends i.WF{constructor(){super(...arguments),this.type="approve",this.onlyDirectionIcon=!1,this.images=[]}render(){return(0,i.qy)` 150 <wui-flex> 151 <wui-transaction-visual 152 .status=${this.status} 153 direction=${(0,m.J)(this.direction)} 154 type=${this.type} 155 .onlyDirectionIcon=${this.onlyDirectionIcon} 156 .images=${this.images} 157 ></wui-transaction-visual> 158 <wui-flex flexDirection="column" gap="1"> 159 <wui-text variant="lg-medium" color="primary"> 160 ${n[this.type]||this.type} 161 </wui-text> 162 <wui-flex class="description-container"> 163 ${this.templateDescription()} ${this.templateSecondDescription()} 164 </wui-flex> 165 </wui-flex> 166 <wui-text variant="sm-medium" color="secondary"><span>${this.date}</span></wui-text> 167 </wui-flex> 168 `}templateDescription(){let e=this.descriptions?.[0];return e?(0,i.qy)` 169 <wui-text variant="md-regular" color="secondary"> 170 <span>${e}</span> 171 </wui-text> 172 `:null}templateSecondDescription(){let e=this.descriptions?.[1];return e?(0,i.qy)` 173 <wui-icon class="description-separator-icon" size="sm" name="arrowRight"></wui-icon> 174 <wui-text variant="md-regular" color="secondary"> 175 <span>${e}</span> 176 </wui-text> 177 `:null}};x.styles=[g.W5,C],A([(0,a.MZ)()],x.prototype,"type",void 0),A([(0,a.MZ)({type:Array})],x.prototype,"descriptions",void 0),A([(0,a.MZ)()],x.prototype,"date",void 0),A([(0,a.MZ)({type:Boolean})],x.prototype,"onlyDirectionIcon",void 0),A([(0,a.MZ)()],x.prototype,"status",void 0),A([(0,a.MZ)()],x.prototype,"direction",void 0),A([(0,a.MZ)({type:Array})],x.prototype,"images",void 0),x=A([(0,y.E)("wui-transaction-list-item")],x),r(52131),r(6077);let I=(0,b.AH)` 178 wui-flex { 179 position: relative; 180 display: inline-flex; 181 justify-content: center; 182 align-items: center; 183 } 184 185 wui-image { 186 border-radius: ${({borderRadius:e})=>e[128]}; 187 } 188 189 .fallback-icon { 190 color: ${({tokens:e})=>e.theme.iconInverse}; 191 border-radius: ${({borderRadius:e})=>e[3]}; 192 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 193 } 194 195 .direction-icon, 196 .status-image { 197 position: absolute; 198 right: 0; 199 bottom: 0; 200 border-radius: ${({borderRadius:e})=>e[128]}; 201 border: 2px solid ${({tokens:e})=>e.theme.backgroundPrimary}; 202 } 203 204 .direction-icon { 205 padding: ${({spacing:e})=>e["01"]}; 206 color: ${({tokens:e})=>e.core.iconSuccess}; 207 208 background-color: color-mix( 209 in srgb, 210 ${({tokens:e})=>e.core.textSuccess} 30%, 211 ${({tokens:e})=>e.theme.backgroundPrimary} 70% 212 ); 213 } 214 215 /* -- Sizes --------------------------------------------------- */ 216 :host([data-size='sm']) > wui-image:not(.status-image), 217 :host([data-size='sm']) > wui-flex { 218 width: 24px; 219 height: 24px; 220 } 221 222 :host([data-size='lg']) > wui-image:not(.status-image), 223 :host([data-size='lg']) > wui-flex { 224 width: 40px; 225 height: 40px; 226 } 227 228 :host([data-size='sm']) .fallback-icon { 229 height: 16px; 230 width: 16px; 231 padding: ${({spacing:e})=>e[1]}; 232 } 233 234 :host([data-size='lg']) .fallback-icon { 235 height: 32px; 236 width: 32px; 237 padding: ${({spacing:e})=>e[1]}; 238 } 239 240 :host([data-size='sm']) .direction-icon, 241 :host([data-size='sm']) .status-image { 242 transform: translate(40%, 30%); 243 } 244 245 :host([data-size='lg']) .direction-icon, 246 :host([data-size='lg']) .status-image { 247 transform: translate(40%, 10%); 248 } 249 250 :host([data-size='sm']) .status-image { 251 height: 14px; 252 width: 14px; 253 } 254 255 :host([data-size='lg']) .status-image { 256 height: 20px;
257 width: 20px; 258 } 259 260 /* -- Crop effects --------------------------------------------------- */ 261 .swap-crop-left-image, 262 .swap-crop-right-image { 263 position: absolute; 264 top: 0; 265 bottom: 0; 266 } 267 268 .swap-crop-left-image { 269 left: 0; 270 clip-path: inset(0px calc(50% + 1.5px) 0px 0%); 271 } 272 273 .swap-crop-right-image { 274 right: 0; 275 clip-path: inset(0px 0px 0px calc(50% + 1.5px)); 276 } 277`;var S=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let T={sm:"xxs",lg:"md"},P=class extends i.WF{constructor(){super(...arguments),this.type="approve",this.size="lg",this.statusImageUrl="",this.images=[]}render(){return(0,i.qy)`<wui-flex>${this.templateVisual()} ${this.templateIcon()}</wui-flex>`}templateVisual(){switch(this.dataset.size=this.size,this.type){case"trade":return this.swapTemplate();case"fiat":return this.fiatTemplate();case"unknown":return this.unknownTemplate();default:return this.tokenTemplate()}}swapTemplate(){let[e,t]=this.images;return 2===this.images.length&&(e||t)?(0,i.qy)` 278 <wui-image class="swap-crop-left-image" src=${e} alt="Swap image"></wui-image> 279 <wui-image class="swap-crop-right-image" src=${t} alt="Swap image"></wui-image> 280 `:e?(0,i.qy)`<wui-image src=${e} alt="Swap image"></wui-image>`:null}fiatTemplate(){return(0,i.qy)`<wui-icon 281 class="fallback-icon" 282 size=${T[this.size]} 283 name="dollar" 284 ></wui-icon>`}unknownTemplate(){return(0,i.qy)`<wui-icon 285 class="fallback-icon" 286 size=${T[this.size]} 287 name="questionMark" 288 ></wui-icon>`}tokenTemplate(){let[e]=this.images;return e?(0,i.qy)`<wui-image src=${e} alt="Token image"></wui-image> `:(0,i.qy)`<wui-icon 289 class="fallback-icon" 290 name=${"nft"===this.type?"image":"coinPlaceholder"} 291 ></wui-icon>`}templateIcon(){return this.statusImageUrl?(0,i.qy)`<wui-image 292 class="status-image" 293 src=${this.statusImageUrl} 294 alt="Status image" 295 ></wui-image>`:(0,i.qy)`<wui-icon 296 class="direction-icon" 297 size=${T[this.size]} 298 name=${this.getTemplateIcon()} 299 ></wui-icon>`}getTemplateIcon(){return"trade"===this.type?"arrowClockWise":"arrowBottom"}};P.styles=[I],S([(0,a.MZ)()],P.prototype,"type",void 0),S([(0,a.MZ)()],P.prototype,"size",void 0),S([(0,a.MZ)()],P.prototype,"statusImageUrl",void 0),S([(0,a.MZ)({type:Array})],P.prototype,"images",void 0),P=S([(0,y.E)("wui-transaction-thumbnail")],P);let O=(0,b.AH)` 300 :host > wui-flex:first-child { 301 gap: ${({spacing:e})=>e[2]}; 302 padding: ${({spacing:e})=>e[3]}; 303 width: 100%; 304 } 305 306 wui-flex { 307 display: flex; 308 flex: 1; 309 } 310`,_=class extends i.WF{render(){return(0,i.qy)` 311 <wui-flex alignItems="center" .padding=${["1","2","1","2"]}> 312 <wui-shimmer width="40px" height="40px" rounded></wui-shimmer> 313 <wui-flex flexDirection="column" gap="1"> 314 <wui-shimmer width="124px" height="16px" rounded></wui-shimmer> 315 <wui-shimmer width="60px" height="14px" rounded></wui-shimmer> 316 </wui-flex> 317 <wui-shimmer width="24px" height="12px" rounded></wui-shimmer> 318 </wui-flex> 319 `}};_.styles=[g.W5,O],_=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}([(0,y.E)("wui-transaction-list-item-loader")],_);var N=r(47482);let k=(0,f.AH)` 320 :host { 321 min-height: 100%; 322 } 323 324 .group-container[last-group='true'] { 325 padding-bottom: ${({spacing:e})=>e["3"]}; 326 } 327 328 .contentContainer { 329 height: 280px; 330 } 331 332 .contentContainer > wui-icon-box { 333 width: 40px; 334 height: 40px; 335 border-radius: ${({borderRadius:e})=>e["3"]}; 336 } 337 338 .contentContainer > .textContent { 339 width: 65%; 340 } 341 342 .emptyContainer { 343 height: 100%; 344 } 345`;var R=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let M="last-transaction",B=class extends i.WF{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.page="activity",this.caipAddress=o.W.state.activeCaipAddress,this.transactionsByYear=l.W.state.transactionsByYear,this.loading=l.W.state.loading,this.empty=l.W.state.empty,this.next=l.W.state.next,l.W.clearCursor(
345),this.unsubscribe.push(o.W.subscribeKey("activeCaipAddress",e=>{e&&this.caipAddress!==e&&(l.W.resetTransactions(),l.W.fetchTransactions(e)),this.caipAddress=e}),o.W.subscribeKey("activeCaipNetwork",()=>{this.updateTransactionView()}),l.W.subscribe(e=>{this.transactionsByYear=e.transactionsByYear,this.loading=e.loading,this.empty=e.empty,this.next=e.next}))}firstUpdated(){this.updateTransactionView(),this.createPaginationObserver()}updated(){this.setPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,i.qy)` ${this.empty?null:this.templateTransactionsByYear()} 346 ${this.loading?this.templateLoading():null} 347 ${!this.loading&&this.empty?this.templateEmpty():null}`}updateTransactionView(){l.W.resetTransactions(),this.caipAddress&&l.W.fetchTransactions(c.w.getPlainAddress(this.caipAddress))}templateTransactionsByYear(){return Object.keys(this.transactionsByYear).sort().reverse().map(e=>{let t=parseInt(e,10),r=Array(12).fill(null).map((e,r)=>({groupTitle:f.tt.getTransactionGroupTitle(t,r),transactions:this.transactionsByYear[t]?.[r]})).filter(({transactions:e})=>e).reverse();return r.map(({groupTitle:e,transactions:t},n)=>{let a=n===r.length-1;return t?(0,i.qy)` 348 <wui-flex 349 flexDirection="column" 350 class="group-container" 351 last-group="${a?"true":"false"}" 352 data-testid="month-indexes" 353 > 354 <wui-flex 355 alignItems="center" 356 flexDirection="row" 357 .padding=${["2","3","3","3"]} 358 > 359 <wui-text variant="md-medium" color="secondary" data-testid="group-title"> 360 ${e} 361 </wui-text> 362 </wui-flex> 363 <wui-flex flexDirection="column" gap="2"> 364 ${this.templateTransactions(t,a)} 365 </wui-flex> 366 </wui-flex> 367 `:null})})}templateRenderTransaction(e,t){let{date:r,descriptions:n,direction:a,images:s,status:o,type:l,transfers:c,isAllNFT:u}=this.getTransactionListItemProps(e);return(0,i.qy)` 368 <wui-transaction-list-item 369 date=${r} 370 .direction=${a} 371 id=${t&&this.next?M:""} 372 status=${o} 373 type=${l} 374 .images=${s} 375 .onlyDirectionIcon=${u||1===c.length} 376 .descriptions=${n} 377 ></wui-transaction-list-item> 378 `}templateTransactions(e,t){return e.map((r,n)=>{let a=t&&n===e.length-1;return(0,i.qy)`${this.templateRenderTransaction(r,a)}`})}emptyStateActivity(){return(0,i.qy)`<wui-flex 379 class="emptyContainer" 380 flexGrow="1" 381 flexDirection="column" 382 justifyContent="center" 383 alignItems="center" 384 .padding=${["10","5","10","5"]} 385 gap="5" 386 data-testid="empty-activity-state" 387 > 388 <wui-icon-box color="default" icon="wallet" size="xl"></wui-icon-box> 389 <wui-flex flexDirection="column" alignItems="center" gap="2"> 390 <wui-text align="center" variant="lg-medium" color="primary">No Transactions yet</wui-text> 391 <wui-text align="center" variant="lg-regular" color="secondary" 392 >Start trading on dApps <br /> 393 to grow your wallet!</wui-text 394 > 395 </wui-flex> 396 </wui-flex>`}emptyStateAccount(){return(0,i.qy)`<wui-flex 397 class="contentContainer" 398 alignItems="center" 399 justifyContent="center" 400 flexDirection="column" 401 gap="4" 402 data-testid="empty-account-state" 403 > 404 <wui-icon-box icon="swapHorizontal" size="lg" color="default"></wui-icon-box> 405 <wui-flex 406 class="textContent" 407 gap="2" 408 flexDirection="column" 409 justifyContent="center" 410 flexDirection="column" 411 > 412 <wui-text variant="md-regular" align="center" color="primary">No activity yet</wui-text> 413 <wui-text variant="sm-regular" align="center" color="secondary" 414 >Your next transactions will appear here</wui-text 415 > 416 </wui-flex> 417 <wui-link @click=${this.onReceiveClick.bind(this)}>Trade</wui-link> 418 </wui-flex>`}templateEmpty(){return"account"===this.page?(0,i.qy)`${this.emptyStateAccount()}`:(0,i.qy)`${this.emptyStateActivity()}`}templateLoading(){return"activity"===this.page?(0,i.qy)` <wui-flex flexDirection="column" width="100%"> 419 <wui-flex .padding=${["2","3","3","3"]}>
420 <wui-shimmer width="70px" height="16px" rounded></wui-shimmer> 421 </wui-flex> 422 <wui-flex flexDirection="column" gap="2" width="100%"> 423 ${Array(7).fill((0,i.qy)` <wui-transaction-list-item-loader></wui-transaction-list-item-loader> `).map(e=>e)} 424 </wui-flex> 425 </wui-flex>`:null}onReceiveClick(){u.I.push("WalletReceive")}createPaginationObserver(){let{projectId:e}=d.H.state;this.paginationObserver=new IntersectionObserver(([t])=>{t?.isIntersecting&&!this.loading&&(l.W.fetchTransactions(c.w.getPlainAddress(this.caipAddress)),h.E.sendEvent({type:"track",event:"LOAD_MORE_TRANSACTIONS",properties:{address:c.w.getPlainAddress(this.caipAddress),projectId:e,cursor:this.next,isSmartAccount:(0,p.lj)(o.W.state.activeChain)===N.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}))},{}),this.setPaginationObserver()}setPaginationObserver(){this.paginationObserver?.disconnect();let e=this.shadowRoot?.querySelector(`#${M}`);e&&this.paginationObserver?.observe(e)}getTransactionListItemProps(e){let t=s.r.formatDate(e?.metadata?.minedAt),r=f.tt.mergeTransfers(e?.transfers||[]),n=f.tt.getTransactionDescriptions(e,r),i=r?.[0],a=!!i&&r?.every(e=>!!e.nft_info),o=f.tt.getTransactionImages(r);return{date:t,direction:i?.direction,descriptions:n,isAllNFT:a,images:o,status:e.metadata?.status,transfers:r,type:e.metadata?.operationType}}};B.styles=k,R([(0,a.MZ)()],B.prototype,"page",void 0),R([(0,a.wk)()],B.prototype,"caipAddress",void 0),R([(0,a.wk)()],B.prototype,"transactionsByYear",void 0),R([(0,a.wk)()],B.prototype,"loading",void 0),R([(0,a.wk)()],B.prototype,"empty",void 0),R([(0,a.wk)()],B.prototype,"next",void 0),B=R([(0,f.EM)("w3m-activity-list")],B)},3733:(e,t,r)=>{"use strict";r.d(t,{u:()=>n});let n="standard:connect"},3770:(e,t,r)=>{"use strict";r.d(t,{X:()=>h}),r(49135);var n=r(57873),i=r(43850),a=r(89188),s=r(33432),o=r(57217),l=r(82376),c=r(32590),u=r(79482);let d=[n.o.CONNECTOR_ID.AUTH,n.o.CONNECTOR_ID.WALLET_CONNECT];class h{constructor(e){this.availableConnectors=[],this.availableConnections=[],this.providerHandlers={},this.eventListeners=new Map,this.getCaipNetworks=e=>l.W.getCaipNetworks(e),this.getConnectorId=e=>c.a.getConnectorId(e),e&&this.construct(e)}construct(e){this.projectId=e.projectId,this.namespace=e.namespace,this.adapterType=e.adapterType}get connectors(){return this.availableConnectors}get connections(){return this.availableConnections}get networks(){return this.getCaipNetworks(this.namespace)}onAuthConnected({accounts:e,chainId:t}){let r=this.getCaipNetworks().filter(e=>e.chainNamespace===this.namespace).find(e=>e.id.toString()===t?.toString());e&&r&&this.addConnection({connectorId:n.o.CONNECTOR_ID.AUTH,accounts:e,caipNetwork:r})}setAuthProvider(e){e.onConnect(this.onAuthConnected.bind(this)),e.onSocialConnected(this.onAuthConnected.bind(this)),this.addConnector({id:n.o.CONNECTOR_ID.AUTH,type:"AUTH",name:n.o.CONNECTOR_NAMES.AUTH,provider:e,imageId:void 0,chain:this.namespace,chains:[]})}addConnector(...e){let t=new Set;this.availableConnectors=[...e,...this.availableConnectors].filter(e=>!t.has(e.id)&&(t.add(e.id),!0)),this.emit("connectors",this.availableConnectors)}addConnection(...e){let t=new Set;this.availableConnections=[...e,...this.availableConnections].filter(e=>!t.has(e.connectorId.toLowerCase())&&(t.add(e.connectorId.toLowerCase()),!0)),this.emit("connections",this.availableConnections)}deleteConnection(e){this.availableConnections=this.availableConnections.filter(t=>t.connectorId.toLowerCase()!==e.toLowerCase()),this.emit("connections",this.availableConnections)}clearConnections(e=!1){this.availableConnections=[],e&&this.emit("connections",this.availableConnections)}setStatus(e,t){l.W.setAccountProp("status",e,t)}on(e,t){this.eventListeners.has(e)||this.eventListeners.set(e,new Set),this.eventListeners.get(e)?.add(t)}off(e,t){let r=this.eventListeners.get(e);r&&r.delete(t)}removeAllEventListeners(){this.eventListeners.forEach(e=>{e.clear()})}emit(e,t){let r=this.eventListeners.get(e);r&&r.forEach(e=>e(t))}async connectWalletConnect(e){try{let e=this.getWalletConnectConnector();return{clientId:(await e.connectWalletConnect()).clientId}}catch(e){if(o.k.isUserRejectedRequestError(e))throw new i.vx(e);throw e}}async switchNetwork(e){let{caipNetwork:t}=e,r=u.G.getProviderId(t.chainNamespace),n=u.G.getProvider(t.chainNamespace);if(!n)throw Error("Provider not found");if("WALLET_CONNECT"===r)return void n.setDefaultChain(t.caipNetworkId);if("AUTH"===r){let e=c.a.getAuthConnector()?.provider;if(!e)throw Error("Auth provider not found");let r=(0,a.lj)(t.chainNamespace);await e.switchNetwork({chainId:t.caipNetworkId});let n=await e.getUser({chainId:t.caipNetworkId,preferredAccountType:r});
425this.emit("switchNetwork",n)}}getWalletConnectConnector(){let e=this.connectors.find(e=>"walletConnect"===e.id);if(!e)throw Error("WalletConnectConnector not found");return e}onConnect(e,t){if(e.length>0){let{address:r,chainId:n}=s.w.getAccount(e[0]),i=this.getCaipNetworks().filter(e=>e.chainNamespace===this.namespace).find(e=>e.id.toString()===n?.toString()),a=this.connectors.find(e=>e.id===t);r&&(this.emit("accountChanged",{address:r,chainId:n,connector:a}),this.addConnection({connectorId:t,accounts:e.map(e=>{let{address:t}=s.w.getAccount(e);return{address:t}}),caipNetwork:i}))}}onAccountsChanged(e,t,r=!0){if(e.length>0){let{address:r}=s.w.getAccount(e[0]),i=this.getConnection({connectorId:t,connections:this.connections,connectors:this.connectors});r&&this.getConnectorId(n.o.CHAIN.EVM)?.toLowerCase()===t.toLowerCase()&&this.emit("accountChanged",{address:r,chainId:i?.caipNetwork?.id,connector:i?.connector}),this.addConnection({connectorId:t,accounts:e.map(e=>{let{address:t}=s.w.getAccount(e);return{address:t}}),caipNetwork:i?.caipNetwork})}else r&&this.onDisconnect(t)}onDisconnect(e){this.removeProviderListeners(e),this.deleteConnection(e),this.getConnectorId(n.o.CHAIN.EVM)?.toLowerCase()===e.toLowerCase()&&this.emitFirstAvailableConnection(),0===this.connections.length&&this.emit("disconnect")}onChainChanged(e,t){let r="string"==typeof e&&e.startsWith("0x")?parseInt(e,16).toString():e.toString(),i=this.getConnection({connectorId:t,connections:this.connections,connectors:this.connectors}),a=this.getCaipNetworks().filter(e=>e.chainNamespace===this.namespace).find(e=>e.id.toString()===r);i&&this.addConnection({connectorId:t,accounts:i.accounts,caipNetwork:a}),this.getConnectorId(n.o.CHAIN.EVM)?.toLowerCase()===t.toLowerCase()&&this.emit("switchNetwork",{chainId:r})}listenProviderEvents(e,t){if(d.includes(e))return;let r=t=>this.onAccountsChanged(t,e),n=t=>this.onChainChanged(t,e),i=()=>this.onDisconnect(e);this.providerHandlers[e]||(t.on("disconnect",i),t.on("accountsChanged",r),t.on("chainChanged",n),this.providerHandlers[e]={provider:t,disconnect:i,accountsChanged:r,chainChanged:n})}removeProviderListeners(e){if(this.providerHandlers[e]){let{provider:t,disconnect:r,accountsChanged:n,chainChanged:i}=this.providerHandlers[e];t.removeListener("disconnect",r),t.removeListener("accountsChanged",n),t.removeListener("chainChanged",i),this.providerHandlers[e]=null}}emitFirstAvailableConnection(){let e=this.getConnection({connections:this.connections,connectors:this.connectors});if(e){let[t]=e.accounts;this.emit("accountChanged",{address:t?.address,chainId:e.caipNetwork?.id,connector:e.connector})}}getConnection({address:e,connectorId:t,connections:r,connectors:n}){if(t){let i=r.find(e=>e.connectorId.toLowerCase()===t.toLowerCase());if(!i)return null;let a=n.find(e=>e.id.toLowerCase()===i.connectorId.toLowerCase()),s=e?i.accounts.find(t=>t.address.toLowerCase()===e.toLowerCase()):i.accounts[0];return{...i,account:s,connector:a}}let i=r.find(e=>e.accounts.length>0&&n.some(t=>t.id.toLowerCase()===e.connectorId.toLowerCase()));if(i){let[e]=i.accounts,t=n.find(e=>e.id.toLowerCase()===i.connectorId.toLowerCase());return{...i,account:e,connector:t}}return null}}},3797:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isErc8010Signature=function(e){return n.SignatureErc8010.validate(e)};let n=r(59104)},4075:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.http=function(e,t={}){let{batch:r,fetchFn:u,fetchOptions:d,key:h="http",maxResponseBodySize:p,methods:f,name:m="HTTP JSON-RPC",onFetchRequest:g,onFetchResponse:y,retryDelay:b,raw:w}=t;return({chain:v,retryCount:E,timeout:C})=>{let{batchSize:A=1e3,wait:x=0}="object"==typeof r?r:{},I=t.retryCount??E,S=C??t.timeout??1e4,T=e||v?.rpcUrls.default.http[0];if(!T)throw new i.UrlRequiredError;let P=(0,s.getHttpRpcClient)(T,{fetchFn:u,fetchOptions:d,maxResponseBodySize:p,onRequest:g,onResponse:y,timeout:S});return(0,o.createTransport)({key:h,methods:f,name:m,async request({method:e,params:t},i){let s={method:e,params:t},o=i?.signal?{signal:i.signal}:void 0,{schedule:u}=(0,a.createBatchScheduler)({id:`${T}.${function(e){if(!e)return"default";let t=c.get(e);if(void 0!==t)return t;let r=l++;return c.set(e,r),r}(i?.signal)}`,wait:x,shouldSplitBatch:e=>e.length>A,fn:e=>P.request({body:e,fetchOptions:o}),sort:(e,t)=>e.id-t.id}),d=async e=>r?u(e):[await P.request({body:e,fetchOptions:o})],[{error:h,result:p}]=await d(s);if(w)return{error:h,result:p};if(h)throw new n.RpcRequestError({body:s,error:h,url:T});return p},retryCount:I,retryDelay:b,timeout:S,type:"http"},{fetchOptions:d,url:T})}};let n=r(17208),i=r(50280),a=r(58856),s=r(11139),o=r(3603),l=0,c=new WeakMap},4200:(e,t,r)=>{"use strict";
425Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionCount=a;let n=r(73506),i=r(14972);async function a(e,{address:t,blockHash:r,blockNumber:a,blockTag:s="latest",requireCanonical:o}){let l=(0,n.formatBlockParameter)({blockHash:r,blockNumber:a,blockTag:s,requireCanonical:o}),c=await e.request({method:"eth_getTransactionCount",params:[t,l]},{dedupe:"bigint"==typeof a||void 0!==r});return(0,i.hexToNumber)(c)}},4319:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=function(e,t){let r=(0,n.keccak_256)((0,i.isHex)(e,{strict:!1})?(0,a.toBytes)(e):e);return"bytes"===(t||"hex")?r:(0,s.toHex)(r)};let n=r(83899),i=r(80217),a=r(60037),s=r(27083)},4466:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseEventLogs=function(e){let{abi:t,args:r,logs:c,strict:u=!0}=e,d=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})(),h=t.filter(e=>"event"===e.type).map(e=>({abi:e,selector:(0,o.toEventSelector)(e)}));return c.map(e=>{let t,o,c="string"==typeof e.blockNumber?(0,a.formatLog)(e):e,p=h.filter(e=>c.topics[0]===e.selector);if(0===p.length)return null;for(let e of p)try{t=(0,l.decodeEventLog)({...c,abi:[e.abi],strict:!0}),o=e;break}catch{}if(!t&&!u){o=p[0];try{t=(0,l.decodeEventLog)({data:c.data,topics:c.topics,abi:[o.abi],strict:!1})}catch{let e=o.abi.inputs?.some(e=>!("name"in e&&e.name));return{...c,args:e?[]:{},eventName:o.abi.name}}}return t&&o&&(!d||d.includes(t.eventName))&&function(e){let{args:t,inputs:r,matchArgs:a}=e;if(!a)return!0;if(!t)return!1;function o(e,t,r){try{if("address"===e.type)return(0,n.isAddressEqual)(t,r);if("string"===e.type||"bytes"===e.type)return(0,s.keccak256)((0,i.toBytes)(t))===r;return t===r}catch{return!1}}return Array.isArray(t)&&Array.isArray(a)?a.every((e,n)=>{if(null==e)return!0;let i=r[n];return!!i&&(Array.isArray(e)?e:[e]).some(e=>o(i,e,t[n]))}):!("object"!=typeof t||Array.isArray(t)||"object"!=typeof a||Array.isArray(a))&&Object.entries(a).every(([e,n])=>{if(null==n)return!0;let i=r.find(t=>t.name===e);return!!i&&(Array.isArray(n)?n:[n]).some(r=>o(i,r,t[e]))})}({args:t.args,inputs:o.abi.inputs,matchArgs:r})?{...t,...c}:null}).filter(Boolean)};let n=r(18978),i=r(60037),a=r(10205),s=r(4319),o=r(55954),l=r(44352)},4586:(e,t,r)=>{"use strict";r.d(t,{FK:()=>z,Pw:()=>K,Zp:()=>G,aX:()=>H,bp:()=>V,hc:()=>J});var n=r(56595),i=r(44582),a=r(10693),s=r(22890);function o(e){let t=new Set;return e.forEach(e=>t.add(e)),Object.freeze(t)}let l=o("external public payable override".split(" ")),c="constant external internal payable private public pure view override",u=o(c.split(" ")),d="constructor error event fallback function receive struct",h=o(d.split(" ")),p="calldata memory storage payable indexed",f=o(p.split(" ")),m=o([d,p,"tuple returns",c].join(" ").split(" ")),g={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},y=RegExp("^(\\s*)"),b=RegExp("^([0-9]+)"),w=RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),v=RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),E=RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class C{#e;#t;get offset(){return this.#e}get length(){return this.#t.length-this.#e}constructor(e){this.#e=0,this.#t=e.slice()}clone(){return new C(this.#t)}reset(){this.#e=0}#r(e=0,t=0){return new C(this.#t.slice(e,t).map(t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e}))))}popKeyword(e){let t=this.peek();if("KEYWORD"!==t.type||!e.has(t.text))throw Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){let t=this.peek();throw Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){let e=this.peek();if("OPEN_PAREN"!==e.type)throw Error("bad start");let t=this.#r(this.#e+1,e.match+1);return this.#e=e.match+1,t}popParams(){let e=this.peek();if("OPEN_PAREN"!==e.type)throw Error("bad start");let t=[];for(;this.#e<e.match-1;){let e=this.peek().linkNext;t.push(this.#r(this.#e+1,e)),this.#e=e}return this.#e=e.match+1,t}peek(){if(this.#e>=this.#t.length)throw Error("out-of-bounds");return this.#t[this.#e]}peekKeyword(e){let t=this.peekType("KEYWORD");return null!=t&&e.has(t)?t:null}peekType(e){if(0===this.length)return null;let t=this.peek();return t.type===e?t.text:null}pop(){let e=this.peek();return this.#e++,e}toString(){let e=[];for(let t=this.#e;t<this.#t.length;t++){let r=this.#t[t];e.push(`${r.type}:${r.text}`)}return`<TokenString ${e.join(" ")}>`}}function A(e){let t=[],r=t=>{let r=s<e.length?JSON.stringify(e[s]):"$EOI";throw Error(`invalid token ${r} at ${s}: ${t}`)},i=[],a=[],s=0;for(;s<e.length;){let o=e.substring(s),l=o.match(y);l&&(s+=l[1].length,o=e.substring(s));let c={depth:i.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:s,value:-1};t.push(c);let u=g[o[0]]||"";if(u){if(c.type=u,c.text=o[0],s++,"OPEN_PAREN"===u)i.push(t.length-1),a.push(t.length-1);else if("CLOSE_PAREN"==u)0===i.length&&r("no matching open bracket"),c.match=i.pop(),t[c.match].match=t.length-1,c.depth--,c.linkBack=a.pop(),t[c.linkBack].linkNext=t.length-1;else if("COMMA"===u)c.linkBack=a.pop(),t[c.linkBack].linkNext=t.length-1,a.push(t.length-1);else if("OPEN_BRACKET"===u)c.type="BRACKET";else if("CLOSE_BRACKET"===u){let e=t.pop().text;if(t.length>0&&"NUMBER"===t[t.length-1].type){let r=t.pop().text;e=r+e,t[t.length-1].value=(0,n.WZ)(r)}if(0===t.length||"BRACKET"!==t[t.length-1].type)throw Error("missing opening bracket");t[t.length-1].text+=e}continue}if(l=o.match(w)){if(c.text=l[1],s+=c.text.length,m.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(E)){c.type="TYPE";continue}c.type="ID";continue}if(l=o.match(b)){c.text=l[1],c.type="NUMBER",s+=c.text.length;continue}throw Error(`unexpected token ${JSON.stringify(o[0])} at position ${s}`)}return new C(t.map(e=>Object.freeze(e)))}function x(e,t){let r=[];for(let n in t.keys())e.has(n)&&r.push(n);if(r.length>1)throw Error(`conflicting types: ${r.join(", ")}`)}function I(e,t){if(t.peekKeyword(h)){let r=t.pop().text;if(r!==e)throw Error(`expected ${e}, got ${r}`)}return t.popType("ID")}function S(e,t){let r=new Set;for(;;){let n=e.peekType("KEYWORD");if(null==n||t&&!t.has(n))break;if(e.pop(),r.has(n))throw Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function T(e){let t=S(e,u);return(x(t,o("constant payable nonpayable".split(" "))),x(t,o("pure view payable nonpayable".split(" "))),t.has("view"))?"view":t.has("pure")?"pure":t.has("payable")?"payable":t.has("nonpayable")?"nonpayable":t.has("constant")?"view":"nonpayable"}function P(e,t){return e.popParams().map(e=>H.from(e,t))}
425function O(e){if(e.peekType("AT")){if(e.pop(),e.peekType("NUMBER"))return(0,n.Ab)(e.pop().text);throw Error("invalid gas")}return null}function _(e){if(e.length)throw Error(`unexpected tokens at offset ${e.offset}: ${e.toString()}`)}let N=new RegExp(/^(.*)\[([0-9]*)\]$/);function k(e){let t=e.match(E);if((0,i.MR)(t,"invalid type","type",e),"uint"===e)return"uint256";if("int"===e)return"int256";if(t[2]){let r=parseInt(t[2]);(0,i.MR)(0!==r&&r<=32,"invalid bytes length","type",e)}else if(t[3]){let r=parseInt(t[3]);(0,i.MR)(0!==r&&r<=256&&r%8==0,"invalid numeric width","type",e)}return e}let R={},M=Symbol.for("_ethers_internal"),B="_ParamTypeInternal",j="_ErrorInternal",U="_EventInternal",$="_ConstructorInternal",L="_FallbackInternal",D="_FunctionInternal",F="_StructInternal";class H{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,r,n,s,o,l,c){if((0,i.gk)(e,R,"ParamType"),Object.defineProperty(this,M,{value:B}),o&&(o=Object.freeze(o.slice())),"array"===n){if(null==l||null==c)throw Error("")}else if(null!=l||null!=c)throw Error("");if("tuple"===n){if(null==o)throw Error("")}else if(null!=o)throw Error("");(0,a.n)(this,{name:t,type:r,baseType:n,indexed:s,components:o,arrayLength:l,arrayChildren:c})}format(e){if(null==e&&(e="sighash"),"json"===e){let t=this.name||"";if(this.isArray()){let e=JSON.parse(this.arrayChildren.format("json"));return e.name=t,e.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(e)}let r={type:"tuple"===this.baseType?"tuple":this.type,name:t};return"boolean"==typeof this.indexed&&(r.indexed=this.indexed),this.isTuple()&&(r.components=this.components.map(t=>JSON.parse(t.format(e)))),JSON.stringify(r)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?t+="("+this.components.map(t=>t.format(e)).join("full"===e?", ":",")+")":t+=this.type,"sighash"!==e&&(!0===this.indexed&&(t+=" indexed"),"full"===e&&this.name&&(t+=" "+this.name)),t}isArray(){return"array"===this.baseType}isTuple(){return"tuple"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw Error("invalid array value");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw Error("array is wrong length");let r=this;return e.map(e=>r.arrayChildren.walk(e,t))}if(this.isTuple()){if(!Array.isArray(e))throw Error("invalid tuple value");if(e.length!==this.components.length)throw Error("array is wrong length");let r=this;return e.map((e,n)=>r.components[n].walk(e,t))}return t(this.type,e)}#n(e,t,r,n){if(this.isArray()){if(!Array.isArray(t))throw Error("invalid array value");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw Error("array is wrong length");let i=this.arrayChildren,a=t.slice();a.forEach((t,n)=>{i.#n(e,t,r,e=>{a[n]=e})}),n(a);return}if(this.isTuple()){let i,a=this.components;if(Array.isArray(t))i=t.slice();else{if(null==t||"object"!=typeof t)throw Error("invalid tuple value");i=a.map(e=>{if(!e.name)throw Error("cannot use object value with unnamed components");if(!(e.name in t))throw Error(`missing value for component ${e.name}`);return t[e.name]})}if(i.length!==this.components.length)throw Error("array is wrong length");i.forEach((t,n)=>{a[n].#n(e,t,r,e=>{i[n]=e})}),n(i);return}let i=r(this.type,t);i.then?e.push(async function(){n(await i)}()):n(i)}async walkAsync(e,t){let r=[],n=[e];return this.#n(r,e,t,e=>{n[0]=e}),r.length&&await Promise.all(r),n[0]}static from(e,t){if(H.isParamType(e))return e;if("string"==typeof e)try{return H.from(A(e),t)}catch(t){(0,i.MR)(!1,"invalid param type","obj",e)}else if(e instanceof C){let r="",n="",i=null;S(e,o(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(n="tuple",i=e.popParams().map(e=>H.from(e)),r=`tuple(${i.map(e=>e.format()).join(",")})`):n=r=k(e.popType("TYPE"));let a=null,s=null;for(;e.length&&e.peekType("BRACKET");){let t=e.pop();a=new H(R,"",r,n,null,i,s,a),s=t.value,r+=t.text,n="array",i=null}let l=null;if(S(e,f).has("indexed")){if(!t)throw Error("");l=!0}let c=e.peekType("ID")?e.pop().text:"";if(e.length)throw Error("leftover tokens");return new H(R,c,r,n,l,i,s,a)}let r=e.name;(0,i.MR)(!r||"string"==typeof r&&r.match(v),"invalid name","obj.name",r);let n=e.indexed;null!=n&&((0,i.MR)(t,"parameter cannot be indexed","obj.indexed",e.indexed),n=!!n);let a=e.type,s=a.match(N);if(s){let t=parseInt(s[2]||"-1"),i=H.from({type:s[1],components:e.components});return new H(R,r||"",a,"array",n,null,t,i)}if("tuple"===a||a.startsWith("tuple(")||a.startsWith("(")){let t=null!=e.components?e.components.map(e=>H.from(e)):null;return new H(R,r||"",a,"tuple",n,t,null,null)}return new H(R,r||"",a=k(e.type),a,n,null,null,null)}static isParamType(e){return e&&e[M]===B}}class z{type;inputs;constructor(e,t,r){(0,i.gk)(e,R,"Fragment"),r=Object.freeze(r.slice()),(0,a.n)(this,{type:t,inputs:r})}static from(e){if("string"==typeof e){try{z.from(JSON.parse(e))}catch(e){}return z.from(A(e))}if(e instanceof C)switch(e.peekKeyword(h)){case"constructor":return K.from(e);case"error":return V.from(e);case"event":return G.from(e);case"fallback":case"receive":return Z.from(e);case"function":return J.from(e);case"struct":return Y.from(e)}else if("object"==typeof e){switch(e.type){case"constructor":return K.from(e);case"error":return V.from(e);case"event":return G.from(e);case"fallback":case"receive":return Z.from(e);case"function":return J.from(e);case"struct":return Y.from(e)}(0,i.vA)(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}(0,i.MR)(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return K.isFragment(e)}static isError(e){return V.isFragment(e)}static isEvent(e){return G.isFragment(e)}static isFunction(e){return J.isFragment(e)}static isStruct(e){return Y.isFragment(e)}}class W extends z{name;
425constructor(e,t,r,n){super(e,t,n),(0,i.MR)("string"==typeof r&&r.match(v),"invalid identifier","name",r),n=Object.freeze(n.slice()),(0,a.n)(this,{name:r})}}function q(e,t){return"("+t.map(t=>t.format(e)).join("full"===e?", ":",")+")"}class V extends W{constructor(e,t,r){super(e,"error",t,r),Object.defineProperty(this,M,{value:j})}get selector(){return(0,s.id)(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});let t=[];return"sighash"!==e&&t.push("error"),t.push(this.name+q(e,this.inputs)),t.join(" ")}static from(e){if(V.isFragment(e))return e;if("string"==typeof e)return V.from(A(e));if(e instanceof C){let t=I("error",e),r=P(e);return _(e),new V(R,t,r)}return new V(R,e.name,e.inputs?e.inputs.map(H.from):[])}static isFragment(e){return e&&e[M]===j}}class G extends W{anonymous;constructor(e,t,r,n){super(e,"event",t,r),Object.defineProperty(this,M,{value:U}),(0,a.n)(this,{anonymous:n})}get topicHash(){return(0,s.id)(this.format("sighash"))}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});let t=[];return"sighash"!==e&&t.push("event"),t.push(this.name+q(e,this.inputs)),"sighash"!==e&&this.anonymous&&t.push("anonymous"),t.join(" ")}static getTopicHash(e,t){return new G(R,e,t=(t||[]).map(e=>H.from(e)),!1).topicHash}static from(e){if(G.isFragment(e))return e;if("string"==typeof e)try{return G.from(A(e))}catch(t){(0,i.MR)(!1,"invalid event fragment","obj",e)}else if(e instanceof C){let t=I("event",e),r=P(e,!0),n=!!S(e,o(["anonymous"])).has("anonymous");return _(e),new G(R,t,r,n)}return new G(R,e.name,e.inputs?e.inputs.map(e=>H.from(e,!0)):[],!!e.anonymous)}static isFragment(e){return e&&e[M]===U}}class K extends z{payable;gas;constructor(e,t,r,n,i){super(e,t,r),Object.defineProperty(this,M,{value:$}),(0,a.n)(this,{payable:n,gas:i})}format(e){if((0,i.vA)(null!=e&&"sighash"!==e,"cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),"json"===e)return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});let t=[`constructor${q(e,this.inputs)}`];return this.payable&&t.push("payable"),null!=this.gas&&t.push(`@${this.gas.toString()}`),t.join(" ")}static from(e){if(K.isFragment(e))return e;if("string"==typeof e)try{return K.from(A(e))}catch(t){(0,i.MR)(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof C){S(e,o(["constructor"]));let t=P(e),r=!!S(e,l).has("payable"),n=O(e);return _(e),new K(R,"constructor",t,r,n)}return new K(R,"constructor",e.inputs?e.inputs.map(H.from):[],!!e.payable,null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[M]===$}}class Z extends z{payable;constructor(e,t,r){super(e,"fallback",t),Object.defineProperty(this,M,{value:L}),(0,a.n)(this,{payable:r})}format(e){let t=0===this.inputs.length?"receive":"fallback";return"json"===e?JSON.stringify({type:t,stateMutability:this.payable?"payable":"nonpayable"}):`${t}()${this.payable?" payable":""}`}static from(e){if(Z.isFragment(e))return e;if("string"==typeof e)try{return Z.from(A(e))}catch(t){(0,i.MR)(!1,"invalid fallback fragment","obj",e)}else if(e instanceof C){let t=e.toString(),r=e.peekKeyword(o(["fallback","receive"]));if((0,i.MR)(r,"type must be fallback or receive","obj",t),"receive"===e.popKeyword(o(["fallback","receive"]))){let t=P(e);return(0,i.MR)(0===t.length,"receive cannot have arguments","obj.inputs",t),S(e,o(["payable"])),_(e),new Z(R,[],!0)}let n=P(e);n.length?(0,i.MR)(1===n.length&&"bytes"===n[0].type,"invalid fallback inputs","obj.inputs",n.map(e=>e.format("minimal")).join(", ")):n=[H.from("bytes")];let a=T(e);if((0,i.MR)("nonpayable"===a||"payable"===a,"fallback cannot be constants","obj.stateMutability",a),S(e,o(["returns"])).has("returns")){let t=P(e);
425(0,i.MR)(1===t.length&&"bytes"===t[0].type,"invalid fallback outputs","obj.outputs",t.map(e=>e.format("minimal")).join(", "))}return _(e),new Z(R,n,"payable"===a)}return"receive"===e.type?new Z(R,[],!0):"fallback"===e.type?new Z(R,[H.from("bytes")],"payable"===e.stateMutability):void(0,i.MR)(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[M]===L}}class J extends W{constant;outputs;stateMutability;payable;gas;constructor(e,t,r,n,i,s){super(e,"function",t,n),Object.defineProperty(this,M,{value:D}),i=Object.freeze(i.slice()),(0,a.n)(this,{constant:"view"===r||"pure"===r,gas:s,outputs:i,payable:"payable"===r,stateMutability:r})}get selector(){return(0,s.id)(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map(t=>JSON.parse(t.format(e))),outputs:this.outputs.map(t=>JSON.parse(t.format(e)))});let t=[];return"sighash"!==e&&t.push("function"),t.push(this.name+q(e,this.inputs)),"sighash"!==e&&("nonpayable"!==this.stateMutability&&t.push(this.stateMutability),this.outputs&&this.outputs.length&&(t.push("returns"),t.push(q(e,this.outputs))),null!=this.gas&&t.push(`@${this.gas.toString()}`)),t.join(" ")}static getSelector(e,t){return new J(R,e,"view",t=(t||[]).map(e=>H.from(e)),[],null).selector}static from(e){if(J.isFragment(e))return e;if("string"==typeof e)try{return J.from(A(e))}catch(t){(0,i.MR)(!1,"invalid function fragment","obj",e)}else if(e instanceof C){let t=I("function",e),r=P(e),n=T(e),i=[];S(e,o(["returns"])).has("returns")&&(i=P(e));let a=O(e);return _(e),new J(R,t,n,r,i,a)}let t=e.stateMutability;return null==t&&(t="payable","boolean"==typeof e.constant?(t="view",!e.constant&&(t="payable","boolean"!=typeof e.payable||e.payable||(t="nonpayable"))):"boolean"!=typeof e.payable||e.payable||(t="nonpayable")),new J(R,e.name,t,e.inputs?e.inputs.map(H.from):[],e.outputs?e.outputs.map(H.from):[],null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[M]===D}}class Y extends W{constructor(e,t,r){super(e,"struct",t,r),Object.defineProperty(this,M,{value:F})}format(){throw Error("@TODO")}static from(e){if("string"==typeof e)try{return Y.from(A(e))}catch(t){(0,i.MR)(!1,"invalid struct fragment","obj",e)}else if(e instanceof C){let t=I("struct",e),r=P(e);return _(e),new Y(R,t,r)}return new Y(R,e.name,e.inputs?e.inputs.map(H.from):[])}static isFragment(e){return e&&e[M]===F}}},4767:(e,t,r)=>{"use strict";r.d(t,{a:()=>s});let n=new Set(["children","localName","ref","style","className"]),i=new WeakMap,a=(e,t,r,n,a)=>{let s=a?.[t];void 0===s?(e[t]=r,null==r&&t in HTMLElement.prototype&&e.removeAttribute(t)):r!==n&&((e,t,r)=>{let n=i.get(e);void 0===n&&i.set(e,n=new Map);let a=n.get(t);void 0!==r?void 0===a?(n.set(t,a={handleEvent:r}),e.addEventListener(t,a)):a.handleEvent=r:void 0!==a&&(n.delete(t),e.removeEventListener(t,a))})(e,s,r)},s=({react:e,tagName:t,elementClass:r,events:i,displayName:s})=>{let o=new Set(Object.keys(i??{})),l=e.forwardRef((s,l)=>{let c=e.useRef(new Map),u=e.useRef(null),d={},h={};for(let[e,t]of Object.entries(s))n.has(e)?d["className"===e?"class":e]=t:o.has(e)||e in r.prototype?h[e]=t:d[e]=t;return e.useLayoutEffect(()=>{if(null===u.current)return;let e=new Map;for(let t in h)a(u.current,t,s[t],c.current.get(t),i),c.current.delete(t),e.set(t,s[t]);for(let[e,t]of c.current)a(u.current,e,void 0,t,i);c.current=e}),e.useLayoutEffect(()=>{u.current?.removeAttribute("defer-hydration")},[]),d.suppressHydrationWarning=!0,e.createElement(t,{...d,ref:e.useCallback(e=>{u.current=e,"function"==typeof l?l(e):null!==l&&(l.current=e)},[l])})});return l.displayName=s??r.name,l}},4806:(e,t,r)=>{"use strict";r.d(t,{m:()=>s});var n=r(77374),i=r(75114),a=r(89596);async function s(e,t){if(e.features["sui:signAndExecuteTransaction"])return e.features["sui:signAndExecuteTransaction"].signAndExecuteTransaction(t);if(!e.features["sui:signAndExecuteTransactionBlock"])throw Error(`Provided wallet (${e.name}) does not support the signAndExecuteTransaction feature.`);let{signAndExecuteTransactionBlock:r}=e.features["sui:signAndExecuteTransactionBlock"],s=i.Z.from(await t.transaction.toJSON()),{digest:o,rawEffects:l,rawTransaction:c}=await r({account:t.account,chain:t.chain,transactionBlock:s,options:{showRawEffects:!0,showRawInput:!0}}),[{txSignatures:[u],intentMessage:{value:d}}]=n.jy.SenderSignedData.parse((0,a.E)(c));
425return{digest:o,signature:u,bytes:n.jy.TransactionData.serialize(d).toBase64(),effects:(0,a.n)(new Uint8Array(l))}}},4906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.slice=function(e,t,r,{strict:n}={}){return(0,i.isHex)(e,{strict:!1})?c(e,t,r,{strict:n}):l(e,t,r,{strict:n})},t.sliceBytes=l,t.sliceHex=c;let n=r(1107),i=r(80217),a=r(29813);function s(e,t){if("number"==typeof t&&t>0&&t>(0,a.size)(e)-1)throw new n.SliceOffsetOutOfBoundsError({offset:t,position:"start",size:(0,a.size)(e)})}function o(e,t,r){if("number"==typeof t&&"number"==typeof r&&(0,a.size)(e)!==r-t)throw new n.SliceOffsetOutOfBoundsError({offset:r,position:"end",size:(0,a.size)(e)})}function l(e,t,r,{strict:n}={}){s(e,t);let i=e.slice(t,r);return n&&o(i,t,r),i}function c(e,t,r,{strict:n}={}){s(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&o(i,t,r),i}},5075:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractChain=function({chains:e,id:t}){return e.find(e=>e.id===t)}},5222:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767);r(79909),r(48054),r(83627);var a=r(46756),s=r(63412),o=r(91392);let l=(0,o.AH)` 426 :host { 427 width: var(--local-width); 428 } 429 430 button { 431 width: var(--local-width); 432 white-space: nowrap; 433 column-gap: ${({spacing:e})=>e[2]}; 434 transition: 435 scale ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-1"]}, 436 background-color ${({durations:e})=>e.lg} 437 ${({easings:e})=>e["ease-out-power-2"]}, 438 border-radius ${({durations:e})=>e.lg} 439 ${({easings:e})=>e["ease-out-power-1"]}; 440 will-change: scale, background-color, border-radius; 441 cursor: pointer; 442 } 443 444 /* -- Sizes --------------------------------------------------- */ 445 button[data-size='sm'] { 446 border-radius: ${({borderRadius:e})=>e[2]}; 447 padding: 0 ${({spacing:e})=>e[2]}; 448 height: 28px; 449 } 450 451 button[data-size='md'] { 452 border-radius: ${({borderRadius:e})=>e[3]}; 453 padding: 0 ${({spacing:e})=>e[4]}; 454 height: 38px; 455 } 456 457 button[data-size='lg'] { 458 border-radius: ${({borderRadius:e})=>e[4]}; 459 padding: 0 ${({spacing:e})=>e[5]}; 460 height: 48px; 461 } 462 463 /* -- Variants --------------------------------------------------------- */ 464 button[data-variant='accent-primary'] { 465 background-color: ${({tokens:e})=>e.core.backgroundAccentPrimary}; 466 color: ${({tokens:e})=>e.theme.textInvert}; 467 } 468 469 button[data-variant='accent-secondary'] { 470 background-color: ${({tokens:e})=>e.core.foregroundAccent010}; 471 color: ${({tokens:e})=>e.core.textAccentPrimary}; 472 } 473 474 button[data-variant='neutral-primary'] { 475 background-color: ${({tokens:e})=>e.theme.backgroundInvert}; 476 color: ${({tokens:e})=>e.theme.textInvert}; 477 } 478 479 button[data-variant='neutral-secondary'] { 480 background-color: transparent; 481 border: 1px solid ${({tokens:e})=>e.theme.borderSecondary}; 482 color: ${({tokens:e})=>e.theme.textPrimary}; 483 } 484 485 button[data-variant='neutral-tertiary'] { 486 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 487 color: ${({tokens:e})=>e.theme.textPrimary}; 488 } 489 490 button[data-variant='error-primary'] { 491 background-color: ${({tokens:e})=>e.core.textError}; 492 color: ${({tokens:e})=>e.theme.textInvert}; 493 } 494 495 button[data-variant='error-secondary'] { 496 background-color: ${({tokens:e})=>e.core.backgroundError}; 497 color: ${({tokens:e})=>e.core.textError}; 498 } 499 500 button[data-variant='shade'] { 501 background: var(--wui-color-gray-glass-002); 502 color: var(--wui-color-fg-200); 503 border: none; 504 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); 505 } 506 507 /* -- Focus states --------------------------------------------------- */ 508 button[data-size='sm']:focus-visible:enabled { 509 border-radius: 28px; 510 } 511 512 button[data-size='md']:focus-visible:enabled { 513 border-radius: 38px; 514 } 515 516 button[data-size='lg']:focus-visible:enabled { 517 border-radius: 48px; 518 } 519 button[data-variant='shade']:focus-visible:enabled { 520 background: var(--wui-color-gray-glass-005); 521 box-shadow: 522 inset 0 0 0 1px var(--wui-color-gray-glass-010), 523 0 0 0 4px var(--wui-color-gray-glass-002); 524 } 525 526 /* -- Hover & Active states ----------------------------------------------------------- */ 527 @media (hover: hover) { 528 button[data-size='sm']:hover:enabled { 529 border-radius: 28px; 530 } 531 532 button[data-size='md']:hover:enabled { 533 border-radius: 38px; 534 } 535 536 button[data-size='lg']:hover:enabled { 537 border-radius: 48px; 538 } 539 540 button[data-variant='shade']:hover:enabled { 541 background: var(--wui-color-gray-glass-002); 542 } 543 544 button[data-variant='shade']:active:enabled { 545 background: var(--wui-color-gray-glass-005); 546 } 547 } 548 549 button[data-size='sm']:active:enabled { 550 border-radius: 28px; 551 } 552 553 button[data-size='md']:active:enabled { 554 border-radius: 38px; 555 } 556 557 button[data-size='lg']:active:enabled { 558 border-radius: 48px; 559 } 560 561 /* -- Disabled states --------------------------------------------------- */ 562 button:disabled { 563 opacity: 0.3; 564 } 565`;var c=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let u={lg:"lg-regular-mono",md:"md-regular-mono",sm:"sm-regular-mono"},d={lg:"md",md:"md",sm:"sm"},h=class extends n.WF{constructor(){super(...arguments),this.size="lg",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="accent-primary"}render(){this.style.cssText=` 566 --local-width: ${this.fullWidth?"100%":"auto"}; 567 `;let e=this.textVariant??u[this.size];return(0,n.qy)` 568 <button data-variant=${this.variant} data-size=${this.size} ?disabled=${this.disabled}> 569 ${this.loadingTemplate()} 570 <slot name="iconLeft"></slot> 571 <wui-text variant=${e} color="inherit"> 572 <slot></slot> 573 </wui-text> 574 <slot name="iconRight"></slot> 575 </button> 576 `}loadingTemplate(){if(this.loading){let e=d[this.size],t="neutral-primary"===this.variant||"accent-primary"===this.variant?"invert":"primary";return(0,n.qy)`<wui-loading-spinner color=${t} size=${e}></wui-loading-spinner>`}return null}};h.styles=[a.W5,a.fD,l],c([(0,i.MZ)()],h.prototype,"size",void 0),c([(0,i.MZ)({type:Boolean})],h.prototype,"disabled",void 0),c([(0,i.MZ)({type:Boolean})],h.prototype,"fullWidth",void 0),c([(0,i.MZ)({type:Boolean})],h.prototype,"loading",void 0),c([(0,i.MZ)()],h.prototype,"variant",void 0),c([(0,i.MZ)()],h.prototype,"textVariant",void 0),h=c([(0,s.E)("wui-button")],h)},5449:(e,t,r)=>{"use strict";
576Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionError=function(e,{docsPath:t,...r}){let s=(()=>{let t=(0,a.getNodeError)(e,r);return t instanceof n.UnknownNodeError?e:t})();return new i.TransactionExecutionError(s,{docsPath:t,...r})};let n=r(80779),i=r(44789),a=r(49259)},5636:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUrl=t.getContractAddress=void 0,t.getAbortError=function(e){if(e?.reason)return e.reason;if("function"==typeof DOMException)return new DOMException("This operation was aborted","AbortError");let t=Error("This operation was aborted");return t.name="AbortError",t},t.isAbortError=function(e){return"object"==typeof e&&null!==e&&"name"in e&&"AbortError"===e.name},t.getContractAddress=e=>e,t.getUrl=e=>{try{let t=new URL(e);if(!t.username&&!t.password)return e;return t.username="",t.password="",t.toString()}catch{return e}}},5763:(e,t,r)=>{"use strict";r.d(t,{w:()=>n});let n="standard:disconnect"},6077:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(46756),s=r(55405),o=r(63412);let l=(0,n.AH)` 577 :host { 578 display: flex; 579 width: inherit; 580 height: inherit; 581 box-sizing: border-box; 582 } 583`;var c=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let u=class extends n.WF{render(){return this.style.cssText=` 584 flex-direction: ${this.flexDirection}; 585 flex-wrap: ${this.flexWrap}; 586 flex-basis: ${this.flexBasis}; 587 flex-grow: ${this.flexGrow}; 588 flex-shrink: ${this.flexShrink}; 589 align-items: ${this.alignItems}; 590 justify-content: ${this.justifyContent}; 591 column-gap: ${this.columnGap&&`var(--apkt-spacing-${this.columnGap})`}; 592 row-gap: ${this.rowGap&&`var(--apkt-spacing-${this.rowGap})`}; 593 gap: ${this.gap&&`var(--apkt-spacing-${this.gap})`}; 594 padding-top: ${this.padding&&s.Z.getSpacingStyles(this.padding,0)}; 595 padding-right: ${this.padding&&s.Z.getSpacingStyles(this.padding,1)}; 596 padding-bottom: ${this.padding&&s.Z.getSpacingStyles(this.padding,2)}; 597 padding-left: ${this.padding&&s.Z.getSpacingStyles(this.padding,3)}; 598 margin-top: ${this.margin&&s.Z.getSpacingStyles(this.margin,0)}; 599 margin-right: ${this.margin&&s.Z.getSpacingStyles(this.margin,1)}; 600 margin-bottom: ${this.margin&&s.Z.getSpacingStyles(this.margin,2)}; 601 margin-left: ${this.margin&&s.Z.getSpacingStyles(this.margin,3)}; 602 width: ${this.width}; 603 `,(0,n.qy)`<slot></slot>`}};u.styles=[a.W5,l],c([(0,i.MZ)()],u.prototype,"flexDirection",void 0),c([(0,i.MZ)()],u.prototype,"flexWrap",void 0),c([(0,i.MZ)()],u.prototype,"flexBasis",void 0),c([(0,i.MZ)()],u.prototype,"flexGrow",void 0),c([(0,i.MZ)()],u.prototype,"flexShrink",void 0),c([(0,i.MZ)()],u.prototype,"alignItems",void 0),c([(0,i.MZ)()],u.prototype,"justifyContent",void 0),c([(0,i.MZ)()],u.prototype,"columnGap",void 0),c([(0,i.MZ)()],u.prototype,"rowGap",void 0),c([(0,i.MZ)()],u.prototype,"gap",void 0),c([(0,i.MZ)()],u.prototype,"padding",void 0),c([(0,i.MZ)()],u.prototype,"margin",void 0),c([(0,i.MZ)()],u.prototype,"width",void 0),u=c([(0,o.E)("wui-flex")],u)},6084:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLogs=o;let n=r(61794),i=r(4466),a=r(27083),s=r(10205);async function o(e,{address:t,blockHash:r,fromBlock:l,toBlock:c,event:u,events:d,args:h,strict:p}={}){let f=d??(u?[u]:void 0),m=[];f&&(m=[f.flatMap(e=>(0,n.encodeEventTopics)({abi:[e],eventName:e.name,args:d?void 0:h}))],u&&(m=m[0]));let g=(r?await e.request({method:"eth_getLogs",params:[{address:t,topics:m,blockHash:r}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:m,fromBlock:"bigint"==typeof l?(0,a.numberToHex)(l):l,toBlock:"bigint"==typeof c?(0,a.numberToHex)(c):c}]})).map(e=>(0,s.formatLog)(e));return f?(0,i.parseEventLogs)({abi:f,args:h,logs:g,strict:p??!1}):g}},6282:(e,t,r)=>{"use strict";r.d(t,{Y:()=>s});var n=r(20801),i=r(76195);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}
603).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}var s=n.memo(n.forwardRef(function(e,t){var r=i.z.getPTI(e);return n.createElement("svg",a({ref:t,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),n.createElement("path",{d:"M9.61296 13C9.50997 13.0005 9.40792 12.9804 9.3128 12.9409C9.21767 12.9014 9.13139 12.8433 9.05902 12.7701L3.83313 7.54416C3.68634 7.39718 3.60388 7.19795 3.60388 6.99022C3.60388 6.78249 3.68634 6.58325 3.83313 6.43628L9.05902 1.21039C9.20762 1.07192 9.40416 0.996539 9.60724 1.00012C9.81032 1.00371 10.0041 1.08597 10.1477 1.22959C10.2913 1.37322 10.3736 1.56698 10.3772 1.77005C10.3808 1.97313 10.3054 2.16968 10.1669 2.31827L5.49496 6.99022L10.1669 11.6622C10.3137 11.8091 10.3962 12.0084 10.3962 12.2161C10.3962 12.4238 10.3137 12.6231 10.1669 12.7701C10.0945 12.8433 10.0083 12.9014 9.91313 12.9409C9.81801 12.9804 9.71596 13.0005 9.61296 13Z",fill:"currentColor"}))}));s.displayName="ChevronLeftIcon"},6647:(e,t,r)=>{"use strict";r(6077)},6724:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LruMap=void 0;class r extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&(super.delete(e),super.set(e,t)),t}set(e,t){if(super.has(e)&&super.delete(e),super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=super.keys().next().value;void 0!==e&&super.delete(e)}return this}}t.LruMap=r},6751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.waitForTransactionReceipt=f;let n=r(99112),i=r(44789),a=r(95847),s=r(84053),o=r(89560),l=r(15573),c=r(68508),u=r(70200),d=r(38149),h=r(60563),p=r(29716);async function f(e,t){let r,f,m,g,y,{checkReplacement:b=e.chain?.supportsTransactionReplacementDetection??!0,confirmations:w=1,hash:v,onReplaced:E,retryCount:C=6,retryDelay:A=({count:e})=>200*~~(1<<e),timeout:x=18e4}=t,I=(0,c.stringify)(["waitForTransactionReceipt",e.uid,v]),S=t.pollingInterval?t.pollingInterval:e.chain?.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval,T=!1,{promise:P,resolve:O,reject:_}=(0,o.withResolvers)(),N=x?setTimeout(()=>{y?.(),g?.(),_(new i.WaitForTransactionReceiptTimeoutError({hash:v}))},x):void 0;return g=(0,s.observe)(I,{onReplaced:E,resolve:O,reject:_},async t=>{if((m=await (0,a.getAction)(e,h.getTransactionReceipt,"getTransactionReceipt")({hash:v}).catch(()=>void 0))&&w<=1){clearTimeout(N),t.resolve(m),g?.();return}y=(0,a.getAction)(e,p.watchBlockNumber,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:S,async onBlockNumber(s){let o=e=>{clearTimeout(N),y?.(),e(),g?.()},c=s;if(!T)try{if(m){if(w>1&&(!m.blockNumber||c-m.blockNumber+1n<w))return;o(()=>t.resolve(m));return}if(b&&!r&&(T=!0,await (0,l.withRetry)(async()=>{(r=await (0,a.getAction)(e,d.getTransaction,"getTransaction")({hash:v})).blockNumber&&(c=r.blockNumber)},{delay:A,retryCount:C}),T=!1),m=await (0,a.getAction)(e,h.getTransactionReceipt,"getTransactionReceipt")({hash:v}),w>1&&(!m.blockNumber||c-m.blockNumber+1n<w))return;o(()=>t.resolve(m))}catch(s){if(s instanceof i.TransactionNotFoundError||s instanceof i.TransactionReceiptNotFoundError){if(!r){T=!1;return}try{f=r,T=!0;let i=await (0,l.withRetry)(()=>(0,a.getAction)(e,u.getBlock,"getBlock")({blockNumber:c,includeTransactions:!0}),{delay:A,retryCount:C,shouldRetry:({error:e})=>e instanceof n.BlockNotFoundError});T=!1;let s=i.transactions.find(({from:e,nonce:t})=>e===f.from&&t===f.nonce);if(!s||(m=await (0,a.getAction)(e,h.getTransactionReceipt,"getTransactionReceipt")({hash:s.hash}),w>1&&(!m.blockNumber||c-m.blockNumber+1n<w)))return;let d="replaced";s.to===f.to&&s.value===f.value&&s.input===f.input?d="repriced":s.from===s.to&&0n===s.value&&(d="cancelled"),o(()=>{t.onReplaced?.({reason:d,replacedTransaction:f,transaction:s,transactionReceipt:m}),t.resolve(m)})}catch(e){o(()=>t.reject(e))}}else o(()=>t.reject(s))}}})}),P}},6755:(e,t,r)=>{"use strict";r.d(t,{CL:()=>l,D5:()=>u,Di:()=>h,G1:()=>_,Gi:()=>c,L5:()=>I,MI:()=>R,RV:()=>C,Sf:()=>E,WT:()=>S,XU:()=>o,YW:()=>m,ab:()=>g,bq:()=>d,cg:()=>P,ch:()=>x,hA:()=>p,hl:()=>T,jz:()=>N,nR:()=>k,qZ:()=>f,s0:()=>y,sV:()=>v,uL:()=>O,vx:()=>w,xQ:()=>b,xq:()=>A});var n=r(81742),i=r(53597);class a extends n.C{constructor(e,{code:t,docsPath:r,metaMessages:n,name:a,shortMessage:s}){super(s,{cause:e,docsPath:r,metaMessages:n||e?.metaMessages,name:a||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}
vendor: 6,299 bytes, line 603
603),this.name=a||e.name,this.code=e instanceof i.J8?e.code:t??-1}}class s extends a{constructor(e,t){super(e,t),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class o extends a{constructor(e){super(e,{code:o.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class l extends a{constructor(e){super(e,{code:l.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class c extends a{constructor(e,{method:t}={}){super(e,{code:c.code,name:"MethodNotFoundRpcError",shortMessage:`The method${t?` "${t}"`:""} does not exist / is not available.`})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class u extends a{constructor(e){super(e,{code:u.code,name:"InvalidParamsRpcError",shortMessage:"Invalid parameters were provided to the RPC method.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class d extends a{constructor(e){super(e,{code:d.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class h extends a{constructor(e){super(e,{code:h.code,name:"InvalidInputRpcError",shortMessage:"Missing or invalid parameters.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class p extends a{constructor(e){super(e,{code:p.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class f extends a{constructor(e){super(e,{code:f.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class m extends a{constructor(e){super(e,{code:m.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class g extends a{constructor(e,{method:t}={}){super(e,{code:g.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${t?` "${t}"`:""} is not supported.`})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class y extends a{constructor(e){super(e,{code:y.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class b extends a{constructor(e){super(e,{code:b.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class w extends s{constructor(e){super(e,{code:w.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class v extends s{constructor(e){super(e,{code:v.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class E extends s{constructor(e,{method:t}={}){super(e,{code:E.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${t?` " ${t}"`:""}.`})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class C extends s{constructor(e){super(e,{code:C.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(C,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class A extends s{constructor(e){super(e,{code:A.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class x extends s{constructor(e){super(e,{code:x.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class I extends s{constructor(e){super(e,{code:I.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(I,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class S extends s{constructor(e){super(e,{code:S.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(S,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class T extends s{constructor(e){super(e,{code:T.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(T,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class P extends s{constructor(e){super(e,{code:P.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class O extends s{constructor(e){super(e,{code:O.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(O,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class _ extends s{constructor(e){super(e,{code:_.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750}
603);class N extends s{constructor(e){super(e,{code:N.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(N,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class k extends s{constructor(e){super(e,{code:k.code,name:"WalletConnectSessionSettlementError",shortMessage:"WalletConnect session settlement failed."})}}Object.defineProperty(k,"code",{enumerable:!0,configurable:!0,writable:!0,value:7e3});class R extends a{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}},6792:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.secp256k1_hasher=t.schnorr=t.secp256k1=void 0;let n=r(82104),i=r(92565),a=r(8844),s=r(37453),o=r(83935),l=r(56196),c=r(90165),u=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h=BigInt(0),p=BigInt(1),f=BigInt(2),m=(e,t)=>
603(e+t/f)/t;function g(e){let t=BigInt(3),r=BigInt(6),n=BigInt(11),i=BigInt(22),a=BigInt(23),s=BigInt(44),l=BigInt(88),c=e*e*e%u,d=c*c*e%u,h=(0,o.pow2)(d,t,u)*d%u,p=(0,o.pow2)(h,t,u)*d%u,m=(0,o.pow2)(p,f,u)*c%u,g=(0,o.pow2)(m,n,u)*m%u,b=(0,o.pow2)(g,i,u)*g%u,w=(0,o.pow2)(b,s,u)*b%u,v=(0,o.pow2)(w,l,u)*w%u,E=(0,o.pow2)(v,s,u)*b%u,C=(0,o.pow2)(E,t,u)*d%u,A=(0,o.pow2)(C,a,u)*g%u,x=(0,o.pow2)(A,r,u)*c%u,I=(0,o.pow2)(x,f,u);if(!y.eql(y.sqr(I),e))throw Error("Cannot find square root");return I}let y=(0,o.Field)(u,void 0,void 0,{sqrt:g});t.secp256k1=(0,a.createCurve)({a:h,b:BigInt(7),Fp:y,n:d,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-p*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=BigInt("0x100000000000000000000000000000000"),a=m(t*e,d),s=m(-r*e,d),l=(0,o.mod)(e-a*t-s*n,d),c=(0,o.mod)(-a*r-s*t,d),u=l>i,h=c>i;if(u&&(l=d-l),h&&(c=d-c),l>i||c>i)throw Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:u,k1:l,k2neg:h,k2:c}}}},n.sha256);let b={};function w(e,...t){let r=b[e];if(void 0===r){let t=(0,n.sha256)(Uint8Array.from(e,e=>e.charCodeAt(0)));r=(0,l.concatBytes)(t,t),b[e]=r}return(0,n.sha256)((0,l.concatBytes)(r,...t))}let v=e=>e.toRawBytes(!0).slice(1),E=e=>(0,l.numberToBytesBE)(e,32),C=e=>(0,o.mod)(e,u),A=e=>(0,o.mod)(e,d),x=t.secp256k1.ProjectivePoint;function I(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=x.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:A(-r),bytes:v(n)}}function S(e){(0,l.aInRange)("x",e,p,u);let t=C(e*e),r=g(C(t*e+BigInt(7)));r%f!==h&&(r=C(-r));let n=new x(e,r,p);return n.assertValidity(),n}let T=l.bytesToNumberBE;function P(...e){return A(T(w("BIP0340/challenge",...e)))}function O(e,t,r){let n=(0,l.ensureBytes)("signature",e,64),i=(0,l.ensureBytes)("message",t),a=(0,l.ensureBytes)("publicKey",r,32);try{let e,t=S(T(a)),r=T(n.subarray(0,32));if(!(0,l.inRange)(r,p,u))return!1;let s=T(n.subarray(32,64));if(!(0,l.inRange)(s,p,d))return!1;let o=P(E(r),v(t),i),c=(e=A(-o),x.BASE.multiplyAndAddUnsafe(t,s,e));if(!c||!c.hasEvenY()||c.toAffine().x!==r)return!1;return!0}catch(e){return!1}}t.schnorr={getPublicKey:function(e){return I(e).bytes},sign:function(e,t,r=(0,i.randomBytes)(32)){let n=(0,l.ensureBytes)("message",e),{bytes:a,scalar:s}=I(t),o=E(s^T(w("BIP0340/aux",(0,l.ensureBytes)("auxRand",r,32)))),c=A(T(w("BIP0340/nonce",o,a,n)));if(c===h)throw Error("sign failed: k is zero");let{bytes:u,scalar:d}=I(c),p=P(u,a,n),f=new Uint8Array(64);if(f.set(u,0),f.set(E(A(d+p*s)),32),!O(f,n,a))throw Error("sign: Invalid signature produced");return f},verify:O,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:S,pointToBytes:v,numberToBytesBE:l.numberToBytesBE,bytesToNumberBE:l.bytesToNumberBE,taggedHash:w,mod:o.mod}};let _=(0,s.isogenyMap)(y,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(e=>
603BigInt(e)))),N=(0,c.mapToCurveSimpleSWU)(y,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:y.create(BigInt("-11"))});t.secp256k1_hasher=(0,s.createHasher)(t.secp256k1.ProjectivePoint,e=>{let{x:t,y:r}=N(y.create(e[0]));return _(t,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:y.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256}),t.hashToCurve=t.secp256k1_hasher.hashToCurve,t.encodeToCurve=t.secp256k1_hasher.encodeToCurve},6875:(e,t,r)=>{"use strict";r.d(t,{b:()=>l});var n=r(36071),i=r(32590),a=r(42242),s=r(18627),o=r(33432);let l={getConnectionStatus(e,t){let r=i.a.state.activeConnectorIds[t],a=n.x.getConnections(t);return r&&e.connectorId===r?"connected":a.some(t=>t.connectorId.toLowerCase()===e.connectorId.toLowerCase())?"active":"disconnected"},excludeConnectorAddressFromConnections:({connections:e,connectorId:t,addresses:r})=>e.map(e=>{if(t&&e.connectorId.toLowerCase()===t.toLowerCase()&&r){let t=e.accounts.filter(e=>!r.some(t=>t.toLowerCase()===e.address.toLowerCase()));return{...e,accounts:t}}return e}),excludeExistingConnections(e,t){let r=new Set(e);return t.filter(e=>!r.has(e.connectorId))},getConnectionsByConnectorId:(e,t)=>e.filter(e=>e.connectorId.toLowerCase()===t.toLowerCase()),getConnectionsData(e){let t=!!s.H.state.remoteFeatures?.multiWallet,r=i.a.state.activeConnectorIds[e],a=n.x.getConnections(e),o=(n.x.state.recentConnections.get(e)??[]).filter(e=>i.a.getConnectorById(e.connectorId)),c=l.excludeExistingConnections([...a.map(e=>e.connectorId),...r?[r]:[]],o);return t?{connections:a,recentConnections:c}:{connections:a.filter(e=>e.connectorId.toLowerCase()===r?.toLowerCase()),recentConnections:[]}},onConnectMobile(e,t){let r=n.x.state.wcUri;if(e?.mobile_link&&r)try{n.x.setWcError(!1);let{mobile_link:i,link_mode:a,name:l}=e,c=o.w.appendPayToUri(r,t),{redirect:u,redirectUniversalLink:d,href:h,universalHref:p}=o.w.formatNativeUrl(i,c,a),f=o.w.isIframe()?"_top":"_self",m=!!s.H.state.experimental_preferUniversalLinks,g=m&&d?d:u,y=m&&p?p:h;n.x.setWcLinking({name:l,href:y}),n.x.setRecentWallet(e),o.w.openHref(g,f)}catch(t){a.E.sendEvent({type:"track",event:"CONNECT_PROXY_ERROR",properties:{message:t instanceof Error?t.message:"Error parsing the deep link",uri:r,mobile_link:e.mobile_link,name:e.name}}),n.x.setWcError(!0)}}}},7246:(e,t)=>{"use strict";async function r(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]})}Object.defineProperty(t,"__esModule",{value:!0}),t.setAutomine=r},7746:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.estimateContractGas=l;let n=r(83562),i=r(25230),a=r(38297),s=r(95847),o=r(87908);async function l(e,t){let{abi:r,address:l,args:c,functionName:u,dataSuffix:d="string"==typeof e.dataSuffix?e.dataSuffix:e.dataSuffix?.value,...h}=t,p=(0,i.encodeFunctionData)({abi:r,args:c,functionName:u});try{return await (0,s.getAction)(e,o.estimateGas,"estimateGas")({data:`${p}${d?d.replace("0x",""):""}`,to:l,...h})}catch(t){let e=h.account?(0,n.parseAccount)(h.account):void 0;throw(0,a.getContractError)(t,{abi:r,address:l,args:c,docsPath:"/docs/contract/estimateContractGas",functionName:u,sender:e?.address})}}},7924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContractAddress=function(e){return"CREATE2"===e.opcode?h(e):d(e)},t.getCreateAddress=d,t.getCreate2Address=h;let n=r(26504),i=r(93939),a=r(3669),s=r(4906),o=r(60037),l=r(36504),c=r(4319),u=r(24998);function d(e){let t=(0,o.toBytes)((0,u.getAddress)(e.from)),r=(0,o.toBytes)(e.nonce);return 0===r[0]&&(r=new Uint8Array([])),(0,u.getAddress)(`0x${(0,c.keccak256)((0,l.toRlp)([t,r],"bytes")).slice(26)}`)}function h(e){let t=(0,o.toBytes)((0,u.getAddress)(e.from)),r=(0,a.pad)((0,i.isBytes)(e.salt)?e.salt:(0,o.toBytes)(e.salt),{size:32}),l="bytecodeHash"in e?(0,i.isBytes)(e.bytecodeHash)?e.bytecodeHash:(0,o.toBytes)(e.bytecodeHash):(0,c.keccak256)(e.bytecode,"bytes");return(0,u.getAddress)((0,s.slice)((0,c.keccak256)((0,n.concat)([(0,o.toBytes)("0xff"),t,r,l])),12))}},8045:(e,t,r)=>{"use strict";
603Object.defineProperty(t,"__esModule",{value:!0}),t.sendUnsignedTransaction=a;let n=r(48674),i=r(53520);async function a(e,t){let{accessList:r,data:a,from:s,gas:o,gasPrice:l,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:d,to:h,value:p,...f}=t,m=e.chain?.formatters?.transactionRequest?.format,g=(m||i.formatTransactionRequest)({...(0,n.extract)(f,{format:m}),accessList:r,data:a,from:s,gas:o,gasPrice:l,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:d,to:h,value:p},"sendUnsignedTransaction");return await e.request({method:"eth_sendUnsignedTransaction",params:[g]})}},8054:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compactSignatureToSignature=function({r:e,yParityAndS:t}){let r=(0,n.hexToBytes)(t),a=128&r[0]?1:0;return 1===a&&(r[0]&=127),{r:e,s:(0,i.bytesToHex)(r),yParity:a}};let n=r(60037),i=r(27083)},8215:(e,t,r)=>{let n=r(59201),i=r(17129);function a(e){this.mode=i.BYTE,"string"==typeof e&&(e=n(e)),this.data=new Uint8Array(e)}a.getBitsLength=function(e){return 8*e},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(e){for(let t=0,r=this.data.length;t<r;t++)e.put(this.data[t],8)},e.exports=a},8526:(e,t)=>{"use strict";async function r(e,{address:t}){await e.request({method:`${e.mode}_impersonateAccount`,params:[t]})}Object.defineProperty(t,"__esModule",{value:!0}),t.impersonateAccount=r},8760:e=>{e.exports={style:{fontFamily:"'Fjalla One', 'Fjalla One Fallback'",fontWeight:400,fontStyle:"normal"},className:"__className_0cbda2",variable:"__variable_0cbda2"}},8844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHash=s,t.createCurve=function(e,t){let r=t=>(0,a.weierstrass)({...e,...s(t)});return{...r(t),create:r}};let n=r(27315),i=r(92565),a=r(90165);function s(e){return{hash:e,hmac:(t,...r)=>(0,n.hmac)(e,t,(0,i.concatBytes)(...r)),randomBytes:i.randomBytes}}},8912:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseStructs=function(e){let t={},r=e.length;for(let n=0;n<r;n++){let r=e[n];if(!(0,l.isStructSignature)(r))continue;let i=(0,l.execStructSignature)(r);if(!i)throw new s.InvalidSignatureError({signature:r,type:"struct"});let a=i.properties.split(";"),o=[],u=a.length;for(let e=0;e<u;e++){let t=a[e].trim();if(!t)continue;let r=(0,c.parseAbiParameter)(t,{type:"struct"});o.push(r)}if(!o.length)throw new s.InvalidStructSignatureError({signature:r});t[i.name]=o}let d={},h=Object.entries(t),p=h.length;for(let e=0;e<p;e++){let[r,s]=h[e];d[r]=function e(t=[],r={},s=new Set){let l=[],d=t.length;for(let h=0;h<d;h++){let d=t[h];if(n.isTupleRegex.test(d.type))l.push(d);else{let t=(0,n.execTyped)(u,d.type);if(!t?.type)throw new a.InvalidAbiTypeParameterError({abiParameter:d});let{array:h,type:p}=t;if(p in r){if(s.has(p))throw new o.CircularReferenceError({type:p});l.push({...d,type:`tuple${h??""}`,components:e(r[p],r,new Set([...s,p]))})}else if((0,c.isSolidityType)(p))l.push(d);else throw new i.UnknownTypeError({type:p})}}return l}(s,t)}return d};let n=r(62561),i=r(50498),a=r(46836),s=r(48065),o=r(27712),l=r(25065),c=r(20295),u=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/},8948:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsAddress=y;let n=r(91472),i=r(72431),a=r(25230),s=r(24998),o=r(77362),l=r(29813),c=r(62704),u=r(27083),d=r(61145),h=r(57660),p=r(2205),f=r(1690),m=r(95847),g=r(527);async function y(e,t){let{blockNumber:r,blockTag:y,coinType:b,name:w,gatewayUrls:v,strict:E}=t,{chain:C}=e,A=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!C)throw Error("client chain not configured. universalResolverAddress is required.");return(0,o.getChainContractAddress)({blockNumber:r,chain:C,contract:"ensUniversalResolver"})})(),x=C?.ensTlds;if(x&&!x.some(e=>w.endsWith(e)))return null;let I=null!=b?[(0,p.namehash)(w),BigInt(b)]:[(0,p.namehash)(w)];try{let t=(0,a.encodeFunctionData)({abi:n.addressResolverAbi,functionName:"addr",args:I}),o={address:A,abi:n.universalResolverResolveAbi,functionName:"resolveWithGateways",args:[(0,u.toHex)((0,f.packetToBytes)(w)),t,v??[h.localBatchGatewayUrl]],blockNumber:r,blockTag:y},d=(0,m.getAction)(e,g.readContract,"readContract"),p=await d(o);if("0x"===p[0])return null;let E=function({coinType:e,data:t,args:r}){try{return(0,i.decodeFunctionResult)({abi:n.addressResolverAbi,args:r,functionName:"addr",data:t})}catch(n){if(null==e)throw n;let r=(0,c.trim)(t);if(20===(0,l.size)(r))return(0,s.getAddress)(r);throw n}}({coinType:b,data:p[0],args:I});if("0x"===E||"0x00"===(0,c.trim)(E))return null;return E}catch(e){if(E)throw e;if((0,d.isNullUniversalResolverError)(e))return null;throw e}}},9266:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767);r(79909),r(83627);var a=r(46756),s=r(63412),o=r(91392);let l=(0,o.AH)` 604 button { 605 border: none; 606 background: transparent; 607 height: 20px; 608 padding: ${({spacing:e})=>e[2]}; 609 column-gap: ${({spacing:e})=>e[1]}; 610 border-radius: ${({borderRadius:e})=>e[1]}; 611 padding: 0 ${({spacing:e})=>e[1]}; 612 border-radius: ${({spacing:e})=>e[1]}; 613 } 614 615 /* -- Variants --------------------------------------------------------- */ 616 button[data-variant='accent'] { 617 color: ${({tokens:e})=>e.core.textAccentPrimary}; 618 } 619 620 button[data-variant='secondary'] { 621 color: ${({tokens:e})=>e.theme.textSecondary}; 622 } 623 624 /* -- Focus states --------------------------------------------------- */ 625 button:focus-visible:enabled { 626 box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2); 627 } 628 629 button[data-variant='accent']:focus-visible:enabled { 630 background-color: ${({tokens:e})=>e.core.foregroundAccent010}; 631 } 632 633 button[data-variant='secondary']:focus-visible:enabled { 634 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 635 } 636 637 /* -- Hover & Active states ----------------------------------------------------------- */ 638 button[data-variant='accent']:hover:enabled { 639 background-color: ${({tokens:e})=>e.core.foregroundAccent010}; 640 } 641 642 button[data-variant='secondary']:hover:enabled { 643 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 644 } 645 646 button[data-variant='accent']:focus-visible { 647 background-color: ${({tokens:e})=>e.core.foregroundAccent010}; 648 } 649 650 button[data-variant='secondary']:focus-visible { 651 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 652 box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2); 653 } 654 655 button[disabled] { 656 opacity: 0.5;
657 cursor: not-allowed; 658 } 659`;var c=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let u={sm:"sm-medium",md:"md-medium"},d={accent:"accent-primary",secondary:"secondary"},h=class extends n.WF{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.variant="accent",this.icon=void 0}render(){return(0,n.qy)` 660 <button ?disabled=${this.disabled} data-variant=${this.variant}> 661 <slot name="iconLeft"></slot> 662 <wui-text 663 color=${d[this.variant]} 664 variant=${u[this.size]} 665 > 666 <slot></slot> 667 </wui-text> 668 ${this.iconTemplate()} 669 </button> 670 `}iconTemplate(){return this.icon?(0,n.qy)`<wui-icon name=${this.icon} size="sm"></wui-icon>`:null}};h.styles=[a.W5,a.fD,l],c([(0,i.MZ)()],h.prototype,"size",void 0),c([(0,i.MZ)({type:Boolean})],h.prototype,"disabled",void 0),c([(0,i.MZ)()],h.prototype,"variant",void 0),c([(0,i.MZ)()],h.prototype,"icon",void 0),h=c([(0,s.E)("wui-link")],h)},9301:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidAddressError=void 0;let n=r(45226);class i extends n.BaseError{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."],name:"InvalidAddressError"})}}t.InvalidAddressError=i},9395:function(e){e.exports=function(e,t,r){e=e||{};var n=t.prototype,i={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 a(e,t,r,i){return n.fromToBase(e,t,r,i)}r.en.relativeTime=i,n.fromToBase=function(t,n,a,s,o){for(var l,c,u,d=a.$locale().relativeTime||i,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 m=h[f];m.d&&(l=s?r(t).diff(a,m.d,!0):a.diff(t,m.d,!0));var g=(e.rounding||Math.round)(Math.abs(l));if(u=l>0,g<=m.r||!m.r){g<=1&&f>0&&(m=h[f-1]);var y=d[m.l];o&&(g=o(""+g)),c="string"==typeof y?y.replace("%d",g):y(g,n,m.l,u);break}}if(n)return c;var b=u?d.future:d.past;return"function"==typeof b?b(c):b.replace("%s",c)},n.to=function(e,t){return a(e,t,this,!0)},n.from=function(e,t){return a(e,t,this)};var s=function(e){return e.$u?r.utc():r()};n.toNow=function(e){return this.to(s(this),e)},n.fromNow=function(e){return this.from(s(this),e)}}},9616:(e,t,r)=>{"use strict";r.d(t,{j:()=>n});let n="standard:events"},9783:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(55284);r(83627);var s=r(46756),o=r(63412);r(74351);var l=r(91392);let c=(0,l.AH)` 671 :host { 672 width: 100%; 673 } 674 675 button { 676 display: flex; 677 align-items: center; 678 justify-content: space-between; 679 padding: ${({spacing:e})=>e[3]}; 680 width: 100%; 681 background-color: transparent; 682 border-radius: ${({borderRadius:e})=>e[4]}; 683 } 684 685 wui-text { 686 text-transform: capitalize; 687 } 688 689 @media (hover: hover) { 690 button:hover:enabled { 691 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 692 } 693 } 694 695 button:disabled { 696 opacity: 0.5; 697 cursor: not-allowed; 698 } 699`;var u=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let d=class extends n.WF{constructor(){super(...arguments),this.logo="google",this.name="Continue with google",this.disabled=!1}render(){return(0,n.qy)` 700 <button ?disabled=${this.disabled} tabindex=${(0,a.J)(this.tabIdx)}> 701 <wui-flex gap="2" alignItems="center"> 702 <wui-image ?boxed=${!0} logo=${this.logo}></wui-image> 703 <wui-text variant="lg-regular" color="primary">${this.name}</wui-text> 704 </wui-flex> 705 <wui-icon name="chevronRight" size="lg" color="default"></wui-icon> 706 </button> 707 `}};d.styles=[s.W5,s.fD,c],u([(0,i.MZ)()],d.prototype,"logo",void 0),u([(0,i.MZ)()],d.prototype,"name",void 0),u([(0,i.MZ)()],d.prototype,"tabIdx",void 0),u([(0,i.MZ)({type:Boolean})],d.prototype,"disabled",void 0),d=u([(0,o.E)("wui-list-social")],d)},9943:(e,t)=>
707{"use strict";async function r(e,{state:t}){await e.request({method:`${e.mode}_loadState`,params:[t]})}Object.defineProperty(t,"__esModule",{value:!0}),t.loadState=r},9949:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.weiUnits=t.gweiUnits=t.etherUnits=void 0,t.etherUnits={gwei:9,wei:18},t.gweiUnits={ether:-9,wei:9},t.weiUnits={ether:-18,gwei:-9}},9996:(e,t)=>{"use strict";async function r(e){await e.request({method:`${e.mode}_removeBlockTimestampInterval`})}Object.defineProperty(t,"__esModule",{value:!0}),t.removeBlockTimestampInterval=r},10205:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLog=function(e,{args:t,eventName:r}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):null===e.blockTimestamp?null:void 0,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}:{}}}},10693:(e,t,r)=>{"use strict";async function n(e){let t=Object.keys(e);return(await Promise.all(t.map(t=>Promise.resolve(e[t])))).reduce((e,r,n)=>(e[t[n]]=r,e),{})}function i(e,t,r){for(let n in t){let i=t[n],a=r?r[n]:null;a&&function(e,t,r){let n=t.split("|").map(e=>e.trim());for(let r=0;r<n.length;r++)switch(t){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof e===t)return}let i=Error(`invalid value for type ${t}`);throw i.code="INVALID_ARGUMENT",i.argument=`value.${r}`,i.value=e,i}(i,a,n),Object.defineProperty(e,n,{enumerable:!0,value:i,writable:!1})}}r.d(t,{k:()=>n,n:()=>i})},10881:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numberToHex=t.getLowerCase=void 0,t.getLowerCase=function(e){return e?e.toLowerCase():e},t.numberToHex=function(e){return`0x${e.toString(16)}`}},10989:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.call=I,t.getRevertErrorData=N;let n=r(65222),i=r(52828),a=r(83562),s=r(91472),o=r(66353),l=r(13894),c=r(45226),u=r(34844),d=r(81701),h=r(5636),p=r(72431),f=r(11985),m=r(25230),g=r(18978),y=r(73506),b=r(77362),w=r(28455),v=r(48674),E=r(53520),C=r(58856),A=r(21672),x=r(61609);async function I(e,t){let{account:s=e.account,authorizationList:p,batch:m=!!e.batch?.multicall,blockHash:b,blockNumber:C,blockTag:I=e.experimental_blockTag??"latest",requireCanonical:S,accessList:T,blobs:k,blockOverrides:R,code:M,data:B,factory:j,factoryData:U,gas:$,gasPrice:L,maxFeePerBlobGas:D,maxFeePerGas:F,maxPriorityFeePerGas:H,nonce:z,requestOptions:W,to:q,value:V,stateOverride:G,...K}=t,Z=s?(0,a.parseAccount)(s):void 0;if(M&&(j||U))throw new c.BaseError("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(M&&q)throw new c.BaseError("Cannot provide both `code` & `to` as parameters.");let J=M&&B,Y=j&&U&&q&&B,Q=J||Y,X=J?_({code:M,data:B}):Y?function(e){let{data:t,factory:r,factoryData:i,to:a}=e;return(0,f.encodeDeployData)({abi:(0,n.parseAbi)(["constructor(address, bytes, address, bytes)"]),bytecode:l.deploylessCallViaFactoryBytecode,args:[a,t,r,i]})}({data:B,factory:j,factoryData:U,to:q}):B;try{(0,x.assertRequest)(t);let r=(0,y.formatBlockParameter)({blockHash:b,blockNumber:C,blockTag:I,requireCanonical:S}),n=R?i.toRpc(R):void 0,a=(0,A.serializeStateOverride)(G),s=e.chain?.formatters?.transactionRequest?.format,l=(s||E.formatTransactionRequest)({...(0,v.extract)(K,{format:s}),accessList:T,account:Z,authorizationList:p,blobs:k,data:X,gas:$,gasPrice:L,maxFeePerBlobGas:D,maxFeePerGas:F,maxPriorityFeePerGas:H,nonce:z,to:Q?void 0:q,value:V},"call");if(m&&function({request:e}){let{data:t,to:r,...n}=e;return!(!t||t.startsWith(o.aggregate3Signature))&&!!r&&!(Object.values(n).filter(e=>void 0!==e).length>0)}({request:l})&&!n&&void 0===b)try{var ee,et;let{deployless:t=!1}="object"==typeof e.batch?.multicall?e.batch.multicall:{},r=O(e,{blockNumber:C,deployless:t});if(!r||(ee=a,et=r,!(ee&&Object.keys(ee).some(e=>(0,g.isAddressEqual)(e,et)))))return await P(e,{...l,blockHash:b,blockNumber:C,blockTag:I,multicallAddress:r,requestOptions:W,requireCanonical:S,rpcStateOverride:a})}catch(e){if(!(e instanceof u.ClientChainNotConfiguredError)&&!(e instanceof u.ChainDoesNotSupportContract))throw e}let c=(()=>{let e=[l,r];return a&&n?[...e,a,n]:a?[...e,a]:n?[...e,{},n]:e})(),d=await e.request({method:"eth_call",params:c},W);if("0x"===d)return{data:void 0};return{data:d}}catch(s){if(W?.signal?.aborted)throw(0,h.getAbortError)(W.signal);if((0,h.isAbortError)(s))throw s;let n=N(s),{offchainLookup:i,offchainLookupSignature:a}=await Promise.resolve().then(()=>r(56724));if(!1!==e.ccipRead&&n?.slice(0,10)===a&&q)return{data:await i(e,{data:n,requestOptions:W,to:q})};if(Q&&n?.slice(0,10)==="0x101bb98d")throw new d.CounterfactualDeploymentFailedError({factory:j});throw(0,w.getCallError)(s,{...t,account:Z,chain:e.chain})}}let S=0,T=new WeakMap;async function P(e,t){let{batchSize:r=1024,deployless:n=!1,wait:i=0}="object"==typeof e.batch?.multicall?e.batch.multicall:{},{blockHash:a,blockNumber:o,blockTag:c=e.experimental_blockTag??"latest",requireCanonical:u,data:h,multicallAddress:f,requestOptions:g,rpcStateOverride:b,to:w}=t,v=void 0!==f?f:O(e,{blockNumber:o,deployless:n}),E=(0,y.formatBlockParameter)({blockHash:a,blockNumber:o,blockTag:c,requireCanonical:u}),A="string"==typeof E?E:JSON.stringify(E),x=b?`.${JSON.stringify(b)}`:"",{schedule:I}=(0,C.createBatchScheduler)({id:`${e.uid}.${A}.${function(e){if(!e)return"default";let t=T.get(e);if(void 0!==t)return t;let r=S++;
707return T.set(e,r),r}(g)}${x}`,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})),n=(0,m.encodeFunctionData)({abi:s.multicall3Abi,args:[r],functionName:"aggregate3"}),i={...null===v?{data:_({code:l.multicall3Bytecode,data:n})}:{to:v,data:n}},a=await e.request({method:"eth_call",params:b?[i,E,b]:[i,E]},g);return(0,p.decodeFunctionResult)({abi:s.multicall3Abi,args:[r],functionName:"aggregate3",data:a||"0x"})}}),[{returnData:P,success:N}]=await I({data:h,to:w});if(!N)throw new d.RawContractError({data:P});return"0x"===P?{data:void 0}:{data:P}}function O(e,t){let{blockNumber:r,deployless:n}=t;if(n)return null;if(e.chain)return(0,b.getChainContractAddress)({blockNumber:r,chain:e.chain,contract:"multicall3"});throw new u.ClientChainNotConfiguredError}function _(e){let{code:t,data:r}=e;return(0,f.encodeDeployData)({abi:(0,n.parseAbi)(["constructor(bytes, bytes)"]),bytecode:l.deploylessCallViaBytecodeBytecode,args:[t,r]})}function N(e){if(!(e instanceof c.BaseError))return;let t=e.walk();return"object"==typeof t?.data?t.data?.data:t.data}},11139:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHttpRpcClient=function(e,t={}){let{url:r,headers:u}=c(e);return{async request(e){let{body:c,fetchFn:d=t.fetchFn??fetch,maxResponseBodySize:h=t.maxResponseBodySize??0xa00000,onRequest:p=t.onRequest,onResponse:f=t.onResponse,timeout:m=t.timeout??1e4}=e,g={...t.fetchOptions??{},...e.fetchOptions??{}},{headers:y,method:b,signal:w}=g;try{let e,t=await (0,a.withTimeout)(async({signal:e})=>{let t={...g,body:Array.isArray(c)?(0,s.stringify)(c.map(e=>({jsonrpc:"2.0",id:e.id??o.idCache.take(),...e}))):(0,s.stringify)({jsonrpc:"2.0",id:c.id??o.idCache.take(),...c}),headers:{...u,"Content-Type":"application/json",...y},method:b||"POST",signal:w||(m>0?e:null)},n=new Request(r,t),i=await p?.(n,t)??{...t,url:r};return await d(i.url??r,i)},{errorInstance:new n.TimeoutError({body:c,url:r}),timeout:m,signal:!0});f&&await f(t);let i=await l(t,{maxResponseBodySize:h});if(t.headers.get("Content-Type")?.startsWith("application/json"))e=JSON.parse(i);else{e=i;try{e=JSON.parse(e||"{}")}catch(r){if(t.ok)throw r;e={error:e}}}if(!t.ok){if("number"==typeof e.error?.code&&"string"==typeof e.error?.message)return e;throw new n.HttpRequestError({body:c,details:(0,s.stringify)(e.error)||t.statusText,headers:t.headers,status:t.status,url:r})}return e}catch(e){if(w?.aborted)throw(0,i.getAbortError)(w);if((0,i.isAbortError)(e)||e instanceof n.HttpRequestError||e instanceof n.ResponseBodyTooLargeError||e instanceof n.TimeoutError)throw e;throw new n.HttpRequestError({body:c,cause:e,url:r})}}}},t.parseUrl=c;let n=r(17208),i=r(5636),a=r(61580),s=r(68508),o=r(84642);async function l(e,{maxResponseBodySize:t}){if(!1===t)return e.text();let r=e.headers.get("Content-Length");if(r){let e=Number(r);if(e>t)throw new n.ResponseBodyTooLargeError({maxSize:t,size:e})}if(!e.body){let r=await e.text(),i=new TextEncoder().encode(r).length;if(i>t)throw new n.ResponseBodyTooLargeError({maxSize:t,size:i});return r}let i=e.body.getReader(),a=new TextDecoder,s="",o=0;try{for(;;){let{done:e,value:r}=await i.read();if(e)break;if((o+=r.byteLength)>t)throw await i.cancel(),new n.ResponseBodyTooLargeError({maxSize:t,size:o});s+=a.decode(r,{stream:!0})}return s+=a.decode()}finally{i.releaseLock()}}function c(e){try{let t=new URL(e),r=(()=>{if(t.username){let e=`${decodeURIComponent(t.username)}:${decodeURIComponent(t.password)}`;return t.username="",t.password="",{url:t.toString(),headers:{Authorization:`Basic ${btoa(e)}`}}}})();return{url:t.toString(),...r}}catch{return{url:e}}}},11150:(e,t,r)=>{"use strict";r.d(t,{I:()=>o});var n=r(91004),i=r(36442),a=r(17052);let s=(0,n.BX)({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),o=(0,a.X)({state:s,subscribe:e=>(0,n.B1)(s,()=>e(s)),subscribeKey:(e,t)=>(0,i.u$)(s,e,t),showTooltip({message:e,triggerRect:t,variant:r}){s.open=!0,s.message=e,s.triggerRect=t,s.variant=r},hide(){s.open=!1,s.message="",s.triggerRect={width:0,height:0,top:0,left:0}}})},11289:(e,t,r)=>{"use strict";
707Object.defineProperty(t,"__esModule",{value:!0}),t.isImageUri=c,t.getGateway=u,t.resolveAvatarUri=d,t.getJsonImage=h,t.getMetadataAvatarUri=p,t.parseAvatarUri=f,t.parseNftUri=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[r,n,a]=t.split("/"),[s,o]=r.split(":"),[l,c]=n.split(":");if(!s||"eip155"!==s.toLowerCase())throw new i.EnsAvatarInvalidNftUriError({reason:"Only EIP-155 supported"});if(!o)throw new i.EnsAvatarInvalidNftUriError({reason:"Chain ID not found"});if(!c)throw new i.EnsAvatarInvalidNftUriError({reason:"Contract address not found"});if(!a)throw new i.EnsAvatarInvalidNftUriError({reason:"Token ID not found"});if(!l)throw new i.EnsAvatarInvalidNftUriError({reason:"ERC namespace not found"});return{chainID:Number.parseInt(o,10),namespace:l.toLowerCase(),contractAddress:c,tokenID:a}},t.getNftTokenUri=m;let n=r(527),i=r(78869),a=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,s=/^(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,([^"].*)/,l=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function c(e){try{let t=await fetch(e,{method:"HEAD"});if(200===t.status){let e=t.headers.get("content-type");return e?.startsWith("image/")}return!1}catch(t){if("object"==typeof t&&void 0!==t.response||!Object.hasOwn(globalThis,"Image"))return!1;return new Promise(t=>{let r=new Image;r.onload=()=>{t(!0)},r.onerror=()=>{t(!1)},r.src=e})}}function u(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function d({uri:e,gatewayUrls:t}){let r=o.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};let n=u(t?.ipfs,"https://ipfs.io"),c=u(t?.arweave,"https://arweave.net"),d=e.match(a),{protocol:h,subpath:p,target:f,subtarget:m=""}=d?.groups||{},g="ipns:/"===h||"ipns/"===p,y="ipfs:/"===h||"ipfs/"===p||s.test(e);if(e.startsWith("http")&&!g&&!y){let r=e;return t?.arweave&&(r=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:r,isOnChain:!1,isEncoded:!1}}if((g||y)&&f)return{uri:`${n}/${g?"ipns":"ipfs"}/${f}${m}`,isOnChain:!1,isEncoded:!1};if("ar:/"===h&&f)return{uri:`${c}/${f}${m||""}`,isOnChain:!1,isEncoded:!1};let b=e.replace(l,"");if(b.startsWith("<svg")&&(b=`data:image/svg+xml;base64,${btoa(b)}`),b.startsWith("data:")||b.startsWith("{"))return{uri:b,isOnChain:!0,isEncoded:!1};throw new i.EnsAvatarUriResolutionError({uri:e})}function h(e){if("object"!=typeof e||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new i.EnsAvatarInvalidMetadataError({data:e});return e.image||e.image_url||e.image_data}async function p({gatewayUrls:e,uri:t}){try{let r=await fetch(t).then(e=>e.json());return await f({gatewayUrls:e,uri:h(r)})}catch{throw new i.EnsAvatarUriResolutionError({uri:t})}}async function f({gatewayUrls:e,uri:t}){let{uri:r,isOnChain:n}=d({uri:t,gatewayUrls:e});if(n||await c(r))return r;throw new i.EnsAvatarUriResolutionError({uri:t})}async function m(e,{nft:t}){if("erc721"===t.namespace)return(0,n.readContract)(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(0,n.readContract)(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 i.EnsAvatarUnsupportedNamespaceError({namespace:t.namespace})}},11558:(e,t,r)=>{"use strict";r.d(t,{o:()=>a});var n=r(47482),i=r(99347);let a={set(e,t){i.Q.isClient&&localStorage.setItem(`${n.s1.STORAGE_KEY}${e}`,t)},get:e=>i.Q.isClient?localStorage.getItem(`${n.s1.STORAGE_KEY}${e}`):null,delete(e,t){i.Q.isClient&&(t?localStorage.removeItem(e):localStorage.removeItem(`${n.s1.STORAGE_KEY}${e}`))}}},11985:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeDeployData=function(e){let{abi:t,args:r,bytecode:o}=e;if(!r||0===r.length)return o;let l=t.find(e=>"type"in e&&"constructor"===e.type);if(!l)throw new n.AbiConstructorNotFoundError({docsPath:s});
707if(!("inputs"in l)||!l.inputs||0===l.inputs.length)throw new n.AbiConstructorParamsNotFoundError({docsPath:s});let c=(0,a.encodeAbiParameters)(l.inputs,r);return(0,i.concatHex)([o,c])};let n=r(82311),i=r(26504),a=r(66008),s="/docs/contract/encodeDeployData"},12026:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCallsStatus=l;let n=r(4906),i=r(62704),a=r(14972),s=r(63178),o=r(32508);async function l(e,t){async function r(t){if(t.endsWith(o.fallbackMagicIdentifier.slice(2))){let r=(0,i.trim)((0,n.sliceHex)(t,-64,-32)),s=(0,n.sliceHex)(t,0,-64).slice(2).match(/.{1,64}/g),l=await Promise.all(s.map(t=>o.fallbackTransactionErrorMagicIdentifier.slice(2)!==t?e.request({method:"eth_getTransactionReceipt",params:[`0x${t}`]},{dedupe:!0}):void 0)),c=l.some(e=>null===e)?100:l.every(e=>e?.status==="0x1")?200:l.every(e=>e?.status==="0x0")?500:600;return{atomic:!1,chainId:(0,a.hexToNumber)(r),receipts:l.filter(Boolean),status:c,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[t]})}let{atomic:l=!1,chainId:c,receipts:u,version:d="2.0.0",...h}=await r(t.id),[p,f]=(()=>{let e=h.status;return e>=100&&e<200?["pending",e]:e>=200&&e<300?["success",e]:e>=300&&e<700?["failure",e]:"CONFIRMED"===e?["success",200]:"PENDING"===e?["pending",100]:[void 0,e]})();return{...h,atomic:l,chainId:c?(0,a.hexToNumber)(c):void 0,receipts:u?.map(e=>({...e,blockNumber:(0,a.hexToBigInt)(e.blockNumber),gasUsed:(0,a.hexToBigInt)(e.gasUsed),status:s.receiptStatuses[e.status]}))??[],statusCode:f,status:p,version:d}}},12050:(e,t,r)=>{"use strict";r.d(t,{S:()=>f});var n="[big.js] ",i=n+"Invalid ",a=i+"decimal places",s=i+"rounding mode",o=n+"Division by zero",l={},c=void 0,u=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function d(e,t,r,n){var i=e.c;if(r===c&&(r=e.constructor.RM),0!==r&&1!==r&&2!==r&&3!==r)throw Error(s);if(t<1)n=3===r&&(n||!!i[0])||0===t&&(1===r&&i[0]>=5||2===r&&(i[0]>5||5===i[0]&&(n||i[1]!==c))),i.length=1,n?(e.e=e.e-t+1,i[0]=1):i[0]=e.e=0;else if(t<i.length){if(n=1===r&&i[t]>=5||2===r&&(i[t]>5||5===i[t]&&(n||i[t+1]!==c||1&i[t-1]))||3===r&&(n||!!i[0]),i.length=t,n){for(;++i[--t]>9;)if(i[t]=0,0===t){++e.e,i.unshift(1);break}}for(t=i.length;!i[--t];)i.pop()}return e}function h(e,t,r){var n=e.e,i=e.c.join(""),a=i.length;if(t)i=i.charAt(0)+(a>1?"."+i.slice(1):"")+(n<0?"e":"e+")+n;else if(n<0){for(;++n;)i="0"+i;i="0."+i}else if(n>0)if(++n>a)for(n-=a;n--;)i+="0";else n<a&&(i=i.slice(0,n)+"."+i.slice(n));else a>1&&(i=i.charAt(0)+"."+i.slice(1));return e.s<0&&r?"-"+i:i}l.abs=function(){var e=new this.constructor(this);return e.s=1,e},l.cmp=function(e){var t,r=this.c,n=(e=new this.constructor(e)).c,i=this.s,a=e.s,s=this.e,o=e.e;if(!r[0]||!n[0])return r[0]?i:n[0]?-a:0;if(i!=a)return i;if(t=i<0,s!=o)return s>o^t?1:-1;for(i=-1,a=(s=r.length)<(o=n.length)?s:o;++i<a;)if(r[i]!=n[i])return r[i]>n[i]^t?1:-1;return s==o?0:s>o^t?1:-1},l.div=function(e){var t=this.constructor,r=this.c,n=(e=new t(e)).c,i=this.s==e.s?1:-1,s=t.DP;if(s!==~~s||s<0||s>1e6)throw Error(a);if(!n[0])throw Error(o);if(!r[0])return e.s=i,e.c=[e.e=0],e;var l,u,h,p,f,m=n.slice(),g=l=n.length,y=r.length,b=r.slice(0,l),w=b.length,v=e,E=v.c=[],C=0,A=s+(v.e=this.e-e.e)+1;for(v.s=i,i=A<0?0:A,m.unshift(0);w++<l;)b.push(0);do{for(h=0;h<10;h++){if(l!=(w=b.length))p=l>w?1:-1;else for(f=-1,p=0;++f<l;)if(n[f]!=b[f]){p=n[f]>b[f]?1:-1;break}if(p<0){for(u=w==l?n:m;w;){if(b[--w]<u[w]){for(f=w;f&&!b[--f];)b[f]=9;--b[f],b[w]+=10}b[w]-=u[w]}for(;!b[0];)b.shift()}else break}E[C++]=p?h:++h,b[0]&&p?b[w]=r[g]||0:b=[r[g]]}while((g++<y||b[0]!==c)&&i--);return!E[0]&&1!=C&&(E.shift(),v.e--,A--),C>A&&d(v,A,t.RM,b[0]!==c),v},l.eq=function(e){return 0===this.cmp(e)},l.gt=function(e){return this.cmp(e)>0},l.gte=function(e){return this.cmp(e)>-1},l.lt=function(e){return 0>this.cmp(e)},l.lte=function(e){return 1>this.cmp(e)},l.minus=l.sub=function(e){var t,r,n,i,a=this.constructor,s=this.s,o=(e=new a(e)).s;if(s!=o)return e.s=-o,this.plus(e);var l=this.c.slice(),c=this.e,u=e.c,d=e.e;if(!l[0]||!u[0])return u[0]?e.s=-o:l[0]?e=new a(this):e.s=1,e;if(s=c-d){for((i=s<0)?(s=-s,n=l):(d=c,n=u),n.reverse(),o=s;o--;)n.push(0);n.reverse()}else for(r=((i=l.length<u.length)?l:u).length,s=o=0;o<r;o++)if(l[o]!=u[o]){i=l[o]<u[o];break}if(i&&(n=l,l=u,u=n,e.s=-e.s),(o=(r=u.length)-(t=l.length))>0)for(;o--;)l[t++]=0;for(o=t;r>s;){if(l[--r]<u[r]){for(t=r;t&&!l[--t];)l[t]=9;--l[t],l[r]+=10}l[r]-=u[r]}for(;0===l[--o];)l.pop();for(;0===l[0];)l.shift(),--d;return l[0]||(e.s=1,l=[d=0]),e.c=l,e.e=d,e},l.mod=function(e){var t,r=this,n=r.constructor,i=r.s,a=(e=new n(e)).s;if(!e.c[0])throw Error(o);return(r.s=e.s=1,t=1==e.cmp(r),r.s=i,e.s=a,t)?new n(r):(i=n.DP,a=n.RM,n.DP=n.RM=0,r=r.div(e),n.DP=i,n.RM=a,this.minus(r.times(e)))},l.neg=function(){var e=new this.constructor(this);return e.s=-e.s,e},l.plus=l.add=function(e){var t,r,n,i=this.constructor;if(e=new i(e),this.s!=e.s)return e.s=-e.s,this.minus(e);var a=this.e,s=this.c,o=e.e,l=e.c;if(!s[0]||!l[0])return l[0]||(s[0]?e=new i(this):e.s=this.s),e;if(s=s.slice(),t=a-o){for(t>0?(o=a,n=l):(t=-t,n=s),n.reverse();t--;)n.push(0);n.reverse()}for(s.length-l.length<0&&(n=l,l=s,s=n),t=l.length,r=0;t;s[t]%=10)r=(s[--t]=s[t]+l[t]+r)/10|0;for(r&&(s.unshift(r),++o),t=s.length;0===s[--t];)s.pop();return e.c=s,e.e=o,e},l.pow=function(e){var t=this,r=new t.constructor("1"),n=r,a=e<0;if(e!==~~e||e<-1e6||e>1e6)throw Error(i+"exponent");for(a&&(e=-e);1&e&&(n=n.times(t)),e>>=1;)t=t.times(t);return a?r.div(n):n},l.prec=function(e,t){if(e!==~~e||e<1||e>1e6)throw Error(i+"precision");return d(new this.constructor(this),e,t)},l.round=function(e,t){if(e===c)e=0;else if(e!==~~e||e<-1e6||e>1e6)throw Error(a);return d(new this.constructor(this),e+this.e+1,t)},l.sqrt=function(){var e,t,r,i=this.constructor,a=this.s,s=this.e,o=new i("0.5");
707if(!this.c[0])return new i(this);if(a<0)throw Error(n+"No square root");0===(a=Math.sqrt(+h(this,!0,!0)))||a===1/0?((t=this.c.join("")).length+s&1||(t+="0"),s=((s+1)/2|0)-(s<0||1&s),e=new i(((a=Math.sqrt(t))==1/0?"5e":(a=a.toExponential()).slice(0,a.indexOf("e")+1))+s)):e=new i(a+""),s=e.e+(i.DP+=4);do r=e,e=o.times(r.plus(this.div(r)));while(r.c.slice(0,s).join("")!==e.c.slice(0,s).join(""));return d(e,(i.DP-=4)+e.e+1,i.RM)},l.times=l.mul=function(e){var t,r=this.constructor,n=this.c,i=(e=new r(e)).c,a=n.length,s=i.length,o=this.e,l=e.e;if(e.s=this.s==e.s?1:-1,!n[0]||!i[0])return e.c=[e.e=0],e;for(e.e=o+l,a<s&&(t=n,n=i,i=t,l=a,a=s,s=l),t=Array(l=a+s);l--;)t[l]=0;for(o=s;o--;){for(s=0,l=a+o;l>o;)s=t[l]+i[o]*n[l-o-1]+s,t[l--]=s%10,s=s/10|0;t[l]=s}for(s?++e.e:t.shift(),o=t.length;!t[--o];)t.pop();return e.c=t,e},l.toExponential=function(e,t){var r=this,n=r.c[0];if(e!==c){if(e!==~~e||e<0||e>1e6)throw Error(a);for(r=d(new r.constructor(r),++e,t);r.c.length<e;)r.c.push(0)}return h(r,!0,!!n)},l.toFixed=function(e,t){var r=this,n=r.c[0];if(e!==c){if(e!==~~e||e<0||e>1e6)throw Error(a);for(r=d(new r.constructor(r),e+r.e+1,t),e=e+r.e+1;r.c.length<e;)r.c.push(0)}return h(r,!1,!!n)},l[Symbol.for("nodejs.util.inspect.custom")]=l.toJSON=l.toString=function(){var e=this.constructor;return h(this,this.e<=e.NE||this.e>=e.PE,!!this.c[0])},l.toNumber=function(){var e=+h(this,!0,!0);if(!0===this.constructor.strict&&!this.eq(e.toString()))throw Error(n+"Imprecise conversion");return e},l.toPrecision=function(e,t){var r=this,n=r.constructor,a=r.c[0];if(e!==c){if(e!==~~e||e<1||e>1e6)throw Error(i+"precision");for(r=d(new n(r),e,t);r.c.length<e;)r.c.push(0)}return h(r,e<=r.e||r.e<=n.NE||r.e>=n.PE,!!a)},l.valueOf=function(){var e=this.constructor;if(!0===e.strict)throw Error(n+"valueOf disallowed");return h(this,this.e<=e.NE||this.e>=e.PE,!0)};var p=function e(){function t(r){if(!(this instanceof t))return r===c?e():new t(r);if(r instanceof t)this.s=r.s,this.e=r.e,this.c=r.c.slice();else{if("string"!=typeof r){if(!0===t.strict&&"bigint"!=typeof r)throw TypeError(i+"value");r=0===r&&1/r<0?"-0":String(r)}!function(e,t){var r,n,a;if(!u.test(t))throw Error(i+"number");for(e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),a=t.length,n=0;n<a&&"0"==t.charAt(n);)++n;if(n==a)e.c=[e.e=0];else{for(;a>0&&"0"==t.charAt(--a););for(e.e=r-n-1,e.c=[],r=0;n<=a;)e.c[r++]=+t.charAt(n++)}}(this,r)}this.constructor=t}return t.prototype=l,t.DP=20,t.RM=1,t.NE=-7,t.PE=21,t.strict=!1,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}();let f={bigNumber(e,t={safe:!1}){try{if(!e)return new p(0);return new p(e)}catch(e){if(t.safe)return new p(0);throw e}},formatNumber(e,t){let{decimals:r,round:n=8,safe:i=!0}=t;return f.bigNumber(e,{safe:i}).div(new p(10).pow(r)).round(n)},multiply(e,t){if(void 0===e||void 0===t)return new p(0);let r=new p(e),n=new p(t);return r.times(n)},toFixed:(e,t=2)=>void 0===e||""===e?new p(0).toFixed(t):new p(e).toFixed(t),formatNumberToLocalString:(e,t=2)=>void 0===e||""===e?"0.00":"number"==typeof e?e.toLocaleString("en-US",{maximumFractionDigits:t,minimumFractionDigits:t,roundingMode:"floor"}):parseFloat(e).toLocaleString("en-US",{maximumFractionDigits:t,minimumFractionDigits:t,roundingMode:"floor"}),parseLocalStringToNumber:e=>void 0===e||""===e?0:new p(e.replace(/,/gu,"")).toNumber()}},12148:(e,t,r)=>{"use strict";r.d(t,{A:()=>i,b:()=>n});var n=r(30445);let i=n},12166:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multicall=f;let n=r(91472),i=r(13894),a=r(82311),s=r(45226),o=r(81701),l=r(72431),c=r(25230),u=r(77362),d=r(38297),h=r(95847),p=r(527);async function f(e,t){let{account:r,authorizationList:f,allowFailure:m=!0,blockHash:g,blockNumber:y,blockOverrides:b,blockTag:w,requireCanonical:v,stateOverride:E}=t,C=t.contracts,A="object"==typeof e.batch?.multicall?e.batch.multicall:{},x=t.batchSize??A.batchSize??1024,I=t.deployless??A.deployless??!1,S=(()=>{if(t.multicallAddress)return t.multicallAddress;if(I)return null;if(e.chain)return(0,u.getChainContractAddress)({blockNumber:y,chain:e.chain,contract:"multicall3"});throw Error("client chain not configured. multicallAddress is required.")})(),T=[[]],P=0,O=0;for(let e=0;e<C.length;e++){let{abi:t,address:n,args:i,functionName:a}=C[e];try{let e=(0,c.encodeFunctionData)({abi:t,args:i,functionName:a});O+=(e.length-2)/2,x>0&&O>x&&T[P].length>
7070&&(P++,O=(e.length-2)/2,T[P]=[]),T[P]=[...T[P],{allowFailure:!0,callData:e,target:n}]}catch(s){let e=(0,d.getContractError)(s,{abi:t,address:n,args:i,docsPath:"/docs/contract/multicall",functionName:a,sender:r});if(!m)throw e;T[P]=[...T[P],{allowFailure:!0,callData:"0x",target:n}]}}let _=await Promise.allSettled(T.map(t=>(0,h.getAction)(e,p.readContract,"readContract")({...null===S?{code:i.multicall3Bytecode}:{address:S},abi:n.multicall3Abi,account:r,args:[t],authorizationList:f,blockHash:g,blockNumber:y,blockOverrides:b,blockTag:w,functionName:"aggregate3",requireCanonical:v,stateOverride:E}))),N=[];for(let e=0;e<_.length;e++){let t=_[e];if("rejected"===t.status){if(!m)throw t.reason;for(let r=0;r<T[e].length;r++)N.push({status:"failure",error:t.reason,result:void 0});continue}let r=t.value;for(let t=0;t<r.length;t++){let{returnData:n,success:i}=r[t],{callData:s}=T[e][t],{abi:c,address:u,functionName:h,args:p}=C[N.length];try{if("0x"===s)throw new a.AbiDecodingZeroDataError;if(!i)throw new o.RawContractError({data:n});let e=(0,l.decodeFunctionResult)({abi:c,args:p,data:n,functionName:h});N.push(m?{result:e,status:"success"}:e)}catch(t){let e=(0,d.getContractError)(t,{abi:c,address:u,args:p,docsPath:"/docs/contract/multicall",functionName:h});if(!m)throw e;N.push({error:e,result:void 0,status:"failure"})}}}if(N.length!==C.length)throw new s.BaseError("multicall results mismatch");return N}},12244:(e,t,r)=>{"use strict";t.I0=t.DH=t.NX=t.u8=t.cY=void 0,t.av=t.O6=t.w3=t.Wg=void 0;let n=r(44168);function i(e){if(!(e instanceof Uint8Array))throw TypeError("b must be a Uint8Array")}function a(e){return i(e),n.Buffer.from(e.buffer,e.byteOffset,e.length)}class s{constructor(e,t){if(!Number.isInteger(e))throw TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}getSpan(e,t){if(0>this.span)throw RangeError("indeterminate span");return this.span}replicate(e){let t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}}function o(e,t){return t.property?e+"["+t.property+"]":e}class l extends s{isCount(){throw Error("ExternalLayout is abstract")}}class c extends l{constructor(e,t=0,r){if(!(e instanceof s))throw TypeError("layout must be a Layout");if(!Number.isInteger(t))throw TypeError("offset must be integer or undefined");super(e.span,r||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof u||this.layout instanceof d}decode(e,t=0){return this.layout.decode(e,t+this.offset)}encode(e,t,r=0){return this.layout.encode(e,t,r+this.offset)}}class u extends s{constructor(e,t){if(super(e,t),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(e,t=0){return a(e).readUIntLE(t,this.span)}encode(e,t,r=0){return a(t).writeUIntLE(e,r,this.span),this.span}}class d extends s{constructor(e,t){if(super(e,t),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(e,t=0){return a(e).readUIntBE(t,this.span)}encode(e,t,r=0){return a(t).writeUIntBE(e,r,this.span),this.span}}function h(e){let t=Math.floor(e/0x100000000);return{hi32:t,lo32:e-0x100000000*t}}function p(e,t){return 0x100000000*e+t}class f extends s{constructor(e){super(8,e)}decode(e,t=0){let r=a(e),n=r.readUInt32LE(t);return p(r.readUInt32LE(t+4),n)}encode(e,t,r=0){let n=h(e),i=a(t);return i.writeUInt32LE(n.lo32,r),i.writeUInt32LE(n.hi32,r+4),8}}class m extends s{constructor(e){super(8,e)}decode(e,t=0){let r=a(e),n=r.readUInt32LE(t);return p(r.readInt32LE(t+4),n)}encode(e,t,r=0){let n=h(e),i=a(t);return i.writeUInt32LE(n.lo32,r),i.writeInt32LE(n.hi32,r+4),8}}class g extends s{constructor(e,t,r){if(!(e instanceof s))throw TypeError("elementLayout must be a Layout");if(!(t instanceof l&&t.isCount()||Number.isInteger(t)&&0<=t))throw TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let n=-1;t instanceof l||!(0<e.span)||(n=t*e.span),super(n,r),this.elementLayout=e,this.count=t}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0,n=this.count;if(n instanceof l&&(n=n.decode(e,t)),0<this.elementLayout.span)r=n*this.elementLayout.span;else{let i=0;for(;i<n;)r+=this.elementLayout.getSpan(e,t+r),++i}return r}decode(e,t=0){let r=[],n=0,i=this.count;for(i instanceof l&&(i=i.decode(e,t));n<i;)r.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),n+=1;return r}encode(e,t,r=0){let n=this.elementLayout,i=e.reduce((e,i)=>e+n.encode(i,t,r+e),0);return this.count instanceof l&&this.count.encode(e.length,t,r),i}}class y extends s{constructor(e,t,r){if(!(Array.isArray(e)&&e.reduce((e,t)=>
vendor: 4,357 bytes, line 707
707e&&t instanceof s,!0)))throw TypeError("fields must be array of Layout instances");for(let n of("boolean"==typeof t&&void 0===r&&(r=t,t=void 0),e))if(0>n.span&&void 0===n.property)throw Error("fields cannot contain unnamed variable-length layout");let n=-1;try{n=e.reduce((e,t)=>e+t.getSpan(),0)}catch(e){}super(n,t),this.fields=e,this.decodePrefixes=!!r}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0;try{r=this.fields.reduce((r,n)=>{let i=n.getSpan(e,t);return t+=i,r+i},0)}catch(e){throw RangeError("indeterminate span")}return r}decode(e,t=0){i(e);let r=this.makeDestinationObject();for(let n of this.fields)if(void 0!==n.property&&(r[n.property]=n.decode(e,t)),t+=n.getSpan(e,t),this.decodePrefixes&&e.length===t)break;return r}encode(e,t,r=0){let n=r,i=0,a=0;for(let n of this.fields){let s=n.span;if(a=0<s?s:0,void 0!==n.property){let i=e[n.property];void 0!==i&&(a=n.encode(i,t,r),0>s&&(s=n.getSpan(t,r)))}i=r,r+=s}return i+a-n}fromArray(e){let t=this.makeDestinationObject();for(let r of this.fields)void 0!==r.property&&0<e.length&&(t[r.property]=e.shift());return t}layoutFor(e){if("string"!=typeof e)throw TypeError("property must be string");for(let t of this.fields)if(t.property===e)return t}offsetOf(e){if("string"!=typeof e)throw TypeError("property must be string");let t=0;for(let r of this.fields){if(r.property===e)return t;0>r.span?t=-1:0<=t&&(t+=r.span)}}}function b(e){return 0>e&&(e+=0x100000000),e}class w extends s{constructor(e,t,r){if(!(e instanceof u||e instanceof d))throw TypeError("word must be a UInt or UIntBE layout");if("string"==typeof t&&void 0===r&&(r=t,t=!1),4<e.span)throw RangeError("word cannot exceed 32 bits");super(e.span,r),this.word=e,this.msb=!!t,this.fields=[];let n=0;this._packedSetValue=function(e){return n=b(e),this},this._packedGetValue=function(){return n}}decode(e,t=0){let r=this.makeDestinationObject(),n=this.word.decode(e,t);for(let t of(this._packedSetValue(n),this.fields))void 0!==t.property&&(r[t.property]=t.decode(e));return r}encode(e,t,r=0){let n=this.word.decode(t,r);for(let t of(this._packedSetValue(n),this.fields))if(void 0!==t.property){let r=e[t.property];void 0!==r&&t.encode(r)}return this.word.encode(this._packedGetValue(),t,r)}addField(e,t){let r=new v(this,e,t);return this.fields.push(r),r}addBoolean(e){let t=new E(this,e);return this.fields.push(t),t}fieldFor(e){if("string"!=typeof e)throw TypeError("property must be string");for(let t of this.fields)if(t.property===e)return t}}class v{constructor(e,t,r){if(!(e instanceof w))throw TypeError("container must be a BitStructure");if(!Number.isInteger(t)||0>=t)throw TypeError("bits must be positive integer");let n=8*e.span,i=e.fields.reduce((e,t)=>e+t.bits,0);if(t+i>n)throw Error("bits too long for span remainder ("+(n-i)+" of "+n+" remain)");this.container=e,this.bits=t,this.valueMask=(1<<t)-1,32===t&&(this.valueMask=0xffffffff),this.start=i,this.container.msb&&(this.start=n-i-t),this.wordMask=b(this.valueMask<<this.start),this.property=r}decode(e,t){return b(this.container._packedGetValue()&this.wordMask)>>>this.start}encode(e){if("number"!=typeof e||!Number.isInteger(e)||e!==b(e&this.valueMask))throw TypeError(o("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let t=this.container._packedGetValue(),r=b(e<<this.start);this.container._packedSetValue(b(t&~this.wordMask)|r)}}class E extends v{constructor(e,t){super(e,1,t)}decode(e,t){return!!super.decode(e,t)}encode(e){"boolean"==typeof e&&(e*=1),super.encode(e)}}class C extends s{constructor(e,t){if(!(e instanceof l&&e.isCount()||Number.isInteger(e)&&0<=e))throw TypeError("length must be positive integer or an unsigned integer ExternalLayout");let r=-1;e instanceof l||(r=e),super(r,t),this.length=e}getSpan(e,t){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),r}decode(e,t=0){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),a(e).slice(t,t+r)}encode(e,t,r){let n=this.length;if(this.length instanceof l&&(n=e.length),!(e instanceof Uint8Array&&n===e.length))throw TypeError(o("Blob.encode",this)+" requires (length "+n+") Uint8Array as src");if(r+n>t.length)throw RangeError("encoding overruns Uint8Array");let i=a(e);return a(t).write(i.toString("hex"),r,n,"hex"),this.length instanceof l&&this.length.encode(n,t,r),n}}t.cY=(e,t,r)=>new c(e,t,r),t.u8=e=>new u(1,e),t.NX=e=>new u(2,e),t.DH=e=>
707new u(4,e),t.I0=e=>new f(e),t.Wg=e=>new m(e),t.w3=(e,t,r)=>new y(e,t,r),t.O6=(e,t,r)=>new g(e,t,r),t.av=(e,t)=>new C(e,t)},12249:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AppKitAccountButton:()=>A,AppKitButton:()=>P,AppKitConnectButton:()=>B,AppKitNetworkButton:()=>W,W3mAccountButton:()=>C,W3mAccountSettingsView:()=>es,W3mAccountView:()=>eH,W3mAllWalletsView:()=>tO,W3mButton:()=>T,W3mChooseAccountNameView:()=>rR,W3mConnectButton:()=>M,W3mConnectView:()=>t6,W3mConnectWalletsView:()=>rH,W3mConnectingExternalView:()=>ro,W3mConnectingMultiChainView:()=>ru,W3mConnectingWcBasicView:()=>rO,W3mConnectingWcView:()=>rT,W3mDownloadsView:()=>rM,W3mFooter:()=>V.H,W3mFundWalletView:()=>e9,W3mGetWalletView:()=>rB,W3mNetworkButton:()=>z,W3mNetworkSwitchView:()=>rK,W3mNetworksView:()=>r1,W3mProfileWalletsView:()=>e4,W3mRouter:()=>q.J,W3mSIWXSignMessageView:()=>nh,W3mSwitchActiveChainView:()=>r3,W3mUnsupportedChainView:()=>ne,W3mWalletCompatibleNetworksView:()=>na,W3mWhatIsANetworkView:()=>r8,W3mWhatIsAWalletView:()=>rL});var n=r(56059),i=r(81767),a=r(55284),s=r(18627),o=r(82376),l=r(12573),c=r(28877),u=r(33432),d=r(53984),h=r(2076);r(79909),r(39909),r(48054),r(83627),r(6077);var p=r(46756),f=r(55405),m=r(63412);r(35305);var g=r(91392);let y=(0,g.AH)` 708 :host { 709 display: block; 710 } 711 712 button { 713 border-radius: ${({borderRadius:e})=>e["20"]}; 714 background: ${({tokens:e})=>e.theme.foregroundPrimary}; 715 display: flex; 716 gap: ${({spacing:e})=>e[1]}; 717 padding: ${({spacing:e})=>e[1]}; 718 color: ${({tokens:e})=>e.theme.textSecondary}; 719 border-radius: ${({borderRadius:e})=>e[16]}; 720 height: 32px; 721 transition: box-shadow ${({durations:e})=>e.lg} 722 ${({easings:e})=>e["ease-out-power-2"]}; 723 will-change: box-shadow; 724 } 725 726 button wui-flex.avatar-container { 727 width: 28px; 728 height: 24px; 729 position: relative; 730 731 wui-flex.network-image-container { 732 position: absolute; 733 bottom: 0px; 734 right: 0px; 735 width: 12px; 736 height: 12px; 737 } 738 739 wui-flex.network-image-container wui-icon { 740 background: ${({tokens:e})=>e.theme.foregroundPrimary}; 741 } 742 743 wui-avatar { 744 width: 24px; 745 min-width: 24px; 746 height: 24px; 747 } 748 749 wui-icon { 750 width: 12px; 751 height: 12px; 752 } 753 } 754 755 wui-image, 756 wui-icon { 757 border-radius: ${({borderRadius:e})=>e[16]}; 758 } 759 760 wui-text { 761 white-space: nowrap; 762 } 763 764 button wui-flex.balance-container { 765 height: 100%; 766 border-radius: ${({borderRadius:e})=>e[16]}; 767 padding-left: ${({spacing:e})=>e[1]}; 768 padding-right: ${({spacing:e})=>e[1]}; 769 background: ${({tokens:e})=>e.theme.foregroundSecondary}; 770 color: ${({tokens:e})=>e.theme.textPrimary}; 771 transition: background-color ${({durations:e})=>e.lg} 772 ${({easings:e})=>e["ease-out-power-2"]}; 773 will-change: background-color; 774 } 775 776 /* -- Hover & Active states ----------------------------------------------------------- */ 777 button:hover:enabled, 778 button:focus-visible:enabled, 779 button:active:enabled { 780 box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.2); 781 782 wui-flex.balance-container { 783 background: ${({tokens:e})=>e.theme.foregroundTertiary}; 784 } 785 } 786 787 /* -- Disabled states --------------------------------------------------- */ 788 button:disabled wui-text, 789 button:disabled wui-flex.avatar-container { 790 opacity: 0.3; 791 } 792`;var b=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let w=class extends n.WF{constructor(){super(...arguments),this.networkSrc=void 0,this.avatarSrc=void 0,this.balance=void 0,this.isUnsupportedChain=void 0,this.disabled=!1,this.loading=!1,this.address="",this.profileName="",this.charsStart=4,this.charsEnd=6}render(){return(0,n.qy)` 793 <button 794 ?disabled=${this.disabled} 795 class=${(0,a.J)(this.balance?void 0:"local-no-balance")} 796 data-error=${(0,a.J)(this.isUnsupportedChain)} 797 > 798 ${this.imageTemplate()} ${this.addressTemplate()} ${this.balanceTemplate()} 799 </button> 800 `}imageTemplate(){let e=this.networkSrc?(0,n.qy)`<wui-image src=${this.networkSrc}></wui-image>`:(0,n.qy)` <wui-icon size="inherit" color="inherit" name="networkPlaceholder"></wui-icon> `;return(0,n.qy)`<wui-flex class="avatar-container"> 801 <wui-avatar 802 .imageSrc=${this.avatarSrc} 803 alt=${this.address} 804 address=${this.address} 805 ></wui-avatar> 806 807 <wui-flex class="network-image-container">${e}</wui-flex> 808 </wui-flex>`}addressTemplate(){return(0,n.qy)`<wui-text variant="md-regular" color="inherit"> 809 ${this.address?f.Z.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?18:this.charsStart,charsEnd:this.profileName?0:this.charsEnd,truncate:this.profileName?"end":"middle"}):null} 810 </wui-text>`}balanceTemplate(){if(this.balance){let e=this.loading?(0,n.qy)`<wui-loading-spinner size="md" color="inherit"></wui-loading-spinner>`:(0,n.qy)`<wui-text variant="md-regular" color="inherit"> ${this.balance}</wui-text>`;return(0,n.qy)`<wui-flex alignItems="center" justifyContent="center" class="balance-container" 811 >${e}</wui-flex 812 >`}return null}};w.styles=[p.W5,p.fD,y],b([(0,i.MZ)()],w.prototype,"networkSrc",void 0),b([(0,i.MZ)()],w.prototype,"avatarSrc",void 0),b([(0,i.MZ)()],w.prototype,"balance",void 0),b([(0,i.MZ)({type:Boolean})],w.prototype,"isUnsupportedChain",void 0),b([(0,i.MZ)({type:Boolean})],w.prototype,"disabled",void 0),b([(0,i.MZ)({type:Boolean})],w.prototype,"loading",void 0),b([(0,i.MZ)()],w.prototype,"address",void 0),b([(0,i.MZ)()],w.prototype,"profileName",void 0),b([(0,i.MZ)()],w.prototype,"charsStart",void 0),b([(0,i.MZ)()],w.prototype,"charsEnd",void 0),w=b([(0,m.E)("wui-account-button")],w);var v=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};class E extends n.WF{constructor(){super(...arguments),this.unsubscribe=[],this.disabled=!1,this.balance="show",this.charsStart=4,this.charsEnd=6,this.namespace=void 0,this.isSupported=!!s.H.state.allowUnsupportedChain||!o.W.state.activeChain||o.W.checkIfSupportedNetwork(o.W.state.activeChain)}connectedCallback(){super.connectedCallback(),this.setAccountData(o.W.getAccountData(this.namespace)),this.setNetworkData(o.W.getNetworkData(this.namespace))}firstUpdated(){let e=this.namespace;e?this.unsubscribe.push(o.W.subscribeChainProp("accountState",e=>{this.setAccountData(e)},e),o.W.subscribeChainProp("networkState",t=>{this.setNetworkData(t),this.isSupported=o.W.checkIfSupportedNetwork(e,t?.caipNetwork?.caipNetworkId)},e)):this.unsubscribe.push(l.j.subscribeNetworkImages(()=>{this.networkImage=c.$.getNetworkImage(this.network)}),o.W.subscribeKey("activeCaipAddress",e=>{this.caipAddress=e}),o.W.subscribeChainProp("accountState",e=>{this.setAccountData(e)}),o.W.subscribeKey("activeCaipNetwork",e=>{this.network=e,this.networkImage=c.$.getNetworkImage(e),this.isSupported=!e?.chainNamespace||o.W.checkIfSupportedNetwork(e?.chainNamespace),this.fetchNetworkImage(e)}))}updated(){this.fetchNetworkImage(this.network)}
812disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!o.W.state.activeChain)return null;let e="show"===this.balance,t="string"!=typeof this.balanceVal,{formattedText:r}=u.w.parseBalance(this.balanceVal,this.balanceSymbol);return(0,n.qy)` 813 <wui-account-button 814 .disabled=${!!this.disabled} 815 .isUnsupportedChain=${!s.H.state.allowUnsupportedChain&&!this.isSupported} 816 address=${(0,a.J)(u.w.getPlainAddress(this.caipAddress))} 817 profileName=${(0,a.J)(this.profileName)} 818 networkSrc=${(0,a.J)(this.networkImage)} 819 avatarSrc=${(0,a.J)(this.profileImage)} 820 balance=${e?r:""} 821 @click=${this.onClick.bind(this)} 822 data-testid=${`account-button${this.namespace?`-${this.namespace}`:""}`} 823 .charsStart=${this.charsStart} 824 .charsEnd=${this.charsEnd} 825 ?loading=${t} 826 > 827 </wui-account-button> 828 `}onClick(){this.isSupported||s.H.state.allowUnsupportedChain?d.W.open({namespace:this.namespace}):d.W.open({view:"UnsupportedChain"})}async fetchNetworkImage(e){e?.assets?.imageId&&(this.networkImage=await c.$.fetchNetworkImage(e?.assets?.imageId))}setAccountData(e){e&&(this.caipAddress=e.caipAddress,this.balanceVal=e.balance,this.balanceSymbol=e.balanceSymbol,this.profileName=e.profileName,this.profileImage=e.profileImage)}setNetworkData(e){e&&(this.network=e.caipNetwork,this.networkImage=c.$.getNetworkImage(e.caipNetwork))}}v([(0,i.MZ)({type:Boolean})],E.prototype,"disabled",void 0),v([(0,i.MZ)()],E.prototype,"balance",void 0),v([(0,i.MZ)()],E.prototype,"charsStart",void 0),v([(0,i.MZ)()],E.prototype,"charsEnd",void 0),v([(0,i.MZ)()],E.prototype,"namespace",void 0),v([(0,i.wk)()],E.prototype,"caipAddress",void 0),v([(0,i.wk)()],E.prototype,"balanceVal",void 0),v([(0,i.wk)()],E.prototype,"balanceSymbol",void 0),v([(0,i.wk)()],E.prototype,"profileName",void 0),v([(0,i.wk)()],E.prototype,"profileImage",void 0),v([(0,i.wk)()],E.prototype,"network",void 0),v([(0,i.wk)()],E.prototype,"networkImage",void 0),v([(0,i.wk)()],E.prototype,"isSupported",void 0);let C=class extends E{};C=v([(0,h.EM)("w3m-account-button")],C);let A=class extends E{};A=v([(0,h.EM)("appkit-account-button")],A);let x=(0,n.AH)` 829 :host { 830 display: block; 831 width: max-content; 832 } 833`;var I=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};class S extends n.WF{constructor(){super(...arguments),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.namespace=void 0}firstUpdated(){this.caipAddress=this.namespace?o.W.getAccountData(this.namespace)?.caipAddress:o.W.state.activeCaipAddress,this.namespace?this.unsubscribe.push(o.W.subscribeChainProp("accountState",e=>{this.caipAddress=e?.caipAddress},this.namespace)):this.unsubscribe.push(o.W.subscribeKey("activeCaipAddress",e=>this.caipAddress=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return this.caipAddress?(0,n.qy)` 834 <appkit-account-button 835 .disabled=${!!this.disabled} 836 balance=${(0,a.J)(this.balance)} 837 .charsStart=${(0,a.J)(this.charsStart)} 838 .charsEnd=${(0,a.J)(this.charsEnd)} 839 namespace=${(0,a.J)(this.namespace)} 840 > 841 </appkit-account-button> 842 `:(0,n.qy)` 843 <appkit-connect-button 844 size=${(0,a.J)(this.size)} 845 label=${(0,a.J)(this.label)} 846 loadingLabel=${(0,a.J)(this.loadingLabel)} 847 namespace=${(0,a.J)(this.namespace)} 848 ></appkit-connect-button> 849 `}}S.styles=x,I([(0,i.MZ)({type:Boolean})],S.prototype,"disabled",void 0),I([(0,i.MZ)()],S.prototype,"balance",void 0),I([(0,i.MZ)()],S.prototype,"size",void 0),I([(0,i.MZ)()],S.prototype,"label",void 0),I([(0,i.MZ)()],S.prototype,"loadingLabel",void 0),I([(0,i.MZ)()],S.prototype,"charsStart",void 0),I([(0,i.MZ)()],S.prototype,"charsEnd",void 0),I([(0,i.MZ)()],S.prototype,"namespace",void 0),I([(0,i.wk)()],S.prototype,"caipAddress",void 0);let T=class extends S{};T=I([(0,h.EM)("w3m-button")],T);let P=class extends S{};P=I([(0,h.EM)("appkit-button")],P);let O=(0,g.AH)` 850 :host { 851 position: relative; 852 display: block; 853 } 854 855 button { 856 border-radius: ${({borderRadius:e})=>e[2]}; 857 } 858 859 button[data-size='sm'] { 860 padding: ${({spacing:e})=>e[2]}; 861 } 862 863 button[data-size='md'] { 864 padding: ${({spacing:e})=>e[3]}; 865 } 866 867 button[data-size='lg'] { 868 padding: ${({spacing:e})=>e[4]}; 869 } 870 871 button[data-variant='primary'] { 872 background: ${({tokens:e})=>e.core.backgroundAccentPrimary}; 873 } 874 875 button[data-variant='secondary'] { 876 background: ${({tokens:e})=>e.core.foregroundAccent010}; 877 } 878 879 button:hover:enabled { 880 border-radius: ${({borderRadius:e})=>e[3]}; 881 } 882 883 button:disabled {
884 cursor: not-allowed; 885 } 886 887 button[data-loading='true'] { 888 cursor: not-allowed; 889 } 890 891 button[data-loading='true'][data-size='sm'] { 892 border-radius: ${({borderRadius:e})=>e[32]}; 893 padding: ${({spacing:e})=>e[2]} ${({spacing:e})=>e[3]}; 894 } 895 896 button[data-loading='true'][data-size='md'] { 897 border-radius: ${({borderRadius:e})=>e[20]}; 898 padding: ${({spacing:e})=>e[3]} ${({spacing:e})=>e[4]}; 899 } 900 901 button[data-loading='true'][data-size='lg'] { 902 border-radius: ${({borderRadius:e})=>e[16]}; 903 padding: ${({spacing:e})=>e[4]} ${({spacing:e})=>e[5]}; 904 } 905`;var _=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let N=class extends n.WF{constructor(){super(...arguments),this.size="md",this.variant="primary",this.loading=!1,this.text="Connect Wallet"}render(){return(0,n.qy)` 906 <button 907 data-loading=${this.loading} 908 data-variant=${this.variant} 909 data-size=${this.size} 910 ?disabled=${this.loading} 911 > 912 ${this.contentTemplate()} 913 </button> 914 `}contentTemplate(){let e={primary:"invert",secondary:"accent-primary"};return this.loading?(0,n.qy)`<wui-loading-spinner 915 color=${e[this.variant]} 916 size=${this.size} 917 ></wui-loading-spinner>`:(0,n.qy)` <wui-text variant=${({lg:"lg-regular",md:"md-regular",sm:"sm-regular"})[this.size]} color=${e[this.variant]}> 918 ${this.text} 919 </wui-text>`}};N.styles=[p.W5,p.fD,O],_([(0,i.MZ)()],N.prototype,"size",void 0),_([(0,i.MZ)()],N.prototype,"variant",void 0),_([(0,i.MZ)({type:Boolean})],N.prototype,"loading",void 0),_([(0,i.MZ)()],N.prototype,"text",void 0),N=_([(0,m.E)("wui-connect-button")],N);var k=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};class R extends n.WF{constructor(){super(),this.unsubscribe=[],this.size="md",this.label="Connect Wallet",this.loadingLabel="Connecting...",this.open=d.W.state.open,this.loading=this.namespace?d.W.state.loadingNamespaceMap.get(this.namespace):d.W.state.loading,this.unsubscribe.push(d.W.subscribe(e=>{this.open=e.open,this.loading=this.namespace?e.loadingNamespaceMap.get(this.namespace):e.loading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,n.qy)` 920 <wui-connect-button 921 size=${(0,a.J)(this.size)} 922 .loading=${this.loading} 923 @click=${this.onClick.bind(this)} 924 data-testid=${`connect-button${this.namespace?`-${this.namespace}`:""}`} 925 > 926 ${this.loading?this.loadingLabel:this.label} 927 </wui-connect-button> 928 `}onClick(){this.open?d.W.close():this.loading||d.W.open({view:"Connect",namespace:this.namespace})}}k([(0,i.MZ)()],R.prototype,"size",void 0),k([(0,i.MZ)()],R.prototype,"label",void 0),k([(0,i.MZ)()],R.prototype,"loadingLabel",void 0),k([(0,i.MZ)()],R.prototype,"namespace",void 0),k([(0,i.wk)()],R.prototype,"open",void 0),k([(0,i.wk)()],R.prototype,"loading",void 0);let M=class extends R{};M=k([(0,h.EM)("w3m-connect-button")],M);let B=class extends R{};B=k([(0,h.EM)("appkit-connect-button")],B);var j=r(42242);r(86921);let U=(0,g.AH)` 929 :host { 930 display: block; 931 } 932 933 button { 934 border-radius: ${({borderRadius:e})=>e[32]}; 935 display: flex; 936 gap: ${({spacing:e})=>e[1]}; 937 padding: ${({spacing:e})=>e[1]} ${({spacing:e})=>e[2]} 938 ${({spacing:e})=>e[1]} ${({spacing:e})=>e[1]}; 939 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 940 } 941 942 button:disabled { 943 opacity: 0.5; 944 cursor: not-allowed; 945 } 946 947 @media (hover: hover) { 948 button:hover:enabled { 949 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 950 } 951 } 952 953 button[data-size='sm'] > wui-icon-box, 954 button[data-size='sm'] > wui-image { 955 width: 16px; 956 height: 16px; 957 } 958 959 button[data-size='md'] > wui-icon-box, 960 button[data-size='md'] > wui-image {
961 width: 20px; 962 height: 20px; 963 } 964 965 button[data-size='lg'] > wui-icon-box, 966 button[data-size='lg'] > wui-image { 967 width: 24px; 968 height: 24px; 969 } 970 971 wui-image, 972 wui-icon-box { 973 border-radius: ${({borderRadius:e})=>e[32]}; 974 } 975`;var $=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let L=class extends n.WF{constructor(){super(...arguments),this.imageSrc=void 0,this.isUnsupportedChain=void 0,this.disabled=!1,this.size="lg"}render(){return(0,n.qy)` 976 <button data-size=${this.size} data-testid="wui-network-button" ?disabled=${this.disabled}> 977 ${this.visualTemplate()} 978 <wui-text variant=${({sm:"sm-regular",md:"md-regular",lg:"lg-regular"})[this.size]} color="primary"> 979 <slot></slot> 980 </wui-text> 981 </button> 982 `}visualTemplate(){return this.isUnsupportedChain?(0,n.qy)` <wui-icon-box color="error" icon="warningCircle"></wui-icon-box> `:this.imageSrc?(0,n.qy)`<wui-image src=${this.imageSrc}></wui-image>`:(0,n.qy)` <wui-icon size="xl" color="default" name="networkPlaceholder"></wui-icon> `}};L.styles=[p.W5,p.fD,U],$([(0,i.MZ)()],L.prototype,"imageSrc",void 0),$([(0,i.MZ)({type:Boolean})],L.prototype,"isUnsupportedChain",void 0),$([(0,i.MZ)({type:Boolean})],L.prototype,"disabled",void 0),$([(0,i.MZ)()],L.prototype,"size",void 0),L=$([(0,m.E)("wui-network-button")],L);let D=(0,n.AH)` 983 :host { 984 display: block; 985 width: max-content; 986 } 987`;var F=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};class H extends n.WF{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.network=o.W.state.activeCaipNetwork,this.networkImage=c.$.getNetworkImage(this.network),this.caipAddress=o.W.state.activeCaipAddress,this.loading=d.W.state.loading,this.isSupported=!!s.H.state.allowUnsupportedChain||!o.W.state.activeChain||o.W.checkIfSupportedNetwork(o.W.state.activeChain),this.unsubscribe.push(l.j.subscribeNetworkImages(()=>{this.networkImage=c.$.getNetworkImage(this.network)}),o.W.subscribeKey("activeCaipAddress",e=>{this.caipAddress=e}),o.W.subscribeKey("activeCaipNetwork",e=>{this.network=e,this.networkImage=c.$.getNetworkImage(e),this.isSupported=!e?.chainNamespace||o.W.checkIfSupportedNetwork(e.chainNamespace),c.$.fetchNetworkImage(e?.assets?.imageId)}),d.W.subscribeKey("loading",e=>this.loading=e))}firstUpdated(){c.$.fetchNetworkImage(this.network?.assets?.imageId)}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=!this.network||o.W.checkIfSupportedNetwork(this.network.chainNamespace);return(0,n.qy)` 988 <wui-network-button 989 .disabled=${!!(this.disabled||this.loading)} 990 .isUnsupportedChain=${!s.H.state.allowUnsupportedChain&&!e} 991 imageSrc=${(0,a.J)(this.networkImage)} 992 @click=${this.onClick.bind(this)} 993 data-testid="w3m-network-button" 994 > 995 ${this.getLabel()} 996 <slot></slot> 997 </wui-network-button> 998 `}getLabel(){return this.network?this.isSupported||s.H.state.allowUnsupportedChain?this.network.name:"Switch Network":this.label?this.label:this.caipAddress?"Unknown Network":"Select Network"}onClick(){this.loading||(j.E.sendEvent({type:"track",event:"CLICK_NETWORKS"}),d.W.open({view:"Networks"}))}}H.styles=D,F([(0,i.MZ)({type:Boolean})],H.prototype,"disabled",void 0),F([(0,i.MZ)({type:String})],H.prototype,"label",void 0),F([(0,i.wk)()],H.prototype,"network",void 0),F([(0,i.wk)()],H.prototype,"networkImage",void 0),F([(0,i.wk)()],H.prototype,"caipAddress",void 0),F([(0,i.wk)()],H.prototype,"loading",void 0),F([(0,i.wk)()],H.prototype,"isSupported",void 0);let z=class extends H{};z=F([(0,h.EM)("w3m-network-button")],z);let W=class extends H{};W=F([(0,h.EM)("appkit-network-button")],W);var q=r(51396),V=r(27126),G=r(57873),K=r(32590),Z=r(81920),J=r(82875),Y=r(26274),Q=r(36071);r(6647),r(42808),r(42978),r(5222);let X=(0,g.AH)` 999 :host { 1000 display: block; 1001 } 1002 1003 button { 1004 width: 100%; 1005 display: flex; 1006 align-items: center; 1007 justify-content: space-between; 1008 gap: ${({spacing:e})=>e[4]}; 1009 padding: ${({spacing:e})=>e[3]}; 1010 border-radius: ${({borderRadius:e})=>e[4]}; 1011 background-color: ${({tokens:e})=>e.core.foregroundAccent010}; 1012 } 1013 1014 wui-flex > wui-icon { 1015 padding: ${({spacing:e})=>e[2]}; 1016 color: ${({tokens:e})=>e.theme.textInvert}; 1017 background-color: ${({tokens:e})=>e.core.backgroundAccentPrimary}; 1018 border-radius: ${({borderRadius:e})=>e[2]}; 1019 align-items: center; 1020 } 1021 1022 @media (hover: hover) { 1023 button:hover:enabled { 1024 background-color: ${({tokens:e})=>e.core.foregroundAccent020}; 1025 } 1026 } 1027`;var ee=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let et=class extends n.WF{constructor(){super(...arguments),this.label="",this.description="",this.icon="wallet"}render(){return(0,n.qy)` 1028 <button> 1029 <wui-flex gap="2" alignItems="center"> 1030 <wui-icon weight="fill" size="lg" name=${this.icon} color="inherit"></wui-icon> 1031 <wui-flex flexDirection="column" gap="1"> 1032 <wui-text variant="md-medium" color="primary">${this.label}</wui-text> 1033 <wui-text variant="md-regular" color="tertiary">${this.description}</wui-text> 1034 </wui-flex> 1035 </wui-flex> 1036 <wui-icon size="lg" color="accent-primary" name="chevronRight"></wui-icon> 1037 </button> 1038 `}};et.styles=[p.W5,p.fD,X],ee([(0,i.MZ)()],et.prototype,"label",void 0),ee([(0,i.MZ)()],et.prototype,"description",void 0),ee([(0,i.MZ)()],et.prototype,"icon",void 0),et=ee([(0,m.E)("wui-notice-card")],et),r(66803);var er=r(29092),en=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let ei=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.socialProvider=er.i.getConnectedSocialProvider(),this.socialUsername=er.i.getConnectedSocialUsername(),this.namespace=o.W.state.activeChain,this.unsubscribe.push(o.W.subscribeKey("activeChain",e=>{this.namespace=e}))}
1038disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=K.a.getConnectorId(this.namespace),t=K.a.getAuthConnector();if(!t||e!==G.o.CONNECTOR_ID.AUTH)return this.style.cssText="display: none",null;let r=t.provider.getEmail()??"";return r||this.socialUsername?(0,n.qy)` 1039 <wui-list-item 1040 ?rounded=${!0} 1041 icon=${this.socialProvider??"mail"} 1042 data-testid="w3m-account-email-update" 1043 ?chevron=${!this.socialProvider} 1044 @click=${()=>{this.onGoToUpdateEmail(r,this.socialProvider)}} 1045 > 1046 <wui-text variant="lg-regular" color="primary">${this.getAuthName(r)}</wui-text> 1047 </wui-list-item> 1048 `:(this.style.cssText="display: none",null)}onGoToUpdateEmail(e,t){t||Y.I.push("UpdateEmailWallet",{email:e,redirectView:"Account"})}getAuthName(e){return this.socialUsername?"discord"===this.socialProvider&&this.socialUsername.endsWith("0")?this.socialUsername.slice(0,-1):this.socialUsername:e.length>30?`${e.slice(0,-3)}...`:e}};en([(0,i.wk)()],ei.prototype,"namespace",void 0),ei=en([(0,h.EM)("w3m-account-auth-button")],ei);var ea=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let es=class extends n.WF{constructor(){super(),this.usubscribe=[],this.networkImages=l.j.state.networkImages,this.address=o.W.getAccountData()?.address,this.profileImage=o.W.getAccountData()?.profileImage,this.profileName=o.W.getAccountData()?.profileName,this.network=o.W.state.activeCaipNetwork,this.disconnecting=!1,this.remoteFeatures=s.H.state.remoteFeatures,this.usubscribe.push(o.W.subscribeChainProp("accountState",e=>{e&&(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName)}),o.W.subscribeKey("activeCaipNetwork",e=>{e?.id&&(this.network=e)}),s.H.subscribeKey("remoteFeatures",e=>{this.remoteFeatures=e}))}disconnectedCallback(){this.usubscribe.forEach(e=>e())}render(){if(!this.address)throw Error("w3m-account-settings-view: No account provided");let e=this.networkImages[this.network?.assets?.imageId??""];return(0,n.qy)` 1049 <wui-flex 1050 flexDirection="column" 1051 alignItems="center" 1052 gap="4" 1053 .padding=${["0","5","3","5"]} 1054 > 1055 <wui-avatar 1056 alt=${this.address} 1057 address=${this.address} 1058 imageSrc=${(0,a.J)(this.profileImage)} 1059 size="lg" 1060 ></wui-avatar> 1061 <wui-flex flexDirection="column" alignItems="center"> 1062 <wui-flex gap="1" alignItems="center" justifyContent="center"> 1063 <wui-text variant="h5-medium" color="primary" data-testid="account-settings-address"> 1064 ${h.Zv.getTruncateString({string:this.address,charsStart:4,charsEnd:6,truncate:"middle"})} 1065 </wui-text> 1066 <wui-icon-link 1067 size="md" 1068 icon="copy" 1069 iconColor="default" 1070 @click=${this.onCopyAddress} 1071 ></wui-icon-link> 1072 </wui-flex> 1073 </wui-flex> 1074 </wui-flex> 1075 <wui-flex flexDirection="column" gap="4"> 1076 <wui-flex flexDirection="column" gap="2" .padding=${["6","4","3","4"]}> 1077 ${this.authCardTemplate()} 1078 <w3m-account-auth-button></w3m-account-auth-button> 1079 <wui-list-item 1080 imageSrc=${(0,a.J)(e)} 1081 ?chevron=${this.isAllowedNetworkSwitch()} 1082 ?fullSize=${!0} 1083 ?rounded=${!0} 1084 @click=${this.onNetworks.bind(this)} 1085 data-testid="account-switch-network-button" 1086 > 1087 <wui-text variant="lg-regular" color="primary"> 1088 ${this.network?.name??"Unknown"} 1089 </wui-text> 1090 </wui-list-item> 1091 ${this.smartAccountSettingsTemplate()} ${this.chooseNameButtonTemplate()} 1092 <wui-list-item 1093 ?rounded=${!0} 1094 icon="power" 1095 iconColor="error" 1096 ?chevron=${!1} 1097 .loading=${this.disconnecting} 1098 @click=${this.onDisconnect.bind(this)} 1099 data-testid="disconnect-button" 1100 > 1101 <wui-text variant="lg-regular" color="primary">Disconnect</wui-text> 1102 </wui-list-item> 1103 </wui-flex> 1104 </wui-flex> 1105 `}chooseNameButtonTemplate(){let e=this.network?.chainNamespace,t=K.a.getConnectorId(e),r=K.a.getAuthConnector();return o.W.checkIfNamesSupported()&&r&&t===G.o.CONNECTOR_ID.AUTH&&!this.profileName?(0,n.qy)` 1106 <wui-list-item 1107 icon="id" 1108 ?rounded=${!0} 1109 ?chevron=${!0} 1110 @click=${this.onChooseName.bind(this)} 1111 data-testid="account-choose-name-button" 1112 > 1113 <wui-text variant="lg-regular" color="primary">Choose account name </wui-text> 1114 </wui-list-item> 1115 `:null}authCardTemplate(){let e=K.a.getConnectorId(this.network?.chainNamespace),t=K.a.getAuthConnector(),{origin:r}=location;return!t||e!==G.o.CONNECTOR_ID.AUTH||r.includes(Z.oU.SECURE_SITE)?null:(0,n.qy)` 1116 <wui-notice-card 1117 @click=${this.onGoToUpgradeView.bind(this)} 1118 label="Upgrade your wallet" 1119 description="Transition to a self-custodial wallet" 1120 icon="wallet" 1121 data-testid="w3m-wallet-upgrade-card" 1122 ></wui-notice-card> 1123 `}isAllowedNetworkSwitch(){let e=o.W.getAllRequestedCaipNetworks(),t=!!e&&e.length>1,r=e?.find(({id:e})=>e===this.network?.id);return t||!r}onCopyAddress(){try{this.address&&(u.w.copyToClopboard(this.address),J.P.showSuccess("Address copied"))}catch{J.P.showError("Failed to copy")}}smartAccountSettingsTemplate(){let e=this.network?.chainNamespace,t=o.W.checkIfSmartAccountEnabled(),r=K.a.getConnectorId(e);return K.a.getAuthConnector()&&r===G.o.CONNECTOR_ID.AUTH&&t?(0,n.qy)` 1124 <wui-list-item 1125 icon="user" 1126 ?rounded=${!0} 1127 ?chevron=${!0} 1128 @click=${this.onSmartAccountSettings.bind(this)} 1129 data-testid="account-smart-account-settings-button" 1130 > 1131 <wui-text variant="lg-regular" color="primary">Smart Account Settings</wui-text> 1132 </wui-list-item> 1133 `:null}onChooseName(){Y.I.push("ChooseAccountName")}onNetworks(){this.isAllowedNetworkSwitch()&&Y.I.push("Networks")}async onDisconnect(){try{this.disconnecting=!0;let e=this.network?.chainNamespace,t=Q.x.getConnections(e).length>0,r=e&&K.a.state.activeConnectorIds[e],n=this.remoteFeatures?.multiWallet;await Q.x.disconnect(n?{id:r,namespace:e}:{}),t&&n&&(Y.I.push("ProfileWallets"),J.P.showSuccess("Wallet deleted"))}catch{j.E.sendEvent({type:"track",event:"DISCONNECT_ERROR",properties:{message:"Failed to disconnect"}}),J.P.showError("Failed to disconnect")}finally{this.disconnecting=!1}}onGoToUpgradeView(){j.E.sendEvent({type:"track",event:"EMAIL_UPGRADE_FROM_MODAL"}),Y.I.push("UpgradeEmailWallet")}onSmartAccountSettings(){Y.I.push("SmartAccountSettings")}};ea([(0,i.wk)()],es.prototype,"address",void 0),ea([(0,i.wk)()],es.prototype,"profileImage",void 0),ea([(0,i.wk)()],es.prototype,"profileName",void 0),ea([(0,i.wk)()],es.prototype,"network",void 0),ea([(0,i.wk)()],es.prototype,"disconnecting",void 0),ea([(0,i.wk)()],es.prototype,"remoteFeatures",void 0),es=ea([(0,h.EM)("w3m-account-settings-view")],es);var eo=r(37662),el=r(89188);r(56060),r(48029);let ec=(0,g.AH)` 1134 :host { 1135 flex: 1; 1136 height: 100%; 1137 } 1138 1139 button { 1140 width: 100%; 1141 height: 100%; 1142 display: inline-flex; 1143 align-items: center; 1144 padding: ${({spacing:e})=>e[1]} ${({spacing:e})=>e[2]}; 1145 column-gap: ${({spacing:e})=>e[1]}; 1146 color: ${({tokens:e})=>e.theme.textSecondary}; 1147 border-radius: ${({borderRadius:e})=>e[20]}; 1148 background-color: transparent; 1149 transition: background-color ${({durations:e})=>e.lg} 1150 ${({easings:e})=>e["ease-out-power-2"]}; 1151 will-change: background-color; 1152 } 1153 1154 /* -- Hover & Active states ----------------------------------------------------------- */ 1155 button[data-active='true'] { 1156 color: ${({tokens:e})=>e.theme.textPrimary}; 1157 background-color: ${({tokens:e})=>e.theme.foregroundTertiary}; 1158 } 1159 1160 button:hover:enabled:not([data-active='true']), 1161 button:active:enabled:not([data-active='true']) { 1162 wui-text, 1163 wui-icon { 1164 color: ${({tokens:e})=>e.theme.textPrimary}; 1165 } 1166 } 1167`;var eu=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let ed={lg:"lg-regular",md:"md-regular",sm:"sm-regular"},eh={lg:"md",md:"sm",sm:"sm"},ep=class extends n.WF{constructor(){super(...arguments),this.icon="mobile",this.size="md",this.label="",this.active=!1}render(){return(0,n.qy)` 1168 <button data-active=${this.active}> 1169 ${this.icon?(0,n.qy)`<wui-icon size=${eh[this.size]} name=${this.icon}></wui-icon>`:""} 1170 <wui-text variant=${ed[this.size]}> ${this.label} </wui-text> 1171 </button> 1172 `}};ep.styles=[p.W5,p.fD,ec],eu([(0,i.MZ)()],ep.prototype,"icon",void 0),eu([(0,i.MZ)()],ep.prototype,"size",void 0),eu([(0,i.MZ)()],ep.prototype,"label",void 0),eu([(0,i.MZ)({type:Boolean})],ep.prototype,"active",void 0),ep=eu([(0,m.E)("wui-tab-item")],ep);let ef=(0,g.AH)` 1173 :host { 1174 display: inline-flex; 1175 align-items: center; 1176 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 1177 border-radius: ${({borderRadius:e})=>e[32]}; 1178 padding: ${({spacing:e})=>e["01"]}; 1179 box-sizing: border-box; 1180 } 1181 1182 :host([data-size='sm']) {
1183 height: 26px; 1184 } 1185 1186 :host([data-size='md']) { 1187 height: 36px; 1188 } 1189`;var em=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let eg=class extends n.WF{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.size="md",this.activeTab=0}render(){return this.dataset.size=this.size,this.tabs.map((e,t)=>{let r=t===this.activeTab;return(0,n.qy)` 1190 <wui-tab-item 1191 @click=${()=>this.onTabClick(t)} 1192 icon=${e.icon} 1193 size=${this.size} 1194 label=${e.label} 1195 ?active=${r} 1196 data-active=${r} 1197 data-testid="tab-${e.label?.toLowerCase()}" 1198 ></wui-tab-item> 1199 `})}onTabClick(e){this.activeTab=e,this.onTabChange(e)}};eg.styles=[p.W5,p.fD,ef],em([(0,i.MZ)({type:Array})],eg.prototype,"tabs",void 0),em([(0,i.MZ)()],eg.prototype,"onTabChange",void 0),em([(0,i.MZ)()],eg.prototype,"size",void 0),em([(0,i.wk)()],eg.prototype,"activeTab",void 0),eg=em([(0,m.E)("wui-tabs")],eg),r(62252),r(46183);var ey=r(47482);let eb=(0,h.AH)` 1200 wui-icon-link { 1201 margin-right: calc(${({spacing:e})=>e["8"]} * -1); 1202 } 1203 1204 wui-notice-card { 1205 margin-bottom: ${({spacing:e})=>e["1"]}; 1206 } 1207 1208 wui-list-item > wui-text { 1209 flex: 1; 1210 } 1211 1212 w3m-transactions-view { 1213 max-height: 200px; 1214 } 1215 1216 .balance-container { 1217 display: inline; 1218 } 1219 1220 .tab-content-container { 1221 height: 300px; 1222 overflow-y: auto; 1223 overflow-x: hidden; 1224 scrollbar-width: none; 1225 } 1226 1227 .symbol { 1228 transform: translateY(-2px); 1229 } 1230 1231 .tab-content-container::-webkit-scrollbar {
1232 display: none; 1233 } 1234 1235 .account-button { 1236 width: auto; 1237 border: none; 1238 display: flex; 1239 align-items: center; 1240 justify-content: center; 1241 gap: ${({spacing:e})=>e["3"]}; 1242 height: 48px; 1243 padding: ${({spacing:e})=>e["2"]}; 1244 padding-right: ${({spacing:e})=>e["3"]}; 1245 box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.theme.foregroundPrimary}; 1246 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 1247 border-radius: ${({borderRadius:e})=>e[6]}; 1248 transition: background-color ${({durations:e})=>e.lg} 1249 ${({easings:e})=>e["ease-out-power-2"]}; 1250 } 1251 1252 .account-button:hover { 1253 background-color: ${({tokens:e})=>e.core.glass010}; 1254 } 1255 1256 .avatar-container { 1257 position: relative; 1258 } 1259 1260 wui-avatar.avatar { 1261 width: 32px; 1262 height: 32px; 1263 box-shadow: 0 0 0 2px ${({tokens:e})=>e.core.glass010}; 1264 } 1265 1266 wui-wallet-switch { 1267 margin-top: ${({spacing:e})=>e["2"]}; 1268 } 1269 1270 wui-avatar.network-avatar { 1271 width: 16px; 1272 height: 16px; 1273 position: absolute; 1274 left: 100%; 1275 top: 100%; 1276 transform: translate(-75%, -75%); 1277 box-shadow: 0 0 0 2px ${({tokens:e})=>e.core.glass010}; 1278 } 1279 1280 .account-links { 1281 display: flex; 1282 justify-content: space-between; 1283 align-items: center; 1284 } 1285 1286 .account-links wui-flex { 1287 cursor: pointer; 1288 display: flex; 1289 align-items: center; 1290 justify-content: center; 1291 flex: 1; 1292 background: red; 1293 align-items: center; 1294 justify-content: center; 1295 height: 48px; 1296 padding: 10px; 1297 flex: 1 0 0; 1298 border-radius: var(--XS, 16px); 1299 border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); 1300 background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); 1301 transition: 1302 background-color ${({durations:e})=>e.md} 1303 ${({easings:e})=>e["ease-out-power-1"]}, 1304 opacity ${({durations:e})=>e.md} ${({easings:e})=>e["ease-out-power-1"]}; 1305 will-change: background-color, opacity; 1306 } 1307 1308 .account-links wui-flex:hover { 1309 background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15)); 1310 } 1311 1312 .account-links wui-flex wui-icon { 1313 width: var(--S, 20px); 1314 height: var(--S, 20px); 1315 } 1316 1317 .account-links wui-flex wui-icon svg path { 1318 stroke: #667dff; 1319 } 1320`;var ew=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let ev=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.caipAddress=o.W.getAccountData()?.caipAddress,this.address=u.w.getPlainAddress(o.W.getAccountData()?.caipAddress),this.profileImage=o.W.getAccountData()?.profileImage,this.profileName=o.W.getAccountData()?.profileName,this.disconnecting=!1,this.balance=o.W.getAccountData()?.balance,this.balanceSymbol=o.W.getAccountData()?.balanceSymbol,this.features=s.H.state.features,this.remoteFeatures=s.H.state.remoteFeatures,this.namespace=o.W.state.activeChain,this.activeConnectorIds=K.a.state.activeConnectorIds,this.unsubscribe.push(o.W.subscribeChainProp("accountState",e=>{this.address=u.w.getPlainAddress(e?.caipAddress),this.caipAddress=e?.caipAddress,this.balance=e?.balance,this.balanceSymbol=e?.balanceSymbol,this.profileName=e?.profileName,this.profileImage=e?.profileImage}),s.H.subscribeKey("features",e=>this.features=e),s.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e),K.a.subscribeKey("activeConnectorIds",e=>{this.activeConnectorIds=e}),o.W.subscribeKey("activeChain",e=>this.namespace=e),o.W.subscribeKey("activeCaipNetwork",e=>{e?.chainNamespace&&(this.namespace=e?.chainNamespace)}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!this.caipAddress||!this.namespace)return null;let e=this.activeConnectorIds[this.namespace],t=e?K.a.getConnectorById(e):void 0,r=c.$.getConnectorImage(t),{value:i,decimals:s,symbol:o}=u.w.parseBalance(this.balance,this.balanceSymbol);return(0,n.qy)`<wui-flex 1321 flexDirection="column" 1322 .padding=${["0","5","4","5"]} 1323 alignItems="center" 1324 gap="3" 1325 > 1326 <wui-avatar 1327 alt=${(0,a.J)(this.caipAddress)} 1328 address=${(0,a.J)(u.w.getPlainAddress(this.caipAddress))} 1329 imageSrc=${(0,a.J)(null===this.profileImage?void 0:this.profileImage)} 1330 data-testid="single-account-avatar" 1331 ></wui-avatar> 1332 <wui-wallet-switch 1333 profileName=${this.profileName} 1334 address=${this.address} 1335 imageSrc=${r} 1336 alt=${t?.name} 1337 @click=${this.onGoToProfileWalletsView.bind(this)} 1338 data-testid="wui-wallet-switch" 1339 ></wui-wallet-switch> 1340 <div class="balance-container"> 1341 <wui-text variant="h3-regular" color="primary">${i}</wui-text> 1342 <wui-text variant="h3-regular" color="secondary">.${s}</wui-text> 1343 <wui-text variant="h6-medium" color="primary" class="symbol">${o}</wui-text> 1344 </div> 1345 ${this.explorerBtnTemplate()} 1346 </wui-flex> 1347 1348 <wui-flex flexDirection="column" gap="2" .padding=${["0","3","3","3"]}> 1349 ${this.authCardTemplate()} <w3m-account-auth-button></w3m-account-auth-button> 1350 ${this.orderedFeaturesTemplate()} ${this.activityTemplate()} 1351 <wui-list-item 1352 .rounded=${!0} 1353 icon="power" 1354 iconColor="error" 1355 ?chevron=${!1} 1356 .loading=${this.disconnecting} 1357 .rightIcon=${!1} 1358 @click=${this.onDisconnect.bind(this)} 1359 data-testid="disconnect-button" 1360 > 1361 <wui-text variant="lg-regular" color="primary">Disconnect</wui-text> 1362 </wui-list-item> 1363 </wui-flex>`}fundWalletTemplate(){if(!this.namespace)return null;let e=Z.oU.ONRAMP_SUPPORTED_CHAIN_NAMESPACES.includes(this.namespace),t=!!this.features?.receive,r=this.remoteFeatures?.onramp&&e,i=eo.g.isPayWithExchangeEnabled();return r||t||i?(0,n.qy)` 1364 <wui-list-item 1365 .rounded=${!0} 1366 data-testid="w3m-account-default-fund-wallet-button" 1367 iconVariant="blue" 1368 icon="dollar" 1369 ?chevron=${!0}
1370 @click=${this.handleClickFundWallet.bind(this)} 1371 > 1372 <wui-text variant="lg-regular" color="primary">Fund wallet</wui-text> 1373 </wui-list-item> 1374 `:null}orderedFeaturesTemplate(){return(this.features?.walletFeaturesOrder||Z.oU.DEFAULT_FEATURES.walletFeaturesOrder).map(e=>{switch(e){case"onramp":return this.fundWalletTemplate();case"swaps":return this.swapsTemplate();case"send":return this.sendTemplate();default:return null}})}activityTemplate(){return this.namespace&&this.remoteFeatures?.activity&&Z.oU.ACTIVITY_ENABLED_CHAIN_NAMESPACES.includes(this.namespace)?(0,n.qy)` <wui-list-item 1375 .rounded=${!0} 1376 icon="clock" 1377 ?chevron=${!0} 1378 @click=${this.onTransactions.bind(this)} 1379 data-testid="w3m-account-default-activity-button" 1380 > 1381 <wui-text variant="lg-regular" color="primary">Activity</wui-text> 1382 </wui-list-item>`:null}swapsTemplate(){let e=this.remoteFeatures?.swaps,t=o.W.state.activeChain===G.o.CHAIN.EVM;return e&&t?(0,n.qy)` 1383 <wui-list-item 1384 .rounded=${!0} 1385 icon="recycleHorizontal" 1386 ?chevron=${!0} 1387 @click=${this.handleClickSwap.bind(this)} 1388 data-testid="w3m-account-default-swaps-button" 1389 > 1390 <wui-text variant="lg-regular" color="primary">Swap</wui-text> 1391 </wui-list-item> 1392 `:null}sendTemplate(){let e=this.features?.send,t=o.W.state.activeChain;if(!t)throw Error("SendController:sendTemplate - namespace is required");let r=Z.oU.SEND_SUPPORTED_NAMESPACES.includes(t);return e&&r?(0,n.qy)` 1393 <wui-list-item 1394 .rounded=${!0} 1395 icon="send" 1396 ?chevron=${!0} 1397 @click=${this.handleClickSend.bind(this)} 1398 data-testid="w3m-account-default-send-button" 1399 > 1400 <wui-text variant="lg-regular" color="primary">Send</wui-text> 1401 </wui-list-item> 1402 `:null}authCardTemplate(){let e=o.W.state.activeChain;if(!e)throw Error("AuthCardTemplate:authCardTemplate - namespace is required");let t=K.a.getConnectorId(e),r=K.a.getAuthConnector(),{origin:i}=location;return!r||t!==G.o.CONNECTOR_ID.AUTH||i.includes(Z.oU.SECURE_SITE)?null:(0,n.qy)` 1403 <wui-notice-card 1404 @click=${this.onGoToUpgradeView.bind(this)} 1405 label="Upgrade your wallet" 1406 description="Transition to a self-custodial wallet" 1407 icon="wallet" 1408 data-testid="w3m-wallet-upgrade-card" 1409 ></wui-notice-card> 1410 `}handleClickFundWallet(){Y.I.push("FundWallet")}handleClickSwap(){Y.I.push("Swap")}handleClickSend(){Y.I.push("WalletSend")}explorerBtnTemplate(){return o.W.getAccountData()?.addressExplorerUrl?(0,n.qy)` 1411 <wui-button size="md" variant="accent-primary" @click=${this.onExplorer.bind(this)}> 1412 <wui-icon size="sm" color="inherit" slot="iconLeft" name="compass"></wui-icon> 1413 Block Explorer 1414 <wui-icon size="sm" color="inherit" slot="iconRight" name="externalLink"></wui-icon> 1415 </wui-button> 1416 `:null}onTransactions(){j.E.sendEvent({type:"track",event:"CLICK_TRANSACTIONS",properties:{isSmartAccount:(0,el.lj)(o.W.state.activeChain)===ey.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}),Y.I.push("Transactions")}async onDisconnect(){try{this.disconnecting=!0;let e=Q.x.getConnections(this.namespace).length>0,t=this.namespace&&K.a.state.activeConnectorIds[this.namespace],r=this.remoteFeatures?.multiWallet;await Q.x.disconnect(r?{id:t,namespace:this.namespace}:{}),e&&r&&(Y.I.push("ProfileWallets"),J.P.showSuccess("Wallet deleted"))}catch{j.E.sendEvent({type:"track",event:"DISCONNECT_ERROR",properties:{message:"Failed to disconnect"}}),J.P.showError("Failed to disconnect")}finally{this.disconnecting=!1}}onExplorer(){let e=o.W.getAccountData()?.addressExplorerUrl;e&&u.w.openHref(e,"_blank")}onGoToUpgradeView(){j.E.sendEvent({type:"track",event:"EMAIL_UPGRADE_FROM_MODAL"}),Y.I.push("UpgradeEmailWallet")}onGoToProfileWalletsView(){Y.I.push("ProfileWallets")}};ev.styles=eb,ew([(0,i.wk)()],ev.prototype,"caipAddress",void 0),ew([(0,i.wk)()],ev.prototype,"address",void 0),ew([(0,i.wk)()],ev.prototype,"profileImage",void 0),ew([(0,i.wk)()],ev.prototype,"profileName",void 0),ew([(0,i.wk)()],ev.prototype,"disconnecting",void 0),ew([(0,i.wk)()],ev.prototype,"balance",void 0),ew([(0,i.wk)()],ev.prototype,"balanceSymbol",void 0),ew([(0,i.wk)()],ev.prototype,"features",void 0),ew([(0,i.wk)()],ev.prototype,"remoteFeatures",void 0),ew([(0,i.wk)()],ev.prototype,"namespace",void 0),ew([(0,i.wk)()],ev.prototype,"activeConnectorIds",void 0),ev=ew([(0,h.EM)("w3m-account-default-widget")],ev);var eE=r(30898);let eC=(0,g.AH)` 1417 span { 1418 font-weight: 500; 1419 font-size: 38px; 1420 color: ${({tokens:e})=>e.theme.textPrimary}; 1421 line-height: 38px; 1422 letter-spacing: -2%; 1423 text-align: center; 1424 font-family: var(--apkt-fontFamily-regular); 1425 } 1426 1427 .pennies { 1428 color: ${({tokens:e})=>e.theme.textSecondary}; 1429 } 1430`;var eA=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let ex=class extends n.WF{constructor(){super(...arguments),this.dollars="0",this.pennies="00"}render(){return(0,n.qy)`<span>$${this.dollars}<span class="pennies">.${this.pennies}</span></span>`}};ex.styles=[p.W5,eC],eA([(0,i.MZ)()],ex.prototype,"dollars",void 0),eA([(0,i.MZ)()],ex.prototype,"pennies",void 0),ex=eA([(0,m.E)("wui-balance")],ex);let eI=(0,g.AH)` 1431 :host { 1432 display: inline-flex; 1433 justify-content: center;
1434 align-items: center; 1435 position: relative; 1436 } 1437 1438 wui-icon { 1439 position: absolute; 1440 width: 12px !important; 1441 height: 4px !important; 1442 } 1443 1444 /* -- Variants --------------------------------------------------------- */ 1445 :host([data-variant='fill']) { 1446 background-color: ${({colors:e})=>e.neutrals100}; 1447 } 1448 1449 :host([data-variant='shade']) { 1450 background-color: ${({colors:e})=>e.neutrals900}; 1451 } 1452 1453 :host([data-variant='fill']) > wui-text { 1454 color: ${({colors:e})=>e.black}; 1455 } 1456 1457 :host([data-variant='shade']) > wui-text { 1458 color: ${({colors:e})=>e.white}; 1459 } 1460 1461 :host([data-variant='fill']) > wui-icon { 1462 color: ${({colors:e})=>e.neutrals100}; 1463 } 1464 1465 :host([data-variant='shade']) > wui-icon { 1466 color: ${({colors:e})=>e.neutrals900}; 1467 } 1468 1469 /* -- Sizes --------------------------------------------------------- */ 1470 :host([data-size='sm']) { 1471 padding: ${({spacing:e})=>e[1]} ${({spacing:e})=>e[2]}; 1472 border-radius: ${({borderRadius:e})=>e[2]}; 1473 } 1474 1475 :host([data-size='md']) { 1476 padding: ${({spacing:e})=>e[2]} ${({spacing:e})=>e[3]}; 1477 border-radius: ${({borderRadius:e})=>e[3]}; 1478 } 1479 1480 /* -- Placements --------------------------------------------------------- */ 1481 wui-icon[data-placement='top'] { 1482 bottom: 0px; 1483 left: 50%; 1484 transform: translate(-50%, 95%); 1485 } 1486 1487 wui-icon[data-placement='bottom'] { 1488 top: 0; 1489 left: 50%; 1490 transform: translate(-50%, -95%) rotate(180deg); 1491 } 1492 1493 wui-icon[data-placement='right'] { 1494 top: 50%; 1495 left: 0; 1496 transform: translate(-65%, -50%) rotate(90deg); 1497 } 1498 1499 wui-icon[data-placement='left'] { 1500 top: 50%; 1501 right: 0%; 1502 transform: translate(65%, -50%) rotate(270deg); 1503 } 1504`;var eS=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let eT={sm:"sm-regular",md:"md-regular"},eP=class extends n.WF{constructor(){super(...arguments),this.placement="top",this.variant="fill",this.size="md",this.message=""}render(){return this.dataset.variant=this.variant,this.dataset.size=this.size,(0,n.qy)`<wui-icon data-placement=${this.placement} size="inherit" name="cursor"></wui-icon> 1505 <wui-text variant=${eT[this.size]}>${this.message}</wui-text>`}};eP.styles=[p.W5,p.fD,eI],eS([(0,i.MZ)()],eP.prototype,"placement",void 0),eS([(0,i.MZ)()],eP.prototype,"variant",void 0),eS([(0,i.MZ)()],eP.prototype,"size",void 0),eS([(0,i.MZ)()],eP.prototype,"message",void 0),eP=eS([(0,m.E)("wui-tooltip")],eP);var eO=r(63884);r(3731);let e_=(0,n.AH)` 1506 :host { 1507 width: 100%; 1508 max-height: 280px; 1509 overflow: scroll; 1510 scrollbar-width: none; 1511 } 1512 1513 :host::-webkit-scrollbar {
1514 display: none; 1515 } 1516`,eN=class extends n.WF{render(){return(0,n.qy)`<w3m-activity-list page="account"></w3m-activity-list>`}};eN.styles=e_,eN=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.EM)("w3m-account-activity-widget")],eN),r(62982);let ek=(0,g.AH)` 1517 :host { 1518 width: 100%; 1519 } 1520 1521 button { 1522 width: 100%; 1523 display: flex; 1524 justify-content: space-between; 1525 align-items: center; 1526 gap: ${({spacing:e})=>e[4]}; 1527 padding: ${({spacing:e})=>e[4]}; 1528 background-color: transparent; 1529 border-radius: ${({borderRadius:e})=>e[4]}; 1530 } 1531 1532 wui-text { 1533 max-width: 174px; 1534 } 1535 1536 .tag-container { 1537 width: fit-content; 1538 } 1539 1540 @media (hover: hover) { 1541 button:hover:enabled { 1542 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 1543 } 1544 } 1545`;var eR=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let eM=class extends n.WF{constructor(){super(...arguments),this.icon="card",this.text="",this.description="",this.tag=void 0,this.disabled=!1}render(){return(0,n.qy)` 1546 <button ?disabled=${this.disabled}> 1547 <wui-flex alignItems="center" gap="3"> 1548 <wui-icon-box padding="2" color="secondary" icon=${this.icon} size="lg"></wui-icon-box> 1549 <wui-flex flexDirection="column" gap="1"> 1550 <wui-text variant="md-medium" color="primary">${this.text}</wui-text> 1551 ${this.description?(0,n.qy)`<wui-text variant="md-regular" color="secondary"> 1552 ${this.description}</wui-text 1553 >`:null} 1554 </wui-flex> 1555 </wui-flex> 1556 1557 <wui-flex class="tag-container" alignItems="center" gap="1" justifyContent="flex-end"> 1558 ${this.tag?(0,n.qy)`<wui-tag tagType="main" size="sm">${this.tag}</wui-tag>`:null} 1559 <wui-icon size="md" name="chevronRight" color="default"></wui-icon> 1560 </wui-flex> 1561 </button> 1562 `}};eM.styles=[p.W5,p.fD,ek],eR([(0,i.MZ)()],eM.prototype,"icon",void 0),eR([(0,i.MZ)()],eM.prototype,"text",void 0),eR([(0,i.MZ)()],eM.prototype,"description",void 0),eR([(0,i.MZ)()],eM.prototype,"tag",void 0),eR([(0,i.MZ)({type:Boolean})],eM.prototype,"disabled",void 0),eM=eR([(0,m.E)("wui-list-description")],eM),r(20398);let eB=(0,n.AH)` 1563 :host { 1564 width: 100%; 1565 } 1566 1567 wui-flex { 1568 width: 100%; 1569 } 1570 1571 .contentContainer { 1572 max-height: 280px; 1573 overflow: scroll; 1574 scrollbar-width: none; 1575 } 1576 1577 .contentContainer::-webkit-scrollbar {
1578 display: none; 1579 } 1580`;var ej=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let eU=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.tokenBalance=o.W.getAccountData()?.tokenBalance,this.remoteFeatures=s.H.state.remoteFeatures,this.unsubscribe.push(o.W.subscribeChainProp("accountState",e=>{this.tokenBalance=e?.tokenBalance}),s.H.subscribeKey("remoteFeatures",e=>{this.remoteFeatures=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,n.qy)`${this.tokenTemplate()}`}tokenTemplate(){return this.tokenBalance&&this.tokenBalance?.length>0?(0,n.qy)`<wui-flex class="contentContainer" flexDirection="column" gap="2"> 1581 ${this.tokenItemTemplate()} 1582 </wui-flex>`:(0,n.qy)` <wui-flex flexDirection="column"> 1583 ${this.onRampTemplate()} 1584 <wui-list-description 1585 @click=${this.onReceiveClick.bind(this)} 1586 text="Receive funds" 1587 description="Scan the QR code and receive funds" 1588 icon="qrCode" 1589 iconColor="fg-200" 1590 iconBackgroundColor="fg-200" 1591 data-testid="w3m-account-receive-button" 1592 ></wui-list-description 1593 ></wui-flex>`}onRampTemplate(){return this.remoteFeatures?.onramp?(0,n.qy)`<wui-list-description 1594 @click=${this.onBuyClick.bind(this)} 1595 text="Buy Crypto" 1596 description="Easy with card or bank account" 1597 icon="card" 1598 iconColor="success-100" 1599 iconBackgroundColor="success-100" 1600 tag="popular" 1601 data-testid="w3m-account-onramp-button" 1602 ></wui-list-description>`:(0,n.qy)``}tokenItemTemplate(){return this.tokenBalance?.map(e=>(0,n.qy)`<wui-list-token 1603 tokenName=${e.name} 1604 tokenImageUrl=${e.iconUrl} 1605 tokenAmount=${e.quantity.numeric} 1606 tokenValue=${e.value} 1607 tokenCurrency=${e.symbol} 1608 ></wui-list-token>`)}onReceiveClick(){Y.I.push("WalletReceive")}onBuyClick(){j.E.sendEvent({type:"track",event:"SELECT_BUY_CRYPTO",properties:{isSmartAccount:(0,el.lj)(o.W.state.activeChain)===ey.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}),Y.I.push("OnRampProviders")}};eU.styles=eB,ej([(0,i.wk)()],eU.prototype,"tokenBalance",void 0),ej([(0,i.wk)()],eU.prototype,"remoteFeatures",void 0),eU=ej([(0,h.EM)("w3m-account-tokens-widget")],eU),r(67088),r(37707);let e$=(0,h.AH)` 1609 wui-flex { 1610 width: 100%; 1611 } 1612 1613 wui-promo { 1614 position: absolute; 1615 top: -32px; 1616 } 1617 1618 wui-profile-button { 1619 margin-top: calc(-1 * ${({spacing:e})=>e["4"]}); 1620 } 1621 1622 wui-promo + wui-profile-button { 1623 margin-top: ${({spacing:e})=>e["4"]}; 1624 } 1625 1626 wui-tabs { 1627 width: 100%; 1628 } 1629 1630 .contentContainer { 1631 height: 280px; 1632 } 1633 1634 .contentContainer > wui-icon-box { 1635 width: 40px; 1636 height: 40px; 1637 border-radius: ${({borderRadius:e})=>e["3"]}; 1638 } 1639 1640 .contentContainer > .textContent { 1641 width: 65%; 1642 } 1643`;var eL=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let eD=class extends n.WF{constructor(){super(...arguments),this.unsubscribe=[],this.network=o.W.state.activeCaipNetwork,this.profileName=o.W.getAccountData()?.profileName,this.address=o.W.getAccountData()?.address,this.currentTab=o.W.getAccountData()?.currentTab,this.tokenBalance=o.W.getAccountData()?.tokenBalance,this.features=s.H.state.features,this.namespace=o.W.state.activeChain,this.activeConnectorIds=K.a.state.activeConnectorIds,this.remoteFeatures=s.H.state.remoteFeatures}firstUpdated(){o.W.fetchTokenBalance(),this.unsubscribe.push(o.W.subscribeChainProp("accountState",e=>{e?.address?(this.address=e.address,this.profileName=e.profileName,this.currentTab=e.currentTab,this.tokenBalance=e.tokenBalance):d.W.close()}),K.a.subscribeKey("activeConnectorIds",e=>{this.activeConnectorIds=e}),o.W.subscribeKey("activeChain",e=>this.namespace=e),o.W.subscribeKey("activeCaipNetwork",e=>this.network=e),s.H.subscribeKey("features",e=>this.features=e),s.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e)),this.watchSwapValues()}
1643disconnectedCallback(){this.unsubscribe.forEach(e=>e()),clearInterval(this.watchTokenBalance)}render(){if(!this.address)throw Error("w3m-account-features-widget: No account provided");if(!this.namespace)return null;let e=this.activeConnectorIds[this.namespace],t=e?K.a.getConnectorById(e):void 0,{icon:r,iconSize:i}=this.getAuthData();return(0,n.qy)`<wui-flex 1644 flexDirection="column" 1645 .padding=${["0","3","4","3"]} 1646 alignItems="center" 1647 gap="4" 1648 data-testid="w3m-account-wallet-features-widget" 1649 > 1650 <wui-flex flexDirection="column" justifyContent="center" alignItems="center" gap="2"> 1651 <wui-wallet-switch 1652 profileName=${this.profileName} 1653 address=${this.address} 1654 icon=${r} 1655 iconSize=${i} 1656 alt=${t?.name} 1657 @click=${this.onGoToProfileWalletsView.bind(this)} 1658 data-testid="wui-wallet-switch" 1659 ></wui-wallet-switch> 1660 1661 ${this.tokenBalanceTemplate()} 1662 </wui-flex> 1663 ${this.orderedWalletFeatures()} ${this.tabsTemplate()} ${this.listContentTemplate()} 1664 </wui-flex>`}orderedWalletFeatures(){let e=this.features?.walletFeaturesOrder||Z.oU.DEFAULT_FEATURES.walletFeaturesOrder;if(e.every(e=>"send"===e||"receive"===e?!this.features?.[e]:"swaps"!==e&&"onramp"!==e||!this.remoteFeatures?.[e]))return null;let t=[...new Set(e.map(e=>"receive"===e||"onramp"===e?"fund":e))];return(0,n.qy)`<wui-flex gap="2"> 1665 ${t.map(e=>{switch(e){case"fund":return this.fundWalletTemplate();case"swaps":return this.swapsTemplate();case"send":return this.sendTemplate();default:return null}})} 1666 </wui-flex>`}fundWalletTemplate(){if(!this.namespace)return null;let e=Z.oU.ONRAMP_SUPPORTED_CHAIN_NAMESPACES.includes(this.namespace),t=this.features?.receive,r=this.remoteFeatures?.onramp&&e,i=eo.g.isPayWithExchangeEnabled();return r||t||i?(0,n.qy)` 1667 <w3m-tooltip-trigger text="Fund wallet"> 1668 <wui-button 1669 data-testid="wallet-features-fund-wallet-button" 1670 @click=${this.onFundWalletClick.bind(this)} 1671 variant="accent-secondary" 1672 size="lg" 1673 fullWidth 1674 > 1675 <wui-icon name="dollar"></wui-icon> 1676 </wui-button> 1677 </w3m-tooltip-trigger> 1678 `:null}swapsTemplate(){let e=this.remoteFeatures?.swaps,t=o.W.state.activeChain===G.o.CHAIN.EVM;return e&&t?(0,n.qy)` 1679 <w3m-tooltip-trigger text="Swap"> 1680 <wui-button 1681 fullWidth 1682 data-testid="wallet-features-swaps-button" 1683 @click=${this.onSwapClick.bind(this)} 1684 variant="accent-secondary" 1685 size="lg" 1686 > 1687 <wui-icon name="recycleHorizontal"></wui-icon> 1688 </wui-button> 1689 </w3m-tooltip-trigger> 1690 `:null}sendTemplate(){let e=this.features?.send,t=o.W.state.activeChain,r=Z.oU.SEND_SUPPORTED_NAMESPACES.includes(t);return e&&r?(0,n.qy)` 1691 <w3m-tooltip-trigger text="Send"> 1692 <wui-button 1693 fullWidth 1694 data-testid="wallet-features-send-button" 1695 @click=${this.onSendClick.bind(this)} 1696 variant="accent-secondary" 1697 size="lg" 1698 > 1699 <wui-icon name="send"></wui-icon> 1700 </wui-button> 1701 </w3m-tooltip-trigger> 1702 `:null}watchSwapValues(){this.watchTokenBalance=setInterval(()=>o.W.fetchTokenBalance(e=>this.onTokenBalanceError(e)),1e4)}onTokenBalanceError(e){e instanceof Error&&e.cause instanceof Response&&e.cause.status===G.o.HTTP_STATUS_CODES.SERVICE_UNAVAILABLE&&clearInterval(this.watchTokenBalance)}listContentTemplate(){return 0===this.currentTab?(0,n.qy)`<w3m-account-tokens-widget></w3m-account-tokens-widget>`:1===this.currentTab?(0,n.qy)`<w3m-account-activity-widget></w3m-account-activity-widget>`:(0,n.qy)`<w3m-account-tokens-widget></w3m-account-tokens-widget>`}tokenBalanceTemplate(){if(this.tokenBalance&&this.tokenBalance?.length>=0){let e=u.w.calculateBalance(this.tokenBalance),{dollars:t="0",pennies:r="00"}=u.w.formatTokenBalance(e);return(0,n.qy)`<wui-balance dollars=${t} pennies=${r}></wui-balance>`}return(0,n.qy)`<wui-balance dollars="0" pennies="00"></wui-balance>`}tabsTemplate(){let e=eO.y.getTabsByNamespace(o.W.state.activeChain);return 0===e.length?null:(0,n.qy)`<wui-tabs 1703 .onTabChange=${this.onTabChange.bind(this)} 1704 .activeTab=${this.currentTab} 1705 .tabs=${e} 1706 ></wui-tabs>`}onTabChange(e){o.W.setAccountProp("currentTab",e,this.namespace)}onFundWalletClick(){Y.I.push("FundWallet")}onSwapClick(){this.network?.caipNetworkId&&!Z.oU.SWAP_SUPPORTED_NETWORKS.includes(this.network?.caipNetworkId)?Y.I.push("UnsupportedChain",{swapUnsupportedChain:!0}):(j.E.sendEvent({type:"track",event:"OPEN_SWAP",properties:{network:this.network?.caipNetworkId||"",isSmartAccount:(0,el.lj)(o.W.state.activeChain)===ey.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}),Y.I.push("Swap"))}getAuthData(){let e=er.i.getConnectedSocialProvider(),t=er.i.getConnectedSocialUsername(),r=K.a.getAuthConnector(),n=r?.provider.getEmail()??"";return{name:eE.g.getAuthName({email:n,socialUsername:t,socialProvider:e}),icon:e??"mail",iconSize:e?"xl":"md"}}onGoToProfileWalletsView(){Y.I.push("ProfileWallets")}onSendClick(){j.E.sendEvent({type:"track",event:"OPEN_SEND",properties:{network:this.network?.caipNetworkId||"",isSmartAccount:(0,el.lj)(o.W.state.activeChain)===ey.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}),Y.I.push("WalletSend")}};eD.styles=e$,eL([(0,i.wk)()],eD.prototype,"watchTokenBalance",void 0),eL([(0,i.wk)()],eD.prototype,"network",void 0),eL([(0,i.wk)()],eD.prototype,"profileName",void 0),eL([(0,i.wk)()],eD.prototype,"address",void 0),eL([(0,i.wk)()],eD.prototype,"currentTab",void 0),eL([(0,i.wk)()],eD.prototype,"tokenBalance",void 0),eL([(0,i.wk)()],eD.prototype,"features",void 0),eL([(0,i.wk)()],eD.prototype,"namespace",void 0),eL([(0,i.wk)()],eD.prototype,"activeConnectorIds",void 0),eL([(0,i.wk)()],eD.prototype,"remoteFeatures",void 0),eD=eL([(0,h.EM)("w3m-account-wallet-features-widget")],eD);var eF=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let eH=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.namespace=o.W.state.activeChain,this.unsubscribe.push(o.W.subscribeKey("activeChain",e=>{this.namespace=e}))}
1706render(){if(!this.namespace)return null;let e=K.a.getConnectorId(this.namespace),t=K.a.getAuthConnector();return(0,n.qy)` 1707 ${t&&e===G.o.CONNECTOR_ID.AUTH?this.walletFeaturesTemplate():this.defaultTemplate()} 1708 `}walletFeaturesTemplate(){return(0,n.qy)`<w3m-account-wallet-features-widget></w3m-account-wallet-features-widget>`}defaultTemplate(){return(0,n.qy)`<w3m-account-default-widget></w3m-account-default-widget>`}};eF([(0,i.wk)()],eH.prototype,"namespace",void 0),eH=eF([(0,h.EM)("w3m-account-view")],eH);var ez=r(88787),eW=r(52335),eq=r(6875);r(77914),r(77805);let eV=(0,g.AH)` 1709 wui-image { 1710 width: 24px; 1711 height: 24px; 1712 border-radius: ${({borderRadius:e})=>e[2]}; 1713 } 1714 1715 wui-image, 1716 .icon-box { 1717 width: 32px; 1718 height: 32px; 1719 border-radius: ${({borderRadius:e})=>e[2]}; 1720 } 1721 1722 wui-icon:not(.custom-icon, .icon-badge) { 1723 cursor: pointer; 1724 } 1725 1726 .icon-box { 1727 position: relative; 1728 border-radius: ${({borderRadius:e})=>e[2]}; 1729 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 1730 } 1731 1732 .icon-badge { 1733 position: absolute; 1734 top: 18px; 1735 left: 23px; 1736 z-index: 3; 1737 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 1738 border: 2px solid ${({tokens:e})=>e.theme.backgroundPrimary}; 1739 border-radius: 50%; 1740 padding: ${({spacing:e})=>e["01"]}; 1741 } 1742 1743 .icon-badge { 1744 width: 8px; 1745 height: 8px; 1746 } 1747`;var eG=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let eK=class extends n.WF{constructor(){super(...arguments),this.address="",this.profileName="",this.content=[],this.alt="",this.imageSrc="",this.icon=void 0,this.iconSize="md",this.iconBadge=void 0,this.iconBadgeSize="md",this.buttonVariant="neutral-primary",this.enableMoreButton=!1,this.charsStart=4,this.charsEnd=6}render(){return(0,n.qy)` 1748 <wui-flex flexDirection="column" rowgap="2"> 1749 ${this.topTemplate()} ${this.bottomTemplate()} 1750 </wui-flex> 1751 `}topTemplate(){return(0,n.qy)` 1752 <wui-flex alignItems="flex-start" justifyContent="space-between"> 1753 ${this.imageOrIconTemplate()} 1754 <wui-icon-link 1755 variant="secondary" 1756 size="md" 1757 icon="copy" 1758 @click=${this.dispatchCopyEvent} 1759 ></wui-icon-link> 1760 <wui-icon-link 1761 variant="secondary" 1762 size="md" 1763 icon="externalLink" 1764 @click=${this.dispatchExternalLinkEvent} 1765 ></wui-icon-link> 1766 ${this.enableMoreButton?(0,n.qy)`<wui-icon-link 1767 variant="secondary" 1768 size="md" 1769 icon="threeDots" 1770 @click=${this.dispatchMoreButtonEvent} 1771 data-testid="wui-active-profile-wallet-item-more-button" 1772 ></wui-icon-link>`:null} 1773 </wui-flex> 1774 `}bottomTemplate(){return(0,n.qy)` <wui-flex flexDirection="column">${this.contentTemplate()}</wui-flex> `}imageOrIconTemplate(){return this.icon?(0,n.qy)` 1775 <wui-flex flexGrow="1" alignItems="center"> 1776 <wui-flex alignItems="center" justifyContent="center" class="icon-box"> 1777 <wui-icon size="lg" color="default" name=${this.icon} class="custom-icon"></wui-icon> 1778 1779 ${this.iconBadge?(0,n.qy)`<wui-icon 1780 color="accent-primary" 1781 size="inherit" 1782 name=${this.iconBadge} 1783 class="icon-badge" 1784 ></wui-icon>`:null} 1785 </wui-flex> 1786 </wui-flex> 1787 `:(0,n.qy)` 1788 <wui-flex flexGrow="1" alignItems="center"> 1789 <wui-image objectFit="contain" src=${this.imageSrc} alt=${this.alt}></wui-image> 1790 </wui-flex> 1791 `}contentTemplate(){return 0===this.content.length?null:(0,n.qy)` 1792 <wui-flex flexDirection="column" rowgap="3"> 1793 ${this.content.map(e=>this.labelAndTagTemplate(e))} 1794 </wui-flex> 1795 `}
1795labelAndTagTemplate({address:e,profileName:t,label:r,description:i,enableButton:a,buttonType:s,buttonLabel:o,buttonVariant:l,tagVariant:c,tagLabel:u,alignItems:d="flex-end"}){return(0,n.qy)` 1796 <wui-flex justifyContent="space-between" alignItems=${d} columngap="1"> 1797 <wui-flex flexDirection="column" rowgap="01"> 1798 ${r?(0,n.qy)`<wui-text variant="sm-medium" color="secondary">${r}</wui-text>`:null} 1799 1800 <wui-flex alignItems="center" columngap="1"> 1801 <wui-text variant="md-regular" color="primary"> 1802 ${f.Z.getTruncateString({string:t||e,charsStart:t?16:this.charsStart,charsEnd:t?0:this.charsEnd,truncate:t?"end":"middle"})} 1803 </wui-text> 1804 1805 ${c&&u?(0,n.qy)`<wui-tag variant=${c} size="sm">${u}</wui-tag>`:null} 1806 </wui-flex> 1807 1808 ${i?(0,n.qy)`<wui-text variant="sm-regular" color="secondary">${i}</wui-text>`:null} 1809 </wui-flex> 1810 1811 ${a?this.buttonTemplate({buttonType:s,buttonLabel:o,buttonVariant:l}):null} 1812 </wui-flex> 1813 `}buttonTemplate({buttonType:e,buttonLabel:t,buttonVariant:r}){return(0,n.qy)` 1814 <wui-button 1815 size="sm" 1816 variant=${r} 1817 @click=${"disconnect"===e?this.dispatchDisconnectEvent.bind(this):this.dispatchSwitchEvent.bind(this)} 1818 data-testid=${"disconnect"===e?"wui-active-profile-wallet-item-disconnect-button":"wui-active-profile-wallet-item-switch-button"} 1819 > 1820 ${t} 1821 </wui-button> 1822 `}dispatchDisconnectEvent(){this.dispatchEvent(new CustomEvent("disconnect",{bubbles:!0,composed:!0}))}dispatchSwitchEvent(){this.dispatchEvent(new CustomEvent("switch",{bubbles:!0,composed:!0}))}dispatchExternalLinkEvent(){this.dispatchEvent(new CustomEvent("externalLink",{bubbles:!0,composed:!0}))}dispatchMoreButtonEvent(){this.dispatchEvent(new CustomEvent("more",{bubbles:!0,composed:!0}))}dispatchCopyEvent(){this.dispatchEvent(new CustomEvent("copy",{bubbles:!0,composed:!0}))}};eK.styles=[p.W5,p.fD,eV],eG([(0,i.MZ)()],eK.prototype,"address",void 0),eG([
1822(0,i.MZ)()],eK.prototype,"profileName",void 0),eG([(0,i.MZ)({type:Array})],eK.prototype,"content",void 0),eG([(0,i.MZ)()],eK.prototype,"alt",void 0),eG([(0,i.MZ)()],eK.prototype,"imageSrc",void 0),eG([(0,i.MZ)()],eK.prototype,"icon",void 0),eG([(0,i.MZ)()],eK.prototype,"iconSize",void 0),eG([(0,i.MZ)()],eK.prototype,"iconBadge",void 0),eG([(0,i.MZ)()],eK.prototype,"iconBadgeSize",void 0),eG([(0,i.MZ)()],eK.prototype,"buttonVariant",void 0),eG([(0,i.MZ)({type:Boolean})],eK.prototype,"enableMoreButton",void 0),eG([(0,i.MZ)({type:Number})],eK.prototype,"charsStart",void 0),eG([(0,i.MZ)({type:Number})],eK.prototype,"charsEnd",void 0),eK=eG([(0,m.E)("wui-active-profile-wallet-item")],eK),r(23833);let eZ=(0,g.AH)` 1823 wui-image, 1824 .icon-box { 1825 width: 32px; 1826 height: 32px; 1827 border-radius: ${({borderRadius:e})=>e[2]}; 1828 } 1829 1830 .right-icon { 1831 cursor: pointer; 1832 } 1833 1834 .icon-box { 1835 position: relative; 1836 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 1837 } 1838 1839 .icon-badge { 1840 position: absolute; 1841 top: 18px; 1842 left: 23px; 1843 z-index: 3; 1844 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 1845 border: 2px solid ${({tokens:e})=>e.theme.backgroundPrimary}; 1846 border-radius: 50%; 1847 padding: ${({spacing:e})=>e["01"]}; 1848 } 1849 1850 .icon-badge { 1851 width: 8px; 1852 height: 8px; 1853 } 1854`;var eJ=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let eY=class extends n.WF{constructor(){super(...arguments),this.address="",this.profileName="",this.alt="",this.buttonLabel="",this.buttonVariant="accent-primary",this.imageSrc="",this.icon=void 0,this.iconSize="md",this.iconBadgeSize="md",this.rightIcon="signOut",this.rightIconSize="md",this.loading=!1,this.charsStart=4,this.charsEnd=6}render(){return(0,n.qy)` 1855 <wui-flex alignItems="center" columngap="2"> 1856 ${this.imageOrIconTemplate()} ${this.labelAndDescriptionTemplate()} 1857 ${this.buttonActionTemplate()} 1858 </wui-flex> 1859 `}imageOrIconTemplate(){return this.icon?(0,n.qy)` 1860 <wui-flex alignItems="center" justifyContent="center" class="icon-box"> 1861 <wui-flex alignItems="center" justifyContent="center" class="icon-box"> 1862 <wui-icon size="lg" color="default" name=${this.icon} class="custom-icon"></wui-icon> 1863 1864 ${this.iconBadge?(0,n.qy)`<wui-icon 1865 color="default" 1866 size="inherit" 1867 name=${this.iconBadge} 1868 class="icon-badge" 1869 ></wui-icon>`:null} 1870 </wui-flex> 1871 </wui-flex> 1872 `:(0,n.qy)`<wui-image objectFit="contain" src=${this.imageSrc} alt=${this.alt}></wui-image>`}labelAndDescriptionTemplate(){return(0,n.qy)` 1873 <wui-flex 1874 flexDirection="column" 1875 flexGrow="1" 1876 justifyContent="flex-start" 1877 alignItems="flex-start" 1878 > 1879 <wui-text variant="lg-regular" color="primary"> 1880 ${f.Z.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?16:this.charsStart,charsEnd:this.profileName?0:this.charsEnd,truncate:this.profileName?"end":"middle"})} 1881 </wui-text> 1882 </wui-flex> 1883 `}buttonActionTemplate(){return(0,n.qy)` 1884 <wui-flex columngap="1" alignItems="center" justifyContent="center"> 1885 <wui-button 1886 size="sm" 1887 variant=${this.buttonVariant} 1888 .loading=${this.loading} 1889 @click=${this.handleButtonClick} 1890 data-testid="wui-inactive-profile-wallet-item-button" 1891 > 1892 ${this.buttonLabel} 1893 </wui-button> 1894 1895 <wui-icon-link 1896 variant="secondary" 1897 size="md" 1898 icon=${(0,a.J)(this.rightIcon)} 1899 class="right-icon" 1900 @click=${this.handleIconClick} 1901 ></wui-icon-link> 1902 </wui-flex> 1903 `}handleButtonClick(){this.dispatchEvent(new CustomEvent("buttonClick",{bubbles:!0,composed:!0}))}handleIconClick(){this.dispatchEvent(new CustomEvent("iconClick",{bubbles:!0,composed:!0}))}};eY.styles=[p.W5,p.fD,eZ],eJ([(0,i.MZ)()],eY.prototype,"address",void 0),eJ([(0,i.MZ)()],eY.prototype,"profileName",void 0),eJ([(0,i.MZ)()],eY.prototype,"alt",void 0),eJ([(0,i.MZ)()],eY.prototype,"buttonLabel",void 0),eJ([(0,i.MZ)()],eY.prototype,"buttonVariant",void 0),eJ([(0,i.MZ)()],eY.prototype,"imageSrc",void 0),eJ([(0,i.MZ)()],eY.prototype,"icon",void 0),eJ([(0,i.MZ)()],eY.prototype,"iconSize",void 0),eJ([(0,i.MZ)()],eY.prototype,"iconBadge",void 0),eJ([(0,i.MZ)()],eY.prototype,"iconBadgeSize",void 0),eJ([(0,i.MZ)()],eY.prototype,"rightIcon",void 0),eJ([(0,i.MZ)()],eY.prototype,"rightIconSize",void 0),eJ([(0,i.MZ)({type:Boolean})],eY.prototype,"loading",void 0),eJ([(0,i.MZ)({type:Number})],eY.prototype,"charsStart",void 0),eJ([(0,i.MZ)({type:Number})],eY.prototype,"charsEnd",void 0),eY=eJ([(0,m.E)("wui-inactive-profile-wallet-item")],eY),r(44141);var eQ=r(33384);let eX={getAuthData(e){let t=e.connectorId===G.o.CONNECTOR_ID.AUTH;if(!t)return{isAuth:!1,icon:void 0,iconSize:void 0,name:void 0};let r=e?.auth?.name??er.i.getConnectedSocialProvider(),n=e?.auth?.username??er.i.getConnectedSocialUsername(),i=K.a.getAuthConnector(),a=i?.provider.getEmail()??"";
1903return{isAuth:!0,icon:r??"mail",iconSize:r?"xl":"md",name:t?eE.g.getAuthName({email:a,socialUsername:n,socialProvider:r}):void 0}}},e0=(0,h.AH)` 1904 :host { 1905 --connect-scroll--top-opacity: 0; 1906 --connect-scroll--bottom-opacity: 0; 1907 } 1908 1909 .balance-amount { 1910 flex: 1; 1911 } 1912 1913 .wallet-list { 1914 scrollbar-width: none; 1915 overflow-y: scroll; 1916 overflow-x: hidden; 1917 transition: opacity ${({easings:e})=>e["ease-out-power-1"]} 1918 ${({durations:e})=>e.md}; 1919 will-change: opacity; 1920 mask-image: linear-gradient( 1921 to bottom, 1922 rgba(0, 0, 0, calc(1 - var(--connect-scroll--top-opacity))) 0px, 1923 rgba(200, 200, 200, calc(1 - var(--connect-scroll--top-opacity))) 1px, 1924 black 40px, 1925 black calc(100% - 40px), 1926 rgba(155, 155, 155, calc(1 - var(--connect-scroll--bottom-opacity))) calc(100% - 1px), 1927 rgba(0, 0, 0, calc(1 - var(--connect-scroll--bottom-opacity))) 100% 1928 ); 1929 } 1930 1931 .active-wallets { 1932 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 1933 border-radius: ${({borderRadius:e})=>e["4"]}; 1934 } 1935 1936 .active-wallets-box { 1937 height: 330px; 1938 } 1939 1940 .empty-wallet-list-box { 1941 height: 400px; 1942 } 1943 1944 .empty-box { 1945 width: 100%; 1946 padding: ${({spacing:e})=>e["4"]}; 1947 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 1948 border-radius: ${({borderRadius:e})=>e["4"]}; 1949 } 1950 1951 wui-separator { 1952 margin: ${({spacing:e})=>e["2"]} 0 ${({spacing:e})=>e["2"]} 0; 1953 } 1954 1955 .active-connection { 1956 padding: ${({spacing:e})=>e["2"]}; 1957 } 1958 1959 .recent-connection { 1960 padding: ${({spacing:e})=>e["2"]} 0 ${({spacing:e})=>e["2"]} 0; 1961 } 1962 1963 @media (max-width: 430px) { 1964 .active-wallets-box, 1965 .empty-wallet-list-box { 1966 height: auto; 1967 max-height: clamp(360px, 470px, 80vh); 1968 } 1969 } 1970`;var e1=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let e2={ADDRESS_DISPLAY:{START:4,END:6},BADGE:{SIZE:"md",ICON:"lightbulb"},SCROLL_THRESHOLD:50,OPACITY_RANGE:[0,1]},e5={eip155:"ethereum",solana:"solana",bip122:"bitcoin",ton:"ton",tron:"tron"},e6=[{namespace:"eip155",icon:e5.eip155,label:"EVM"},{namespace:"solana",icon:e5.solana,label:"Solana"},{namespace:"bip122",icon:e5.bip122,label:"Bitcoin"},{namespace:"ton",icon:e5.ton,label:"Ton"},{namespace:"tron",icon:e5.tron,label:"Tron"}],e3={eip155:{title:"Add EVM Wallet",description:"Add your first EVM wallet"},solana:{title:"Add Solana Wallet",description:"Add your first Solana wallet"},bip122:{title:"Add Bitcoin Wallet",description:"Add your first Bitcoin wallet"},ton:{title:"Add TON Wallet",description:"Add your first TON wallet"},tron:{title:"Add TRON Wallet",description:"Add your first TRON wallet"}},e4=class extends n.WF{constructor(){super(),this.unsubscribers=[],this.currentTab=0,this.namespace=o.W.state.activeChain,this.namespaces=Array.from(o.W.state.chains.keys()),this.caipAddress=void 0,this.profileName=void 0,this.activeConnectorIds=K.a.state.activeConnectorIds,this.lastSelectedAddress="",this.lastSelectedConnectorId="",this.isSwitching=!1,this.caipNetwork=o.W.state.activeCaipNetwork,this.user=o.W.getAccountData()?.user,this.remoteFeatures=s.H.state.remoteFeatures,this.currentTab=this.namespace?this.namespaces.indexOf(this.namespace):0,this.caipAddress=o.W.getAccountData(this.namespace)?.caipAddress,this.profileName=o.W.getAccountData(this.namespace)?.profileName,this.unsubscribers.push(Q.x.subscribeKey("connections",()=>this.onConnectionsChange()),Q.x.subscribeKey("recentConnections",()=>this.requestUpdate()),K.a.subscribeKey("activeConnectorIds",e=>{this.activeConnectorIds=e}),o.W.subscribeKey("activeCaipNetwork",e=>this.caipNetwork=e),o.W.subscribeChainProp("accountState",e=>{this.user=e?.user}),s.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e)),this.chainListener=o.W.subscribeChainProp("accountState",e=>{this.caipAddress=e?.caipAddress,this.profileName=e?.profileName},this.namespace)}
1970disconnectedCallback(){this.unsubscribers.forEach(e=>e()),this.resizeObserver?.disconnect(),this.removeScrollListener(),this.chainListener?.()}firstUpdated(){let e=this.shadowRoot?.querySelector(".wallet-list");if(!e)return;let t=()=>this.updateScrollOpacity(e);requestAnimationFrame(t),e.addEventListener("scroll",t),this.resizeObserver=new ResizeObserver(t),this.resizeObserver.observe(e),t()}render(){let e=this.namespace;if(!e)throw Error("Namespace is not set");return(0,n.qy)` 1971 <wui-flex flexDirection="column" .padding=${["0","4","4","4"]} gap="4"> 1972 ${this.renderTabs()} ${this.renderHeader(e)} ${this.renderConnections(e)} 1973 ${this.renderAddConnectionButton(e)} 1974 </wui-flex> 1975 `}renderTabs(){let e=this.namespaces.map(e=>e6.find(t=>t.namespace===e)).filter(Boolean);return e.length>1?(0,n.qy)` 1976 <wui-tabs 1977 .onTabChange=${e=>this.handleTabChange(e)} 1978 .activeTab=${this.currentTab} 1979 .tabs=${e} 1980 ></wui-tabs> 1981 `:null}renderHeader(e){let t=this.getActiveConnections(e).flatMap(({accounts:e})=>e).length+ +!!this.caipAddress;return(0,n.qy)` 1982 <wui-flex alignItems="center" columngap="1"> 1983 <wui-icon 1984 size="sm" 1985 name=${e5[e]??e5.eip155} 1986 ></wui-icon> 1987 <wui-text color="secondary" variant="lg-regular" 1988 >${t>1?"Wallets":"Wallet"}</wui-text 1989 > 1990 <wui-text 1991 color="primary" 1992 variant="lg-regular" 1993 class="balance-amount" 1994 data-testid="balance-amount" 1995 > 1996 ${t} 1997 </wui-text> 1998 <wui-link 1999 color="secondary" 2000 variant="secondary" 2001 @click=${()=>Q.x.disconnect({namespace:e})} 2002 ?disabled=${!this.hasAnyConnections(e)} 2003 data-testid="disconnect-all-button" 2004 > 2005 Disconnect All 2006 </wui-link> 2007 </wui-flex> 2008 `}renderConnections(e){let t=this.hasAnyConnections(e);return(0,n.qy)` 2009 <wui-flex flexDirection="column" class=${(0,ez.H)({"wallet-list":!0,"active-wallets-box":t,"empty-wallet-list-box":!t})} rowgap="3"> 2010 ${t?this.renderActiveConnections(e):this.renderEmptyState(e)} 2011 </wui-flex> 2012 `}renderActiveConnections(e){let t=this.getActiveConnections(e),r=this.activeConnectorIds[e],i=this.getPlainAddress();return(0,n.qy)` 2013 ${i||r||t.length>0?(0,n.qy)`<wui-flex 2014 flexDirection="column" 2015 .padding=${["4","0","4","0"]} 2016 class="active-wallets" 2017 > 2018 ${this.renderActiveProfile(e)} ${this.renderActiveConnectionsList(e)} 2019 </wui-flex>`:null} 2020 ${this.renderRecentConnections(e)} 2021 `}renderActiveProfile(e){let t=this.activeConnectorIds[e];if(!t)return null;let{connections:r}=eq.b.getConnectionsData(e),i=K.a.getConnectorById(t),a=c.$.getConnectorImage(i),s=this.getPlainAddress();if(!s)return null;let o=e===G.o.CHAIN.BITCOIN,l=eX.getAuthData({connectorId:t,accounts:[]}),u=this.getActiveConnections(e).flatMap(e=>e.accounts).length>0,d=r.find(e=>e.connectorId===t),h=d?.accounts.filter(e=>!eQ.y.isLowerCaseMatch(e.address,s));return(0,n.qy)` 2022 <wui-flex flexDirection="column" .padding=${["0","4","0","4"]}> 2023 <wui-active-profile-wallet-item 2024 address=${s} 2025 alt=${i?.name} 2026 .content=${this.getProfileContent({address:s,connections:r,connectorId:t,namespace:e})} 2027 .charsStart=${e2.ADDRESS_DISPLAY.START} 2028 .charsEnd=${e2.ADDRESS_DISPLAY.END} 2029 .icon=${l.icon} 2030 .iconSize=${l.iconSize} 2031 .iconBadge=${this.isSmartAccount(s)?e2.BADGE.ICON:void 0} 2032 .iconBadgeSize=${this.isSmartAccount(s)?e2.BADGE.SIZE:void 0} 2033 imageSrc=${a} 2034 ?enableMoreButton=${l.isAuth} 2035 @copy=${()=>this.handleCopyAddress(s)} 2036 @disconnect=${()=>this.handleDisconnect(e,t)} 2037 @switch=${()=>{o&&d&&h?.[0]&&this.handleSwitchWallet(d,h[0].address,e)}} 2038 @externalLink=${()=>this.handleExternalLink(s)} 2039 @more=${()=>this.handleMore()} 2040 data-testid="wui-active-profile-wallet-item" 2041 ></wui-active-profile-wallet-item> 2042 ${u?(0,n.qy)`<wui-separator></wui-separator>`:null} 2043 </wui-flex> 2044 `}renderActiveConnectionsList(e){let t=this.getActiveConnections(e);return 0===t.length?null:(0,n.qy)` 2045 <wui-flex flexDirection="column" .padding=${["0","2","0","2"]}> 2046 ${this.renderConnectionList(t,!1,e)} 2047 </wui-flex> 2048 `}renderRecentConnections(e){let{recentConnections:t}=eq.b.getConnectionsData(e);return 0===t.flatMap(e=>e.accounts).length?null:(0,n.qy)` 2049 <wui-flex flexDirection="column" .padding=${["0","2","0","2"]} rowGap="2"> 2050 <wui-text color="secondary" variant="sm-medium" data-testid="recently-connected-text" 2051 >RECENTLY CONNECTED</wui-text 2052 > 2053 <wui-flex flexDirection="column" .padding=${["0","2","0","2"]}> 2054 ${this.renderConnectionList(t,!0,e)} 2055 </wui-flex> 2056 </wui-flex> 2057 `}renderConnectionList(e,t,r){return e.filter(e=>e.accounts.length>0).map((e,i)=>{let a=K.a.getConnectorById(e.connectorId),s=c.$.getConnectorImage(a)??"",o=eX.getAuthData(e);return e.accounts.map((a,l)=>{let c=this.isAccountLoading(e.connectorId,a.address);return(0,n.qy)` 2058 <wui-flex flexDirection="column"> 2059 ${0!==i||0!==l?(0,n.qy)`<wui-separator></wui-separator>`:null} 2060 <wui-inactive-profile-wallet-item 2061 address=${a.address} 2062 alt=${e.connectorId} 2063 buttonLabel=${t?"Connect":"Switch"} 2064 buttonVariant=${t?"neutral-secondary":"accent-secondary"} 2065 rightIcon=${t?"bin":"power"} 2066 rightIconSize="sm" 2067 class=${t?"recent-connection":"active-connection"} 2068 data-testid=${t?"recent-connection":"active-connection"} 2069 imageSrc=${s} 2070 .iconBadge=${this.isSmartAccount(a.address)?e2.BADGE.ICON:void 0} 2071 .iconBadgeSize=${this.isSmartAccount(a.address)?e2.BADGE.SIZE:void 0} 2072 .icon=${o.icon} 2073 .iconSize=${o.iconSize} 2074 .loading=${c} 2075 .showBalance=${!1} 2076 .charsStart=${e2.ADDRESS_DISPLAY.START} 2077 .charsEnd=${e2.ADDRESS_DISPLAY.END} 2078 @buttonClick=${()=>this.handleSwitchWallet(e,a.address,r)} 2079 @iconClick=${()=>this.handleWalletAction({connection:e,address:a.address,isRecentConnection:t,namespace:r})} 2080 ></wui-inactive-profile-wallet-item> 2081 </wui-flex> 2082 `})})}renderAddConnectionButton(e){if(!this.isMultiWalletEnabled()&&this.caipAddress||!this.hasAnyConnections(e))return null;let{title:t}=this.getChainLabelInfo(e);return(0,n.qy)` 2083 <wui-list-item 2084 variant="icon" 2085 iconVariant="overlay" 2086 icon="plus" 2087 iconSize="sm" 2088 ?chevron=${!0} 2089 @click=${()=>this.handleAddConnection(e)} 2090 data-testid="add-connection-button" 2091 > 2092 <wui-text variant="md-medium" color="secondary">${t}</wui-text> 2093 </wui-list-item> 2094 `}renderEmptyState(e){let{title:t,description:r}=this.getChainLabelInfo(e);return(0,n.qy)` 2095 <wui-flex alignItems="flex-start" class="empty-template" data-testid="empty-template"> 2096 <wui-flex 2097 flexDirection="column" 2098 alignItems="center" 2099 justifyContent="center" 2100 rowgap="3" 2101 class="empty-box" 2102 > 2103 <wui-icon-box size="xl" icon="wallet" color="secondary"></wui-icon-box> 2104 2105 <wui-flex flexDirection="column" alignItems="center" justifyContent="center" gap="1"> 2106 <wui-text color="primary" variant="lg-regular" data-testid="empty-state-text" 2107 >No wallet connected</wui-text 2108 > 2109 <wui-text color="secondary" variant="md-regular" data-testid="empty-state-description" 2110 >${r}</wui-text 2111 > 2112 </wui-flex> 2113 2114 <wui-link 2115 @click=${()=>this.handleAddConnection(e)} 2116 data-testid="empty-state-button" 2117 icon="plus" 2118 > 2119 ${t} 2120 </wui-link> 2121 </wui-flex> 2122 </wui-flex> 2123 `}handleTabChange(e){let t=this.namespaces[e];t&&(this.chainListener?.(),this.currentTab=this.namespaces.indexOf(t),this.namespace=t,this.caipAddress=o.W.getAccountData(t)?.caipAddress,this.profileName=o.W.getAccountData(t)?.profileName,this.chainListener=o.W.subscribeChainProp("accountState",e=>{this.caipAddress=e?.caipAddress},t))}async handleSwitchWallet(e,t,r){try{this.isSwitching=!0,this.lastSelectedConnectorId=e.connectorId,this.lastSelectedAddress=t,this.caipNetwork?.chainNamespace!==r&&e?.caipNetwork&&(K.a.setFilterByNamespace(r),await o.W.switchActiveNetwork(e?.caipNetwork)),await Q.x.switchConnection({connection:e,address:t,namespace:r,closeModalOnConnect:!1,onChange({hasSwitchedAccount:e,hasSwitchedWallet:t}){t?J.P.showSuccess("Wallet switched"):e&&J.P.showSuccess("Account switched")}})}catch(e){J.P.showError("Failed to switch wallet")}finally{this.isSwitching=!1}}
2123handleWalletAction(e){let{connection:t,address:r,isRecentConnection:n,namespace:i}=e;n?(er.i.deleteAddressFromConnection({connectorId:t.connectorId,address:r,namespace:i}),Q.x.syncStorageConnections(),J.P.showSuccess("Wallet deleted")):this.handleDisconnect(i,t.connectorId)}async handleDisconnect(e,t){try{await Q.x.disconnect({id:t,namespace:e}),J.P.showSuccess("Wallet disconnected")}catch{J.P.showError("Failed to disconnect wallet")}}handleCopyAddress(e){u.w.copyToClopboard(e),J.P.showSuccess("Address copied")}handleMore(){Y.I.push("AccountSettings")}handleExternalLink(e){let t=this.caipNetwork?.blockExplorers?.default.url;t&&u.w.openHref(`${t}/address/${e}`,"_blank")}handleAddConnection(e){K.a.setFilterByNamespace(e),Y.I.push("Connect",{addWalletForNamespace:e})}getChainLabelInfo(e){return e3[e]??{title:"Add Wallet",description:"Add your first wallet"}}isSmartAccount(e){if(!this.namespace)return!1;let t=this.user?.accounts?.find(e=>"smartAccount"===e.type);return!!t&&!!e&&eQ.y.isLowerCaseMatch(t.address,e)}getPlainAddress(){return this.caipAddress?u.w.getPlainAddress(this.caipAddress):void 0}getActiveConnections(e){let t=this.activeConnectorIds[e],{connections:r}=eq.b.getConnectionsData(e),[n]=r.filter(e=>eQ.y.isLowerCaseMatch(e.connectorId,t));if(!t)return r;let i=e===G.o.CHAIN.BITCOIN,{address:a}=this.caipAddress?eW.C.parseCaipAddress(this.caipAddress):{},s=[...a?[a]:[]];return i&&n&&(s=n.accounts.map(e=>e.address)||[]),eq.b.excludeConnectorAddressFromConnections({connectorId:t,addresses:s,connections:r})}hasAnyConnections(e){let t=this.getActiveConnections(e),{recentConnections:r}=eq.b.getConnectionsData(e);return!!this.caipAddress||t.length>0||r.length>0}isAccountLoading(e,t){return eQ.y.isLowerCaseMatch(this.lastSelectedConnectorId,e)&&eQ.y.isLowerCaseMatch(this.lastSelectedAddress,t)&&this.isSwitching}getProfileContent(e){let{address:t,connections:r,connectorId:n,namespace:i}=e,[a]=r.filter(e=>eQ.y.isLowerCaseMatch(e.connectorId,n));if(i===G.o.CHAIN.BITCOIN&&a?.accounts.every(e=>"string"==typeof e.type))return this.getBitcoinProfileContent(a.accounts,t);let s=eX.getAuthData({connectorId:n,accounts:[]});return[{address:t,tagLabel:"Active",tagVariant:"success",enableButton:!0,profileName:this.profileName,buttonType:"disconnect",buttonLabel:"Disconnect",buttonVariant:"neutral-secondary",...s.isAuth?{description:this.isSmartAccount(t)?"Smart Account":"EOA Account"}:{}}]}getBitcoinProfileContent(e,t){let r=e.length>1,n=this.getPlainAddress();return e.map(e=>{let i=eQ.y.isLowerCaseMatch(e.address,n),a="PAYMENT";return"ordinal"===e.type&&(a="ORDINALS"),{address:e.address,tagLabel:eQ.y.isLowerCaseMatch(e.address,t)?"Active":void 0,tagVariant:eQ.y.isLowerCaseMatch(e.address,t)?"success":void 0,enableButton:!0,...r?{label:a,alignItems:"flex-end",buttonType:i?"disconnect":"switch",buttonLabel:i?"Disconnect":"Switch",buttonVariant:i?"neutral-secondary":"accent-secondary"}:{alignItems:"center",buttonType:"disconnect",buttonLabel:"Disconnect",buttonVariant:"neutral-secondary"}}})}removeScrollListener(){let e=this.shadowRoot?.querySelector(".wallet-list");e&&e.removeEventListener("scroll",()=>this.handleConnectListScroll())}handleConnectListScroll(){let e=this.shadowRoot?.querySelector(".wallet-list");e&&this.updateScrollOpacity(e)}isMultiWalletEnabled(){return!!this.remoteFeatures?.multiWallet}updateScrollOpacity(e){e.style.setProperty("--connect-scroll--top-opacity",h.z8.interpolate([0,e2.SCROLL_THRESHOLD],e2.OPACITY_RANGE,e.scrollTop).toString()),e.style.setProperty("--connect-scroll--bottom-opacity",h.z8.interpolate([0,e2.SCROLL_THRESHOLD],e2.OPACITY_RANGE,e.scrollHeight-e.scrollTop-e.offsetHeight).toString())}onConnectionsChange(){if(this.isMultiWalletEnabled()&&this.namespace){let{connections:e}=eq.b.getConnectionsData(this.namespace);0===e.length&&Y.I.reset("ProfileWallets")}this.requestUpdate()}};e4.styles=e0,e1([(0,i.wk)()],e4.prototype,"currentTab",void 0),e1([(0,i.wk)()],e4.prototype,"namespace",void 0),e1([(0,i.wk)()],e4.prototype,"namespaces",void 0),e1([(0,i.wk)()],e4.prototype,"caipAddress",void 0),e1([(0,i.wk)()],e4.prototype,"profileName",void 0),e1([(0,i.wk)()],e4.prototype,"activeConnectorIds",void 0),e1([(0,i.wk)()],e4.prototype,"lastSelectedAddress",void 0),e1([(0,i.wk)()],e4.prototype,"lastSelectedConnectorId",void 0),e1([(0,i.wk)()],e4.prototype,"isSwitching",void 0),e1([(0,i.wk)()],e4.prototype,"caipNetwork",void 0),e1([(0,i.wk)()],e4.prototype,"user",void 0),e1([(0,i.wk)()],e4.prototype,"remoteFeatures",void 0),e4=e1([(0,h.EM)("w3m-profile-wallets-view")],e4);var e8=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let e9=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.activeCaipNetwork=o.W.state.activeCaipNetwork,this.features=s.H.state.features,this.remoteFeatures=s.H.state.remoteFeatures,this.exchangesLoading=eo.g.state.isLoading,this.exchanges=eo.g.state.exchanges,this.unsubscribe.push(s.H.subscribeKey("features",e=>this.features=e),s.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e),o.W.subscribeKey("activeCaipNetwork",e=>{this.activeCaipNetwork=e,this.setDefaultPaymentAsset()}),eo.g.subscribeKey("isLoading",e=>this.exchangesLoading=e),eo.g.subscribeKey("exchanges",e=>this.exchanges=e))}
2123disconnectedCallback(){this.unsubscribe.forEach(e=>e())}async firstUpdated(){eo.g.isPayWithExchangeSupported()&&(await this.setDefaultPaymentAsset(),await eo.g.fetchExchanges())}render(){return(0,n.qy)` 2124 <wui-flex flexDirection="column" .padding=${["1","3","3","3"]} gap="2"> 2125 ${this.onrampTemplate()} ${this.receiveTemplate()} ${this.depositFromExchangeTemplate()} 2126 </wui-flex> 2127 `}async setDefaultPaymentAsset(){if(!this.activeCaipNetwork)return;let e=await eo.g.getAssetsForNetwork(this.activeCaipNetwork.caipNetworkId),t=e.find(e=>"USDC"===e.metadata.symbol)||e[0];t&&eo.g.setPaymentAsset(t)}onrampTemplate(){if(!this.activeCaipNetwork)return null;let e=this.remoteFeatures?.onramp,t=Z.oU.ONRAMP_SUPPORTED_CHAIN_NAMESPACES.includes(this.activeCaipNetwork.chainNamespace);return e&&t?(0,n.qy)` 2128 <wui-list-item 2129 @click=${this.onBuyCrypto.bind(this)} 2130 icon="card" 2131 data-testid="wallet-features-onramp-button" 2132 > 2133 <wui-text variant="lg-regular" color="primary">Buy crypto</wui-text> 2134 </wui-list-item> 2135 `:null}depositFromExchangeTemplate(){return this.activeCaipNetwork&&eo.g.isPayWithExchangeSupported()?(0,n.qy)` 2136 <wui-list-item 2137 @click=${this.onDepositFromExchange.bind(this)} 2138 icon="arrowBottomCircle" 2139 data-testid="wallet-features-deposit-from-exchange-button" 2140 ?loading=${this.exchangesLoading} 2141 ?disabled=${this.exchangesLoading||!this.exchanges.length} 2142 > 2143 <wui-text variant="lg-regular" color="primary">Deposit from exchange</wui-text> 2144 </wui-list-item> 2145 `:null}receiveTemplate(){return this.features?.receive?(0,n.qy)` 2146 <wui-list-item 2147 @click=${this.onReceive.bind(this)} 2148 icon="qrCode" 2149 data-testid="wallet-features-receive-button" 2150 > 2151 <wui-text variant="lg-regular" color="primary">Receive funds</wui-text> 2152 </wui-list-item> 2153 `:null}onBuyCrypto(){Y.I.push("OnRampProviders")}onReceive(){Y.I.push("WalletReceive")}onDepositFromExchange(){eo.g.reset(),Y.I.push("PayWithExchange",{redirectView:Y.I.state.data?.redirectView})}};e8([(0,i.wk)()],e9.prototype,"activeCaipNetwork",void 0),e8([(0,i.wk)()],e9.prototype,"features",void 0),e8([(0,i.wk)()],e9.prototype,"remoteFeatures",void 0),e8([(0,i.wk)()],e9.prototype,"exchangesLoading",void 0),e8([(0,i.wk)()],e9.prototype,"exchanges",void 0),e9=e8([(0,h.EM)("w3m-fund-wallet-view")],e9);var e7=r(99736);let te=(0,g.AH)` 2154 :host { 2155 display: flex; 2156 align-items: center; 2157 justify-content: center; 2158 } 2159 2160 label { 2161 position: relative; 2162 display: inline-block; 2163 user-select: none; 2164 transition: 2165 background-color ${({durations:e})=>e.lg} 2166 ${({easings:e})=>e["ease-out-power-2"]}, 2167 color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 2168 border ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 2169 box-shadow ${({durations:e})=>e.lg} 2170 ${({easings:e})=>e["ease-out-power-2"]}, 2171 width ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 2172 height ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 2173 transform ${({durations:e})=>e.lg} 2174 ${({easings:e})=>e["ease-out-power-2"]}, 2175 opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}; 2176 will-change: background-color, color, border, box-shadow, width, height, transform, opacity; 2177 } 2178 2179 input { 2180 width: 0; 2181 height: 0; 2182 opacity: 0; 2183 } 2184 2185 span { 2186 position: absolute; 2187 cursor: pointer; 2188 top: 0; 2189 left: 0; 2190 right: 0; 2191 bottom: 0; 2192 background-color: ${({colors:e})=>e.neutrals300}; 2193 border-radius: ${({borderRadius:e})=>e.round}; 2194 border: 1px solid transparent; 2195 will-change: border; 2196 transition: 2197 background-color ${({durations:e})=>e.lg} 2198 ${({easings:e})=>e["ease-out-power-2"]}, 2199 color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 2200 border ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 2201 box-shadow ${({durations:e})=>e.lg} 2202 ${({easings:e})=>e["ease-out-power-2"]}, 2203 width ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 2204 height ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 2205 transform ${({durations:e})=>e.lg} 2206 ${({easings:e})=>e["ease-out-power-2"]}, 2207 opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}; 2208 will-change: background-color, color, border, box-shadow, width, height, transform, opacity; 2209 } 2210 2211 span:before { 2212 content: ''; 2213 position: absolute; 2214 background-color: ${({colors:e})=>e.white}; 2215 border-radius: 50%; 2216 } 2217 2218 /* -- Sizes --------------------------------------------------------- */ 2219 label[data-size='lg'] { 2220 width: 48px; 2221 height: 32px; 2222 } 2223 2224 label[data-size='md'] { 2225 width: 40px; 2226 height: 28px; 2227 } 2228 2229 label[data-size='sm'] { 2230 width: 32px; 2231 height: 22px; 2232 } 2233 2234 label[data-size='lg'] > span:before { 2235 height: 24px; 2236 width: 24px; 2237 left: 4px; 2238 top: 3px; 2239 } 2240 2241 label[data-size='md'] > span:before { 2242 height: 20px;
2243 width: 20px; 2244 left: 4px; 2245 top: 3px; 2246 } 2247 2248 label[data-size='sm'] > span:before { 2249 height: 16px; 2250 width: 16px; 2251 left: 3px; 2252 top: 2px; 2253 } 2254 2255 /* -- Focus states --------------------------------------------------- */ 2256 input:focus-visible:not(:checked) + span, 2257 input:focus:not(:checked) + span { 2258 border: 1px solid ${({tokens:e})=>e.core.iconAccentPrimary}; 2259 background-color: ${({tokens:e})=>e.theme.textTertiary}; 2260 box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2); 2261 } 2262 2263 input:focus-visible:checked + span, 2264 input:focus:checked + span { 2265 border: 1px solid ${({tokens:e})=>e.core.iconAccentPrimary}; 2266 box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2); 2267 } 2268 2269 /* -- Checked states --------------------------------------------------- */ 2270 input:checked + span { 2271 background-color: ${({tokens:e})=>e.core.iconAccentPrimary}; 2272 } 2273 2274 label[data-size='lg'] > input:checked + span:before { 2275 transform: translateX(calc(100% - 9px)); 2276 } 2277 2278 label[data-size='md'] > input:checked + span:before { 2279 transform: translateX(calc(100% - 9px)); 2280 } 2281 2282 label[data-size='sm'] > input:checked + span:before { 2283 transform: translateX(calc(100% - 7px)); 2284 } 2285 2286 /* -- Hover states ------------------------------------------------------- */ 2287 label:hover > input:not(:checked):not(:disabled) + span { 2288 background-color: ${({colors:e})=>e.neutrals400}; 2289 } 2290 2291 label:hover > input:checked:not(:disabled) + span { 2292 background-color: ${({colors:e})=>e.accent080}; 2293 } 2294 2295 /* -- Disabled state --------------------------------------------------- */ 2296 label:has(input:disabled) { 2297 pointer-events: none; 2298 user-select: none; 2299 } 2300 2301 input:not(:checked):disabled + span { 2302 background-color: ${({colors:e})=>e.neutrals700}; 2303 } 2304 2305 input:checked:disabled + span { 2306 background-color: ${({colors:e})=>e.neutrals700}; 2307 } 2308 2309 input:not(:checked):disabled + span::before { 2310 background-color: ${({colors:e})=>e.neutrals400}; 2311 } 2312 2313 input:checked:disabled + span::before { 2314 background-color: ${({tokens:e})=>e.theme.textTertiary}; 2315 } 2316`;var tt=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let tr=class extends n.WF{constructor(){super(...arguments),this.inputElementRef=(0,e7._)(),this.checked=!1,this.disabled=!1,this.size="md"}render(){return(0,n.qy)` 2317 <label data-size=${this.size}> 2318 <input 2319 ${(0,e7.K)(this.inputElementRef)} 2320 type="checkbox" 2321 ?checked=${this.checked} 2322 ?disabled=${this.disabled} 2323 @change=${this.dispatchChangeEvent.bind(this)} 2324 /> 2325 <span></span> 2326 </label> 2327 `}dispatchChangeEvent(){this.dispatchEvent(new CustomEvent("switchChange",{detail:this.inputElementRef.value?.checked,bubbles:!0,composed:!0}))}};tr.styles=[p.W5,p.fD,te],tt([(0,i.MZ)({type:Boolean})],tr.prototype,"checked",void 0),tt([(0,i.MZ)({type:Boolean})],tr.prototype,"disabled",void 0),tt([(0,i.MZ)()],tr.prototype,"size",void 0),tr=tt([(0,m.E)("wui-toggle")],tr);let tn=(0,g.AH)` 2328 :host { 2329 height: auto; 2330 } 2331 2332 :host > wui-flex { 2333 height: 100%; 2334 display: flex; 2335 align-items: center; 2336 justify-content: center; 2337 column-gap: ${({spacing:e})=>e["2"]}; 2338 padding: ${({spacing:e})=>e["2"]} ${({spacing:e})=>e["3"]}; 2339 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 2340 border-radius: ${({borderRadius:e})=>e["4"]}; 2341 box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.theme.foregroundPrimary}; 2342 transition: background-color ${({durations:e})=>e.lg} 2343 ${({easings:e})=>e["ease-out-power-2"]}; 2344 will-change: background-color; 2345 cursor: pointer; 2346 } 2347 2348 wui-switch { 2349 pointer-events: none; 2350 } 2351`;var ti=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let ta=class extends n.WF{constructor(){super(...arguments),this.checked=!1}
2351render(){return(0,n.qy)` 2352 <wui-flex> 2353 <wui-icon size="xl" name="walletConnectBrown"></wui-icon> 2354 <wui-toggle 2355 ?checked=${this.checked} 2356 size="sm" 2357 @switchChange=${this.handleToggleChange.bind(this)} 2358 ></wui-toggle> 2359 </wui-flex> 2360 `}handleToggleChange(e){e.stopPropagation(),this.checked=e.detail,this.dispatchSwitchEvent()}dispatchSwitchEvent(){this.dispatchEvent(new CustomEvent("certifiedSwitchChange",{detail:this.checked,bubbles:!0,composed:!0}))}};ta.styles=[p.W5,p.fD,tn],ti([(0,i.MZ)({type:Boolean})],ta.prototype,"checked",void 0),ta=ti([(0,m.E)("wui-certified-switch")],ta),r(96574);let ts=(0,g.AH)` 2361 :host { 2362 position: relative; 2363 display: inline-block; 2364 width: 100%; 2365 } 2366 2367 wui-icon { 2368 position: absolute; 2369 top: 50%; 2370 transform: translateY(-50%); 2371 right: ${({spacing:e})=>e[3]}; 2372 color: ${({tokens:e})=>e.theme.iconDefault}; 2373 cursor: pointer; 2374 padding: ${({spacing:e})=>e[2]}; 2375 background-color: transparent; 2376 border-radius: ${({borderRadius:e})=>e[4]}; 2377 transition: background-color ${({durations:e})=>e.lg} 2378 ${({easings:e})=>e["ease-out-power-2"]}; 2379 } 2380 2381 @media (hover: hover) { 2382 wui-icon:hover { 2383 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 2384 } 2385 } 2386`;var to=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let tl=class extends n.WF{constructor(){super(...arguments),this.inputComponentRef=(0,e7._)(),this.inputValue=""}render(){return(0,n.qy)` 2387 <wui-input-text 2388 ${(0,e7.K)(this.inputComponentRef)} 2389 placeholder="Search wallet" 2390 icon="search" 2391 type="search" 2392 enterKeyHint="search" 2393 size="sm" 2394 @inputChange=${this.onInputChange} 2395 > 2396 ${this.inputValue?(0,n.qy)`<wui-icon 2397 @click=${this.clearValue} 2398 color="inherit" 2399 size="sm" 2400 name="close" 2401 ></wui-icon>`:null} 2402 </wui-input-text> 2403 `}onInputChange(e){this.inputValue=e.detail||""}clearValue(){let e=this.inputComponentRef.value,t=e?.inputElementRef.value;t&&(t.value="",this.inputValue="",t.focus(),t.dispatchEvent(new Event("input")))}};tl.styles=[p.W5,ts],to([(0,i.MZ)()],tl.prototype,"inputValue",void 0),tl=to([(0,m.E)("wui-search-bar")],tl);var tc=r(79561),tu=r(37454),td=r(69705);r(52131);let th=(0,g.AH)` 2404 :host { 2405 display: flex; 2406 flex-direction: column; 2407 justify-content: center; 2408 align-items: center; 2409 height: 104px; 2410 width: 104px; 2411 row-gap: ${({spacing:e})=>e[2]}; 2412 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 2413 border-radius: ${({borderRadius:e})=>e[5]}; 2414 position: relative; 2415 } 2416 2417 wui-shimmer[data-type='network'] { 2418 border: none; 2419 -webkit-clip-path: var(--apkt-path-network); 2420 clip-path: var(--apkt-path-network); 2421 } 2422 2423 svg { 2424 position: absolute; 2425 width: 48px; 2426 height: 54px; 2427 z-index: 1; 2428 } 2429 2430 svg > path { 2431 stroke: ${({tokens:e})=>e.theme.foregroundSecondary}; 2432 stroke-width: 1px; 2433 } 2434 2435 @media (max-width: 350px) { 2436 :host { 2437 width: 100%; 2438 } 2439 } 2440`;var tp=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let tf=class extends n.WF{constructor(){super(...arguments),this.type="wallet"}render(){return(0,n.qy)` 2441 ${this.shimmerTemplate()} 2442 <wui-shimmer width="80px" height="20px"></wui-shimmer> 2443 `}shimmerTemplate(){return"network"===this.type?(0,n.qy)` <wui-shimmer data-type=${this.type} width="48px" height="54px"></wui-shimmer> 2444 ${td.a}`:(0,n.qy)`<wui-shimmer width="56px" height="56px"></wui-shimmer>`}};tf.styles=[p.W5,p.fD,th],tp([(0,i.MZ)()],tf.prototype,"type",void 0),tf=tp([(0,m.E)("wui-card-select-loader")],tf);let tm=(0,n.AH)` 2445 :host { 2446 display: grid; 2447 width: inherit; 2448 height: inherit; 2449 } 2450`;var tg=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let ty=class extends n.WF{render(){return this.style.cssText=` 2451 grid-template-rows: ${this.gridTemplateRows}; 2452 grid-template-columns: ${this.gridTemplateColumns}; 2453 justify-items: ${this.justifyItems}; 2454 align-items: ${this.alignItems}; 2455 justify-content: ${this.justifyContent}; 2456 align-content: ${this.alignContent}; 2457 column-gap: ${this.columnGap&&`var(--apkt-spacing-${this.columnGap})`}; 2458 row-gap: ${this.rowGap&&`var(--apkt-spacing-${this.rowGap})`}; 2459 gap: ${this.gap&&`var(--apkt-spacing-${this.gap})`}; 2460 padding-top: ${this.padding&&f.Z.getSpacingStyles(this.padding,0)}; 2461 padding-right: ${this.padding&&f.Z.getSpacingStyles(this.padding,1)}; 2462 padding-bottom: ${this.padding&&f.Z.getSpacingStyles(this.padding,2)}; 2463 padding-left: ${this.padding&&f.Z.getSpacingStyles(this.padding,3)}; 2464 margin-top: ${this.margin&&f.Z.getSpacingStyles(this.margin,
24640)}; 2465 margin-right: ${this.margin&&f.Z.getSpacingStyles(this.margin,1)}; 2466 margin-bottom: ${this.margin&&f.Z.getSpacingStyles(this.margin,2)}; 2467 margin-left: ${this.margin&&f.Z.getSpacingStyles(this.margin,3)}; 2468 `,(0,n.qy)`<slot></slot>`}};ty.styles=[p.W5,tm],tg([(0,i.MZ)()],ty.prototype,"gridTemplateRows",void 0),tg([(0,i.MZ)()],ty.prototype,"gridTemplateColumns",void 0),tg([(0,i.MZ)()],ty.prototype,"justifyItems",void 0),tg([(0,i.MZ)()],ty.prototype,"alignItems",void 0),tg([(0,i.MZ)()],ty.prototype,"justifyContent",void 0),tg([(0,i.MZ)()],ty.prototype,"alignContent",void 0),tg([(0,i.MZ)()],ty.prototype,"columnGap",void 0),tg([(0,i.MZ)()],ty.prototype,"rowGap",void 0),tg([(0,i.MZ)()],ty.prototype,"gap",void 0),tg([(0,i.MZ)()],ty.prototype,"padding",void 0),tg([(0,i.MZ)()],ty.prototype,"margin",void 0),ty=tg([(0,m.E)("wui-grid")],ty),r(78027),r(12981);let tb=(0,h.AH)` 2469 button { 2470 display: flex; 2471 flex-direction: column; 2472 justify-content: center; 2473 align-items: center; 2474 cursor: pointer; 2475 width: 104px; 2476 row-gap: ${({spacing:e})=>e["2"]}; 2477 padding: ${({spacing:e})=>e["3"]} ${({spacing:e})=>e["0"]}; 2478 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 2479 border-radius: clamp(0px, ${({borderRadius:e})=>e["4"]}, 20px); 2480 transition: 2481 color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-1"]}, 2482 background-color ${({durations:e})=>e.lg} 2483 ${({easings:e})=>e["ease-out-power-1"]}, 2484 border-radius ${({durations:e})=>e.lg} 2485 ${({easings:e})=>e["ease-out-power-1"]}; 2486 will-change: background-color, color, border-radius; 2487 outline: none; 2488 border: none; 2489 } 2490 2491 button > wui-flex > wui-text { 2492 color: ${({tokens:e})=>e.theme.textPrimary}; 2493 max-width: 86px; 2494 white-space: nowrap; 2495 overflow: hidden; 2496 text-overflow: ellipsis; 2497 justify-content: center; 2498 } 2499 2500 button > wui-flex > wui-text.certified { 2501 max-width: 66px; 2502 } 2503 2504 @media (hover: hover) and (pointer: fine) { 2505 button:hover:enabled { 2506 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 2507 } 2508 } 2509 2510 button:disabled > wui-flex > wui-text { 2511 color: ${({tokens:e})=>e.core.glass010}; 2512 } 2513 2514 [data-selected='true'] { 2515 background-color: ${({colors:e})=>e.accent020}; 2516 } 2517 2518 @media (hover: hover) and (pointer: fine) { 2519 [data-selected='true']:hover:enabled { 2520 background-color: ${({colors:e})=>e.accent010}; 2521 } 2522 } 2523 2524 [data-selected='true']:active:enabled { 2525 background-color: ${({colors:e})=>e.accent010}; 2526 } 2527 2528 @media (max-width: 350px) { 2529 button { 2530 width: 100%; 2531 } 2532 } 2533`;var tw=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let tv=class extends n.WF{constructor(){super(),this.observer=new IntersectionObserver(()=>void 0),this.visible=!1,this.imageSrc=void 0,this.imageLoading=!1,this.isImpressed=!1,this.explorerId="",this.walletQuery="",this.certified=!1,this.displayIndex=0,this.wallet=void 0,this.observer=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?(this.visible=!0,this.fetchImageSrc(),this.sendImpressionEvent()):this.visible=!1})},{threshold:.01})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){let e=this.wallet?.badge_type==="certified";return(0,n.qy)` 2534 <button> 2535 ${this.imageTemplate()} 2536 <wui-flex flexDirection="row" alignItems="center" justifyContent="center" gap="1"> 2537 <wui-text 2538 variant="md-regular" 2539 color="inherit" 2540 class=${(0,a.J)(e?"certified":void 0)} 2541 >${this.wallet?.name}</wui-text 2542 > 2543 ${e?(0,n.qy)`<wui-icon size="sm" name="walletConnectBrown"></wui-icon>`:null} 2544 </wui-flex> 2545 </button> 2546 `}imageTemplate(){return(this.visible||this.imageSrc)&&!this.imageLoading?(0,n.qy)` 2547 <wui-wallet-image 2548 size="lg" 2549 imageSrc=${(0,a.J)(this.imageSrc)}
2550 name=${(0,a.J)(this.wallet?.name)} 2551 .installed=${this.wallet?.installed??!1} 2552 badgeSize="sm" 2553 > 2554 </wui-wallet-image> 2555 `:this.shimmerTemplate()}shimmerTemplate(){return(0,n.qy)`<wui-shimmer width="56px" height="56px"></wui-shimmer>`}async fetchImageSrc(){this.wallet&&(this.imageSrc=c.$.getWalletImage(this.wallet),this.imageSrc||(this.imageLoading=!0,this.imageSrc=await c.$.fetchWalletImage(this.wallet.image_id),this.imageLoading=!1))}sendImpressionEvent(){this.wallet&&!this.isImpressed&&(this.isImpressed=!0,j.E.sendWalletImpressionEvent({name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.explorerId,view:Y.I.state.view,query:this.walletQuery,certified:this.certified,displayIndex:this.displayIndex}))}};tv.styles=tb,tw([(0,i.wk)()],tv.prototype,"visible",void 0),tw([(0,i.wk)()],tv.prototype,"imageSrc",void 0),tw([(0,i.wk)()],tv.prototype,"imageLoading",void 0),tw([(0,i.wk)()],tv.prototype,"isImpressed",void 0),tw([(0,i.MZ)()],tv.prototype,"explorerId",void 0),tw([(0,i.MZ)()],tv.prototype,"walletQuery",void 0),tw([(0,i.MZ)()],tv.prototype,"certified",void 0),tw([(0,i.MZ)()],tv.prototype,"displayIndex",void 0),tw([(0,i.MZ)({type:Object})],tv.prototype,"wallet",void 0),tv=tw([(0,h.EM)("w3m-all-wallets-list-item")],tv);let tE=(0,h.AH)` 2556 wui-grid { 2557 max-height: clamp(360px, 400px, 80vh); 2558 overflow: scroll; 2559 scrollbar-width: none; 2560 grid-auto-rows: min-content; 2561 grid-template-columns: repeat(auto-fill, 104px); 2562 } 2563 2564 :host([data-mobile-fullscreen='true']) wui-grid { 2565 max-height: none; 2566 } 2567 2568 @media (max-width: 350px) { 2569 wui-grid { 2570 grid-template-columns: repeat(2, 1fr); 2571 } 2572 } 2573 2574 wui-grid[data-scroll='false'] { 2575 overflow: hidden; 2576 } 2577 2578 wui-grid::-webkit-scrollbar {
2579 display: none; 2580 } 2581 2582 w3m-all-wallets-list-item { 2583 opacity: 0; 2584 animation-duration: ${({durations:e})=>e.xl}; 2585 animation-timing-function: ${({easings:e})=>e["ease-inout-power-2"]}; 2586 animation-name: fade-in; 2587 animation-fill-mode: forwards; 2588 } 2589 2590 @keyframes fade-in { 2591 from { 2592 opacity: 0; 2593 } 2594 to { 2595 opacity: 1; 2596 } 2597 } 2598 2599 wui-loading-spinner { 2600 padding-top: ${({spacing:e})=>e["4"]}; 2601 padding-bottom: ${({spacing:e})=>e["4"]}; 2602 justify-content: center; 2603 grid-column: 1 / span 4; 2604 } 2605`;var tC=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let tA="local-paginator",tx=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.loading=!tc.N.state.wallets.length,this.wallets=tc.N.state.wallets,this.mobileFullScreen=s.H.state.enableMobileFullScreen,this.unsubscribe.push(tc.N.subscribeKey("wallets",e=>this.wallets=e))}firstUpdated(){this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.paginationObserver?.disconnect()}render(){return(0,n.qy)` 2606 <wui-grid 2607 data-scroll=${!this.loading} 2608 .padding=${["0","3","3","3"]} 2609 gap="2" 2610 justifyContent="space-between" 2611 > 2612 ${this.loading?this.shimmerTemplate(16):this.walletsTemplate()} 2613 ${this.paginationLoaderTemplate()} 2614 </wui-grid> 2615 `}async initialFetch(){this.loading=!0;let e=this.shadowRoot?.querySelector("wui-grid");e&&(await tc.N.fetchWalletsByPage({page:1}),await e.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.loading=!1,e.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}shimmerTemplate(e,t){return[...Array(e)].map(()=>(0,n.qy)` 2616 <wui-card-select-loader type="wallet" id=${(0,a.J)(t)}></wui-card-select-loader> 2617 `)}walletsTemplate(){return tu.A.getWalletConnectWallets(this.wallets).map((e,t)=>(0,n.qy)` 2618 <w3m-all-wallets-list-item 2619 data-testid="wallet-search-item-${e.id}" 2620 @click=${()=>this.onConnectWallet(e)} 2621 .wallet=${e} 2622 explorerId=${e.id} 2623 certified=${"certified"===this.badge} 2624 displayIndex=${t} 2625 ></w3m-all-wallets-list-item> 2626 `)}paginationLoaderTemplate(){let{wallets:e,recommended:t,featured:r,count:n,mobileFilteredOutWalletsLength:i}=tc.N.state,a=window.innerWidth<352?3:4,s=e.length+t.length,o=Math.ceil(s/a)*a-s+a;return(o-=e.length?r.length%a:0,0===n&&r.length>0)?null:0===n||[...r,...e,...t].length<n-(i??0)?this.shimmerTemplate(o,tA):null}createPaginationObserver(){let e=this.shadowRoot?.querySelector(`#${tA}`);e&&(this.paginationObserver=new IntersectionObserver(([e])=>{if(e?.isIntersecting&&!this.loading){let{page:e,count:t,wallets:r}=tc.N.state;r.length<t&&tc.N.fetchWalletsByPage({page:e+1})}}),this.paginationObserver.observe(e))}onConnectWallet(e){K.a.selectWalletConnector(e)}};tx.styles=tE,tC([(0,i.wk)()],tx.prototype,"loading",void 0),tC([(0,i.wk)()],tx.prototype,"wallets",void 0),tC([(0,i.wk)()],tx.prototype,"badge",void 0),tC([(0,i.wk)()],tx.prototype,"mobileFullScreen",void 0),tx=tC([(0,h.EM)("w3m-all-wallets-list")],tx),r(73732);let tI=(0,n.AH)` 2627 wui-grid, 2628 wui-loading-spinner, 2629 wui-flex { 2630 height: 360px; 2631 } 2632 2633 wui-grid { 2634 overflow: scroll; 2635 scrollbar-width: none; 2636 grid-auto-rows: min-content; 2637 grid-template-columns: repeat(auto-fill, 104px); 2638 } 2639 2640 :host([data-mobile-fullscreen='true']) wui-grid { 2641 max-height: none; 2642 height: auto; 2643 } 2644 2645 wui-grid[data-scroll='false'] { 2646 overflow: hidden; 2647 } 2648 2649 wui-grid::-webkit-scrollbar {
2650 display: none; 2651 } 2652 2653 wui-loading-spinner { 2654 justify-content: center; 2655 align-items: center; 2656 } 2657 2658 @media (max-width: 350px) { 2659 wui-grid { 2660 grid-template-columns: repeat(2, 1fr); 2661 } 2662 } 2663`;var tS=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let tT=class extends n.WF{constructor(){super(...arguments),this.prevQuery="",this.prevBadge=void 0,this.loading=!0,this.mobileFullScreen=s.H.state.enableMobileFullScreen,this.query=""}render(){return this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),this.onSearch(),this.loading?(0,n.qy)`<wui-loading-spinner color="accent-primary"></wui-loading-spinner>`:this.walletsTemplate()}async onSearch(){(this.query.trim()!==this.prevQuery.trim()||this.badge!==this.prevBadge)&&(this.prevQuery=this.query,this.prevBadge=this.badge,this.loading=!0,await tc.N.searchWallet({search:this.query,badge:this.badge}),this.loading=!1)}walletsTemplate(){let{search:e}=tc.N.state,t=tu.A.markWalletsAsInstalled(e),r=tu.A.filterWalletsByWcSupport(t);return r.length?(0,n.qy)` 2664 <wui-grid 2665 data-testid="wallet-list" 2666 .padding=${["0","3","3","3"]} 2667 rowGap="4" 2668 columngap="2" 2669 justifyContent="space-between" 2670 > 2671 ${r.map((e,t)=>(0,n.qy)` 2672 <w3m-all-wallets-list-item 2673 @click=${()=>this.onConnectWallet(e)} 2674 .wallet=${e} 2675 data-testid="wallet-search-item-${e.id}" 2676 explorerId=${e.id} 2677 certified=${"certified"===this.badge} 2678 walletQuery=${this.query} 2679 displayIndex=${t} 2680 ></w3m-all-wallets-list-item> 2681 `)} 2682 </wui-grid> 2683 `:(0,n.qy)` 2684 <wui-flex 2685 data-testid="no-wallet-found" 2686 justifyContent="center" 2687 alignItems="center" 2688 gap="3" 2689 flexDirection="column" 2690 > 2691 <wui-icon-box size="lg" color="default" icon="wallet"></wui-icon-box> 2692 <wui-text data-testid="no-wallet-found-text" color="secondary" variant="md-medium"> 2693 No Wallet found 2694 </wui-text> 2695 </wui-flex> 2696 `}onConnectWallet(e){K.a.selectWalletConnector(e)}};tT.styles=tI,tS([(0,i.wk)()],tT.prototype,"loading",void 0),tS([(0,i.wk)()],tT.prototype,"mobileFullScreen",void 0),tS([(0,i.MZ)()],tT.prototype,"query",void 0),tS([(0,i.MZ)()],tT.prototype,"badge",void 0),tT=tS([(0,h.EM)("w3m-all-wallets-search")],tT);var tP=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let tO=class extends n.WF{constructor(){super(...arguments),this.search="",this.badge=void 0,this.onDebouncedSearch=u.w.debounce(e=>{this.search=e})}render(){let e=this.search.length>=2;return(0,n.qy)` 2697 <wui-flex .padding=${["1","3","3","3"]} gap="2" alignItems="center"> 2698 <wui-search-bar @inputChange=${this.onInputChange.bind(this)}></wui-search-bar> 2699 <wui-certified-switch 2700 ?checked=${"certified"===this.badge} 2701 @certifiedSwitchChange=${this.onCertifiedSwitchChange.bind(this)} 2702 data-testid="wui-certified-switch" 2703 ></wui-certified-switch> 2704 ${this.qrButtonTemplate()} 2705 </wui-flex> 2706 ${e||this.badge?(0,n.qy)`<w3m-all-wallets-search 2707 query=${this.search} 2708 .badge=${this.badge} 2709 ></w3m-all-wallets-search>`:(0,n.qy)`<w3m-all-wallets-list .badge=${this.badge}></w3m-all-wallets-list>`} 2710 `}onInputChange(e){this.onDebouncedSearch(e.detail)}onCertifiedSwitchChange(e){e.detail?(this.badge="certified",J.P.showSvg("Only WalletConnect certified",{icon:"walletConnectBrown",iconColor:"accent-100"})):this.badge=void 0}qrButtonTemplate(){return u.w.isMobile()?(0,n.qy)` 2711 <wui-icon-box 2712 size="xl" 2713 iconSize="xl" 2714 color="accent-primary" 2715 icon="qrCode" 2716 border 2717 borderColor="wui-accent-glass-010" 2718 @click=${this.onWalletConnectQr.bind(this)} 2719 ></wui-icon-box> 2720 `:null}onWalletConnectQr(){Y.I.push("ConnectingWalletConnect")}};tP([(0,i.wk)()],tO.prototype,"search",void 0),tP([(0,i.wk)()],tO.prototype,"badge",void 0),tO=tP([(0,h.EM)("w3m-all-wallets-view")],tO);var t_=r(66889),tN=r(12488);let tk=(0,g.AH)` 2721 button { 2722 display: flex; 2723 gap: ${({spacing:e})=>e[1]}; 2724 padding: ${({spacing:e})=>e[4]}; 2725 width: 100%; 2726 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 2727 border-radius: ${({borderRadius:e})=>e[4]}; 2728 justify-content: center;
2729 align-items: center; 2730 } 2731 2732 :host([data-size='sm']) button { 2733 padding: ${({spacing:e})=>e[2]}; 2734 border-radius: ${({borderRadius:e})=>e[2]}; 2735 } 2736 2737 :host([data-size='md']) button { 2738 padding: ${({spacing:e})=>e[3]}; 2739 border-radius: ${({borderRadius:e})=>e[3]}; 2740 } 2741 2742 button:hover { 2743 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 2744 } 2745 2746 button:disabled { 2747 opacity: 0.5; 2748 } 2749`;var tR=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let tM=class extends n.WF{constructor(){super(...arguments),this.text="",this.disabled=!1,this.size="lg",this.icon="copy",this.tabIdx=void 0}render(){this.dataset.size=this.size;let e=`${this.size}-regular`;return(0,n.qy)` 2750 <button ?disabled=${this.disabled} tabindex=${(0,a.J)(this.tabIdx)}> 2751 <wui-icon name=${this.icon} size=${this.size} color="default"></wui-icon> 2752 <wui-text align="center" variant=${e} color="primary">${this.text}</wui-text> 2753 </button> 2754 `}};tM.styles=[p.W5,p.fD,tk],tR([(0,i.MZ)()],tM.prototype,"text",void 0),tR([(0,i.MZ)({type:Boolean})],tM.prototype,"disabled",void 0),tR([(0,i.MZ)()],tM.prototype,"size",void 0),tR([(0,i.MZ)()],tM.prototype,"icon",void 0),tR([(0,i.MZ)()],tM.prototype,"tabIdx",void 0),tM=tR([(0,m.E)("wui-list-button")],tM),r(65507);var tB=r(41776),tj=r(23655);r(48789);var tU=r(88239);let t$=(0,h.AH)` 2755 wui-separator { 2756 margin: ${({spacing:e})=>e["3"]} calc(${({spacing:e})=>e["3"]} * -1); 2757 width: calc(100% + ${({spacing:e})=>e["3"]} * 2); 2758 } 2759 2760 wui-email-input { 2761 width: 100%; 2762 } 2763 2764 form { 2765 width: 100%; 2766 display: block; 2767 position: relative; 2768 } 2769 2770 wui-icon-link, 2771 wui-loading-spinner { 2772 position: absolute; 2773 top: 50%; 2774 transform: translateY(-50%); 2775 } 2776 2777 wui-icon-link { 2778 right: ${({spacing:e})=>e["2"]}; 2779 } 2780 2781 wui-loading-spinner { 2782 right: ${({spacing:e})=>e["3"]}; 2783 } 2784 2785 wui-text { 2786 margin: ${({spacing:e})=>e["2"]} ${({spacing:e})=>e["3"]} 2787 ${({spacing:e})=>e["0"]} ${({spacing:e})=>e["3"]}; 2788 } 2789`;var tL=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let tD=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.formRef=(0,e7._)(),this.email="",this.loading=!1,this.error="",this.remoteFeatures=s.H.state.remoteFeatures,this.hasExceededUsageLimit=tc.N.state.plan.hasExceededUsageLimit,this.unsubscribe.push(s.H.subscribeKey("remoteFeatures",e=>{this.remoteFeatures=e}),tc.N.subscribeKey("plan",e=>this.hasExceededUsageLimit=e.hasExceededUsageLimit))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}firstUpdated(){this.formRef.value?.addEventListener("keydown",e=>{"Enter"===e.key&&this.onSubmitEmail(e)})}render(){let e=Q.x.hasAnyConnection(G.o.CONNECTOR_ID.AUTH);return(0,n.qy)` 2790 <form ${(0,e7.K)(this.formRef)} @submit=${this.onSubmitEmail.bind(this)}> 2791 <wui-email-input 2792 @focus=${this.onFocusEvent.bind(this)} 2793 .disabled=${this.loading} 2794 @inputChange=${this.onEmailInputChange.bind(this)} 2795 tabIdx=${(0,a.J)(this.tabIdx)} 2796 ?disabled=${e||this.hasExceededUsageLimit} 2797 > 2798 </wui-email-input> 2799 2800 ${this.submitButtonTemplate()}${this.loadingTemplate()} 2801 <input type="submit" hidden /> 2802 </form> 2803 ${this.templateError()} 2804 `}submitButtonTemplate(){return!this.loading&&this.email.length>3?(0,n.qy)` 2805 <wui-icon-link 2806 size="lg" 2807 icon="chevronRight" 2808 iconcolor="accent-100" 2809 @click=${this.onSubmitEmail.bind(this)} 2810 > 2811 </wui-icon-link> 2812 `:null}loadingTemplate(){return this.loading?(0,n.qy)`<wui-loading-spinner size="md" color="accent-primary"></wui-loading-spinner>`:null}templateError(){return this.error?(0,n.qy)`<wui-text variant="sm-medium" color="error">${this.error}</wui-text>`:null}onEmailInputChange(e){this.email=e.detail.trim(),this.error=""}async onSubmitEmail(e){if(!eO.y.isValidEmail(this.email))return void tj.h.open({displayMessage:tU.R.ALERT_WARNINGS.INVALID_EMAIL.displayMessage},"warning");if(!G.o.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(e=>e===o.W.state.activeChain)){let e=o.W.getFirstCaipNetworkSupportsAuthConnector();if(e)return void Y.I.push("SwitchNetwork",{network:e})}try{if(this.loading)return;this.loading=!0,e.preventDefault();let t=K.a.getAuthConnector();if(!t)throw Error("w3m-email-login-widget: Auth connector not found");let{action:r}=await t.provider.connectEmail({email:this.email});if(j.E.sendEvent({type:"track",event:"EMAIL_SUBMITTED"}),"VERIFY_OTP"===r)j.E.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),Y.I.push("EmailVerifyOtp",{email:this.email});
2812else if("VERIFY_DEVICE"===r)Y.I.push("EmailVerifyDevice",{email:this.email});else if("CONNECT"===r){let e=this.remoteFeatures?.multiWallet;await Q.x.connectExternal(t,o.W.state.activeChain),e?(Y.I.replace("ProfileWallets"),J.P.showSuccess("New Wallet Added")):Y.I.replace("Account")}}catch(t){let e=u.w.parseError(t);e?.includes("Invalid email")?this.error="Invalid email. Try again.":J.P.showError(t)}finally{this.loading=!1}}onFocusEvent(){j.E.sendEvent({type:"track",event:"EMAIL_LOGIN_SELECTED"})}};tD.styles=t$,tL([(0,i.MZ)()],tD.prototype,"tabIdx",void 0),tL([(0,i.wk)()],tD.prototype,"email",void 0),tL([(0,i.wk)()],tD.prototype,"loading",void 0),tL([(0,i.wk)()],tD.prototype,"error",void 0),tL([(0,i.wk)()],tD.prototype,"remoteFeatures",void 0),tL([(0,i.wk)()],tD.prototype,"hasExceededUsageLimit",void 0),tD=tL([(0,h.EM)("w3m-email-login-widget")],tD),r(69542);var tF=r(46469);r(9783),r(74351);let tH=(0,g.AH)` 2813 :host { 2814 display: block; 2815 width: 100%; 2816 } 2817 2818 button { 2819 width: 100%; 2820 height: 52px; 2821 display: flex; 2822 align-items: center; 2823 justify-content: center; 2824 background: ${({tokens:e})=>e.theme.foregroundPrimary}; 2825 border-radius: ${({borderRadius:e})=>e[4]}; 2826 } 2827 2828 @media (hover: hover) { 2829 button:hover:enabled { 2830 background: ${({tokens:e})=>e.theme.foregroundSecondary}; 2831 } 2832 } 2833 2834 button:disabled { 2835 cursor: not-allowed; 2836 opacity: 0.5; 2837 } 2838`;var tz=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let tW=class extends n.WF{constructor(){super(...arguments),this.logo="google",this.disabled=!1,this.tabIdx=void 0}render(){return(0,n.qy)` 2839 <button ?disabled=${this.disabled} tabindex=${(0,a.J)(this.tabIdx)}> 2840 <wui-icon size="xxl" name=${this.logo}></wui-icon> 2841 </button> 2842 `}};tW.styles=[p.W5,p.fD,tH],tz([(0,i.MZ)()],tW.prototype,"logo",void 0),tz([(0,i.MZ)({type:Boolean})],tW.prototype,"disabled",void 0),tz([(0,i.MZ)()],tW.prototype,"tabIdx",void 0),tW=tz([(0,m.E)("wui-logo-select")],tW);var tq=r(49359);let tV=(0,h.AH)` 2843 wui-separator { 2844 margin: ${({spacing:e})=>e["3"]} calc(${({spacing:e})=>e["3"]} * -1) 2845 ${({spacing:e})=>e["3"]} calc(${({spacing:e})=>e["3"]} * -1); 2846 width: calc(100% + ${({spacing:e})=>e["3"]} * 2); 2847 } 2848`;var tG=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let tK=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.walletGuide="get-started",this.tabIdx=void 0,this.connectors=K.a.state.connectors,this.remoteFeatures=s.H.state.remoteFeatures,this.authConnector=this.connectors.find(e=>"AUTH"===e.type),this.isPwaLoading=!1,this.hasExceededUsageLimit=tc.N.state.plan.hasExceededUsageLimit,this.unsubscribe.push(K.a.subscribeKey("connectors",e=>{this.connectors=e,this.authConnector=this.connectors.find(e=>"AUTH"===e.type)}),s.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e),tc.N.subscribeKey("plan",e=>this.hasExceededUsageLimit=e.hasExceededUsageLimit))}connectedCallback(){super.connectedCallback(),this.handlePwaFrameLoad()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,n.qy)` 2849 <wui-flex 2850 class="container" 2851 flexDirection="column" 2852 gap="2" 2853 data-testid="w3m-social-login-widget" 2854 > 2855 ${this.topViewTemplate()}${this.bottomViewTemplate()} 2856 </wui-flex> 2857 `}topViewTemplate(){let e="explore"===this.walletGuide,t=this.remoteFeatures?.socials;return!t&&e?(t=Z.oU.DEFAULT_SOCIALS,this.renderTopViewContent(t)):t?this.renderTopViewContent(t):null}renderTopViewContent(e){return 2===e.length?(0,n.qy)` <wui-flex gap="2"> 2858 ${e.slice(0,2).map(e=>(0,n.qy)`<wui-logo-select 2859 data-testid=${`social-selector-${e}`} 2860 @click=${()=>{this.onSocialClick(e)}} 2861 logo=${e} 2862 tabIdx=${(0,a.J)(this.tabIdx)} 2863 ?disabled=${this.isPwaLoading||this.hasConnection()} 2864 ></wui-logo-select>`)} 2865 </wui-flex>`:(0,n.qy)` <wui-list-button 2866 data-testid=${`social-selector-${e[0]}`} 2867 @click=${()=>{this.onSocialClick(e[0])}} 2868 size="lg" 2869 icon=${(0,a.J)(e[0])} 2870 text=${`Continue with ${h.Zv.capitalize(e[0])}`} 2871 tabIdx=${(0,a.J)(this.tabIdx)} 2872 ?disabled=${this.isPwaLoading||this.hasConnection()} 2873 ></wui-list-button>`}bottomViewTemplate(){let e=this.remoteFeatures?.socials,t="explore"===this.walletGuide;return(this.authConnector&&e&&0!==e.length||!t||(e=Z.oU.DEFAULT_SOCIALS),!e||e.length<=2)?null:e&&e.length>6?(0,n.qy)`<wui-flex gap="2"> 2874 ${e.slice(1,5).map(e=>(0,n.qy)`<wui-logo-select 2875 data-testid=${`social-selector-${e}`} 2876 @click=${()=>{this.onSocialClick(e)}} 2877 logo=${e} 2878 tabIdx=${(0,a.J)(this.tabIdx)} 2879 ?focusable=${void 0!==this.tabIdx&&this.tabIdx>=0} 2880 ?disabled=${this.isPwaLoading||this.hasConnection()} 2881 ></wui-logo-select>`)} 2882 <wui-logo-select 2883 logo="more" 2884 tabIdx=${(0,a.J)(this.tabIdx)} 2885 @click=${this.onMoreSocialsClick.bind(this)} 2886 ?disabled=${this.isPwaLoading||this.hasConnection()} 2887 data-testid="social-selector-more" 2888 ></wui-logo-select> 2889 </wui-flex>`:e?(0,n.qy)`<wui-flex gap="2"> 2890 ${e.slice(1,e.length).map(e=>(0,n.qy)`<wui-logo-select 2891 data-testid=${`social-selector-${e}`} 2892 @click=${()=>{this.onSocialClick(e)}} 2893 logo=${e} 2894 tabIdx=${(0,a.J)(this.tabIdx)} 2895 ?focusable=${void 0!==this.tabIdx&&this.tabIdx>=0} 2896 ?disabled=${this.isPwaLoading||this.hasConnection()} 2897 ></wui-logo-select>`)} 2898 </wui-flex>`:null}onMoreSocialsClick(){Y.I.push("ConnectSocials")}async onSocialClick(e){if(this.hasExceededUsageLimit)return void Y.I.push("UsageExceeded");if(!G.o.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(e=>e===o.W.state.activeChain)){let e=o.W.getFirstCaipNetworkSupportsAuthConnector();if(e)return void Y.I.push("SwitchNetwork",{network:e})}e&&await (0,tF.Up)(e)}async handlePwaFrameLoad(){if(u.w.isPWA()){this.isPwaLoading=!0;try{this.authConnector?.provider instanceof tq.Y&&await this.authConnector.provider.init()}catch(e){tj.h.open({displayMessage:"Error loading embedded wallet in PWA",debugMessage:e.message},"error")}finally{this.isPwaLoading=!1}}}hasConnection(){return Q.x.hasAnyConnection(G.o.CONNECTOR_ID.AUTH)}};tK.styles=tV,tG([(0,i.MZ)()],tK.prototype,"walletGuide",void 0),tG([(0,i.MZ)()],tK.prototype,"tabIdx",void 0),tG([(0,i.wk)()],tK.prototype,"connectors",void 0),tG([(0,i.wk)()],tK.prototype,"remoteFeatures",void 0),tG([(0,i.wk)()],tK.prototype,"authConnector",void 0),tG([(0,i.wk)()],tK.prototype,"isPwaLoading",void 0),tG([(0,i.wk)()],tK.prototype,"hasExceededUsageLimit",void 0),tK=tG([
2898(0,h.EM)("w3m-social-login-widget")],tK),r(26376);var tZ=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let tJ=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=K.a.state.connectors,this.count=tc.N.state.count,this.filteredCount=tc.N.state.filteredWallets.length,this.isFetchingRecommendedWallets=tc.N.state.isFetchingRecommendedWallets,this.unsubscribe.push(K.a.subscribeKey("connectors",e=>this.connectors=e),tc.N.subscribeKey("count",e=>this.count=e),tc.N.subscribeKey("filteredWallets",e=>this.filteredCount=e.length),tc.N.subscribeKey("isFetchingRecommendedWallets",e=>this.isFetchingRecommendedWallets=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.connectors.find(e=>"walletConnect"===e.id),{allWallets:t}=s.H.state;if(!e||"HIDE"===t||"ONLY_MOBILE"===t&&!u.w.isMobile())return null;let r=tc.N.state.featured.length,i=this.count+r,o=i<10?i:10*Math.floor(i/10),l=this.filteredCount>0?this.filteredCount:o,c=`${l}`;this.filteredCount>0?c=`${this.filteredCount}`:l<i&&(c=`${l}+`);let d=Q.x.hasAnyConnection(G.o.CONNECTOR_ID.WALLET_CONNECT);return(0,n.qy)` 2899 <wui-list-wallet 2900 name="Search Wallet" 2901 walletIcon="search" 2902 showAllWallets 2903 @click=${this.onAllWallets.bind(this)} 2904 tagLabel=${c} 2905 tagVariant="info" 2906 data-testid="all-wallets" 2907 tabIdx=${(0,a.J)(this.tabIdx)} 2908 .loading=${this.isFetchingRecommendedWallets} 2909 ?disabled=${d} 2910 size="sm" 2911 ></wui-list-wallet> 2912 `}onAllWallets(){j.E.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),Y.I.push("AllWallets",{redirectView:Y.I.state.data?.redirectView})}};tZ([(0,i.MZ)()],tJ.prototype,"tabIdx",void 0),tZ([(0,i.wk)()],tJ.prototype,"connectors",void 0),tZ([(0,i.wk)()],tJ.prototype,"count",void 0),tZ([(0,i.wk)()],tJ.prototype,"filteredCount",void 0),tZ([(0,i.wk)()],tJ.prototype,"isFetchingRecommendedWallets",void 0),tJ=tZ([(0,h.EM)("w3m-all-wallets-widget")],tJ);let tY=(0,h.AH)` 2913 :host { 2914 margin-top: ${({spacing:e})=>e["1"]}; 2915 } 2916 wui-separator { 2917 margin: ${({spacing:e})=>e["3"]} calc(${({spacing:e})=>e["3"]} * -1) 2918 ${({spacing:e})=>e["2"]} calc(${({spacing:e})=>e["3"]} * -1); 2919 width: calc(100% + ${({spacing:e})=>e["3"]} * 2); 2920 } 2921`;var tQ=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let tX=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.explorerWallets=tc.N.state.explorerWallets,this.connections=Q.x.state.connections,this.connectorImages=l.j.state.connectorImages,this.loadingTelegram=!1,this.unsubscribe.push(Q.x.subscribeKey("connections",e=>this.connections=e),l.j.subscribeKey("connectorImages",e=>this.connectorImages=e),tc.N.subscribeKey("explorerFilteredWallets",e=>{this.explorerWallets=e?.length?e:tc.N.state.explorerWallets}),tc.N.subscribeKey("explorerWallets",e=>{this.explorerWallets?.length||(this.explorerWallets=e)})),u.w.isTelegram()&&u.w.isIos()&&(this.loadingTelegram=!Q.x.state.wcUri,this.unsubscribe.push(Q.x.subscribeKey("wcUri",e=>this.loadingTelegram=!e)))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,n.qy)` 2922 <wui-flex flexDirection="column" gap="2"> ${this.connectorListTemplate()} </wui-flex> 2923 `}connectorListTemplate(){return eE.g.connectorList().map((e,t)=>"connector"===e.kind?this.renderConnector(e,t):this.renderWallet(e,t))}getConnectorNamespaces(e){return"walletConnect"===e.subtype?[]:"multiChain"===e.subtype?e.connector.connectors?.map(e=>e.chain)||[]:[e.connector.chain]}renderConnector(e,t){let r,i,s=e.connector,o=c.$.getConnectorImage(s)||this.connectorImages[s?.imageId??""],l=(this.connections.get(s.chain)??[]).some(e=>eQ.y.isLowerCaseMatch(e.connectorId,s.id));"walletConnect"===e.subtype?(r="qr code",i="accent"):"injected"===e.subtype||"announced"===e.subtype?(r=l?"connected":"installed",i=l?"info":"success"):(r=void 0,i=void 0);let u=Q.x.hasAnyConnection(G.o.CONNECTOR_ID.WALLET_CONNECT),d=("walletConnect"===e.subtype||"external"===e.subtype)&&u;return(0,n.qy)` 2924 <w3m-list-wallet 2925 displayIndex=${t} 2926 imageSrc=${(0,a.J)(o)} 2927 .installed=${!0} 2928 name=${s.name??"Unknown"} 2929 .tagVariant=${i} 2930 tagLabel=${(0,a.J)(r)} 2931 data-testid=${`wallet-selector-${s.id.toLowerCase()}`} 2932 size="sm" 2933 @click=${()=>this.onClickConnector(e)} 2934 tabIdx=${(0,a.J)(this.tabIdx)} 2935 ?disabled=${d} 2936 rdnsId=${(0,a.J)(s.explorerWallet?.rdns||void 0)} 2937 walletRank=${(0,a.J)(s.explorerWallet?.order)} 2938 .namespaces=${this.getConnectorNamespaces(e)} 2939 > 2940 </w3m-list-wallet> 2941 `}onClickConnector(e){let t=Y.I.state.data?.redirectView;if("walletConnect"===e.subtype){K.a.setActiveConnector(e.connector),u.w.isMobile()?Y.I.push("AllWallets"):Y.I.push("ConnectingWalletConnect",{redirectView:t});return}if("multiChain"===e.subtype){K.a.setActiveConnector(e.connector),Y.I.push("ConnectingMultiChain",{redirectView:t});return}if("injected"===e.subtype){K.a.setActiveConnector(e.connector),Y.I.push("ConnectingExter
2941nal",{connector:e.connector,redirectView:t,wallet:e.connector.explorerWallet});return}if("announced"===e.subtype)return"walletConnect"===e.connector.id?void(u.w.isMobile()?Y.I.push("AllWallets"):Y.I.push("ConnectingWalletConnect",{redirectView:t})):(Y.I.push("ConnectingExternal",{connector:e.connector,redirectView:t,wallet:e.connector.explorerWallet}),void 0);Y.I.push("ConnectingExternal",{connector:e.connector,redirectView:t})}renderWallet(e,t){let r=e.wallet,i=c.$.getWalletImage(r),s=Q.x.hasAnyConnection(G.o.CONNECTOR_ID.WALLET_CONNECT),o=this.loadingTelegram,l="recent"===e.subtype?"recent":void 0,u="recent"===e.subtype?"info":void 0;return(0,n.qy)` 2942 <w3m-list-wallet 2943 displayIndex=${t} 2944 imageSrc=${(0,a.J)(i)} 2945 name=${r.name??"Unknown"} 2946 @click=${()=>this.onClickWallet(e)} 2947 size="sm" 2948 data-testid=${`wallet-selector-${r.id}`} 2949 tabIdx=${(0,a.J)(this.tabIdx)} 2950 ?loading=${o} 2951 ?disabled=${s} 2952 rdnsId=${(0,a.J)(r.rdns||void 0)} 2953 walletRank=${(0,a.J)(r.order)} 2954 tagLabel=${(0,a.J)(l)} 2955 .tagVariant=${u} 2956 > 2957 </w3m-list-wallet> 2958 `}onClickWallet(e){let t=Y.I.state.data?.redirectView,r=o.W.state.activeChain;if("featured"===e.subtype)return void K.a.selectWalletConnector(e.wallet);if("recent"===e.subtype){if(this.loadingTelegram)return;K.a.selectWalletConnector(e.wallet);return}if("custom"===e.subtype){if(this.loadingTelegram)return;Y.I.push("ConnectingWalletConnect",{wallet:e.wallet,redirectView:t});return}if(this.loadingTelegram)return;let n=r?K.a.getConnector({id:e.wallet.id,namespace:r}):void 0;n?Y.I.push("ConnectingExternal",{connector:n,redirectView:t}):Y.I.push("ConnectingWalletConnect",{wallet:e.wallet,redirectView:t})}};tX.styles=tY,tQ([(0,i.MZ)({type:Number})],tX.prototype,"tabIdx",void 0),tQ([(0,i.wk)()],tX.prototype,"explorerWallets",void 0),tQ([(0,i.wk)()],tX.prototype,"connections",void 0),tQ([(0,i.wk)()],tX.prototype,"connectorImages",void 0),tQ([(0,i.wk)()],tX.prototype,"loadingTelegram",void 0),tX=tQ([(0,h.EM)("w3m-connector-list")],tX);var t0=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let t1=class extends n.WF{constructor(){super(...arguments),this.tabIdx=void 0}render(){return(0,n.qy)` 2959 <wui-flex flexDirection="column" gap="2"> 2960 <w3m-connector-list tabIdx=${(0,a.J)(this.tabIdx)}></w3m-connector-list> 2961 <w3m-all-wallets-widget tabIdx=${(0,a.J)(this.tabIdx)}></w3m-all-wallets-widget> 2962 </wui-flex> 2963 `}};t0([(0,i.MZ)()],t1.prototype,"tabIdx",void 0),t1=t0([(0,h.EM)("w3m-wallet-login-list")],t1);let t2=(0,h.AH)` 2964 :host { 2965 --connect-scroll--top-opacity: 0; 2966 --connect-scroll--bottom-opacity: 0; 2967 --connect-mask-image: none; 2968 } 2969 2970 .connect { 2971 max-height: clamp(360px, 470px, 80vh); 2972 scrollbar-width: none; 2973 overflow-y: scroll; 2974 overflow-x: hidden; 2975 transition: opacity ${({durations:e})=>e.lg} 2976 ${({easings:e})=>e["ease-out-power-2"]}; 2977 will-change: opacity; 2978 mask-image: var(--connect-mask-image); 2979 } 2980 2981 .guide { 2982 transition: opacity ${({durations:e})=>e.lg} 2983 ${({easings:e})=>e["ease-out-power-2"]}; 2984 will-change: opacity; 2985 } 2986 2987 .connect::-webkit-scrollbar {
2988 display: none; 2989 } 2990 2991 .all-wallets { 2992 flex-flow: column; 2993 } 2994 2995 .connect.disabled, 2996 .guide.disabled { 2997 opacity: 0.3; 2998 pointer-events: none; 2999 user-select: none; 3000 } 3001 3002 wui-separator { 3003 margin: ${({spacing:e})=>e["3"]} calc(${({spacing:e})=>e["3"]} * -1); 3004 width: calc(100% + ${({spacing:e})=>e["3"]} * 2); 3005 } 3006`;var t5=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let t6=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.connectors=K.a.state.connectors,this.authConnector=this.connectors.find(e=>"AUTH"===e.type),this.features=s.H.state.features,this.remoteFeatures=s.H.state.remoteFeatures,this.enableWallets=s.H.state.enableWallets,this.noAdapters=o.W.state.noAdapters,this.walletGuide="get-started",this.checked=tN.o.state.isLegalCheckboxChecked,this.isEmailEnabled=this.remoteFeatures?.email&&!o.W.state.noAdapters,this.isSocialEnabled=this.remoteFeatures?.socials&&this.remoteFeatures.socials.length>0&&!o.W.state.noAdapters,this.isAuthEnabled=this.checkIfAuthEnabled(this.connectors),this.unsubscribe.push(K.a.subscribeKey("connectors",e=>{this.connectors=e,this.authConnector=this.connectors.find(e=>"AUTH"===e.type),this.isAuthEnabled=this.checkIfAuthEnabled(this.connectors)}),s.H.subscribeKey("features",e=>{this.features=e}),s.H.subscribeKey("remoteFeatures",e=>{this.remoteFeatures=e,this.setEmailAndSocialEnableCheck(this.noAdapters,this.remoteFeatures)}),s.H.subscribeKey("enableWallets",e=>this.enableWallets=e),o.W.subscribeKey("noAdapters",e=>this.setEmailAndSocialEnableCheck(e,this.remoteFeatures)),tN.o.subscribeKey("isLegalCheckboxChecked",e=>this.checked=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.resizeObserver?.disconnect();let e=this.shadowRoot?.querySelector(".connect");e?.removeEventListener("scroll",this.handleConnectListScroll.bind(this))}firstUpdated(){let e=this.shadowRoot?.querySelector(".connect");e&&(requestAnimationFrame(this.handleConnectListScroll.bind(this)),e?.addEventListener("scroll",this.handleConnectListScroll.bind(this)),this.resizeObserver=new ResizeObserver(()=>{this.handleConnectListScroll()}),this.resizeObserver?.observe(e),this.handleConnectListScroll())}render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=s.H.state,r=s.H.state.features?.legalCheckbox,i=!!(e||t)&&!!r&&"get-started"===this.walletGuide&&!this.checked,a=s.H.state.enableWalletGuide,o=this.enableWallets,l=this.isSocialEnabled||this.authConnector;return(0,n.qy)` 3007 <wui-flex flexDirection="column"> 3008 ${this.legalCheckboxTemplate()} 3009 <wui-flex 3010 data-testid="w3m-connect-scroll-view" 3011 flexDirection="column" 3012 .padding=${["0","0","4","0"]} 3013 class=${(0,ez.H)({connect:!0,disabled:i})} 3014 > 3015 <wui-flex 3016 class="connect-methods" 3017 flexDirection="column" 3018 gap="2" 3019 .padding=${l&&o&&a&&"get-started"===this.walletGuide?["0","3","0","3"]:["0","3","3","3"]} 3020 > 3021 ${this.renderConnectMethod(i?-1:void 0)} 3022 </wui-flex> 3023 </wui-flex> 3024 ${this.reownBrandingTemplate()} 3025 </wui-flex> 3026 `}reownBrandingTemplate(){return eO.y.hasFooter()||!this.remoteFeatures?.reownBranding?null:(0,n.qy)`<wui-ux-by-reown></wui-ux-by-reown>`}setEmailAndSocialEnableCheck(e,t){this.isEmailEnabled=t?.email&&!e,this.isSocialEnabled=t?.socials&&t.socials.length>0&&!e,this.remoteFeatures=t,this.noAdapters=e}checkIfAuthEnabled(e){let t=e.filter(e=>e.type===tB.o.CONNECTOR_TYPE_AUTH).map(e=>e.chain);return G.o.AUTH_CONNECTOR_SUPPORTED_CHAINS.some(e=>t.includes(e))}renderConnectMethod(e){let t=tu.A.getConnectOrderMethod(this.features,this.connectors);return(0,n.qy)`${t.map((t,r)=>{switch(t){case"email":return(0,n.qy)`${this.emailTemplate(e)} ${this.separatorTemplate(r,"email")}`;case"social":return(0,n.qy)`${this.socialListTemplate(e)} 3027 ${this.separatorTemplate(r,"social")}`;case"wallet":return(0,n.qy)`${this.walletListTemplate(e)} 3028 ${this.separatorTemplate(r,"wallet")}`;default:return null}})}`}checkMethodEnabled(e){switch(e){case"wallet":return this.enableWallets;case"social":return this.isSocialEnabled&&this.isAuthEnabled;case"email":return this.isEmailEnabled&&this.isAuthEnabled;default:return null}}checkIsThereNextMethod(e){let t=tu.A.getConnectOrderMethod(this.features,this.connectors)[e+1];return t?this.checkMethodEnabled(t)?t:this.checkIsThereNextMethod(e+1):void 0}separatorTemplate(e,t){let r=this.checkIsThereNextMethod(e),i="explore"===this.walletGuide;switch(t){case"wallet":return this.enableWallets&&r&&!i?(0,n.qy)`<wui-separator data-testid="wui-separator" text="or"></wui-separator>`:null;case"email":return this.isAuthEnabled&&this.isEmailEnabled&&"social"!==r&&r?(0,n.qy)`<wui-separator 3029 data-testid="w3m-email-login-or-separator" 3030 text="or" 3031 ></wui-separator>`:null;case"social":return this.isAuthEnabled&&this.isSocialEnabled&&"email"!==r&&r?(0,n.qy)`<wui-separator data-testid="wui-separator" text="or"></wui-separator>`:null;default:return null}}emailTemplate(e){return this.isEmailEnabled&&this.isAuthEnabled?(0,n.qy)`<w3m-email-login-widget tabIdx=${(0,a.J)(e)}></w3m-email-login-widget>`:null}socialListTemplate(e){return this.isSocialEnabled&&this.isAuthEnabled?(0,n.qy)`<w3m-social-login-widget 3032 walletGuide=${this.walletGuide} 3033 tabIdx=${(0,a.J)(e)} 3034 ></w3m-social-login-widget>`:null}walletListTemplate(e){let t=this.enableWallets,r=this.features?.emailShowWallets===!1,i=this.features?.collapseWallets;return t?(u.w.isTelegram()&&(u.w.isSafari()||u.w.isIos())&&Q.x.connectWalletConnect().catch(e=>({})),"explore"===this.walletGuide)?null:this.isAuthEnabled&&(this.isEmailEnabled||this.isSocialEnabled)&&(r||i)?(0,n.qy)`<wui-list-button 3035 data-testid="w3m-collapse-wallets-button" 3036 tabIdx=${(0,a.J)(e)} 3037 @click=${this.onContinueWalletClick.bind(this)} 3038 text="Continue with a wallet" 3039 icon="wallet" 3040 ></wui-list-button>`:(0,n.qy)`<w3m-wallet-login-list tabIdx=${(0,a.J)(e)}></w3m-wallet-login-list>`:null}legalCheckboxTemplate(){return"explore"===this.walletGuide?null:(0,n.qy)`<w3m-legal-checkbox data-testid="w3m-legal-checkbox"></w3m-legal-checkbox>`}handleConnectListScroll(){let e=this.shadowRoot?.querySelector(".connect");e&&(e.scrollHeight>470?(e.style.setProperty("--connect-mask-image",`linear-gradient( 3041 to bottom, 3042 rgba(0, 0, 0, calc(1 - var(--connect-scroll--top-opacity))) 0px, 3043 rgba(200, 200, 200, calc(1 - var(--connect-scroll--top-opacity))) 1px, 3044 black 100px, 3045 black calc(100% - 100px), 3046 rgba(155, 155, 155, calc(1 - var(--connect-scroll--bottom-opacity))) calc(100% - 1px), 3047 rgba(0, 0, 0, calc(1 - var(--connect-scroll--bottom-opacity))) 100% 3048 )`),e.style.setProperty("--connect-scroll--top-opacity",h.z8.interpolate([0,50],[0,1],e.scrollTop).toString()),e.style.setProperty("--connect-scroll--bottom-opacity",h.z8.interpolate([0,50],[0,1],e.scrollHeight-e.scrollTop-e.offsetHeight).toString())):(e.style.setProperty("--connect-mask-image","none"),e.style.setProperty("--connect-scroll--top-opacity","0"),e.style.setProperty("--connect-scroll--bottom-opacity","0")))}onContinueWalletClick(){Y.I.push("ConnectWallets")}};t6.styles=t2,t5([(0,t_.w)()],t6.prototype,"connectors",void 0),t5([(0,t_.w)()],t6.prototype,"authConnector",void 0),t5([(0,t_.w)()],t6.prototype,"features",void 0),t5([(0,t_.w)()],t6.prototype,"remoteFeatures",void 0),t5([(0,t_.w)()],t6.prototype,"enableWallets",void 0),t5([(0,t_.w)()],t6.prototype,"noAdapters",void 0),t5([(0,i.MZ)()],t6.prototype,"walletGuide",void 0),t5([(0,t_.w)()],t6.prototype,"checked",void 0),t5([(0,t_.w)()],t6.prototype,"isEmailEnabled",void 0),t5([(0,t_.w)()],t6.prototype,"isSocialEnabled",void 0),t5([(0,t_.w)()],t6.prototype,"isAuthEnabled",void 0),t6=t5([(0,h.EM)("w3m-connect-view")],t6);var t3=r(43850),t4=r(17052),t8=r(51636);r(9266),r(35159);let t9=(0,g.AH)` 3049 wui-flex { 3050 width: 100%; 3051 height: 52px; 3052 box-sizing: border-box; 3053 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 3054 border-radius: ${({borderRadius:e})=>e[5]}; 3055 padding-left: ${({spacing:e})=>e[3]}; 3056 padding-right: ${({spacing:e})=>e[3]}; 3057 display: flex; 3058 align-items: center; 3059 justify-content: space-between; 3060 gap: ${({spacing:e})=>e[6]}; 3061 } 3062 3063 wui-text { 3064 color: ${({tokens:e})=>e.theme.textSecondary}; 3065 } 3066 3067 wui-icon { 3068 width: 12px; 3069 height: 12px; 3070 } 3071`;var t7=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let re=class extends n.WF{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return(0,n.qy)` 3072 <wui-flex justifyContent="space-between" alignItems="center"> 3073 <wui-text variant="lg-regular" color="inherit">${this.label}</wui-text> 3074 <wui-button variant="accent-secondary" size="sm"> 3075 ${this.buttonLabel} 3076 <wui-icon name="chevronRight" color="inherit" size="inherit" slot="iconRight"></wui-icon> 3077 </wui-button>
3077 3078 </wui-flex> 3079 `}};re.styles=[p.W5,p.fD,t9],t7([(0,i.MZ)({type:Boolean})],re.prototype,"disabled",void 0),t7([(0,i.MZ)()],re.prototype,"label",void 0),t7([(0,i.MZ)()],re.prototype,"buttonLabel",void 0),re=t7([(0,m.E)("wui-cta-button")],re);let rt=(0,h.AH)` 3080 :host { 3081 display: block; 3082 padding: 0 ${({spacing:e})=>e["5"]} ${({spacing:e})=>e["5"]}; 3083 } 3084`;var rr=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let rn=class extends n.WF{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:a}=this.wallet,s=u.w.isMobile(),o=u.w.isIos(),l=u.w.isAndroid(),c=[t,r,a,i].filter(Boolean).length>1,d=h.Zv.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:"end"});return c&&!s?(0,n.qy)` 3085 <wui-cta-button 3086 label=${`Don't have ${d}?`} 3087 buttonLabel="Get" 3088 @click=${()=>Y.I.push("Downloads",{wallet:this.wallet})} 3089 ></wui-cta-button> 3090 `:!c&&a?(0,n.qy)` 3091 <wui-cta-button 3092 label=${`Don't have ${d}?`} 3093 buttonLabel="Get" 3094 @click=${this.onHomePage.bind(this)} 3095 ></wui-cta-button> 3096 `:t&&o?(0,n.qy)` 3097 <wui-cta-button 3098 label=${`Don't have ${d}?`} 3099 buttonLabel="Get" 3100 @click=${this.onAppStore.bind(this)} 3101 ></wui-cta-button> 3102 `:r&&l?(0,n.qy)` 3103 <wui-cta-button 3104 label=${`Don't have ${d}?`} 3105 buttonLabel="Get" 3106 @click=${this.onPlayStore.bind(this)} 3107 ></wui-cta-button> 3108 `:(this.style.display="none",null)}onAppStore(){this.wallet?.app_store&&u.w.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&u.w.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&u.w.openHref(this.wallet.homepage,"_blank")}};rn.styles=[rt],rr([(0,i.MZ)({type:Object})],rn.prototype,"wallet",void 0),rn=rr([(0,h.EM)("w3m-mobile-download-links")],rn);let ri=(0,h.AH)` 3109 @keyframes shake { 3110 0% { 3111 transform: translateX(0); 3112 } 3113 25% { 3114 transform: translateX(3px); 3115 } 3116 50% { 3117 transform: translateX(-3px); 3118 } 3119 75% { 3120 transform: translateX(3px); 3121 } 3122 100% { 3123 transform: translateX(0); 3124 } 3125 } 3126 3127 wui-flex:first-child:not(:only-child) { 3128 position: relative; 3129 } 3130 3131 wui-wallet-image { 3132 width: 56px; 3133 height: 56px; 3134 } 3135 3136 wui-loading-thumbnail { 3137 position: absolute; 3138 } 3139 3140 wui-icon-box { 3141 position: absolute; 3142 right: calc(${({spacing:e})=>e["1"]} * -1); 3143 bottom: calc(${({spacing:e})=>e["1"]} * -1); 3144 opacity: 0; 3145 transform: scale(0.5); 3146 transition-property: opacity, transform; 3147 transition-duration: ${({durations:e})=>e.lg}; 3148 transition-timing-function: ${({easings:e})=>e["ease-out-power-2"]}; 3149 will-change: opacity, transform; 3150 } 3151 3152 wui-text[align='center'] { 3153 width: 100%; 3154 padding: 0px ${({spacing:e})=>e["4"]}; 3155 } 3156 3157 [data-error='true'] wui-icon-box { 3158 opacity: 1; 3159 transform: scale(1); 3160 } 3161 3162 [data-error='true'] > wui-flex:first-child { 3163 animation: shake 250ms ${({easings:e})=>e["ease-out-power-2"]} both; 3164 } 3165 3166 [data-retry='false'] wui-link { 3167 display: none; 3168 } 3169 3170 [data-retry='true'] wui-link { 3171 display: block; 3172 opacity: 1; 3173 } 3174 3175 w3m-mobile-download-links { 3176 padding: 0px; 3177 width: 100%; 3178 } 3179`;var ra=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};class rs extends n.WF{constructor(){super(),this.wallet=Y.I.state.data?.wallet,this.connector=Y.I.state.data?.connector,this.timeout=void 0,this.secondaryBtnIcon="refresh",this.onConnect=void 0,this.onRender=void 0,this.onAutoConnect=void 0,this.isWalletConnect=!0,this.unsubscribe=[],this.imageSrc=c.$.getConnectorImage(this.connector)??c.$.getWalletImage(this.wallet),this.name=this.wallet?.name??this.connector?.name??"Wallet",this.isRetrying=!1,this.uri=Q.x.state.wcUri,this.error=Q.x.state.wcError,this.ready=!1,this.showRetry=!1,this.label=void 0,this.secondaryBtnLabel="Try again",this.secondaryLabel="Accept connection request in the wallet",this.isLoading=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(Q.x.subscribeKey("wcUri",e=>{this.uri=e,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,this.onConnect?.())}),Q.x.subscribeKey("wcError",e=>this.error=e)),(u.w.isTelegram()||u.w.isSafari())&&u.w.isIos()&&Q.x.state.wcUri&&this.onConnect?.()}firstUpdated(){this.onAutoConnect?.(),this.showRetry=!this.onAutoConnect}
3179disconnectedCallback(){this.unsubscribe.forEach(e=>e()),Q.x.setWcError(!1),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="";return this.label?t=this.label:(t=`Continue in ${this.name}`,this.error&&(t="Connection declined")),(0,n.qy)` 3180 <wui-flex 3181 data-error=${(0,a.J)(this.error)} 3182 data-retry=${this.showRetry} 3183 flexDirection="column" 3184 alignItems="center" 3185 .padding=${["10","5","5","5"]} 3186 gap="6" 3187 > 3188 <wui-flex gap="2" justifyContent="center" alignItems="center"> 3189 <wui-wallet-image size="lg" imageSrc=${(0,a.J)(this.imageSrc)}></wui-wallet-image> 3190 3191 ${this.error?null:this.loaderTemplate()} 3192 3193 <wui-icon-box 3194 color="error" 3195 icon="close" 3196 size="sm" 3197 border 3198 borderColor="wui-color-bg-125" 3199 ></wui-icon-box> 3200 </wui-flex> 3201 3202 <wui-flex flexDirection="column" alignItems="center" gap="6"> <wui-flex 3203 flexDirection="column" 3204 alignItems="center" 3205 gap="2" 3206 .padding=${["2","0","0","0"]} 3207 > 3208 <wui-text align="center" variant="lg-medium" color=${this.error?"error":"primary"}> 3209 ${t} 3210 </wui-text> 3211 <wui-text align="center" variant="lg-regular" color="secondary">${e}</wui-text> 3212 </wui-flex> 3213 3214 ${this.secondaryBtnLabel?(0,n.qy)` 3215 <wui-button 3216 variant="neutral-secondary" 3217 size="md" 3218 ?disabled=${this.isRetrying||this.isLoading} 3219 @click=${this.onTryAgain.bind(this)} 3220 data-testid="w3m-connecting-widget-secondary-button" 3221 > 3222 <wui-icon 3223 color="inherit" 3224 slot="iconLeft" 3225 name=${this.secondaryBtnIcon} 3226 ></wui-icon> 3227 ${this.secondaryBtnLabel} 3228 </wui-button> 3229 `:null} 3230 </wui-flex> 3231 3232 ${this.isWalletConnect?(0,n.qy)` 3233 <wui-flex .padding=${["0","5","5","5"]} justifyContent="center"> 3234 <wui-link 3235 @click=${this.onCopyUri} 3236 variant="secondary" 3237 icon="copy" 3238 data-testid="wui-link-copy" 3239 > 3240 Copy link 3241 </wui-link> 3242 </wui-flex> 3243 `:null} 3244 3245 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links></wui-flex> 3246 </wui-flex> 3247 `}onShowRetry(){if(this.error&&!this.showRetry){this.showRetry=!0;let e=this.shadowRoot?.querySelector("wui-button");e?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}onTryAgain(){Q.x.setWcError(!1),this.onRetry?(this.isRetrying=!0,this.onRetry?.()):this.onConnect?.()}loaderTemplate(){let e=t8.W.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return(0,n.qy)`<wui-loading-thumbnail radius=${9*t}></wui-loading-thumbnail>`}onCopyUri(){try{this.uri&&(u.w.copyToClopboard(this.uri),J.P.showSuccess("Link copied"))}catch{J.P.showError("Failed to copy")}}}rs.styles=ri,ra([(0,i.wk)()],rs.prototype,"isRetrying",void 0),ra([(0,i.wk)()],rs.prototype,"uri",void 0),ra([(0,i.wk)()],rs.prototype,"error",void 0),ra([(0,i.wk)()],rs.prototype,"ready",void 0),ra([(0,i.wk)()],rs.prototype,"showRetry",void 0),ra([(0,i.wk)()],rs.prototype,"label",void 0),ra([(0,i.wk)()],rs.prototype,"secondaryBtnLabel",void 0),ra([(0,i.wk)()],rs.prototype,"secondaryLabel",void 0),ra([(0,i.wk)()],rs.prototype,"isLoading",void 0),ra([(0,i.MZ)({type:Boolean})],rs.prototype,"isMobile",void 0),ra([(0,i.MZ)()],rs.prototype,"onRetry",void 0);let ro=class extends rs{constructor(){if(super(),this.externalViewUnsubscribe=[],this.connectionsByNamespace=Q.x.getConnections(this.connector?.chain),this.hasMultipleConnections=this.connectionsByNamespace.length>0,this.remoteFeatures=s.H.state.remoteFeatures,this.currentActiveConnectorId=K.a.state.activeConnectorIds[this.connector?.chain],!this.connector)throw Error("w3m-connecting-view: No connector provided");let e=this.connector?.chain;this.isAlreadyConnected(this.connector)&&(this.secondaryBtnLabel=void 0,this.label=`This account is already linked, change your account in ${this.connector.name}`,this.secondaryLabel=`To link a new account, open ${this.connector.name} and switch to the account you want to link`),j.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.connector.name??"Unknown",platform:"browser",dis
3247playIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:Y.I.state.view}}),this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),this.isWalletConnect=!1,this.externalViewUnsubscribe.push(K.a.subscribeKey("activeConnectorIds",t=>{let r=t[e],n=this.remoteFeatures?.multiWallet,{redirectView:i}=Y.I.state.data??{};r!==this.currentActiveConnectorId&&(this.hasMultipleConnections&&n?(Y.I.replace("ProfileWallets"),J.P.showSuccess("New Wallet Added")):i?Y.I.replace(i):d.W.close())}),Q.x.subscribeKey("connections",this.onConnectionsChange.bind(this)))}disconnectedCallback(){this.externalViewUnsubscribe.forEach(e=>e())}async onConnectProxy(){try{if(this.error=!1,this.connector){if(this.isAlreadyConnected(this.connector))return;(this.connector.id===G.o.CONNECTOR_ID.COINBASE_SDK||this.connector.id===G.o.CONNECTOR_ID.BASE_ACCOUNT)&&this.error||await Q.x.connectExternal(this.connector,this.connector.chain)}}catch(e){e instanceof t4.A&&e.originalName===t3.RQ.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?j.E.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:e.message}}):j.E.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}}onConnectionsChange(e){if(this.connector?.chain&&e.get(this.connector.chain)&&this.isAlreadyConnected(this.connector)){let t=e.get(this.connector.chain)??[],r=this.remoteFeatures?.multiWallet;if(0===t.length)Y.I.replace("Connect");else{let e=eq.b.getConnectionsByConnectorId(this.connectionsByNamespace,this.connector.id).flatMap(e=>e.accounts),n=eq.b.getConnectionsByConnectorId(t,this.connector.id).flatMap(e=>e.accounts);0===n.length?this.hasMultipleConnections&&r?(Y.I.replace("ProfileWallets"),J.P.showSuccess("Wallet deleted")):d.W.close():!e.every(e=>n.some(t=>eQ.y.isLowerCaseMatch(e.address,t.address)))&&r&&Y.I.replace("ProfileWallets")}}}isAlreadyConnected(e){return!!e&&this.connectionsByNamespace.some(t=>eQ.y.isLowerCaseMatch(t.connectorId,e.id))}};ro=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.EM)("w3m-connecting-external-view")],ro);let rl=(0,n.AH)` 3248 wui-flex, 3249 wui-list-wallet { 3250 width: 100%; 3251 } 3252`;var rc=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let ru=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.activeConnector=K.a.state.activeConnector,this.unsubscribe.push(K.a.subscribeKey("activeConnector",e=>this.activeConnector=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,n.qy)` 3253 <wui-flex 3254 flexDirection="column" 3255 alignItems="center" 3256 .padding=${["3","5","5","5"]} 3257 gap="5" 3258 > 3259 <wui-flex justifyContent="center" alignItems="center"> 3260 <wui-wallet-image 3261 size="lg" 3262 imageSrc=${(0,a.J)(c.$.getConnectorImage(this.activeConnector))} 3263 ></wui-wallet-image> 3264 </wui-flex> 3265 <wui-flex 3266 flexDirection="column" 3267 alignItems="center" 3268 gap="2" 3269 .padding=${["0","3","0","3"]} 3270 > 3271 <wui-text variant="lg-medium" color="primary"> 3272 Select Chain for ${this.activeConnector?.name} 3273 </wui-text> 3274 <wui-text align="center" variant="lg-regular" color="secondary" 3275 >Select which chain to connect to your multi chain wallet</wui-text 3276 > 3277 </wui-flex> 3278 <wui-flex 3279 flexGrow="1" 3280 flexDirection="column" 3281 alignItems="center" 3282 gap="2" 3283 .padding=${["2","0","2","0"]} 3284 > 3285 ${this.networksTemplate()} 3286 </wui-flex> 3287 </wui-flex> 3288 `}networksTemplate(){return this.activeConnector?.connectors?.map((e,t)=>e.name?(0,n.qy)` 3289 <w3m-list-wallet 3290 displayIndex=${t} 3291 imageSrc=${(0,a.J)(c.$.getChainImage(e.chain))} 3292 name=${G.o.CHAIN_NAME_MAP[e.chain]} 3293 @click=${()=>this.onConnector(e)} 3294 size="sm" 3295 data-testid="wui-list-chain-${e.chain}" 3296 rdnsId=${e.explorerWallet?.rdns} 3297 ></w3m-list-wallet> 3298 `:null)}onConnector(e){let t=this.activeConnector?.connectors?.find(t=>t.chain===e.chain),r=Y.I.state.data?.redirectView;if(!t)return void J.P.showError("Failed to find connector");"walletConnect"===t.id?u.w.isMobile()?Y.I.push("AllWallets"):Y.I.push("ConnectingWalletConnect",{redirectView:r}
3298):Y.I.push("ConnectingExternal",{connector:t,redirectView:r,wallet:this.activeConnector?.explorerWallet})}};ru.styles=rl,rc([(0,i.wk)()],ru.prototype,"activeConnector",void 0),ru=rc([(0,h.EM)("w3m-connecting-multi-chain-view")],ru);var rd=r(76916),rh=r(73626),rp=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let rf=class extends n.WF{constructor(){super(...arguments),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.generateTabs();return(0,n.qy)` 3299 <wui-flex justifyContent="center" .padding=${["0","0","4","0"]}> 3300 <wui-tabs .tabs=${e} .onTabChange=${this.onTabChange.bind(this)}></wui-tabs> 3301 </wui-flex> 3302 `}generateTabs(){let e=this.platforms.map(e=>{if("browser"===e)return{label:"Browser",icon:"extension",platform:"browser"};if("mobile"===e)return{label:"Mobile",icon:"mobile",platform:"mobile"};if("qrcode"===e)return{label:"Mobile",icon:"mobile",platform:"qrcode"};if("web"===e)return{label:"Webapp",icon:"browser",platform:"web"};if("desktop"===e)return{label:"Desktop",icon:"desktop",platform:"desktop"};return{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)}};rp([(0,i.MZ)({type:Array})],rf.prototype,"platforms",void 0),rp([(0,i.MZ)()],rf.prototype,"onSelectPlatfrom",void 0),rf=rp([(0,h.EM)("w3m-connecting-header")],rf);let rm=class extends rs{constructor(){if(super(),!this.wallet)throw Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),j.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:Y.I.state.view}})}async onConnectProxy(){try{this.error=!1;let{connectors:e}=K.a.state,t=e.find(e=>"ANNOUNCED"===e.type&&e.info?.rdns===this.wallet?.rdns||"INJECTED"===e.type||e.name===this.wallet?.name);if(t)await Q.x.connectExternal(t,t.chain);else throw Error("w3m-connecting-wc-browser: No connector found");d.W.close()}catch(e){e instanceof t4.A&&e.originalName===t3.RQ.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?j.E.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:e.message}}):j.E.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}}};rm=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.EM)("w3m-connecting-wc-browser")],rm);let rg=class extends rs{constructor(){if(super(),!this.wallet)throw Error("w3m-connecting-wc-desktop: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),j.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:Y.I.state.view}})}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onConnectProxy(){if(this.wallet?.desktop_link&&this.uri)try{this.error=!1;let{desktop_link:e,name:t}=this.wallet,{redirect:r,href:n}=u.w.formatNativeUrl(e,this.uri);Q.x.setWcLinking({name:t,href:n}),Q.x.setRecentWallet(this.wallet),u.w.openHref(r,"_blank")}catch{this.error=!0}}};rg=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.EM)("w3m-connecting-wc-desktop")],rg);var ry=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let rb=class extends rs{constructor(){if(super(),this.btnLabelTimeout=void 0,this.redirectDeeplink=void 0,this.redirectUniversalLink=void 0,this.target=void 0,this.preferUniversalLinks=s.H.state.experimental_preferUniversalLinks,this.isLoading=!0,this.onConnect=()=>{eq.b.onConnectMobile(this.wallet)},!this.wallet)throw Error("w3m-connecting-wc-mobile: No wallet provided");this.secondaryBtnLabel="Open",this.secondaryLabel=Z.oU.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.onHandleURI(),this.unsubscribe.push(Q.x.subscribeKey("wcUri",()=>{this.onHandleURI()})),j.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:Y.I.state.view}})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.btnLabelTimeout)}onHandleURI(){this.isLoading=!this.uri,!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onTryAgain(){Q.x.setWcError(!1),this.onConnect?.()}};ry([(0,i.wk)()],rb.prototype,"redirectDeeplink",void 0),ry([(0,i.wk)()],rb.prototype,"redirectUniversalLink",void 0),ry([(0,i.wk)()],rb.prototype,"target",void 0),ry([(0,i.wk)()],rb.prototype,"preferUniversalLinks",void 0),ry([(0,i.wk)()],rb.prototype,"isLoading",void 0),rb=ry([(0,h.EM)("w3m-connecting-wc-mobile")],rb),r(37417);let rw=(0,h.AH)` 3303 wui-shimmer { 3304 width: 100%; 3305 aspect-ratio: 1 / 1; 3306 border-radius: ${({borderRadius:e})=>e[4]}; 3307 } 3308 3309 wui-qr-code { 3310 opacity: 0; 3311 animation-duration: ${({durations:e})=>e.xl}; 3312 animation-timing-function: ${({easings:e})=>e["ease-out-power-2"]}; 3313 animation-name: fade-in; 3314 animation-fill-mode: forwards; 3315 } 3316 3317 @keyframes fade-in { 3318 from { 3319 opacity: 0; 3320 } 3321 to { 3322 opacity: 1; 3323 } 3324 } 3325`;var rv=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let rE=class extends rs{constructor(){super(),this.basic=!1}firstUpdated(){this.basic||j.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet?.name??"WalletConnect",platform:"qrcode",dis
3325playIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:Y.I.state.view}})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe?.forEach(e=>e())}render(){return this.onRenderProxy(),(0,n.qy)` 3326 <wui-flex 3327 flexDirection="column" 3328 alignItems="center" 3329 .padding=${["0","5","5","5"]} 3330 gap="5" 3331 > 3332 <wui-shimmer width="100%"> ${this.qrCodeTemplate()} </wui-shimmer> 3333 <wui-text variant="lg-medium" color="primary"> Scan this QR Code with your phone </wui-text> 3334 ${this.copyTemplate()} 3335 </wui-flex> 3336 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links> 3337 `}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0)}qrCodeTemplate(){if(!this.uri||!this.ready)return null;let e=this.wallet?this.wallet.name:void 0;Q.x.setWcLinking(void 0),Q.x.setRecentWallet(this.wallet);let t=t8.W.state.themeVariables["--apkt-qr-color"]??t8.W.state.themeVariables["--w3m-qr-color"];return(0,n.qy)` <wui-qr-code 3338 theme=${t8.W.state.themeMode} 3339 uri=${this.uri} 3340 imageSrc=${(0,a.J)(c.$.getWalletImage(this.wallet))} 3341 color=${(0,a.J)(t)} 3342 alt=${(0,a.J)(e)} 3343 data-testid="wui-qr-code" 3344 ></wui-qr-code>`}copyTemplate(){let e=!this.uri||!this.ready;return(0,n.qy)`<wui-button 3345 .disabled=${e} 3346 @click=${this.onCopyUri} 3347 variant="neutral-secondary" 3348 size="sm" 3349 data-testid="copy-wc2-uri" 3350 > 3351 Copy link 3352 <wui-icon size="sm" color="inherit" name="copy" slot="iconRight"></wui-icon> 3353 </wui-button>`}};rE.styles=rw,rv([(0,i.MZ)({type:Boolean})],rE.prototype,"basic",void 0),rE=rv([(0,h.EM)("w3m-connecting-wc-qrcode")],rE);let rC=class extends n.WF{constructor(){if(super(),this.wallet=Y.I.state.data?.wallet,!this.wallet)throw Error("w3m-connecting-wc-unsupported: No wallet provided");j.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:Y.I.state.view}})}render(){return(0,n.qy)` 3354 <wui-flex 3355 flexDirection="column" 3356 alignItems="center" 3357 .padding=${["10","5","5","5"]} 3358 gap="5" 3359 > 3360 <wui-wallet-image 3361 size="lg" 3362 imageSrc=${(0,a.J)(c.$.getWalletImage(this.wallet))} 3363 ></wui-wallet-image> 3364 3365 <wui-text variant="md-regular" color="primary">Not Detected</wui-text> 3366 </wui-flex> 3367 3368 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links> 3369 `}};rC=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.EM)("w3m-connecting-wc-unsupported")],rC);var rA=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let rx=class extends rs{constructor(){if(super(),this.isLoading=!0,!this.wallet)throw Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel=Z.oU.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.updateLoadingState(),this.unsubscribe.push(Q.x.subscribeKey("wcUri",()=>{this.updateLoadingState()})),j.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:Y.I.state.view}})}updateLoadingState(){this.isLoading=!this.uri}onConnectProxy(){if(this.wallet?.webapp_link&&this.uri)try{this.error=!1;let{webapp_link:e,name:t}=this.wallet,{redirect:r,href:n}=u.w.formatUniversalUrl(e,this.uri);Q.x.setWcLinking({name:t,href:n}),Q.x.setRecentWallet(this.wallet),u.w.openHref(r,"_blank")}catch{this.error=!0}}};rA([(0,i.wk)()],rx.prototype,"isLoading",void 0),rx=rA([(0,h.EM)("w3m-connecting-wc-web")],rx);let rI=(0,h.AH)` 3370 :host([data-mobile-fullscreen='true']) { 3371 height: 100%; 3372 display: flex; 3373 flex-direction: column; 3374 } 3375 3376 :host([data-mobile-fullscreen='true']) wui-ux-by-reown { 3377 margin-top: auto; 3378 } 3379`;var rS=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let rT=class extends n.WF{constructor(){super(),this.wallet=Y.I.state.data?.wallet,this.unsubscribe=[],this.platform=void 0,this.platforms=[],this.isSiwxEnabled=!!s.H.state.siwx,this.remoteFeatures=s.H.state.remoteFeatures,this.displayBranding=!0,this.basic=!1,this.determinePlatforms(),this.initializeConnection(),this.unsubscribe.push(s.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}
3379disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return s.H.state.enableMobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),(0,n.qy)` 3380 ${this.headerTemplate()} 3381 <div class="platform-container">${this.platformTemplate()}</div> 3382 ${this.reownBrandingTemplate()} 3383 `}reownBrandingTemplate(){return this.remoteFeatures?.reownBranding&&this.displayBranding?(0,n.qy)`<wui-ux-by-reown></wui-ux-by-reown>`:null}async initializeConnection(e=!1){if("browser"!==this.platform&&(!s.H.state.manualWCControl||e))try{let{wcPairingExpiry:t,status:r}=Q.x.state,{redirectView:n}=Y.I.state.data??{};if(e||s.H.state.enableEmbedded||u.w.isPairingExpired(t)||"connecting"===r){let e=Q.x.getConnections(o.W.state.activeChain),t=this.remoteFeatures?.multiWallet,r=e.length>0;await Q.x.connectWalletConnect({cache:"never"}),this.isSiwxEnabled||(r&&t?(Y.I.replace("ProfileWallets"),J.P.showSuccess("New Wallet Added")):n?Y.I.replace(n):d.W.close())}}catch(e){if(e instanceof Error&&e.message.includes("An error occurred when attempting to switch chain")&&!s.H.state.enableNetworkSwitch&&o.W.state.activeChain){o.W.setActiveCaipNetwork(rh.R.getUnsupportedNetwork(`${o.W.state.activeChain}:${o.W.state.activeCaipNetwork?.id}`)),o.W.showUnsupportedChainUI();return}e instanceof t4.A&&e.originalName===t3.RQ.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?j.E.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:e.message}}):j.E.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),Q.x.setWcError(!0),J.P.showError(e.message??"Connection error"),Q.x.resetWcConnection(),Y.I.goBack()}}determinePlatforms(){if(!this.wallet){this.platforms.push("qrcode"),this.platform="qrcode";return}if(this.platform)return;let{mobile_link:e,desktop_link:t,webapp_link:r,injected:n,rdns:i}=this.wallet,a=n?.map(({injected_id:e})=>
3383e).filter(Boolean),l=[...i?[i]:a??[]],c=!s.H.state.isUniversalProvider&&l.length,d=Q.x.checkInstalled(l),h=c&&d,p=t&&!u.w.isMobile();h&&!o.W.state.noAdapters&&this.platforms.push("browser"),e&&this.platforms.push(u.w.isMobile()?"mobile":"qrcode"),r&&this.platforms.push("web"),p&&this.platforms.push("desktop");let f=rd.W.isCustomDeeplinkWallet(this.wallet.id,o.W.state.activeChain);h||!c||o.W.state.noAdapters||f||this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return(0,n.qy)`<w3m-connecting-wc-browser></w3m-connecting-wc-browser>`;case"web":return(0,n.qy)`<w3m-connecting-wc-web></w3m-connecting-wc-web>`;case"desktop":return(0,n.qy)` 3384 <w3m-connecting-wc-desktop .onRetry=${()=>this.initializeConnection(!0)}> 3385 </w3m-connecting-wc-desktop> 3386 `;case"mobile":return(0,n.qy)` 3387 <w3m-connecting-wc-mobile isMobile .onRetry=${()=>this.initializeConnection(!0)}> 3388 </w3m-connecting-wc-mobile> 3389 `;case"qrcode":return(0,n.qy)`<w3m-connecting-wc-qrcode ?basic=${this.basic}></w3m-connecting-wc-qrcode>`;default:return(0,n.qy)`<w3m-connecting-wc-unsupported></w3m-connecting-wc-unsupported>`}}headerTemplate(){return this.platforms.length>1?(0,n.qy)` 3390 <w3m-connecting-header 3391 .platforms=${this.platforms} 3392 .onSelectPlatfrom=${this.onSelectPlatform.bind(this)} 3393 > 3394 </w3m-connecting-header> 3395 `: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"}))}};rT.styles=rI,rS([(0,i.wk)()],rT.prototype,"platform",void 0),rS([(0,i.wk)()],rT.prototype,"platforms",void 0),rS([(0,i.wk)()],rT.prototype,"isSiwxEnabled",void 0),rS([(0,i.wk)()],rT.prototype,"remoteFeatures",void 0),rS([(0,i.MZ)({type:Boolean})],rT.prototype,"displayBranding",void 0),rS([(0,i.MZ)({type:Boolean})],rT.prototype,"basic",void 0),rT=rS([(0,h.EM)("w3m-connecting-wc-view")],rT);var rP=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let rO=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.isMobile=u.w.isMobile(),this.remoteFeatures=s.H.state.remoteFeatures,this.unsubscribe.push(s.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(this.isMobile){let{featured:e,recommended:t}=tc.N.state,{customWallets:r}=s.H.state,i=er.i.getRecentWallets(),a=e.length||t.length||r?.length||i.length;return(0,n.qy)`<wui-flex flexDirection="column" gap="2" .margin=${["1","3","3","3"]}> 3396 ${a?(0,n.qy)`<w3m-connector-list></w3m-connector-list>`:null} 3397 <w3m-all-wallets-widget></w3m-all-wallets-widget> 3398 </wui-flex>`}return(0,n.qy)`<wui-flex flexDirection="column" .padding=${["0","0","4","0"]}> 3399 <w3m-connecting-wc-view ?basic=${!0} .displayBranding=${!1}></w3m-connecting-wc-view> 3400 <wui-flex flexDirection="column" .padding=${["0","3","0","3"]}> 3401 <w3m-all-wallets-widget></w3m-all-wallets-widget> 3402 </wui-flex> 3403 </wui-flex> 3404 ${this.reownBrandingTemplate()} `}reownBrandingTemplate(){return this.remoteFeatures?.reownBranding?(0,n.qy)` <wui-flex flexDirection="column" .padding=${["1","0","1","0"]}> 3405 <wui-ux-by-reown></wui-ux-by-reown> 3406 </wui-flex>`:null}};rP([(0,i.wk)()],rO.prototype,"isMobile",void 0),rP([(0,i.wk)()],rO.prototype,"remoteFeatures",void 0),rO=rP([(0,h.EM)("w3m-connecting-wc-basic-view")],rO);var r_=r(57942);let rN=(0,n.AH)` 3407 .continue-button-container { 3408 width: 100%; 3409 } 3410`;var rk=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let rR=class extends n.WF{constructor(){super(...arguments),this.loading=!1}render(){return(0,n.qy)` 3411 <wui-flex 3412 flexDirection="column" 3413 alignItems="center" 3414 gap="6" 3415 .padding=${["0","0","4","0"]} 3416 > 3417 ${this.onboardingTemplate()} ${this.buttonsTemplate()} 3418 <wui-link 3419 @click=${()=>{u.w.openHref(r_.T.URLS.FAQ,"_blank")}} 3420 > 3421 Learn more about names 3422 <wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon> 3423 </wui-link> 3424 </wui-flex> 3425 `}onboardingTemplate(){return(0,n.qy)` <wui-flex 3426 flexDirection="column" 3427 gap="6" 3428 alignItems="center" 3429 .padding=${["0","6","0","6"]} 3430 > 3431 <wui-flex gap="3" alignItems="center" justifyContent="center"> 3432 <wui-icon-box icon="id" size="xl" iconSize="xxl" color="default"></wui-icon-box> 3433 </wui-flex> 3434 <wui-flex flexDirection="column" alignItems="center" gap="3"> 3435 <wui-text align="center" variant="lg-medium" color="primary"> 3436 Choose your account name 3437 </wui-text> 3438 <wui-text align="center" variant="md-regular" color="primary"> 3439 Finally say goodbye to 0x addresses, name your account to make it easier to exchange 3440 assets 3441 </wui-text> 3442 </wui-flex> 3443 </wui-flex>`}buttonsTemplate(){return(0,n.qy)`<wui-flex 3444 .padding=${["0","8","0","8"]} 3445 gap="3" 3446 class="continue-button-container" 3447 > 3448 <wui-button 3449 fullWidth 3450 .loading=${this.loading} 3451 size="lg" 3452 borderRadius="xs" 3453 @click=${this.handleContinue.bind(this)} 3454 >Choose name 3455 </wui-button>
3455 3456 </wui-flex>`}handleContinue(){Y.I.push("RegisterAccountName"),j.E.sendEvent({type:"track",event:"OPEN_ENS_FLOW",properties:{isSmartAccount:(0,el.lj)(o.W.state.activeChain)===ey.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}})}};rR.styles=rN,rk([(0,i.wk)()],rR.prototype,"loading",void 0),rR=rk([(0,h.EM)("w3m-choose-account-name-view")],rR);let rM=class extends n.WF{constructor(){super(...arguments),this.wallet=Y.I.state.data?.wallet}render(){if(!this.wallet)throw Error("w3m-downloads-view");return(0,n.qy)` 3457 <wui-flex gap="2" flexDirection="column" .padding=${["3","3","4","3"]}> 3458 ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()} 3459 ${this.homepageTemplate()} 3460 </wui-flex> 3461 `}chromeTemplate(){return this.wallet?.chrome_store?(0,n.qy)`<wui-list-item 3462 variant="icon" 3463 icon="chromeStore" 3464 iconVariant="square" 3465 @click=${this.onChromeStore.bind(this)} 3466 chevron 3467 > 3468 <wui-text variant="md-medium" color="primary">Chrome Extension</wui-text> 3469 </wui-list-item>`:null}iosTemplate(){return this.wallet?.app_store?(0,n.qy)`<wui-list-item 3470 variant="icon" 3471 icon="appStore" 3472 iconVariant="square" 3473 @click=${this.onAppStore.bind(this)} 3474 chevron 3475 > 3476 <wui-text variant="md-medium" color="primary">iOS App</wui-text> 3477 </wui-list-item>`:null}androidTemplate(){return this.wallet?.play_store?(0,n.qy)`<wui-list-item 3478 variant="icon" 3479 icon="playStore" 3480 iconVariant="square" 3481 @click=${this.onPlayStore.bind(this)} 3482 chevron 3483 > 3484 <wui-text variant="md-medium" color="primary">Android App</wui-text> 3485 </wui-list-item>`:null}homepageTemplate(){return this.wallet?.homepage?(0,n.qy)` 3486 <wui-list-item 3487 variant="icon" 3488 icon="browser" 3489 iconVariant="square-blue" 3490 @click=${this.onHomePage.bind(this)} 3491 chevron 3492 > 3493 <wui-text variant="md-medium" color="primary">Website</wui-text> 3494 </wui-list-item> 3495 `:null}openStore(e){e.href&&this.wallet&&(j.E.sendEvent({type:"track",event:"GET_WALLET",properties:{name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.wallet.id,type:e.type}}),u.w.openHref(e.href,"_blank"))}onChromeStore(){this.wallet?.chrome_store&&this.openStore({href:this.wallet.chrome_store,type:"chrome_store"})}onAppStore(){this.wallet?.app_store&&this.openStore({href:this.wallet.app_store,type:"app_store"})}onPlayStore(){this.wallet?.play_store&&this.openStore({href:this.wallet.play_store,type:"play_store"})}onHomePage(){this.wallet?.homepage&&this.openStore({href:this.wallet.homepage,type:"homepage"})}};rM=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.EM)("w3m-downloads-view")],rM);let rB=class extends n.WF{render(){return(0,n.qy)` 3496 <wui-flex flexDirection="column" .padding=${["0","3","3","3"]} gap="2"> 3497 ${this.recommendedWalletsTemplate()} 3498 <w3m-list-wallet 3499 name="Explore all" 3500 showAllWallets 3501 walletIcon="allWallets" 3502 icon="externalLink" 3503 size="sm" 3504 @click=${()=>{u.w.openHref("https://walletguide.walletconnect.network/","_blank")}} 3505 ></w3m-list-wallet> 3506 </wui-flex> 3507 `}recommendedWalletsTemplate(){let{recommended:e,featured:t}=tc.N.state,{customWallets:r}=s.H.state;return[...t,...r??[],...e].slice(0,4).map((e,t)=>(0,n.qy)` 3508 <w3m-list-wallet 3509 displayIndex=${t} 3510 name=${e.name??"Unknown"} 3511 tagVariant="accent" 3512 size="sm" 3513 imageSrc=${(0,a.J)(c.$.getWalletImage(e))} 3514 @click=${()=>{this.onWalletClick(e)}} 3515 ></w3m-list-wallet> 3516 `)}onWalletClick(e){j.E.sendEvent({type:"track",event:"GET_WALLET",properties:{name:e.name,walletRank:void 0,explorerId:e.id,type:"homepage"}}),u.w.openHref(e.homepage??"https://walletguide.walletconnect.network","_blank")}};rB=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.EM)("w3m-get-wallet-view")],rB),r(28770);var rj=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let rU=class extends n.WF{constructor(){super(...arguments),this.data=[]}render(){return(0,n.qy)` 3517 <wui-flex flexDirection="column" alignItems="center" gap="4"> 3518 ${this.data.map(e=>(0,n.qy)` 3519 <wui-flex flexDirection="column" alignItems="center" gap="5"> 3520 <wui-flex flexDirection="row" justifyContent="center" gap="1"> 3521 ${e.images.map(e=>(0,n.qy)`<wui-visual size="sm" name=${e}></wui-visual>`)} 3522 </wui-flex> 3523 </wui-flex> 3524 <wui-flex flexDirection="column" alignItems="center" gap="1"> 3525 <wui-text variant="md-regular" color="primary" align="center">${e.title}</wui-text> 3526 <wui-text variant="sm-regular" color="secondary" align="center" 3527 >${e.text}</wui-text 3528 > 3529 </wui-flex> 3530 `)} 3531 </wui-flex> 3532 `}};rj([(0,i.MZ)({type:Array})],rU.prototype,"data",void 0),rU=rj([(0,h.EM)("w3m-help-widget")],rU);let r$=[{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."}],rL=class extends n.WF{render(){return(0,n.qy)` 3533 <wui-flex 3534 flexDirection="column" 3535 .padding=${["6","5","5","5"]} 3536 alignItems="center" 3537 gap="5" 3538 > 3539 <w3m-help-widget .data=${r$}></w3m-help-widget> 3540 <wui-button variant="accent-primary" size="md" @click=${this.onGetWallet.bind(this)}> 3541 <wui-icon color="inherit" slot="iconLeft" name="wallet"></wui-icon> 3542 Get a wallet 3543 </wui-button>
3543 3544 </wui-flex> 3545 `}onGetWallet(){j.E.sendEvent({type:"track",event:"CLICK_GET_WALLET_HELP"}),Y.I.push("GetWallet")}};rL=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.EM)("w3m-what-is-a-wallet-view")],rL);let rD=(0,h.AH)` 3546 wui-flex { 3547 max-height: clamp(360px, 540px, 80vh); 3548 overflow: scroll; 3549 scrollbar-width: none; 3550 transition: opacity ${({durations:e})=>e.lg} 3551 ${({easings:e})=>e["ease-out-power-2"]}; 3552 will-change: opacity; 3553 } 3554 wui-flex::-webkit-scrollbar { 3555 display: none; 3556 } 3557 wui-flex.disabled { 3558 opacity: 0.3; 3559 pointer-events: none; 3560 user-select: none; 3561 } 3562`;var rF=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let rH=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.checked=tN.o.state.isLegalCheckboxChecked,this.unsubscribe.push(tN.o.subscribeKey("isLegalCheckboxChecked",e=>{this.checked=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=s.H.state,r=s.H.state.features?.legalCheckbox,i=!!(e||t)&&!!r,o=i&&!this.checked;return(0,n.qy)` 3563 <w3m-legal-checkbox></w3m-legal-checkbox> 3564 <wui-flex 3565 flexDirection="column" 3566 .padding=${i?["0","3","3","3"]:"3"} 3567 gap="2" 3568 class=${(0,a.J)(o?"disabled":void 0)} 3569 > 3570 <w3m-wallet-login-list tabIdx=${(0,a.J)(o?-1:void 0)}></w3m-wallet-login-list> 3571 </wui-flex> 3572 `}};rH.styles=rD,rF([(0,i.wk)()],rH.prototype,"checked",void 0),rH=rF([(0,h.EM)("w3m-connect-wallets-view")],rH);var rz=r(25340);let rW=(0,g.AH)` 3573 :host { 3574 display: block; 3575 width: 120px; 3576 height: 120px; 3577 } 3578 3579 svg { 3580 width: 120px; 3581 height: 120px; 3582 fill: none; 3583 stroke: transparent; 3584 stroke-linecap: round; 3585 } 3586 3587 use { 3588 stroke: ${e=>e.colors.accent100}; 3589 stroke-width: 2px; 3590 stroke-dasharray: 54, 118; 3591 stroke-dashoffset: 172; 3592 animation: dash 1s linear infinite; 3593 } 3594 3595 @keyframes dash { 3596 to { 3597 stroke-dashoffset: 0px; 3598 } 3599 } 3600`,rq=class extends n.WF{render(){return(0,n.qy)` 3601 <svg viewBox="0 0 54 59"> 3602 <path 3603 id="wui-loader-path" 3604 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" 3605 /> 3606 <use xlink:href="#wui-loader-path"></use> 3607 </svg> 3608 `}};rq.styles=[p.W5,rW],rq=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}([(0,m.E)("wui-loading-hexagon")],rq),r(16017);let rV=(0,n.AH)` 3609 @keyframes shake { 3610 0% { 3611 transform: translateX(0); 3612 } 3613 25% { 3614 transform: translateX(3px); 3615 } 3616 50% { 3617 transform: translateX(-3px); 3618 } 3619 75% { 3620 transform: translateX(3px); 3621 } 3622 100% { 3623 transform: translateX(0); 3624 } 3625 } 3626 3627 wui-flex:first-child:not(:only-child) { 3628 position: relative; 3629 } 3630 3631 wui-loading-hexagon { 3632 position: absolute; 3633 } 3634 3635 wui-icon-box { 3636 position: absolute; 3637 right: 4px; 3638 bottom: 0; 3639 opacity: 0; 3640 transform: scale(0.5); 3641 z-index: 1; 3642 } 3643 3644 wui-button { 3645 display: none; 3646 } 3647 3648 [data-error='true'] wui-icon-box { 3649 opacity: 1; 3650 transform: scale(1); 3651 } 3652 3653 [data-error='true'] > wui-flex:first-child { 3654 animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; 3655 } 3656 3657 wui-button[data-retry='true'] { 3658 display: block; 3659 opacity: 1; 3660 } 3661`;var rG=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let rK=class extends n.WF{constructor(){super(),this.network=Y.I.state.data?.network,this.unsubscribe=[],this.showRetry=!1,this.error=!1}
3661disconnectedCallback(){this.unsubscribe.forEach(e=>e())}firstUpdated(){this.onSwitchNetwork()}render(){if(!this.network)throw Error("w3m-network-switch-view: No network provided");this.onShowRetry();let e=this.getLabel(),t=this.getSubLabel();return(0,n.qy)` 3662 <wui-flex 3663 data-error=${this.error} 3664 flexDirection="column" 3665 alignItems="center" 3666 .padding=${["10","5","10","5"]} 3667 gap="7" 3668 > 3669 <wui-flex justifyContent="center" alignItems="center"> 3670 <wui-network-image 3671 size="lg" 3672 imageSrc=${(0,a.J)(c.$.getNetworkImage(this.network))} 3673 ></wui-network-image> 3674 3675 ${this.error?null:(0,n.qy)`<wui-loading-hexagon></wui-loading-hexagon>`} 3676 3677 <wui-icon-box color="error" icon="close" size="sm"></wui-icon-box> 3678 </wui-flex> 3679 3680 <wui-flex flexDirection="column" alignItems="center" gap="2"> 3681 <wui-text align="center" variant="h6-regular" color="primary">${e}</wui-text> 3682 <wui-text align="center" variant="md-regular" color="secondary">${t}</wui-text> 3683 </wui-flex> 3684 3685 <wui-button 3686 data-retry=${this.showRetry} 3687 variant="accent-primary" 3688 size="md" 3689 .disabled=${!this.error} 3690 @click=${this.onSwitchNetwork.bind(this)} 3691 > 3692 <wui-icon color="inherit" slot="iconLeft" name="refresh"></wui-icon> 3693 Try again 3694 </wui-button> 3695 </wui-flex> 3696 `}getSubLabel(){let e=K.a.getConnectorId(o.W.state.activeChain);return K.a.getAuthConnector()&&e===G.o.CONNECTOR_ID.AUTH?"":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=K.a.getConnectorId(o.W.state.activeChain);return K.a.getAuthConnector()&&e===G.o.CONNECTOR_ID.AUTH?`Switching to ${this.network?.name??"Unknown"} network...`:this.error?"Switch declined":"Approve in wallet"}onShowRetry(){if(this.error&&!this.showRetry){this.showRetry=!0;let e=this.shadowRoot?.querySelector("wui-button");e?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}async onSwitchNetwork(){try{this.error=!1,o.W.state.activeChain!==this.network?.chainNamespace&&o.W.setIsSwitchingNamespace(!0),this.network&&(await o.W.switchActiveNetwork(this.network),await rz.U.isAuthenticated()&&Y.I.goBack())}catch(e){this.error=!0}}};rK.styles=rV,rG([(0,i.wk)()],rK.prototype,"showRetry",void 0),rG([(0,i.wk)()],rK.prototype,"error",void 0),rK=rG([(0,h.EM)("w3m-network-switch-view")],rK);var rZ=r(59539);r(77652);let rJ=(0,g.AH)` 3697 :host { 3698 width: 100%; 3699 } 3700 3701 button { 3702 display: flex; 3703 align-items: center; 3704 justify-content: space-between; 3705 padding: ${({spacing:e})=>e[3]}; 3706 width: 100%; 3707 background-color: transparent; 3708 border-radius: ${({borderRadius:e})=>e[4]}; 3709 } 3710 3711 wui-text { 3712 text-transform: capitalize; 3713 } 3714 3715 @media (hover: hover) { 3716 button:hover:enabled { 3717 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 3718 } 3719 } 3720 3721 button:disabled { 3722 opacity: 0.5; 3723 cursor: not-allowed; 3724 } 3725`;var rY=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let rQ=class extends n.WF{constructor(){super(...arguments),this.imageSrc=void 0,this.name="Ethereum",this.disabled=!1}render(){return(0,n.qy)` 3726 <button ?disabled=${this.disabled} tabindex=${(0,a.J)(this.tabIdx)}> 3727 <wui-flex gap="2" alignItems="center"> 3728 ${this.imageTemplate()} 3729 <wui-text variant="lg-regular" color="primary">${this.name}</wui-text> 3730 </wui-flex> 3731 <wui-icon name="chevronRight" size="lg" color="default"></wui-icon> 3732 </button> 3733 `}imageTemplate(){return this.imageSrc?(0,n.qy)`<wui-image ?boxed=${!0} src=${this.imageSrc}></wui-image>`:(0,n.qy)`<wui-image 3734 ?boxed=${!0} 3735 icon="networkPlaceholder" 3736 size="lg" 3737 iconColor="default" 3738 ></wui-image>`}};rQ.styles=[p.W5,p.fD,rJ],rY([(0,i.MZ)()],rQ.prototype,"imageSrc",void 0),rY([(0,i.MZ)()],rQ.prototype,"name",void 0),rY([(0,i.MZ)()],rQ.prototype,"tabIdx",void 0),rY([(0,i.MZ)({type:Boolean})],rQ.prototype,"disabled",void 0),rQ=rY([(0,m.E)("wui-list-network")],rQ);let rX=(0,n.AH)` 3739 .container { 3740 max-height: 360px; 3741 overflow: auto; 3742 } 3743 3744 .container::-webkit-scrollbar {
3745 display: none; 3746 } 3747`;var r0=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let r1=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.network=o.W.state.activeCaipNetwork,this.requestedCaipNetworks=o.W.getCaipNetworks(),this.search="",this.onDebouncedSearch=u.w.debounce(e=>{this.search=e},100),this.unsubscribe.push(l.j.subscribeNetworkImages(()=>this.requestUpdate()),o.W.subscribeKey("activeCaipNetwork",e=>this.network=e),o.W.subscribe(()=>{this.requestedCaipNetworks=o.W.getAllRequestedCaipNetworks()}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,n.qy)` 3748 ${this.templateSearchInput()} 3749 <wui-flex 3750 class="container" 3751 .padding=${["0","3","3","3"]} 3752 flexDirection="column" 3753 gap="2" 3754 > 3755 ${this.networksTemplate()} 3756 </wui-flex> 3757 `}templateSearchInput(){return(0,n.qy)` 3758 <wui-flex gap="2" .padding=${["0","3","3","3"]}> 3759 <wui-input-text 3760 @inputChange=${this.onInputChange.bind(this)} 3761 class="network-search-input" 3762 size="md" 3763 placeholder="Search network" 3764 icon="search" 3765 ></wui-input-text> 3766 </wui-flex> 3767 `}onInputChange(e){this.onDebouncedSearch(e.detail)}networksTemplate(){let e=o.W.getAllApprovedCaipNetworkIds(),t=u.w.sortRequestedNetworks(e,this.requestedCaipNetworks);return this.search?this.filteredNetworks=t?.filter(e=>e?.name?.toLowerCase().includes(this.search.toLowerCase())):this.filteredNetworks=t,this.filteredNetworks?.map(e=>(0,n.qy)` 3768 <wui-list-network 3769 .selected=${this.network?.id===e.id} 3770 imageSrc=${(0,a.J)(c.$.getNetworkImage(e))} 3771 type="network" 3772 name=${e.name??e.id} 3773 @click=${()=>this.onSwitchNetwork(e)} 3774 .disabled=${o.W.isCaipNetworkDisabled(e)} 3775 data-testid=${`w3m-network-switch-${e.name??e.id}`} 3776 ></wui-list-network> 3777 `)}onSwitchNetwork(e){rZ.L.onSwitchNetwork({network:e})}};r1.styles=rX,r0([(0,i.wk)()],r1.prototype,"network",void 0),r0([(0,i.wk)()],r1.prototype,"requestedCaipNetworks",void 0),r0([(0,i.wk)()],r1.prototype,"filteredNetworks",void 0),r0([(0,i.wk)()],r1.prototype,"search",void 0),r1=r0([(0,h.EM)("w3m-networks-view")],r1);let r2=(0,h.AH)` 3778 @keyframes shake { 3779 0% { 3780 transform: translateX(0); 3781 } 3782 25% { 3783 transform: translateX(3px); 3784 } 3785 50% { 3786 transform: translateX(-3px); 3787 } 3788 75% { 3789 transform: translateX(3px); 3790 } 3791 100% { 3792 transform: translateX(0); 3793 } 3794 } 3795 3796 wui-flex:first-child:not(:only-child) { 3797 position: relative; 3798 } 3799 3800 wui-loading-thumbnail { 3801 position: absolute; 3802 } 3803 3804 wui-visual { 3805 border-radius: calc( 3806 ${({borderRadius:e})=>e["1"]} * 9 - ${({borderRadius:e})=>e["3"]} 3807 ); 3808 position: relative; 3809 overflow: hidden; 3810 } 3811 3812 wui-visual::after { 3813 content: ''; 3814 display: block; 3815 width: 100%; 3816 height: 100%; 3817 position: absolute; 3818 inset: 0; 3819 border-radius: calc( 3820 ${({borderRadius:e})=>e["1"]} * 9 - ${({borderRadius:e})=>e["3"]} 3821 ); 3822 box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.core.glass010}; 3823 } 3824 3825 wui-icon-box { 3826 position: absolute; 3827 right: calc(${({spacing:e})=>e["1"]} * -1); 3828 bottom: calc(${({spacing:e})=>e["1"]} * -1); 3829 opacity: 0; 3830 transform: scale(0.5); 3831 transition: 3832 opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, 3833 transform ${({durations:e})=>e.lg} 3834 ${({easings:e})=>e["ease-out-power-2"]}; 3835 will-change: opacity, transform; 3836 } 3837 3838 wui-text[align='center'] { 3839 width: 100%; 3840 padding: 0px ${({spacing:e})=>e["4"]}; 3841 } 3842 3843 [data-error='true'] wui-icon-box { 3844 opacity: 1; 3845 transform: scale(1); 3846 } 3847 3848 [data-error='true'] > wui-flex:first-child { 3849 animation: shake 250ms ${({easings:e})=>e["ease-out-power-2"]} both; 3850 } 3851 3852 [data-retry='false'] wui-link { 3853 display: none; 3854 } 3855 3856 [data-retry='true'] wui-link { 3857 display: block; 3858 opacity: 1; 3859 } 3860 3861 wui-link { 3862 padding: ${({spacing:e})=>e["01"]} ${({spacing:e})=>e["2"]}; 3863 } 3864 3865 .capitalize { 3866 text-transform: capitalize; 3867 } 3868`;var r5=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let r6={eip155:"eth",solana:"solana",bip122:"bitcoin",polkadot:void 0},r3=class extends n.WF{constructor(){super(...arguments),this.unsubscribe=[],this.switchToChain=Y.I.state.data?.switchToChain,this.caipNetwork=Y.I.state.data?.network,this.activeChain=o.W.state.activeChain}firstUpdated(){this.unsubscribe.push(o.W.subscribeKey("activeChain",e=>this.activeChain=e))}
3868disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.switchToChain?G.o.CHAIN_NAME_MAP[this.switchToChain]:"supported";if(!this.switchToChain)return null;let t=G.o.CHAIN_NAME_MAP[this.switchToChain];return(0,n.qy)` 3869 <wui-flex 3870 flexDirection="column" 3871 alignItems="center" 3872 .padding=${["4","2","2","2"]} 3873 gap="4" 3874 > 3875 <wui-flex justifyContent="center" flexDirection="column" alignItems="center" gap="2"> 3876 <wui-visual 3877 size="md" 3878 name=${(0,a.J)(r6[this.switchToChain])} 3879 ></wui-visual> 3880 <wui-flex gap="2" flexDirection="column" alignItems="center"> 3881 <wui-text 3882 data-testid=${`w3m-switch-active-chain-to-${t}`} 3883 variant="lg-regular" 3884 color="primary" 3885 align="center" 3886 >Switch to <span class="capitalize">${t}</span></wui-text 3887 > 3888 <wui-text variant="md-regular" color="secondary" align="center"> 3889 Connected wallet doesn't support connecting to ${e} chain. You 3890 need to connect with a different wallet. 3891 </wui-text> 3892 </wui-flex> 3893 <wui-button 3894 data-testid="w3m-switch-active-chain-button" 3895 size="md" 3896 @click=${this.switchActiveChain.bind(this)} 3897 >Switch</wui-button 3898 > 3899 </wui-flex> 3900 </wui-flex> 3901 `}async switchActiveChain(){this.switchToChain&&(o.W.setIsSwitchingNamespace(!0),K.a.setFilterByNamespace(this.switchToChain),this.caipNetwork?await o.W.switchActiveNetwork(this.caipNetwork):o.W.setActiveNamespace(this.switchToChain),Y.I.reset("Connect"))}};r3.styles=r2,r5([(0,i.MZ)()],r3.prototype,"activeChain",void 0),r3=r5([(0,h.EM)("w3m-switch-active-chain-view")],r3);let r4=[{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."}],r8=class extends n.WF{render(){return(0,n.qy)` 3902 <wui-flex 3903 flexDirection="column" 3904 .padding=${["6","5","5","5"]} 3905 alignItems="center" 3906 gap="5" 3907 > 3908 <w3m-help-widget .data=${r4}></w3m-help-widget> 3909 <wui-button 3910 variant="accent-primary" 3911 size="md" 3912 @click=${()=>{u.w.openHref("https://ethereum.org/en/developers/docs/networks/","_blank")}} 3913 > 3914 Learn more 3915 <wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon> 3916 </wui-button> 3917 </wui-flex> 3918 `}};r8=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.EM)("w3m-what-is-a-network-view")],r8);let r9=(0,n.AH)` 3919 :host > wui-flex { 3920 max-height: clamp(360px, 540px, 80vh); 3921 overflow: scroll; 3922 scrollbar-width: none; 3923 } 3924 3925 :host > wui-flex::-webkit-scrollbar {
3926 display: none; 3927 } 3928`;var r7=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let ne=class extends n.WF{constructor(){super(),this.swapUnsupportedChain=Y.I.state.data?.swapUnsupportedChain,this.unsubscribe=[],this.disconnecting=!1,this.remoteFeatures=s.H.state.remoteFeatures,this.unsubscribe.push(l.j.subscribeNetworkImages(()=>this.requestUpdate()),s.H.subscribeKey("remoteFeatures",e=>{this.remoteFeatures=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,n.qy)` 3929 <wui-flex class="container" flexDirection="column" gap="0"> 3930 <wui-flex 3931 class="container" 3932 flexDirection="column" 3933 .padding=${["3","5","2","5"]} 3934 alignItems="center" 3935 gap="5" 3936 > 3937 ${this.descriptionTemplate()} 3938 </wui-flex> 3939 3940 <wui-flex flexDirection="column" padding="3" gap="2"> ${this.networksTemplate()} </wui-flex> 3941 3942 <wui-separator text="or"></wui-separator> 3943 <wui-flex flexDirection="column" padding="3" gap="2"> 3944 <wui-list-item 3945 variant="icon" 3946 iconVariant="overlay" 3947 icon="signOut" 3948 ?chevron=${!1} 3949 .loading=${this.disconnecting} 3950 @click=${this.onDisconnect.bind(this)} 3951 data-testid="disconnect-button" 3952 > 3953 <wui-text variant="md-medium" color="secondary">Disconnect</wui-text> 3954 </wui-list-item> 3955 </wui-flex> 3956 </wui-flex> 3957 `}descriptionTemplate(){return this.swapUnsupportedChain?(0,n.qy)` 3958 <wui-text variant="sm-regular" color="secondary" align="center"> 3959 The swap feature doesnât support your current network. Switch to an available option to 3960 continue. 3961 </wui-text> 3962 `:(0,n.qy)` 3963 <wui-text variant="sm-regular" color="secondary" align="center"> 3964 This app doesnât support your current network. Switch to an available option to continue. 3965 </wui-text> 3966 `}networksTemplate(){let e=o.W.getAllRequestedCaipNetworks(),t=o.W.getAllApprovedCaipNetworkIds(),r=u.w.sortRequestedNetworks(t,e);return(this.swapUnsupportedChain?r.filter(e=>Z.oU.SWAP_SUPPORTED_NETWORKS.includes(e.caipNetworkId)):r).map(e=>(0,n.qy)` 3967 <wui-list-network 3968 imageSrc=${(0,a.J)(c.$.getNetworkImage(e))} 3969 name=${e.name??"Unknown"} 3970 @click=${()=>this.onSwitchNetwork(e)} 3971 > 3972 </wui-list-network> 3973 `)}async onDisconnect(){try{this.disconnecting=!0;let e=o.W.state.activeChain,t=Q.x.getConnections(e).length>0,r=e&&K.a.state.activeConnectorIds[e],n=this.remoteFeatures?.multiWallet;await Q.x.disconnect(n?{id:r,namespace:e}:{}),t&&n&&(Y.I.push("ProfileWallets"),J.P.showSuccess("Wallet deleted"))}catch{j.E.sendEvent({type:"track",event:"DISCONNECT_ERROR",properties:{message:"Failed to disconnect"}}),J.P.showError("Failed to disconnect")}finally{this.disconnecting=!1}}async onSwitchNetwork(e){let t=o.W.getActiveCaipAddress(),r=o.W.getAllApprovedCaipNetworkIds(),n=(o.W.getNetworkProp("supportsAllNetworks",e.chainNamespace),Y.I.state.data);t?r?.includes(e.caipNetworkId)?await o.W.switchActiveNetwork(e):Y.I.push("SwitchNetwork",{...n,network:e}):t||(o.W.setActiveCaipNetwork(e),Y.I.push("Connect"))}};ne.styles=r9,r7([(0,i.wk)()],ne.prototype,"disconnecting",void 0),r7([(0,i.wk)()],ne.prototype,"remoteFeatures",void 0),ne=r7([(0,h.EM)("w3m-unsupported-chain-view")],ne);let nt=(0,g.AH)` 3974 wui-flex { 3975 width: 100%; 3976 display: flex; 3977 align-items: center; 3978 justify-content: center; 3979 gap: ${({spacing:e})=>e[2]}; 3980 border-radius: ${({borderRadius:e})=>e[4]}; 3981 padding: ${({spacing:e})=>e[3]}; 3982 } 3983 3984 /* -- Types --------------------------------------------------------- */ 3985 wui-flex[data-type='info'] { 3986 color: ${({tokens:e})=>e.theme.textSecondary}; 3987 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 3988 } 3989 3990 wui-flex[data-type='success'] { 3991 color: ${({tokens:e})=>e.core.textSuccess}; 3992 background-color: ${({tokens:e})=>e.core.backgroundSuccess}; 3993 } 3994 3995 wui-flex[data-type='error'] { 3996 color: ${({tokens:e})=>e.core.textError}; 3997 background-color: ${({tokens:e})=>e.core.backgroundError}; 3998 } 3999 4000 wui-flex[data-type='warning'] { 4001 color: ${({tokens:e})=>e.core.textWarning}; 4002 background-color: ${({tokens:e})=>e.core.backgroundWarning}; 4003 } 4004 4005 wui-flex[data-type='info'] wui-icon-box { 4006 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 4007 } 4008 4009 wui-flex[data-type='success'] wui-icon-box { 4010 background-color: ${({tokens:e})=>e.core.backgroundSuccess}; 4011 } 4012 4013 wui-flex[data-type='error'] wui-icon-box { 4014 background-color: ${({tokens:e})=>e.core.backgroundError}; 4015 } 4016 4017 wui-flex[data-type='warning'] wui-icon-box { 4018 background-color: ${({tokens:e})=>e.core.backgroundWarning}; 4019 } 4020 4021 wui-text { 4022 flex: 1; 4023 } 4024`;var nr=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let nn=class extends n.WF{constructor(){super(...arguments),this.icon="externalLink",this.text="",this.type="info"}render(){return(0,n.qy)` 4025 <wui-flex alignItems="center" data-type=${this.type}> 4026 <wui-icon-box size="sm" color="inherit" icon=${this.icon}></wui-icon-box> 4027 <wui-text variant="md-regular" color="inherit">${this.text}</wui-text> 4028 </wui-flex> 4029 `}};nn.styles=[p.W5,p.fD,nt],nr([(0,i.MZ)()],nn.prototype,"icon",void 0),nr([(0,i.MZ)()],nn.prototype,"text",void 0),nr([(0,i.MZ)()],nn.prototype,"type",void 0),nn=nr([(0,m.E)("wui-banner")],nn);let ni=(0,n.AH)` 4030 :host > wui-flex { 4031 max-height: clamp(360px, 540px, 80vh); 4032 overflow: scroll; 4033 scrollbar-width: none; 4034 } 4035 4036 :host > wui-flex::-webkit-scrollbar {
4037 display: none; 4038 } 4039`,na=class extends n.WF{constructor(){super(),this.unsubscribe=[]}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,n.qy)` <wui-flex flexDirection="column" .padding=${["2","3","3","3"]} gap="2"> 4040 <wui-banner 4041 icon="warningCircle" 4042 text="You can only receive assets on these networks" 4043 ></wui-banner> 4044 ${this.networkTemplate()} 4045 </wui-flex>`}networkTemplate(){let e=o.W.getAllRequestedCaipNetworks(),t=o.W.getAllApprovedCaipNetworkIds(),r=o.W.state.activeCaipNetwork,i=o.W.checkIfSmartAccountEnabled(),s=u.w.sortRequestedNetworks(t,e);if(i&&(0,el.lj)(r?.chainNamespace)===ey.Vl.ACCOUNT_TYPES.SMART_ACCOUNT){if(!r)return null;s=[r]}return s.filter(e=>e.chainNamespace===r?.chainNamespace).map(e=>(0,n.qy)` 4046 <wui-list-network 4047 imageSrc=${(0,a.J)(c.$.getNetworkImage(e))} 4048 name=${e.name??"Unknown"} 4049 ?transparent=${!0} 4050 > 4051 </wui-list-network> 4052 `)}};na.styles=ni,na=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.EM)("w3m-wallet-compatible-networks-view")],na);let ns=(0,g.AH)` 4053 :host { 4054 display: flex; 4055 justify-content: center; 4056 align-items: center; 4057 width: 56px; 4058 height: 56px; 4059 box-shadow: 0 0 0 8px ${({tokens:e})=>e.theme.borderPrimary}; 4060 border-radius: ${({borderRadius:e})=>e[4]}; 4061 overflow: hidden; 4062 } 4063 4064 :host([data-border-radius-full='true']) { 4065 border-radius: 50px; 4066 } 4067 4068 wui-icon { 4069 width: 32px; 4070 height: 32px; 4071 } 4072`;var no=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let nl=class extends n.WF{render(){return this.dataset.borderRadiusFull=this.borderRadiusFull?"true":"false",(0,n.qy)`${this.templateVisual()}`}templateVisual(){return this.imageSrc?(0,n.qy)`<wui-image src=${this.imageSrc} alt=${this.alt??""}></wui-image>`:(0,n.qy)`<wui-icon 4073 data-parent-size="md" 4074 size="inherit" 4075 color="inherit" 4076 name="wallet" 4077 ></wui-icon>`}};nl.styles=[p.W5,ns],no([(0,i.MZ)()],nl.prototype,"imageSrc",void 0),no([(0,i.MZ)()],nl.prototype,"alt",void 0),no([(0,i.MZ)({type:Boolean})],nl.prototype,"borderRadiusFull",void 0),nl=no([(0,m.E)("wui-visual-thumbnail")],nl);let nc=(0,h.AH)` 4078 :host { 4079 display: flex; 4080 justify-content: center; 4081 gap: ${({spacing:e})=>e["4"]}; 4082 } 4083 4084 wui-visual-thumbnail:nth-child(1) { 4085 z-index: 1; 4086 } 4087`,nu=class extends n.WF{constructor(){super(...arguments),this.dappImageUrl=s.H.state.metadata?.icons,this.walletImageUrl=o.W.getAccountData()?.connectedWalletInfo?.icon}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(0,n.qy)` 4088 <wui-visual-thumbnail 4089 ?borderRadiusFull=${!0} 4090 .imageSrc=${this.dappImageUrl?.[0]} 4091 ></wui-visual-thumbnail> 4092 <wui-visual-thumbnail .imageSrc=${this.walletImageUrl}></wui-visual-thumbnail> 4093 `}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})}};nu.styles=nc,nu=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.EM)("w3m-siwx-sign-message-thumbnails")],nu);var nd=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let nh=class extends n.WF{constructor(){super(...arguments),this.dappName=s.H.state.metadata?.name,this.isCancelling=!1,this.isSigning=!1}render(){return(0,n.qy)` 4094 <wui-flex justifyContent="center" .padding=${["8","0","6","0"]}> 4095 <w3m-siwx-sign-message-thumbnails></w3m-siwx-sign-message-thumbnails> 4096 </wui-flex> 4097 <wui-flex .padding=${["0","20","5","20"]} gap="3" justifyContent="space-between"> 4098 <wui-text variant="lg-medium" align="center" color="primary" 4099 >${this.dappName??"Dapp"} needs to connect to your wallet</wui-text 4100 > 4101 </wui-flex> 4102 <wui-flex .padding=${["0","10","4","10"]} gap="3" justifyContent="space-between"> 4103 <wui-text variant="md-regular" align="center" color="secondary" 4104 >Sign this message to prove you own this wallet and proceed. Canceling will disconnect 4105 you.</wui-text 4106 > 4107 </wui-flex> 4108 <wui-flex .padding=${["4","5","5","5"]} gap="3" justifyContent="space-between"> 4109 <wui-button 4110 size="lg" 4111 borderRadius="xs" 4112 fullWidth 4113 variant="neutral-secondary" 4114 ?loading=${this.isCancelling} 4115 @click=${this.onCancel.bind(this)} 4116 data-testid="w3m-connecting-siwe-cancel" 4117 > 4118 ${this.isCancelling?"Cancelling...":"Cancel"} 4119 </wui-button>
4119 4120 <wui-button 4121 size="lg" 4122 borderRadius="xs" 4123 fullWidth 4124 variant="neutral-primary" 4125 @click=${this.onSign.bind(this)} 4126 ?loading=${this.isSigning} 4127 data-testid="w3m-connecting-siwe-sign" 4128 > 4129 ${this.isSigning?"Signing...":"Sign"} 4130 </wui-button> 4131 </wui-flex> 4132 `}async onSign(){this.isSigning=!0;try{await rz.U.requestSignMessage()}catch(e){if(e instanceof Error&&e.message.includes("OTP is required")){J.P.showError({message:"Something went wrong. We need to verify your account again."}),Y.I.replace("DataCapture");return}throw e}finally{this.isSigning=!1}}async onCancel(){this.isCancelling=!0,await rz.U.cancelSignMessage().finally(()=>this.isCancelling=!1)}};nd([(0,i.wk)()],nh.prototype,"isCancelling",void 0),nd([(0,i.wk)()],nh.prototype,"isSigning",void 0),nh=nd([(0,h.EM)("w3m-siwx-sign-message-view")],nh)},12259:(e,t,r)=>{"use strict";r.d(t,{o:()=>C,Wv:()=>E,TY:()=>A,ju:()=>d,L2:()=>y,Jk:()=>b,u0:()=>m,d_:()=>p,HD:()=>v,$b:()=>w,jo:()=>g});var n=r(23331),i=class{constructor(e){this.bytePosition=0,this.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength)}shift(e){return this.bytePosition+=e,this}read8(){let e=this.dataView.getUint8(this.bytePosition);return this.shift(1),e}read16(){let e=this.dataView.getUint16(this.bytePosition,!0);return this.shift(2),e}read32(){let e=this.dataView.getUint32(this.bytePosition,!0);return this.shift(4),e}read64(){let e=this.read32();return BigInt("0x"+(this.read32().toString(16)+e.toString(16).padStart(8,"0"))).toString(10)}read128(){let e=BigInt(this.read64());return BigInt("0x"+(BigInt(this.read64()).toString(16)+e.toString(16).padStart(16,"0"))).toString(10)}read256(){let e=BigInt(this.read128());return BigInt("0x"+(BigInt(this.read128()).toString(16)+e.toString(16).padStart(32,"0"))).toString(10)}readBytes(e){let t=this.bytePosition+this.dataView.byteOffset,r=new Uint8Array(this.dataView.buffer,t,e);return this.shift(e),r}readULEB(){let e=this.bytePosition+this.dataView.byteOffset,{value:t,length:r}=(0,n.j)(new Uint8Array(this.dataView.buffer,e));return this.shift(r),t}readVec(e){let t=this.readULEB(),r=[];for(let n=0;n<t;n++)r.push(e(this,n,t));return r}},a=r(81366),s=class{constructor({initialSize:e=1024,maxSize:t=1/0,allocateSize:r=1024}={}){this.bytePosition=0,this.size=e,this.maxSize=t,this.allocateSize=r,this.dataView=new DataView(new ArrayBuffer(e))}ensureSizeOrGrow(e){let t=this.bytePosition+e;if(t>this.size){let e=Math.min(this.maxSize,Math.max(this.size+t,this.size+this.allocateSize));if(t>e)throw Error(`Attempting to serialize to BCS, but buffer does not have enough size. Allocated size: ${this.size}, Max size: ${this.maxSize}, Required size: ${t}`);this.size=e;let r=new ArrayBuffer(this.size);new Uint8Array(r).set(new Uint8Array(this.dataView.buffer)),this.dataView=new DataView(r)}}shift(e){return this.bytePosition+=e,this}write8(e){return this.ensureSizeOrGrow(1),this.dataView.setUint8(this.bytePosition,Number(e)),this.shift(1)}writeBytes(e){this.ensureSizeOrGrow(e.length);for(let t=0;t<e.length;t++)this.dataView.setUint8(this.bytePosition+t,e[t]);return this.shift(e.length)}write16(e){return this.ensureSizeOrGrow(2),this.dataView.setUint16(this.bytePosition,Number(e),!0),this.shift(2)}write32(e){return this.ensureSizeOrGrow(4),this.dataView.setUint32(this.bytePosition,Number(e),!0),this.shift(4)}write64(e){return o(BigInt(e),8).forEach(e=>this.write8(e)),this}write128(e){return o(BigInt(e),16).forEach(e=>this.write8(e)),this}write256(e){return o(BigInt(e),32).forEach(e=>this.write8(e)),this}writeULEB(e){return(0,n.h)(e).forEach(e=>this.write8(e)),this}writeVec(e,t){return this.writeULEB(e.length),Array.from(e).forEach((r,n)=>t(this,r,n,e.length)),this}*[Symbol.iterator](){for(let e=0;e<this.bytePosition;e++)yield this.dataView.getUint8(e);return this.toBytes()}toBytes(){return new Uint8Array(this.dataView.buffer.slice(0,this.bytePosition))}toString(e){return(0,a.U6)(this.toBytes(),e)}};function o(e,t){let r=new Uint8Array(t),n=0;for(;e>0;)r[n]=Number(e%BigInt(256)),e/=BigInt(256),n+=1;return r}var l=r(33811),c=r(14663),u=r(89596),d=class e{#i;#a;constructor(e){this.name=e.name,this.read=e.read,this.serializedSize=e.serializedSize??(()=>null),this.#i=e.write,this.#a=e.serialize??((e,t)=>{let r=new s({initialSize:this.serializedSize(e)??void 0,...t});return this.#i(e,r),r.toBytes()}),this.validate=e.validate??(()=>{})}write(e,t){this.validate(e),this.#i(e,t)}serialize(e,t){return this.validate(e),new f(this,this.#a(e,t))}parse(e){let t=new i(e);return this.read(t)}fromHex(e){return this.parse((0,l.a)(e))}fromBase58(e){return this.parse((0,c.n)(e))}fromBase64(e){return this.parse((0,u.E)(e))}transform({name:t,input:r,output:n,validate:i}){return new e({name:t??this.name,read:e=>n?n(this.read(e)):this.read(e),write:(e,t)=>
4132this.#i(r?r(e):e,t),serializedSize:e=>this.serializedSize(r?r(e):e),serialize:(e,t)=>this.#a(r?r(e):e,t),validate:e=>{i?.(e),this.validate(r?r(e):e)}})}};let h=Symbol.for("@mysten/serialized-bcs");function p(e){return!!e&&"object"==typeof e&&!0===e[h]}var f=class{#s;#o;get[h](){return!0}constructor(e,t){this.#s=e,this.#o=t}toBytes(){return this.#o}toHex(){return(0,l.n)(this.#o)}toBase64(){return(0,u.n)(this.#o)}toBase58(){return(0,c.g)(this.#o)}parse(){return this.#s.parse(this.#o)}};function m({size:e,...t}){return new d({...t,serializedSize:()=>e})}function g({readMethod:e,writeMethod:t,...r}){return m({...r,read:t=>t[e](),write:(e,r)=>r[t](e),validate:e=>{if(e<0||e>r.maxValue)throw TypeError(`Invalid ${r.name} value: ${e}. Expected value in range 0-${r.maxValue}`);r.validate?.(e)}})}function y({readMethod:e,writeMethod:t,...r}){return m({...r,read:t=>t[e](),write:(e,r)=>r[t](BigInt(e)),validate:e=>{let t=BigInt(e);if(t<0||t>r.maxValue)throw TypeError(`Invalid ${r.name} value: ${t}. Expected value in range 0-${r.maxValue}`);r.validate?.(t)}})}function b({serialize:e,...t}){let r=new d({...t,serialize:e,write:(e,t)=>{for(let n of r.serialize(e).toBytes())t.write8(n)}});return r}function w({toBytes:e,fromBytes:t,...r}){return new d({...r,read:e=>{let r=e.readULEB();return t(e.readBytes(r))},write:(t,r)=>{let n=e(t);r.writeULEB(n.length);for(let e=0;e<n.length;e++)r.write8(n[e])},serialize:t=>{let r=e(t),i=(0,n.h)(r.length),a=new Uint8Array(i.length+r.length);return a.set(i,0),a.set(r,i.length),a},validate:e=>{if("string"!=typeof e)throw TypeError(`Invalid ${r.name} value: ${e}. Expected string`);r.validate?.(e)}})}function v(e){let t=null;function r(){return t||(t=e()),t}return new d({name:"lazy",read:e=>r().read(e),serializedSize:e=>r().serializedSize(e),write:(e,t)=>r().write(e,t),serialize:(e,t)=>r().serialize(e,t).toBytes()})}var E=class extends d{constructor({name:e,fields:t,...r}){let n=Object.entries(t);super({name:e,serializedSize:e=>{let t=0;for(let[r,i]of n){let n=i.serializedSize(e[r]);if(null==n)return null;t+=n}return t},read:e=>{let t={};for(let[r,i]of n)t[r]=i.read(e);return t},write:(e,t)=>{for(let[r,i]of n)i.write(e[r],t)},...r,validate:e=>{if(r?.validate?.(e),"object"!=typeof e||null==e)throw TypeError(`Expected object, found ${typeof e}`)}})}},C=class extends d{constructor({fields:e,...t}){let r=Object.entries(e);super({read:e=>{let n=e.readULEB(),i=r[n];if(!i)throw TypeError(`Unknown value ${n} for enum ${t.name}`);let[a,s]=i;return{[a]:s?.read(e)??!0,$kind:a}},write:(t,n)=>{let[i,a]=Object.entries(t).filter(([t])=>Object.hasOwn(e,t))[0];for(let e=0;e<r.length;e++){let[t,s]=r[e];if(t===i){n.writeULEB(e),s?.write(a,n);return}}},...t,validate:r=>{if(t?.validate?.(r),"object"!=typeof r||null==r)throw TypeError(`Expected object, found ${typeof r}`);let n=Object.keys(r).filter(t=>void 0!==r[t]&&Object.hasOwn(e,t));if(1!==n.length)throw TypeError(`Expected object with one key, but found ${n.length} for type ${t.name}}`);let[i]=n;if(!Object.hasOwn(e,i))throw TypeError(`Invalid enum variant ${i}`)}})}},A=class extends d{constructor({fields:e,name:t,...r}){super({name:t??`(${e.map(e=>e.name).join(", ")})`,serializedSize:t=>{let r=0;for(let n=0;n<e.length;n++){let i=e[n].serializedSize(t[n]);if(null==i)return null;r+=i}return r},read:t=>{let r=[];for(let n of e)r.push(n.read(t));return r},write:(t,r)=>{for(let n=0;n<e.length;n++)e[n].write(t[n],r)},...r,validate:t=>{if(r?.validate?.(t),!Array.isArray(t))throw TypeError(`Expected array, found ${typeof t}`);if(t.length!==e.length)throw TypeError(`Expected array of length ${e.length}, found ${t.length}`)}})}}},12366:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineBlock=void 0,t.formatBlock=a;let n=r(87721),i=r(93771);function a(e,t){let r=(e.transactions??[]).map(e=>"string"==typeof e?e:(0,i.formatTransaction)(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.gasLim
4132it?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:r,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}t.defineBlock=(0,n.defineFormatter)("block",a)},12488:(e,t,r)=>{"use strict";r.d(t,{o:()=>s});var n=r(91004),i=r(36442);let a=(0,n.BX)({isLegalCheckboxChecked:!1}),s={state:a,subscribe:e=>(0,n.B1)(a,()=>e(a)),subscribeKey:(e,t)=>(0,i.u$)(a,e,t),setIsLegalCheckboxChecked(e){a.isLegalCheckboxChecked=e}}},12573:(e,t,r)=>{"use strict";r.d(t,{j:()=>o});var n=r(91004),i=r(36442),a=r(17052);let s=(0,n.BX)({walletImages:{},networkImages:{},chainImages:{},connectorImages:{},tokenImages:{},currencyImages:{}}),o=(0,a.X)({state:s,subscribeNetworkImages:e=>(0,n.B1)(s.networkImages,()=>e(s.networkImages)),subscribeKey:(e,t)=>(0,i.u$)(s,e,t),subscribe:e=>(0,n.B1)(s,()=>e(s)),setWalletImage(e,t){s.walletImages[e]=t},setNetworkImage(e,t){s.networkImages[e]=t},setChainImage(e,t){s.chainImages[e]=t},setConnectorImage(e,t){s.connectorImages={...s.connectorImages,[e]:t}},setTokenImage(e,t){s.tokenImages[e]=t},setCurrencyImage(e,t){s.currencyImages[e]=t}})},12658:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=void 0;let n=r(25609),i=r(88746);class a{constructor(e){this.communicator=e}async getPermissions(){return(await this.communicator.send(n.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(e){if(!this.isPermissionRequestValid(e))throw new i.PermissionsError("Permissions request is invalid",i.PERMISSIONS_REQUEST_REJECTED);try{return(await this.communicator.send(n.Methods.wallet_requestPermissions,e)).data}catch{throw new i.PermissionsError("Permissions rejected",i.PERMISSIONS_REQUEST_REJECTED)}}isPermissionRequestValid(e){return e.every(e=>"object"==typeof e&&Object.keys(e).every(e=>!!Object.values(n.RestrictedMethods).includes(e)))}}t.Wallet=a},12734:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setStorageAt=i;let n=r(27083);async function i(e,{address:t,index:r,value:i}){await e.request({method:`${e.mode}_setStorageAt`,params:[t,"number"==typeof r?(0,n.numberToHex)(r):r,i]})}},12949:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isErc6492Signature=function(e){return(0,i.sliceHex)(e,-32)===n.erc6492MagicBytes};let n=r(94034),i=r(4906)},12981:(e,t,r)=>{"use strict";r(77805)},13054:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.walletActions=function(e){return{addChain:t=>(0,s.addChain)(e,t),deployContract:t=>(0,o.deployContract)(e,t),fillTransaction:t=>(0,n.fillTransaction)(e,t),getAddresses:()=>(0,l.getAddresses)(e),getCallsStatus:t=>(0,c.getCallsStatus)(e,t),getCapabilities:t=>(0,u.getCapabilities)(e,t),getChainId:()=>(0,i.getChainId)(e),getPermissions:()=>(0,d.getPermissions)(e),prepareAuthorization:t=>(0,h.prepareAuthorization)(e,t),prepareTransactionRequest:t=>(0,p.prepareTransactionRequest)(e,t),requestAddresses:()=>(0,f.requestAddresses)(e),requestPermissions:t=>(0,m.requestPermissions)(e,t),sendCalls:t=>(0,g.sendCalls)(e,t),sendCallsSync:t=>(0,y.sendCallsSync)(e,t),sendRawTransaction:t=>(0,b.sendRawTransaction)(e,t),sendRawTransactionSync:t=>(0,w.sendRawTransactionSync)(e,t),sendTransaction:t=>(0,v.sendTransaction)(e,t),sendTransactionSync:t=>(0,E.sendTransactionSync)(e,t),showCallsStatus:t=>(0,C.showCallsStatus)(e,t),signAuthorization:t=>(0,A.signAuthorization)(e,t),signMessage:t=>(0,x.signMessage)(e,t),signTransaction:t=>(0,I.signTransaction)(e,t),signTypedData:t=>(0,S.signTypedData)(e,t),switchChain:t=>(0,T.switchChain)(e,t),waitForCallsStatus:t=>(0,P.waitForCallsStatus)(e,t),watchAsset:t=>(0,O.watchAsset)(e,t),writeContract:t=>(0,_.writeContract)(e,t),writeContractSync:t=>(0,N.writeContractSync)(e,t),token:{approve:(0,k.bindActionDecorators)(e,a.approve),approveSync:(0,k.bindActionDecorators)(e,a.approveSync),transfer:(0,k.bindActionDecorators)(e,a.transfer),transferSync:(0,k.bindActionDecorators)(e,a.transferSync)}}};let n=r(2404),i=r(80517),a=r(1893),s=r(33074),o=r(25984),l=r(57181),c=r(12026),u=r(14257),d=r(41805),h=r(1529),p=r(84593),f=r(39978),m=r(65026),g=r(32508),y=r(62923),b=r(37833),w=r(29018),v=r(60149),E=r(57150),C=r(51411),A=r(30873),x=r(18731),I=r(98976),S=r(69756),T=r(76218),P=r(42678),O=r(74868),_=r(42350),N=r(98065),k=r(85583)},13434:(e,t,r)=>{"use strict";r.d(t,{g:()=>g});var n=r(52335),i=r(57873),a=r(47482),s=r(82376),o=r(36071),l=r(32590),c=r(42242),u=r(53984),d=r(26274),h=r(89188),p=r(81920),f=r(33432),m=r(29092);let g={checkNamespaceConnectorId:(e,t)=>l.a.getConnectorId(e)===t,isSocialProvider:e=>p.oU.DEFAULT_REMOTE_FEATURES.socials.includes(e),connectWalletConnect:({walletConnect:e,connector:t,closeModalOnConnect:r=!0,redirectViewOnModalClose:i="Connect",onOpen:a,onConnect:o})=>new Promise((c,h)=>{if(e&&l.a.setActiveConnector(t),a?.(f.w.isMobile()&&e),i){let e=u.W.subscribeKey("open",t=>{t||(d.I.state.view!==i&&d.I.replace(i),e(),h(Error("Modal closed")))})}let p=s.W.subscribeKey("activeCaipAddress",e=>{e&&(o?.(),r&&u.W.close(),p(),c(n.C.parseCaipAddress(e)))})}),connectExternal:e=>new Promise((t,r)=>{let i=s.W.subscribeKey("activeCaipAddress",e=>{e&&(u.W.close(),i(),t(n.C.parseCaipAddress(e)))});o.x.connectExternal(e,e.chain).catch(()=>{i(),r(Error("Connection rejected"))})}),connectSocial({social:e,namespace:t,closeModalOnConnect:r=!0,onOpenFarcaster:a,onConnect:d}){let h,p=!1,g=null,y=t||s.W.state.activeChain,b=s.W.subscribeKey("activeCaipAddress",e=>{e&&(r&&u.W.close(),b())});return new Promise((t,r)=>{async function b(a){if(a.data?.resultUri)if(a.origin===i.o.SECURE_SITE_SDK_ORIGIN){window.removeEventListener("message",b,!1);try{let i=l.a.getAuthConnector(y);if(i&&!p){h&&h.close(),p=!0;let l=a.data.resultUri;c.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_REQUEST_USER_DATA",properties:{provider:e}}
4132),m.i.setConnectedSocialProvider(e),await o.x.connectExternal({id:i.id,type:i.type,socialUri:l},i.chain);let u=s.W.state.activeCaipAddress;if(!u)return void r(Error("Failed to connect"));t(n.C.parseCaipAddress(u)),c.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_SUCCESS",properties:{provider:e}})}}catch(t){c.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:e,message:f.w.parseError(t)}}),r(Error("Failed to connect"))}}else c.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:e,message:"Untrusted Origin"}})}!async function(){if(c.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_STARTED",properties:{provider:e}}),"farcaster"===e){a?.();let t=u.W.subscribeKey("open",n=>{n||"farcaster"!==e||(r(Error("Popup closed")),d?.(),t())}),n=l.a.getAuthConnector();if(n){let e=s.W.getAccountData(y);if(!e?.farcasterUrl)try{let{url:e}=await n.provider.getFarcasterUri();s.W.setAccountProp("farcasterUrl",e,y)}catch{r(Error("Failed to connect to farcaster"))}}}else{let t=l.a.getAuthConnector();g=f.w.returnOpenHref(`${i.o.SECURE_SITE_SDK_ORIGIN}/loading`,"popupWindow","width=600,height=800,scrollbars=yes");try{if(t){let{uri:n}=await t.provider.getSocialRedirectUri({provider:e});if(g&&n){g.location.href=n,h=g;let e=setInterval(()=>{h?.closed&&!p&&(r(Error("Popup closed")),clearInterval(e))},1e3);window.addEventListener("message",b,!1)}else g?.close(),r(Error("Failed to initiate social connection"))}}catch{r(Error("Failed to initiate social connection")),g?.close()}}}()})},connectEmail:({closeModalOnConnect:e=!0,redirectViewOnModalClose:t="Connect",onOpen:r,onConnect:i})=>new Promise((a,o)=>{if(r?.(),t){let e=u.W.subscribeKey("open",r=>{r||(d.I.state.view!==t&&d.I.replace(t),e(),o(Error("Modal closed")))})}let l=s.W.subscribeKey("activeCaipAddress",t=>{t&&(i?.(),e&&u.W.close(),l(),a(n.C.parseCaipAddress(t)))})}),async updateEmail(){let e=m.i.getConnectedConnectorId(s.W.state.activeChain),t=l.a.getAuthConnector();if(!t)throw Error("No auth connector found");if(e!==i.o.CONNECTOR_ID.AUTH)throw Error("Not connected to email or social");let r=t.provider.getEmail()??"";return await u.W.open({view:"UpdateEmailWallet",data:{email:r,redirectView:void 0}}),new Promise((e,n)=>{let i=setInterval(()=>{let n=t.provider.getEmail()??"";n!==r&&(u.W.close(),clearInterval(i),a(),e({email:n}))},1e3),a=u.W.subscribeKey("open",e=>{e||("Connect"!==d.I.state.view&&d.I.push("Connect"),clearInterval(i),a(),n(Error("Modal closed")))})})},canSwitchToSmartAccount:e=>s.W.checkIfSmartAccountEnabled()&&(0,h.lj)(e)===a.Vl.ACCOUNT_TYPES.EOA}},13599:(e,t,r)=>{"use strict";r.d(t,{YW:()=>o,_v:()=>l});var n=r(98668),i=r(44582);function a(e,t,r,n,i){if("BAD_PREFIX"===e||"UNEXPECTED_CONTINUE"===e){let e=0;for(let n=t+1;n<r.length&&r[n]>>6==2;n++)e++;return e}return"OVERRUN"===e?r.length-t-1:0}let s=Object.freeze({error:function(e,t,r,n,a){(0,i.MR)(!1,`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:a,replace:function(e,t,r,n,s){return"OVERLONG"===e?((0,i.MR)("number"==typeof s,"invalid bad code point for replacement","badCodepoint",s),n.push(s),0):(n.push(65533),a(e,t,r,n,s))}});function o(e,t){(0,i.MR)("string"==typeof e,"invalid string value","str",e),null!=t&&((0,i.SP)(t),e=e.normalize(t));let r=[];for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<128)r.push(n);else if(n<2048)r.push(n>>6|192),r.push(63&n|128);else if((64512&n)==55296){t++;let a=e.charCodeAt(t);(0,i.MR)(t<e.length&&(64512&a)==56320,"invalid surrogate pair","str",e);let s=65536+((1023&n)<<10)+(1023&a);r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(63&s|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return new Uint8Array(r)}function l(e,t){return(function(e,t){null==t&&(t=s.error);let r=(0,n.q5)(e,"bytes"),i=[],a=0;for(;a<r.length;){let e=r[a++];if(e>>7==0){i.push(e);continue}let n=null,s=null;if((224&e)==192)n=1,s=127;else if((240&e)==224)n=2,s=2047;else if((248&e)==240)n=3,s=65535;else{(192&e)==128?a+=t("UNEXPECTED_CONTINUE",a-1,r,i):a+=t("BAD_PREFIX",a-1,r,i);continue}if(a-1+n>=r.length){a+=t("OVERRUN",a-1,r,i);continue}let o=e&(1<<8-n-1)-1;for(let e=0;e<n;e++){let e=r[a];if((192&e)!=128){a+=t("MISSING_CONTINUE",a,r,i),o=null;break}o=o<<6|63&e,a++}if(null!==o){if(o>1114111){a+=t("OUT_OF_RANGE",a-1-n,r,i,o);continue}if(o>=55296&&o<=57343){a+=t("UTF16_SURROGATE",a-1-n,r,i,o);continue}if(o<=s){a+=t("OVERLONG",a-1-n,r,i,o);continue}i.push(o)}}return i})(e,t).map(e=>e<=65535?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10&1023)+55296,(1023&e)+56320)).join("")}},13609:(e,t)=>{"use strict";
4132Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="2.55.1"},13640:(e,t,r)=>{"use strict";function n(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}r.d(t,{q:()=>n})},13645:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(33028).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},13745:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toSignature=void 0;let n=r(65222),i=r(92139);t.toSignature=e=>{let t="string"==typeof e?e:(0,n.formatAbiItem)(e);return(0,i.normalizeSignature)(t)}},13894:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multicall3Bytecode=t.erc6492SignatureValidatorByteCode=t.deploylessCallViaFactoryBytecode=t.deploylessCallViaBytecodeBytecode=void 0,t.deploylessCallViaBytecodeBytecode="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",t.deploylessCallViaFactoryBytecode="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",t.erc6492SignatureValidatorByteCode="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b
41326001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848
4132603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",t.multicall3Bytecode="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9
4132150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033"},14029:(e,t,r)=>{let n=r(21823).getSymbolSize;t.getPositions=function(e){let t=n(e);return[[0,0],[t-7,0],[0,t-7]]}},14116:(e,t,r)=>{"use strict";
4132Object.defineProperty(t,"__esModule",{value:!0}),t.setNextBlockTimestamp=i;let n=r(27083);async function i(e,{timestamp:t}){await e.request({method:"evm_setNextBlockTimestamp",params:[(0,n.numberToHex)(t)]})}},14257:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCapabilities=a;let n=r(83562),i=r(27083);async function a(e,t={}){let{account:r=e.account,chainId:s}=t,o=r?(0,n.parseAccount)(r):void 0,l=s?[o?.address,[(0,i.numberToHex)(s)]]:[o?.address],c=await e.request({method:"wallet_getCapabilities",params:l}),u={};for(let[e,t]of Object.entries(c))for(let[r,n]of(u[Number(e)]={},Object.entries(t)))"addSubAccount"===r&&(r="unstable_addSubAccount"),u[Number(e)][r]=n;return"number"==typeof s?u[s]:u}},14319:(e,t,r)=>{"use strict";r.d(t,{D0:()=>P,LH:()=>T,Tp:()=>_,dQ:()=>C,jr:()=>x,pS:()=>I,qy:()=>N,zH:()=>g,zi:()=>m});var n=r(40537),i=r(26531);let a=BigInt(0),s=BigInt(1),o=BigInt(2),l=BigInt(3),c=BigInt(4),u=BigInt(5),d=BigInt(7),h=BigInt(8),p=BigInt(9),f=BigInt(16);function m(e,t){let r=e%t;return r>=a?r:t+r}function g(e,t,r){let n=e;for(;t-- >a;)n*=n,n%=r;return n}function y(e,t){if(e===a)throw Error("invert: expected non-zero number");if(t<=a)throw Error("invert: expected positive modulus, got "+t);let r=m(e,t),n=t,i=a,o=s,l=s,c=a;for(;r!==a;){let e=n/r,t=n%r,a=i-l*e,s=o-c*e;n=r,r=t,i=l,o=c,l=a,c=s}if(n!==s)throw Error("invert: does not exist");return m(i,t)}function b(e,t,r){if(!e.eql(e.sqr(t),r))throw Error("Cannot find square root")}function w(e,t){let r=(e.ORDER+s)/c,n=e.pow(t,r);return b(e,n,t),n}function v(e,t){let r=(e.ORDER-u)/h,n=e.mul(t,o),i=e.pow(n,r),a=e.mul(t,i),s=e.mul(e.mul(a,o),i),l=e.mul(a,e.sub(s,e.ONE));return b(e,l,t),l}function E(e){if(e<l)throw Error("sqrt is not defined for small field");let t=e-s,r=0;for(;t%o===a;)t/=o,r++;let n=o,i=P(e);for(;1===S(i,n);)if(n++>1e3)throw Error("Cannot find square root: probably non-prime P");if(1===r)return w;let c=i.pow(n,t),u=(t+s)/o;return function(e,n){if(e.is0(n))return n;if(1!==S(e,n))throw Error("Cannot find square root");let i=r,a=e.mul(e.ONE,c),o=e.pow(n,t),l=e.pow(n,u);for(;!e.eql(o,e.ONE);){if(e.is0(o))return e.ZERO;let t=1,r=e.sqr(o);for(;!e.eql(r,e.ONE);)if(t++,r=e.sqr(r),t===i)throw Error("Cannot find square root");let n=s<<BigInt(i-t-1),c=e.pow(a,n);i=t,a=e.sqr(c),o=e.mul(o,a),l=e.mul(l,c)}return l}}let C=(e,t)=>(m(e,t)&s)===s,A=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function x(e){let t=A.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"});return(0,n.DS)(e,t),e}function I(e,t,r=!1){let n=Array(t.length).fill(r?e.ZERO:void 0),i=t.reduce((t,r,i)=>e.is0(r)?t:(n[i]=t,e.mul(t,r)),e.ONE),a=e.inv(i);return t.reduceRight((t,r,i)=>e.is0(r)?t:(n[i]=e.mul(t,n[i]),e.mul(t,r)),a),n}function S(e,t){let r=(e.ORDER-s)/o,n=e.pow(t,r),i=e.eql(n,e.ONE),a=e.eql(n,e.ZERO),l=e.eql(n,e.neg(e.ONE));if(!i&&!a&&!l)throw Error("invalid Legendre symbol result");return i?1:a?0:-1}function T(e,t){void 0!==t&&(0,i.Fe)(t);let r=void 0!==t?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function P(e,t,r=!1,i={}){let o,g,C,A;if(e<=a)throw Error("invalid field: expected ORDER > 0, got "+e);let x=!1;if("object"==typeof t&&null!=t){if(i.sqrt||r)throw Error("cannot specify opts in two arguments");t.BITS&&(g=t.BITS),t.sqrt&&(C=t.sqrt),"boolean"==typeof t.isLE&&(r=t.isLE),"boolean"==typeof t.modFromBytes&&(x=t.modFromBytes),A=t.allowedLengths}else"number"==typeof t&&(g=t),i.sqrt&&(C=i.sqrt);let{nBitLength:S,nByteLength:O}=T(e,g);if(O>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let _=Object.freeze({ORDER:e,isLE:r,BITS:S,BYTES:O,MASK:(0,n.OG)(S),ZERO:a,ONE:s,allowedLengths:A,create:t=>m(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return a<=t&&t<e},is0:e=>e===a,isValidNot0:e=>!_.is0(e)&&_.isValid(e),isOdd:e=>(e&s)===s,neg:t=>m(-t,e),eql:(e,t)=>e===t,sqr:t=>m(t*t,e),add:(t,r)=>m(t+r,e),sub:(t,r)=>m(t-r,e),mul:(t,r)=>m(t*r,e),pow:(e,t)=>(function(e,t,r){if(r<a)throw Error("invalid exponent, negatives unsupported");if(r===a)return e.ONE;if(r===s)return t;let n=e.ONE,i=t;for(;r>a;)r&s&&(n=e.mul(n,i)),i=e.sqr(i),r>>=s;return n})(_,e,t),div:(t,r)=>m(t*y(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>y(t,e),sqrt:C||(t=>(o||(o=e%c===l?w:e%h===u?v:e%f===p?function(e){let t=P(e),r=E(e),n=r(t,t.neg(t.ONE)),i=r(t,n),a=r(t,t.neg(n)),s=(e+d)/f;return(e,t)=>{let r=e.pow(t,s),o=e.mul(r,n),l=e.mul(r,i),c=e.mul(r,a),u=e.eql(e.sqr(o),t),d=e.eql(e.sqr(l),t);r=e.cmov(r,o,u),o=e.cmov(c,l,d);let h=e.eql(e.sqr(o),t),p=e.cmov(r,o,h);return b(e,p,t),p}}(e):E(e)),o(_,t))),toBytes:e=>r?(0,n.z)(e,O):(0,n.lq)(e,O),fromBytes:(t,i=!0)=>
4132{if(A){if(!A.includes(t.length)||t.length>O)throw Error("Field.fromBytes: expected "+A+" bytes, got "+t.length);let e=new Uint8Array(O);e.set(t,r?0:e.length-t.length),t=e}if(t.length!==O)throw Error("Field.fromBytes: expected "+O+" bytes, got "+t.length);let a=r?(0,n.lX)(t):(0,n.Ph)(t);if(x&&(a=m(a,e)),!i&&!_.isValid(a))throw Error("invalid field element: outside of range 0..ORDER");return a},invertBatch:e=>I(_,e),cmov:(e,t,r)=>r?t:e});return Object.freeze(_)}function O(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function _(e){let t=O(e);return t+Math.ceil(t/2)}function N(e,t,r=!1){let i=e.length,a=O(t),o=_(t);if(i<16||i<o||i>1024)throw Error("expected "+o+"-1024 bytes of input, got "+i);let l=m(r?(0,n.lX)(e):(0,n.Ph)(e),t-s)+s;return r?(0,n.z)(l,a):(0,n.lq)(l,a)}},14429:(e,t,r)=>{"use strict";r.d(t,{q:()=>i});let n={adapters:{}},i={state:n,initialize(e){n.adapters={...e}},get:e=>n.adapters[e]}},14663:(e,t,r)=>{"use strict";function n(e){if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name&&"BYTES_PER_ELEMENT"in e&&1===e.BYTES_PER_ELEMENT))throw TypeError("Uint8Array expected")}r.d(t,{n:()=>l,g:()=>o});let i=(()=>{try{let e=new TextDecoder;return"A0+�"===e.decode(Uint8Array.of(65,48,43,127))?e:void 0}catch(e){return}})(),a={encode:e=>{n(e);let t=e.length;if(0===t)return new Uint8Array(0);let r=0;for(;r<t-1&&0===e[r];)r++;let i=Math.ceil(t/2),a=new Uint16Array(i),s=1&t;s&&(a[0]=e[0]);for(let r=s,n=s;r<t;r+=2,n++)a[n]=e[r]<<8|e[r+1];let o=[],l=0;for(;l<i;){let e=0;for(let t=l;t<i;t++){let r=65536*e+a[t],n=Math.floor(r/0x271f35a0);e=r-0x271f35a0*n,a[t]=n,0===n&&t===l&&l++}o.push(e)}let c=o.length-1,u=5*c;for(let e=o[c];u++,!(e<58);e=Math.floor(e/58));let d=new Uint8Array(r+u),h=d.length-1;for(let e=0;e<c;e++){let t=o[e];for(let e=0;e<5;e++)d[h--]=t%58,t=Math.floor(t/58)}for(let e=o[c];h>=r;e=Math.floor(e/58))d[h--]=e%58;return d},decode:e=>{n(e);let t=e.length;if(0===t)return new Uint8Array(0);if(t>=65536)throw Error("invalid length");let r=0;for(;r<t-1&&0===e[r];)r++;let i=new Uint16Array(Math.ceil(6*t/16)+1),a=0,s=0,o=t%5||5;for(;s<t;){let t=0,r=1;for(let n=s+o;s<n;s++){let n=e[s];if(n>=58)throw Error(`invalid integer: ${n}`);t=58*t+n,r*=58}o=5;let n=t;for(let e=0;e<a;e++){let t=i[e]*r+n;n=Math.floor(t/65536),i[e]=t-65536*n}for(;n>0;n=Math.floor(n/65536))i[a++]=n%65536}let l=new Uint8Array(r+(0===a?1:2*a-(i[a-1]<256))),c=l.length-1;for(let e=0;e<a;e++){let t=i[e];l[c--]=255&t,c>=r&&(l[c--]=t>>8)}return l}},s=Object.freeze(function(...e){let t=e=>e,r=(e,t)=>r=>e(t(r));return{encode:e.map(e=>e.encode).reduceRight(r,t),decode:e.map(e=>e.decode).reduce(r,t)}}(a,function(e,t){let r=e.length;if(r>128)throw Error("alphabet: max 128 letters");let n=new Uint8Array(r),a=new Int8Array(128).fill(-1);for(let t=0;t<r;t++){let r=e.charCodeAt(t);if(e.codePointAt(t)!==r||r>127)throw Error("alphabet: single-char ASCII letters only");n[t]=r,a[r]=t}return{encode:e=>{let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++){let i=e[r],a=n[i];if(void 0===a)throw Error(`alphabet.encode: invalid digit ${i}`);t[r]=a}let r=t.length;if(void 0!==i&&r>=12)return i.decode(t);if(r<=8192)return String.fromCharCode.apply(null,t);let a="";for(let e=0;e<r;e+=8192)a+=String.fromCharCode.apply(null,t.subarray(e,e+8192));return a},decode:t=>{var r=t;if("string"!=typeof r)throw TypeError("decode: string expected");let n=t.length,i=new Uint8Array(n);for(let r=0;r<n;r++){let n=t.charCodeAt(r),s=n<128?a[n]:-1;if(-1===s)throw Error(`Unknown letter "${t[r]}". Allowed: ${e}`);i[r]=s}return i}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"))),o=e=>s.encode(e),l=e=>s.decode(e)},14671:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.increaseTime=i;let n=r(27083);async function i(e,{seconds:t}){return await e.request({method:"evm_increaseTime",params:[(0,n.numberToHex)(t)]})}},14972:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertSize=o,t.fromHex=function(e,t){let r="string"==typeof t?{to:t}:t,n=r.to;
4132return"number"===n?u(e,r):"bigint"===n?l(e,r):"string"===n?d(e,r):"boolean"===n?c(e,r):(0,s.hexToBytes)(e,r)},t.hexToBigInt=l,t.hexToBool=c,t.hexToNumber=u,t.hexToString=d;let n=r(51674),i=r(29813),a=r(62704),s=r(60037);function o(e,{size:t}){if((0,i.size)(e)>t)throw new n.SizeOverflowError({givenSize:(0,i.size)(e),maxSize:t})}function l(e,t={}){let{signed:r}=t;t.size&&o(e,{size:t.size});let n=BigInt(e);if(!r)return n;let i=(e.length-2)/2;return n<=(1n<<8n*BigInt(i)-1n)-1n?n:n-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function c(e,t={}){let r=e;if(t.size&&(o(r,{size:t.size}),r=(0,a.trim)(r)),"0x00"===(0,a.trim)(r))return!1;if("0x01"===(0,a.trim)(r))return!0;throw new n.InvalidHexBooleanError(r)}function u(e,t={}){let r=l(e,t),i=Number(r);if(!Number.isSafeInteger(i))throw new n.IntegerOutOfRangeError({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${r}n`});return i}function d(e,t={}){let r=(0,s.hexToBytes)(e);return t.size&&(o(r,{size:t.size}),r=(0,a.trim)(r,{dir:"right"})),new TextDecoder().decode(r)}},15027:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodedLabelToLabelhash=function(e){if(66!==e.length||0!==e.indexOf("[")||65!==e.indexOf("]"))return null;let t=`0x${e.slice(1,65)}`;return(0,n.isHex)(t)?t:null};let n=r(80217)},15405:(e,t,r)=>{"use strict";r.d(t,{IP:()=>s,T8:()=>i,Ud:()=>a,Ws:()=>n});let n={WALLET_ID:"@appkit/wallet_id",WALLET_NAME:"@appkit/wallet_name",SOLANA_WALLET:"@appkit/solana_wallet",SOLANA_CAIP_CHAIN:"@appkit/solana_caip_chain",ACTIVE_CAIP_NETWORK_ID:"@appkit/active_caip_network_id",CONNECTED_SOCIAL:"@appkit/connected_social",CONNECTED_SOCIAL_USERNAME:"@appkit-wallet/SOCIAL_USERNAME",RECENT_WALLETS:"@appkit/recent_wallets",RECENT_WALLET:"@appkit/recent_wallet",DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",ACTIVE_NAMESPACE:"@appkit/active_namespace",CONNECTED_NAMESPACES:"@appkit/connected_namespaces",CONNECTION_STATUS:"@appkit/connection_status",SIWX_AUTH_TOKEN:"@appkit/siwx-auth-token",SIWX_NONCE_TOKEN:"@appkit/siwx-nonce-token",TELEGRAM_SOCIAL_PROVIDER:"@appkit/social_provider",NATIVE_BALANCE_CACHE:"@appkit/native_balance_cache",PORTFOLIO_CACHE:"@appkit/portfolio_cache",ENS_CACHE:"@appkit/ens_cache",IDENTITY_CACHE:"@appkit/identity_cache",PREFERRED_ACCOUNT_TYPES:"@appkit/preferred_account_types",CONNECTIONS:"@appkit/connections",DISCONNECTED_CONNECTOR_IDS:"@appkit/disconnected_connector_ids",HISTORY_TRANSACTIONS_CACHE:"@appkit/history_transactions_cache",TOKEN_PRICE_CACHE:"@appkit/token_price_cache",RECENT_EMAILS:"@appkit/recent_emails",LATEST_APPKIT_VERSION:"@appkit/latest_version",TON_WALLETS_CACHE:"@appkit/ton_wallets_cache"};function i(e){if(!e)throw Error("Namespace is required for CONNECTED_CONNECTOR_ID");return`@appkit/${e}:connected_connector_id`}let a={setItem(e,t){s()&&void 0!==t&&localStorage.setItem(e,t)},getItem(e){if(s())return localStorage.getItem(e)||void 0},removeItem(e){s()&&localStorage.removeItem(e)},clear(){s()&&localStorage.clear()}};function s(){return"undefined"!=typeof window&&"undefined"!=typeof localStorage}},15447:(e,t,r)=>{"use strict";r.d(t,{u:()=>i});var n=r(35261);async function i(e,{signal:t}={}){return new Promise((r,i)=>{if(t?.aborted)return void i((0,n.TY)(t));let a=()=>t?.removeEventListener("abort",o),s=setTimeout(()=>{a(),r()},e),o=()=>{clearTimeout(s),a(),i((0,n.TY)(t))};t?.addEventListener("abort",o,{once:!0})})}},15573:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.withRetry=function(e,{delay:t=100,retryCount:r=2,shouldRetry:a=()=>!0,signal:s}={}){return new Promise((o,l)=>{let c=async({count:u=0}={})=>{if(s?.aborted)return void l((0,n.getAbortError)(s));let d=async({error:e})=>{let r="function"==typeof t?t({count:u,error:e}):t;if(r)try{await (0,i.wait)(r,{signal:s})}catch(e){l(e);return}c({count:u+1})};try{let t=await e();o(t)}catch(e){if(s?.aborted)return void l((0,n.getAbortError)(s));if((0,n.isAbortError)(e))return void l(e);if(u<r&&await a({count:u,error:e}))return d({error:e});l(e)}};c()})};let n=r(5636),i=r(73206)},15748:(e,t)=>{"use strict";async function r(e,{interval:t}){let r="hardhat"===e.mode?1e3*t:t;await e.request({method:`${e.mode}_setBlockTimestampInterval`,params:[r]})}
4132Object.defineProperty(t,"__esModule",{value:!0}),t.setBlockTimestampInterval=r},15871:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getProof=a;let n=r(73506),i=r(62965);async function a(e,{address:t,blockHash:r,blockNumber:a,blockTag:s="latest",requireCanonical:o,storageKeys:l}){let c=(0,n.formatBlockParameter)({blockHash:r,blockNumber:a,blockTag:s,requireCanonical:o}),u=await e.request({method:"eth_getProof",params:[t,l,c]});return(0,i.formatProof)(u)}},16017:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767);let a=(0,n.JW)`<svg width="86" height="96" fill="none"> 4133 <path 4134 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" 4135 /> 4136</svg>`;var s=r(69705);let o=(0,n.JW)` 4137 <svg fill="none" viewBox="0 0 36 40"> 4138 <path 4139 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" 4140 /> 4141 </svg> 4142`;r(79909),r(39909);var l=r(46756),c=r(63412),u=r(91392);let d=(0,u.AH)` 4143 :host { 4144 position: relative; 4145 border-radius: inherit; 4146 display: flex; 4147 justify-content: center; 4148 align-items: center; 4149 width: var(--local-width); 4150 height: var(--local-height); 4151 } 4152 4153 :host([data-round='true']) { 4154 background: ${({tokens:e})=>e.theme.foregroundPrimary}; 4155 border-radius: 100%; 4156 outline: 1px solid ${({tokens:e})=>e.core.glass010}; 4157 } 4158 4159 svg { 4160 position: absolute; 4161 top: 0; 4162 left: 0; 4163 width: 100%; 4164 height: 100%; 4165 z-index: 1; 4166 } 4167 4168 svg > path { 4169 stroke: var(--local-stroke); 4170 } 4171 4172 wui-image { 4173 width: 100%; 4174 height: 100%; 4175 -webkit-clip-path: var(--local-path); 4176 clip-path: var(--local-path); 4177 background: ${({tokens:e})=>e.theme.foregroundPrimary}; 4178 } 4179 4180 wui-icon { 4181 transform: translateY(-5%); 4182 width: var(--local-icon-size); 4183 height: var(--local-icon-size); 4184 } 4185`;var h=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let p=class extends n.WF{constructor(){super(...arguments),this.size="md",this.name="uknown",this.networkImagesBySize={sm:o,md:s.a,lg:a},this.selected=!1,this.round=!1}render(){return this.round?(this.dataset.round="true",this.style.cssText=` 4186 --local-width: var(--apkt-spacing-10); 4187 --local-height: var(--apkt-spacing-10); 4188 --local-icon-size: var(--apkt-spacing-4); 4189 `):this.style.cssText=` 4190 4191 --local-path: var(--apkt-path-network-${this.size}); 4192 --local-width: var(--apkt-width-network-${this.size}); 4193 --local-height: var(--apkt-height-network-${this.size}); 4194 --local-icon-size: var(--apkt-spacing-${({sm:"4",md:"6",lg:"10"})[this.size]}); 4195 `,(0,n.qy)`${this.templateVisual()} ${this.svgTemplate()} `}svgTemplate(){return this.round?null:this.networkImagesBySize[this.size]}templateVisual(){return this.imageSrc?(0,n.qy)`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`:(0,n.qy)`<wui-icon size="inherit" color="default" name="networkPlaceholder"></wui-icon>`}};p.styles=[l.W5,d],h([(0,i.MZ)()],p.prototype,"size",void 0),h([(0,i.MZ)()],p.prototype,"name",void 0),h([(0,i.MZ)({type:Object})],p.prototype,"networkImagesBySize",void 0),h([(0,i.MZ)()],p.prototype,"imageSrc",void 0),h([(0,i.MZ)({type:Boolean})],p.prototype,"selected",void 0),h([(0,i.MZ)({type:Boolean})],p.prototype,"round",void 0),p=h([(0,c.E)("wui-network-image")],p)},16040:(e,t,r)=>{"use strict";r.d(t,{Vw:()=>c,Id:()=>l,O8:()=>a,po:()=>d,Ow:()=>s,ZJ:()=>o,DH:()=>i,ld:()=>u});let n="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,i=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),a=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),s=(e,t)=>e<<32-t|e>>>t;if(68!==new Uint8Array(new Uint32Array([0x11223344]).buffer)[0])throw Error("Non little-endian hardware is not supported");function o(e){if("string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}(e)),!(e instanceof Uint8Array))throw Error(`expected Uint8Array, got ${typeof e}`);return e}function l(...e){let t=new Uint8Array(e.reduce((e,t)=>
4195e+t.length,0)),r=0;return e.forEach(e=>{if(!(e instanceof Uint8Array))throw Error("Uint8Array expected");t.set(e,r),r+=e.length}),t}class c{clone(){return this._cloneInto()}}function u(e){let t=t=>e().update(o(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function d(e=32){if(n&&"function"==typeof n.getRandomValues)return n.getRandomValues(new Uint8Array(e));throw Error("crypto.getRandomValues must be defined")}},16105:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareEncodeFunctionData=function(e){let{abi:t,args:r,functionName:l}=e,c=t[0];if(l){let e=(0,s.getAbiItem)({abi:t,args:r,name:l});if(!e)throw new n.AbiFunctionNotFoundError(l,{docsPath:o});c=e}if("function"!==c.type)throw new n.AbiFunctionNotFoundError(void 0,{docsPath:o});return{abi:[c],functionName:(0,i.toFunctionSelector)((0,a.formatAbiItem)(c))}};let n=r(82311),i=r(16936),a=r(71680),s=r(61569),o="/docs/contract/encodeFunctionData"},16493:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAGIC_VALUE_BYTES=t.MAGIC_VALUE=void 0,t.MAGIC_VALUE="0x1626ba7e",t.MAGIC_VALUE_BYTES="0x20c13b0b"},16936:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toFunctionSelector=void 0;let n=r(4906),i=r(26929);t.toFunctionSelector=e=>(0,n.slice)((0,i.toSignatureHash)(e),0,4)},17052:(e,t,r)=>{"use strict";r.d(t,{A:()=>h,X:()=>f});var n=r(91004),i=r(36442),a=r(33432),s=r(77909),o=r(18627);let l=Object.freeze({enabled:!0,events:[]}),c=new s.Z({baseUrl:a.w.getAnalyticsUrl(),clientId:null}),u=(0,n.BX)({...l}),d={state:u,subscribeKey:(e,t)=>(0,i.u$)(u,e,t),async sendError(e,t){if(!u.enabled)return;let r=Date.now();if(u.events.filter(e=>r-new Date(e.properties.timestamp||"").getTime()<6e4).length>=5)return;let n={type:"error",event:t,properties:{errorType:e.name,errorMessage:e.message,stackTrace:e.stack,timestamp:new Date().toISOString()}};u.events.push(n);try{if("undefined"==typeof window)return;let{projectId:r,sdkType:n,sdkVersion:i}=o.H.state;await c.post({path:"/e",params:{projectId:r,st:n,sv:i||"html-wagmi-4.2.2"},body:{eventId:a.w.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:new Date().toISOString(),props:{type:"error",event:t,errorType:e.name,errorMessage:e.message,stackTrace:e.stack}}})}catch{}},enable(){u.enabled=!0},disable(){u.enabled=!1},clearEvents(){u.events=[]}};
4195class h extends Error{constructor(e,t,r){super(e),this.originalName="AppKitError",this.name="AppKitError",this.category=t,this.originalError=r,r&&r instanceof Error&&(this.originalName=r.name),Object.setPrototypeOf(this,h.prototype);let n=!1;if(r instanceof Error&&"string"==typeof r.stack&&r.stack){let e=r.stack,t=e.indexOf("\n");if(t>-1){let r=e.substring(t+1);this.stack=`${this.name}: ${this.message} 4196${r}`,n=!0}}!n&&(Error.captureStackTrace?Error.captureStackTrace(this,h):this.stack||(this.stack=`${this.name}: ${this.message}`))}}function p(e,t){let r="";try{r=e instanceof Error?e.message:"string"==typeof e?e:"object"==typeof e&&null!==e?0===Object.keys(e).length?"Unknown error":e?.message||JSON.stringify(e):String(e)}catch(e){r="Unknown error",console.error("Error parsing error message",e)}let n=e instanceof h?e:new h(r,t,e);throw d.sendError(n,n.category),n}function f(e,t="INTERNAL_SDK_ERROR"){let r={};return Object.keys(e).forEach(n=>{let i=e[n];if("function"==typeof i){let e=i;e="AsyncFunction"===i.constructor.name?async(...e)=>{try{return await i(...e)}catch(e){return p(e,t)}}:(...e)=>{try{return i(...e)}catch(e){return p(e,t)}},r[n]=e}else r[n]=i}),r}},17129:(e,t,r)=>{let n=r(1399),i=r(33373);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw Error("Invalid mode: "+e);if(!n.isValid(t))throw Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,r){if(t.isValid(e))return e;try{if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw Error("Unknown mode: "+e)}}catch(e){return r}}},17207:(e,t,r)=>{let n=r(21823).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];let t=Math.floor(e/7)+2,r=n(e),i=145===r?26:2*Math.ceil((r-13)/(2*t-2)),a=[r-7];for(let e=1;e<t-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},t.getPositions=function(e){let r=[],n=t.getRowColCoords(e),i=n.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)(0!==e||0!==t)&&(0!==e||t!==i-1)&&(e!==i-1||0!==t)&&r.push([n[e],n[t]]);return r}},17208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeoutError=t.SocketClosedError=t.RpcRequestError=t.WebSocketRequestError=t.ResponseBodyTooLargeError=t.HttpRequestError=void 0;let n=r(68508),i=r(45226),a=r(5636);class s extends i.BaseError{constructor({body:e,cause:t,details:r,headers:i,status:s,url:o}){super("HTTP request failed.",{cause:t,details:r,metaMessages:[s&&`Status: ${s}`,`URL: ${(0,a.getUrl)(o)}`,e&&`Request body: ${(0,n.stringify)(e)}`].filter(Boolean),name:"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=i,this.status=s,this.url=o}}t.HttpRequestError=s;class o extends i.BaseError{constructor({maxSize:e,size:t}){super("HTTP response body exceeded the size limit.",{metaMessages:[`Max: ${e} bytes`,`Received: ${t} bytes`],name:"ResponseBodyTooLargeError"}),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e,this.size=t}}t.ResponseBodyTooLargeError=o;class l extends i.BaseError{constructor({body:e,cause:t,details:r,url:i}){super("WebSocket request failed.",{cause:t,details:r,metaMessages:[`URL: ${(0,a.getUrl)(i)}`,e&&`Request body: ${(0,n.stringify)(e)}
4196`].filter(Boolean),name:"WebSocketRequestError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=i}}t.WebSocketRequestError=l;class c extends i.BaseError{constructor({body:e,error:t,url:r}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,a.getUrl)(r)}`,`Request body: ${(0,n.stringify)(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{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,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code,this.data=t.data,this.url=r}}t.RpcRequestError=c;class u extends i.BaseError{constructor({url:e}={}){super("The socket has been closed.",{metaMessages:[e&&`URL: ${(0,a.getUrl)(e)}`].filter(Boolean),name:"SocketClosedError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=e}}t.SocketClosedError=u;class d extends i.BaseError{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,a.getUrl)(t)}`,`Request body: ${(0,n.stringify)(e)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=t}}t.TimeoutError=d},17456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.labelhash=function(e){let t=new Uint8Array(32).fill(0);return e?(0,s.encodedLabelToLabelhash)(e)||(0,a.keccak256)((0,n.stringToBytes)(e)):(0,i.bytesToHex)(t)};let n=r(60037),i=r(27083),a=r(4319),s=r(15027)},17515:(e,t)=>{"use strict";async function r(e){return BigInt(await e.request({method:"eth_blobBaseFee"}))}Object.defineProperty(t,"__esModule",{value:!0}),t.getBlobBaseFee=r},17568:(e,t,r)=>{let n=r(88786);t.mul=function(e,t){let r=new Uint8Array(e.length+t.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<t.length;a++)r[i+a]^=n.mul(e[i],t[a]);return r},t.mod=function(e,t){let r=new Uint8Array(e);for(;r.length-t.length>=0;){let e=r[0];for(let i=0;i<t.length;i++)r[i]^=n.mul(t[i],e);let i=0;for(;i<r.length&&0===r[i];)i++;r=r.slice(i)}return r},t.generateECPolynomial=function(e){let r=new Uint8Array([1]);for(let i=0;i<e;i++)r=t.mul(r,new Uint8Array([1,n.exp(i)]));return r}},17617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toFunctionSignature=void 0;var n=r(13745);Object.defineProperty(t,"toFunctionSignature",{enumerable:!0,get:function(){return n.toSignature}})},17683:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidParenthesisError=void 0;let n=r(86737);class i extends n.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"})}}t.InvalidParenthesisError=i},17732:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transfer=c;let n=r(91472),i=r(4466),a=r(7746),s=r(77081),o=r(42350),l=r(55498);async function c(e,t){return c.inner(o.writeContract,e,t)}!function(e){async function t(t,r,n){return await t(r,{...n,...e.call(r,n)})}async function r(t,r){return(0,a.estimateContractGas)(t,{...(0,l.pickWriteParameters)(r),...e.call(t,r)})}async function o(t,r){return(0,s.simulateContract)(t,{...(0,l.pickWriteParameters)(r),...e.call(t,r)})}e.inner=t,e.call=function(e,t){return(0,l.defineCall)(function(e,t){let{amount:r,from:i,to:a,token:s}=t,{address:o,decimals:c}=(0,l.resolveToken)(e,{token:s}),u=(0,l.toBaseUnits)(r,c);return i?{abi:n.erc20Abi,address:o,args:[i,a,u],functionName:"transferFrom"}:{abi:n.erc20Abi,address:o,args:[a,u],functionName:"transfer"}}(e,t))},e.estimateGas=r,e.simulate=o,e.extractEvent=function(e){let[t]=(0,i.parseEventLogs)({abi:n.erc20Abi,logs:e,eventName:"Transfer",strict:!0});if(!t)throw Error("`Transfer` event not found.");return t}}(c||(t.transfer=c={}))},18028:(e,t,r)=>{e.exports=r(35723)("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},18577:(e,t,r)=>{"use strict";r.d(t,{R:()=>C});var n=r(91004),i=r(36442),a=r(43850),s=r(12050),o=r(57873),l=r(53344),c=r(47482),u=r(71016),d=r(89188),h=r(81920),p=r(33432),f=r(73688),m=r(17052),g=r(82376),y=r(36071),b=r(42242),w=r(26274),v=r(82875);let E=(0,n.BX)({tokenBalances:[],loading:!1}
4196),C=(0,m.X)({state:E,subscribe:e=>(0,n.B1)(E,()=>e(E)),subscribeKey:(e,t)=>(0,i.u$)(E,e,t),setToken(e){e&&(E.token=(0,n.KR)(e))},setTokenAmount(e){E.sendTokenAmount=e},setReceiverAddress(e){E.receiverAddress=e},setReceiverProfileImageUrl(e){E.receiverProfileImageUrl=e},setReceiverProfileName(e){E.receiverProfileName=e},setNetworkBalanceInUsd(e){E.networkBalanceInUSD=e},setLoading(e){E.loading=e},getSdkEventProperties:e=>({message:p.w.parseError(e),isSmartAccount:(0,d.lj)(g.W.state.activeChain)===c.Vl.ACCOUNT_TYPES.SMART_ACCOUNT,token:E.token?.symbol||"",amount:Number(E.sendTokenAmount??"0"),network:g.W.state.activeCaipNetwork?.caipNetworkId||""}),async sendToken(){try{switch(C.setLoading(!0),g.W.state.activeCaipNetwork?.chainNamespace){case"eip155":await C.sendEvmToken();return;case"solana":await C.sendSolanaToken();return;default:throw Error("Unsupported chain")}}catch(e){if(a.RQ.isUserRejectedRequestError(e))throw new a.vx(e);throw e}finally{C.setLoading(!1)}},async sendEvmToken(){let e=g.W.state.activeChain;if(!e)throw Error("SendController:sendEvmToken - activeChainNamespace is required");let t=(0,d.lj)(e);if(!C.state.sendTokenAmount||!C.state.receiverAddress)throw Error("An amount and receiver address are required");if(!C.state.token)throw Error("A token is required");if(C.state.token?.address){b.E.sendEvent({type:"track",event:"SEND_INITIATED",properties:{isSmartAccount:t===c.Vl.ACCOUNT_TYPES.SMART_ACCOUNT,token:C.state.token.address,amount:Number(C.state.sendTokenAmount),network:g.W.state.activeCaipNetwork?.caipNetworkId||""}});let{hash:e}=await C.sendERC20Token({receiverAddress:C.state.receiverAddress,tokenAddress:C.state.token.address,sendTokenAmount:C.state.sendTokenAmount,decimals:C.state.token.quantity.decimals});e&&(E.hash=e)}else{b.E.sendEvent({type:"track",event:"SEND_INITIATED",properties:{isSmartAccount:t===c.Vl.ACCOUNT_TYPES.SMART_ACCOUNT,token:C.state.token.symbol||"",amount:Number(C.state.sendTokenAmount),network:g.W.state.activeCaipNetwork?.caipNetworkId||""}});let{hash:e}=await C.sendNativeToken({receiverAddress:C.state.receiverAddress,sendTokenAmount:C.state.sendTokenAmount,decimals:C.state.token.quantity.decimals});e&&(E.hash=e)}},async fetchTokenBalance(e){E.loading=!0;let t=g.W.state.activeChain,r=g.W.state.activeCaipNetwork?.caipNetworkId,n=g.W.state.activeCaipNetwork?.chainNamespace,i=g.W.getAccountData(t)?.caipAddress??g.W.state.activeCaipAddress,a=i?p.w.getPlainAddress(i):void 0;if(E.lastRetry&&!p.w.isAllowedRetry(E.lastRetry,30*h.oU.ONE_SEC_MS))return E.loading=!1,[];try{if(a&&r&&n){let e=await u.Z.getMyTokensWithBalance();return E.tokenBalances=e,E.lastRetry=void 0,e}}catch(t){E.lastRetry=Date.now(),e?.(t),v.P.showError("Token Balance Unavailable")}finally{E.loading=!1}return[]},fetchNetworkBalance(){if(0===E.tokenBalances.length)return;let e=f.s.mapBalancesToSwapTokens(E.tokenBalances);if(!e)return;let t=e.find(e=>e.address===(0,d.K1)());t&&(E.networkBalanceInUSD=t?s.S.multiply(t.quantity.numeric,t.price).toString():"0")},async sendNativeToken(e){w.I.pushTransactionStack({});let t=e.receiverAddress,r=g.W.getAccountData()?.address,n=y.x.parseUnits(e.sendTokenAmount.toString(),Number(e.decimals)),i=await y.x.sendTransaction({chainNamespace:o.o.CHAIN.EVM,to:t,address:r,data:"0x",value:n??BigInt(0)});return b.E.sendEvent({type:"track",event:"SEND_SUCCESS",properties:{isSmartAccount:(0,d.lj)("eip155")===c.Vl.ACCOUNT_TYPES.SMART_ACCOUNT,token:C.state.token?.symbol||"",amount:Number(e.sendTokenAmount),network:g.W.state.activeCaipNetwork?.caipNetworkId||"",hash:i||""}}),y.x._getClient()?.updateBalance("eip155"),C.resetSend(),{hash:i}},async sendERC20Token(e){w.I.pushTransactionStack({onSuccess(){w.I.replace("Account")}});let t=y.x.parseUnits(e.sendTokenAmount.toString(),Number(e.decimals)),r=g.W.getAccountData()?.address;if(r&&e.sendTokenAmount&&e.receiverAddress&&e.tokenAddress){let n=p.w.getPlainAddress(e.tokenAddress);if(!n)throw Error("SendController:sendERC20Token - tokenAddress is required");let i=await y.x.writeContract({fromAddress:r,tokenAddress:n,args:[e.receiverAddress,t??BigInt(0)],method:"transfer",abi:l.v.getERC20Abi(n),chainNamespace:o.o.CHAIN.EVM});return b.E.sendEvent({type:"track",event:"SEND_SUCCESS",properties:{isSmartAccount:(0,d.lj)("eip155")===c.Vl.ACCOUNT_TYPES.SMART_ACCOUNT,token:C.state.token?.symbol||"",amount:Number(e.sendTokenAmount),network:g.W.state.activeCaipNetwork?.caipNetworkId||"",hash:i||""}}),C.resetSend(),{hash:i}}return{hash:void 0}},async sendSolanaToken(){let e;if(!C.state.sendTokenAmount||!C.state.receiverAddress)throw Error("An amount and receiver address are required");w.I.pushTransactionStack({onSuccess(){w.I.replace("Account")}}),C.state.token&&C.state.token.address!==h.oU.SOLANA_NATIVE_TOKEN_ADDRESS&&(e=p.w.isCaipAddress(C.state.token.address)?p.w.getPlainAddress(C.state.token.address):C.state.token.address);let t=await y.x.sendTransaction({chainNamespace:"solana",tokenMint:e,to:C.state.receiverAddress,value:Number(C.state.sendTokenAmount)});t&&(E.hash=t),y.x._getClient()?.updateBalance("solana"),b.E.sendEvent({type:"track",event:"SEND_SUCCESS",properties:{isSmartAccount:!1,token:C.state.token?.symbol||"",amount:Number(C.state.sendTokenAmount),network:g.W.state.activeCaipNetwork?.caipNetworkId||"",hash:t||""}}),C.resetSend()},resetSend(){E.token=void 0,E.sendTokenAmount=void 0,E.receiverAddress=void 0,E.receiverProfileImageUrl=void 0,E.receiverProfileName=void 0,E.loading=!1,E.tokenBalances=[]}})},18627:(e,t,r)=>{"use strict";r.d(t,{H:()=>c});var n=r(91004),i=r(36442),a=r(81920),s=r(33432),o=r(35763);let l=(0,n.BX)({features:a.oU.DEFAULT_FEATURES,projectId:"",sdkType:"appkit",sdkVersion:"html-wagmi-undefined",defaultAccountTypes:a.oU.DEFAULT_ACCOUNT_TYPES,enableNetworkSwitch:!0,experimental_preferUniversalLinks:!1,remoteFeatures:{},enableMobileFullScreen:!1,coinbasePreference:"all"}),c={state:l,subscribeKey:(e,t)=>(0,i.u$)(l,e,t),setOptions(e){Object.assign(l,e)},setRemoteFeatures(e){if(!e)return;let t={...l.remoteFeatures,...e};l.remoteFeatures=t,l.remoteFeatures?.socials&&(l.remoteFeatures.socials=o.D.filterS
4196ocialsByPlatform(l.remoteFeatures.socials)),l.features?.pay&&(l.remoteFeatures.email=!1,l.remoteFeatures.socials=!1)},setFeatures(e){if(!e)return;l.features||(l.features=a.oU.DEFAULT_FEATURES);let t={...l.features,...e};l.features=t,l.features?.pay&&l.remoteFeatures&&(l.remoteFeatures.email=!1,l.remoteFeatures.socials=!1)},setProjectId(e){l.projectId=e},setCustomRpcUrls(e){l.customRpcUrls=e},setAllWallets(e){l.allWallets=e},setIncludeWalletIds(e){l.includeWalletIds=e},setExcludeWalletIds(e){l.excludeWalletIds=e},setFeaturedWalletIds(e){l.featuredWalletIds=e},setTokens(e){l.tokens=e},setTermsConditionsUrl(e){l.termsConditionsUrl=e},setPrivacyPolicyUrl(e){l.privacyPolicyUrl=e},setCustomWallets(e){l.customWallets=e},setIsSiweEnabled(e){l.isSiweEnabled=e},setIsUniversalProvider(e){l.isUniversalProvider=e},setSdkVersion(e){l.sdkVersion=e},setMetadata(e){l.metadata=e},setDisableAppend(e){l.disableAppend=e},setEIP6963Enabled(e){l.enableEIP6963=e},setEnableInjected(e){l.enableInjected=e},setEnableCoinbase(e){l.enableCoinbase=e},setEnableBaseAccount(e){l.enableBaseAccount=e},setDebug(e){l.debug=e},setEnableWalletGuide(e){l.enableWalletGuide=e},setEnableAuthLogger(e){l.enableAuthLogger=e},setEnableWallets(e){l.enableWallets=e},setPreferUniversalLinks(e){l.experimental_preferUniversalLinks=e},setSIWX(e){if(e)for(let[t,r]of Object.entries(a.oU.SIWX_DEFAULTS))e[t]??=r;l.siwx=e},setConnectMethodsOrder(e){l.features={...l.features,connectMethodsOrder:e}},setWalletFeaturesOrder(e){l.features={...l.features,walletFeaturesOrder:e}},setSocialsOrder(e){l.remoteFeatures={...l.remoteFeatures,socials:e}},setCollapseWallets(e){l.features={...l.features,collapseWallets:e}},setEnableEmbedded(e){l.enableEmbedded=e},setAllowUnsupportedChain(e){l.allowUnsupportedChain=e},setManualWCControl(e){l.manualWCControl=e},setEnableNetworkSwitch(e){l.enableNetworkSwitch=e},setEnableMobileFullScreen(e){l.enableMobileFullScreen=s.w.isMobile()&&e},setEnableReconnect(e){l.enableReconnect=e},setCoinbasePreference(e){l.coinbasePreference=e},setDefaultAccountTypes(e={}){Object.entries(e).forEach(([e,t])=>{t&&(l.defaultAccountTypes[e]=t)})},setUniversalProviderConfigOverride(e){l.universalProviderConfigOverride=e},getUniversalProviderConfigOverride:()=>l.universalProviderConfigOverride,getSnapshot:()=>(0,n.P9)(l)}},18697:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.estimateMaxPriorityFeePerGas=l,t.internal_estimateMaxPriorityFeePerGas=c;let n=r(75445),i=r(14972),a=r(95847),s=r(70200),o=r(66629);async function l(e,t){return c(e,t)}async function c(e,t){let{block:r,chain:l=e.chain,request:c}=t||{};try{let t=l?.fees?.maxPriorityFeePerGas??l?.fees?.defaultPriorityFee;if("function"==typeof t){let n=r||await (0,a.getAction)(e,s.getBlock,"getBlock")({}),i=await t({block:n,client:e,request:c});if(null===i)throw Error();return i}if(void 0!==t)return t;let n=await e.request({method:"eth_maxPriorityFeePerGas"});return(0,i.hexToBigInt)(n)}catch{let[t,i]=await Promise.all([r?Promise.resolve(r):(0,a.getAction)(e,s.getBlock,"getBlock")({}),(0,a.getAction)(e,o.getGasPrice,"getGasPrice")({})]);if("bigint"!=typeof t.baseFeePerGas)throw new n.Eip1559FeesNotSupportedError;let l=i-t.baseFeePerGas;if(l<0n)return 0n;return l}}},18731:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signMessage=s;let n=r(83562),i=r(85926),a=r(27083);async function s(e,{account:t=e.account,message:r}){if(!t)throw new i.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});let s=(0,n.parseAccount)(t);if(s.signMessage)return s.signMessage({message:r});let o="string"==typeof r?(0,a.stringToHex)(r):r.raw instanceof Uint8Array?(0,a.toHex)(r.raw):r.raw;return e.request({method:"personal_sign",params:[o,s.address]},{retryCount:0})}},18893:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mine=i;let n=r(27083);async function i(e,{blocks:t,interval:r}){"ganache"===e.mode?await e.request({method:"evm_mine",params:[{blocks:(0,n.numberToHex)(t)}]}):await e.request({method:`${e.mode}_mine`,params:[(0,n.numberToHex)(t),(0,n.numberToHex)(r||0)]})}},18957:(e,t,r)=>{"use strict";
4196Object.defineProperty(t,"__esModule",{value:!0}),t.fallback=function(e,t={}){let{key:r="fallback",name:n="Fallback",rank:i=!1,shouldThrow:a=o,retryCount:c,retryDelay:u}=t;return({chain:t,pollingInterval:o=4e3,timeout:d,...h})=>{let p=e,f=()=>{},m=(0,s.createTransport)({key:r,name:n,async request({method:e,params:r}){let n,i=async(s=0)=>{let o=p[s]({...h,chain:t,retryCount:0,timeout:d});try{let t=await o.request({method:e,params:r});return f({method:e,params:r,response:t,transport:o,status:"success"}),t}catch(l){if(f({error:l,method:e,params:r,transport:o,status:"error"}),a(l)||s===p.length-1||!(n??=p.slice(s+1).some(r=>{let{include:n,exclude:i}=r({chain:t}).config.methods||{};return n?n.includes(e):!i||!i.includes(e)})))throw l;return i(s+1)}};return i()},retryCount:c,retryDelay:u,type:"fallback"},{onResponse:e=>f=e,transports:p.map(e=>e({chain:t,retryCount:0}))});if(i){let e="object"==typeof i?i:{};l({chain:t,interval:e.interval??o,onTransports:e=>p=e,ping:e.ping,sampleCount:e.sampleCount,timeout:e.timeout,transports:p,weights:e.weights})}return m}},t.shouldThrow=o,t.rankTransports=l;let n=r(80779),i=r(69902),a=r(73206),s=r(3603);function o(e){return!!("code"in e&&"number"==typeof e.code&&(e.code===i.TransactionRejectedRpcError.code||e.code===i.UserRejectedRequestError.code||e.code===i.WalletConnectSessionSettlementError.code||n.ExecutionRevertedError.nodeMessage.test(e.message)||5e3===e.code))}function l({chain:e,interval:t=4e3,onTransports:r,ping:n,sampleCount:i=10,timeout:s=1e3,transports:o,weights:l={}}){let{stability:c=.7,latency:u=.3}=l,d=[],h=async()=>{let l=await Promise.all(o.map(async t=>{let r,i,a=t({chain:e,retryCount:0,timeout:s}),o=Date.now();try{await (n?n({transport:a}):a.request({method:"net_listening"})),i=1}catch{i=0}finally{r=Date.now()}return{latency:r-o,success:i}}));d.push(l),d.length>i&&d.shift();let p=Math.max(...d.map(e=>Math.max(...e.map(({latency:e})=>e))));r(o.map((e,t)=>{let r=d.map(e=>e[t].latency),n=r.reduce((e,t)=>e+t,0)/r.length,i=d.map(e=>e[t].success),a=i.reduce((e,t)=>e+t,0)/i.length;return 0===a?[0,t]:[u*(1-n/p)+c*a,t]}).sort((e,t)=>t[0]-e[0]).map(([,e])=>
4196o[e])),await (0,a.wait)(t),h()};h()}},18978:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAddressEqual=function(e,t){if(!(0,i.isAddress)(e,{strict:!1}))throw new n.InvalidAddressError({address:e});if(!(0,i.isAddress)(t,{strict:!1}))throw new n.InvalidAddressError({address:t});return e.toLowerCase()===t.toLowerCase()};let n=r(9301),i=r(63402)},19016:(e,t)=>{"use strict";async function r(e,t){await e.request({method:`${e.mode}_setLoggingEnabled`,params:[t]})}Object.defineProperty(t,"__esModule",{value:!0}),t.setLoggingEnabled=r},19068:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverPublicKey=o;let n=r(80217),i=r(29813),a=r(14972),s=r(27083);async function o({hash:e,signature:t}){let o=(0,n.isHex)(e)?e:(0,s.toHex)(e),{secp256k1:c}=await Promise.resolve().then(()=>r(6792)),u=(()=>{if("object"==typeof t&&"r"in t&&"s"in t){let{r:e,s:r,v:n,yParity:i}=t,s=l(Number(i??n));return new c.Signature((0,a.hexToBigInt)(e),(0,a.hexToBigInt)(r)).addRecoveryBit(s)}let e=(0,n.isHex)(t)?t:(0,s.toHex)(t);if(65!==(0,i.size)(e))throw Error("invalid signature length");let r=l((0,a.hexToNumber)(`0x${e.slice(130)}`));return c.Signature.fromCompact(e.substring(2,130)).addRecoveryBit(r)})().recoverPublicKey(o.substring(2)).toHex(!1);return`0x${u}`}function l(e){if(0===e||1===e)return e;if(27===e)return 0;if(28===e)return 1;throw Error("Invalid yParityOrV value")}},19559:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidWrappedSignatureError=t.suffixParameters=t.magicBytes=void 0,t.assert=c,t.from=function(e){return"string"==typeof e?u(e):e},t.unwrap=u,t.wrap=function(e){let{data:r,signature:a}=e;c(e);let u=o.recoverAddress({payload:i.getSignPayload(e.authorization),signature:l.from(e.authorization)}),d=n.encode(t.suffixParameters,[{...e.authorization,delegation:e.authorization.address,chainId:BigInt(e.authorization.chainId)},e.to??u,r??"0x"]),h=s.fromNumber(s.size(d),{size:32});return s.concat(a,d,h,t.magicBytes)},t.validate=function(e){try{return c(e),!0}catch{return!1}};let n=r(57300),i=r(99727),a=r(53937),s=r(70259),o=r(40690),l=r(42288);function c(e){if("string"==typeof e){if(s.slice(e,-32)!==t.magicBytes)throw new d(e)}else l.assert(e.authorization)}function u(e){c(e);let r=s.toNumber(s.slice(e,-64,-32)),a=s.slice(e,-r-64,-64),o=s.slice(e,0,-r-64),[l,u,d]=n.decode(t.suffixParameters,a);return{authorization:i.from({address:l.delegation,chainId:Number(l.chainId),nonce:l.nonce,yParity:l.yParity,r:l.r,s:l.s}),signature:o,...d&&"0x"!==d?{data:d,to:u}:{}}}t.magicBytes="0x8010801080108010801080108010801080108010801080108010801080108010",t.suffixParameters=n.from("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");class d extends a.BaseError{constructor(e){super(`Value \`${e}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}}t.InvalidWrappedSignatureError=d},19748:(e,t,r)=>{"use strict";r.d(t,{Fl:()=>a,NV:()=>s,ii:()=>i});var n=r(81742);class i extends n.C{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}}class a extends n.C{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}class s extends n.C{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.`,{name:"InvalidBytesLengthError"})}}},19775:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.versionedHashVersionKzg=void 0,t.versionedHashVersionKzg=1},19941:(e,t,r)=>{let n=r(98407);function i(e,t){let r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function a(e,t,r){let n=e+t;return void 0!==r&&(n+=" "+r),n}t.render=function(e,t,r){let s=n.getOptions(t),o=e.modules.size,l=e.modules.data,c=o+2*s.margin,u=s.color.light.a?"<path "+i(s.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",d="<path "+i(s.color.dark,"stroke")+' d="'+function(e,t,r){let n="",i=0,s=!1,o=0;for(let l=0;l<e.length;l++){let c=Math.floor(l%t),u=Math.floor(l/t);c||s||(s=!0),e[l]?(o++,l>0&&c>0&&e[l-1]||(n+=s?a("M",c+r,.5+u+r):a("m",i,0),i=0,s=!1),c+1<t&&e[l+1]||(n+=a("h",o),o=0)):i++}return n}(l,o,s.margin)+'"/>',h='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+('viewB
4196ox="0 0 '+c+" ")+c+'" shape-rendering="crispEdges">'+u+d+"</svg>\n";return"function"==typeof r&&r(null,h),h}},20134:(e,t,r)=>{"use strict";r.d(t,{aG:()=>g});var n=r(91004),i=r(36442),a=r(57873),s=r(81920),o=r(17052),l=r(79561),c=r(45283),u=r(82376),d=r(18627);let h={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"}]},p={id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},f={providers:s.tM,selectedProvider:null,error:null,purchaseCurrency:h,paymentCurrency:p,purchaseCurrencies:[h],paymentCurrencies:[],quotesLoading:!1},m=(0,n.BX)(f),g=(0,o.X)({state:m,subscribe:e=>(0,n.B1)(m,()=>e(m)),subscribeKey:(e,t)=>(0,i.u$)(m,e,t),setSelectedProvider(e){if(e&&"meld"===e.name){let t=u.W.state.activeChain,r=t===a.o.CHAIN.SOLANA?"SOL":"USDC",n=t?u.W.state.chains.get(t)?.accountState?.address??"":"",i=new URL(e.url);i.searchParams.append("publicKey",s.Db),i.searchParams.append("destinationCurrencyCode",r),i.searchParams.append("walletAddress",n),i.searchParams.append("externalCustomerId",d.H.state.projectId),m.selectedProvider={...e,url:i.toString()}}else m.selectedProvider=e},setOnrampProviders(e){Array.isArray(e)&&e.every(e=>"string"==typeof e)?m.providers=s.tM.filter(t=>e.includes(t.name)):m.providers=[]},setPurchaseCurrency(e){m.purchaseCurrency=e},setPaymentCurrency(e){m.paymentCurrency=e},setPurchaseAmount(e){g.state.purchaseAmount=e},setPaymentAmount(e){g.state.paymentAmount=e},async getAvailableCurrencies(){let e=await c.T.getOnrampOptions();m.purchaseCurrencies=e.purchaseCurrencies,m.paymentCurrencies=e.paymentCurrencies,m.paymentCurrency=e.paymentCurrencies[0]||p,m.purchaseCurrency=e.purchaseCurrencies[0]||h,await l.N.fetchCurrencyImages(e.paymentCurrencies.map(e=>e.id)),await l.N.fetchTokenImages(e.purchaseCurrencies.map(e=>e.symbol))},async getQuote(){m.quotesLoading=!0;try{let e=await c.T.getOnrampQuote({purchaseCurrency:m.purchaseCurrency,paymentCurrency:m.paymentCurrency,amount:m.paymentAmount?.toString()||"0",network:m.purchaseCurrency?.symbol});return m.quotesLoading=!1,m.purchaseAmount=Number(e?.purchaseAmount.amount),e}catch(e){return m.error=e.message,m.quotesLoading=!1,null}finally{m.quotesLoading=!1}},resetState(){m.selectedProvider=null,m.error=null,m.purchaseCurrency=h,m.paymentCurrency=p,m.purchaseCurrencies=[h],m.paymentCurrencies=[],m.paymentAmount=void 0,m.purchaseAmount=void 0,m.quotesLoading=!1}})},20155:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeFunctionResult=function(e){let{abi:t,functionName:r,result:o}=e,l=t[0];if(r){let e=(0,a.getAbiItem)({abi:t,name:r});if(!e)throw new n.AbiFunctionNotFoundError(r,{docsPath:s});l=e}if("function"!==l.type)throw new n.AbiFunctionNotFoundError(void 0,{docsPath:s});if(!l.outputs)throw new n.AbiFunctionOutputsNotFoundError(l.name,{docsPath:s});let c=(()=>{if(0===l.outputs.length)return[];if(1===l.outputs.length)return[o];if(Array.isArray(o))return o;throw new n.InvalidArrayError(o)})();return(0,i.encodeAbiParameters)(l.outputs,c)};let n=r(82311),i=r(66008),a=r(61569),s="/docs/contract/encodeFunctionResult"},20240:function(e,t,r){"use strict";var n=r(44168).Buffer,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}
vendor: 4,909 bytes, line 4196
4196,o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&i(t,e,r);return a(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.deserializeUnchecked=t.deserialize=t.serialize=t.BinaryReader=t.BinaryWriter=t.BorshError=t.baseDecode=t.baseEncode=void 0;let c=l(r(94056)),u=l(r(18028)),d=o(r(46076)),h=new("function"!=typeof TextDecoder?d.TextDecoder:TextDecoder)("utf-8",{fatal:!0});t.baseEncode=function(e){return"string"==typeof e&&(e=n.from(e,"utf8")),u.default.encode(n.from(e))},t.baseDecode=function(e){return n.from(u.default.decode(e))};class p extends Error{constructor(e){super(e),this.fieldPath=[],this.originalMessage=e}addToFieldPath(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}t.BorshError=p;class f{constructor(){this.buf=n.alloc(1024),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=n.concat([this.buf,n.alloc(1024)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(n.from(new c.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(n.from(new c.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(n.from(new c.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(n.from(new c.default(e).toArray("le",64)))}writeBuffer(e){this.buf=n.concat([n.from(this.buf.subarray(0,this.length)),e,n.alloc(1024)]),this.length+=e.length}writeString(e){this.maybeResize();let t=n.from(e,"utf8");this.writeU32(t.length),this.writeBuffer(t)}writeFixedArray(e){this.writeBuffer(n.from(e))}writeArray(e,t){for(let r of(this.maybeResize(),this.writeU32(e.length),e))this.maybeResize(),t(r)}toArray(){return this.buf.subarray(0,this.length)}}function m(e,t,r){let n=r.value;r.value=function(...e){try{return n.apply(this,e)}catch(e){if(e instanceof RangeError&&["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(e.code)>=0)throw new p("Reached the end of buffer when deserializing");throw e}}}t.BinaryWriter=f;class g{constructor(e){this.buf=e,this.offset=0}readU8(){let e=this.buf.readUInt8(this.offset);return this.offset+=1,e}readU16(){let e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}readU32(){let e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}readU64(){let e=this.readBuffer(8);return new c.default(e,"le")}readU128(){let e=this.readBuffer(16);return new c.default(e,"le")}readU256(){let e=this.readBuffer(32);return new c.default(e,"le")}readU512(){let e=this.readBuffer(64);return new c.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new p(`Expected buffer length ${e} isn't within bounds`);let t=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,t}readString(){let e=this.readU32(),t=this.readBuffer(e);try{return h.decode(t)}catch(e){throw new p(`Error decoding UTF-8 string: ${e}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){let t=this.readU32(),r=[];for(let n=0;n<t;++n)r.push(e());return r}}function y(e){return e.charAt(0).toUpperCase()+e.slice(1)}function b(e,t,r,n,i){try{if("string"==typeof n)i[`write${y(n)}`](r);else if(n instanceof Array)if("number"==typeof n[0]){if(r.length!==n[0])throw new p(`Expecting byte array of length ${n[0]}, but got ${r.length} bytes`);i.writeFixedArray(r)}else if(2===n.length&&"number"==typeof n[1]){if(r.length!==n[1])throw new p(`Expecting byte array of length ${n[1]}, but got ${r.length} bytes`);for(let t=0;t<n[1];t++)b(e,null,r[t],n[0],i)}else i.writeArray(r,r=>{b(e,t,r,n[0],i)});else if(void 0!==n.kind)switch(n.kind){case"option":null==r?i.writeU8(0):(i.writeU8(1),b(e,t,r,n.type,i));break;case"map":i.writeU32(r.size),r.forEach((r,a)=>{b(e,t,a,n.key,i),b(e,t,r,n.value,i)});break;default:throw new p(`FieldType ${n} unrecognized`)}else w(e,r,i)}catch(e){throw e instanceof p&&e.addToFieldPath(t),e}}function w(e,t,r){if("function"==typeof t.borshSerialize)return void t.borshSerialize(r);let n=e.get(t.constructor);if(!n)throw new p(`Class ${t.constructor.name} is missing in schema`);if("struct"===n.kind)n.fields.map(([n,i])=>{b(e,n,t[n],i,r)});else if("enum"===n.kind){let i=t[n.field];for(let a=0;a<n.values.length;++a){let[s,o]=n.values[a];if(s===i){r.writeU8(a),b(e,s,t[s],o,r);break}}}else throw new p(`Unexpected schema kind: ${n.kind} for ${t.constructor.name}`)}function v(e,t,r,n){try{if("string"==typeof r)return n[`read${y(r)}`]();if(r instanceof Array)if("number"==typeof r[0])return n.readFixedArray(r[0]);else{if("number"!=typeof r[1])return n.readArray(()=>
4196v(e,t,r[0],n));let i=[];for(let t=0;t<r[1];t++)i.push(v(e,null,r[0],n));return i}if("option"===r.kind){if(n.readU8())return v(e,t,r.type,n);return}if("map"===r.kind){let i=new Map,a=n.readU32();for(let s=0;s<a;s++){let a=v(e,t,r.key,n),s=v(e,t,r.value,n);i.set(a,s)}return i}return E(e,r,n)}catch(e){throw e instanceof p&&e.addToFieldPath(t),e}}function E(e,t,r){if("function"==typeof t.borshDeserialize)return t.borshDeserialize(r);let n=e.get(t);if(!n)throw new p(`Class ${t.name} is missing in schema`);if("struct"===n.kind){let n={};for(let[i,a]of e.get(t).fields)n[i]=v(e,i,a,r);return new t(n)}if("enum"===n.kind){let i=r.readU8();if(i>=n.values.length)throw new p(`Enum index: ${i} is out of range`);let[a,s]=n.values[i],o=v(e,a,s,r);return new t({[a]:o})}throw new p(`Unexpected schema kind: ${n.kind} for ${t.constructor.name}`)}s([m],g.prototype,"readU8",null),s([m],g.prototype,"readU16",null),s([m],g.prototype,"readU32",null),s([m],g.prototype,"readU64",null),s([m],g.prototype,"readU128",null),s([m],g.prototype,"readU256",null),s([m],g.prototype,"readU512",null),s([m],g.prototype,"readString",null),s([m],g.prototype,"readFixedArray",null),s([m],g.prototype,"readArray",null),t.BinaryReader=g,t.serialize=function(e,t,r=f){let n=new r;return w(e,t,n),n.toArray()},t.deserialize=function(e,t,r,n=g){let i=new n(r),a=E(e,t,i);if(i.offset<r.length)throw new p(`Unexpected ${r.length-i.offset} bytes after deserialized data`);return a},t.deserializeUnchecked=function(e,t,r,n=g){return E(e,t,new n(r))}},20295:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseSignature=function(e,t={}){if((0,c.isFunctionSignature)(e))return u(e,t);if((0,c.isEventSignature)(e))return d(e,t);if((0,c.isErrorSignature)(e))return h(e,t);if((0,c.isConstructorSignature)(e))return p(e,t);if((0,c.isFallbackSignature)(e))return f(e);if((0,c.isReceiveSignature)(e))return{type:"receive",stateMutability:"payable"};throw new s.UnknownSignatureError({signature:e})},t.parseFunctionSignature=u,t.parseEventSignature=d,t.parseErrorSignature=h,t.parseConstructorSignature=p,t.parseFallbackSignature=f,t.parseAbiParameter=b,t.splitParameters=w,t.isSolidityType=v,t.isSolidityKeyword=C,t.isValidDataLocation=A;let n=r(62561),i=r(50498),a=r(46836),s=r(48065),o=r(17683),l=r(33364),c=r(25065);function u(e,t={}){let r=(0,c.execFunctionSignature)(e);if(!r)throw new s.InvalidSignatureError({signature:e,type:"function"});let n=w(r.parameters),i=[],a=n.length;for(let e=0;e<a;e++)i.push(b(n[e],{modifiers:c.functionModifiers,structs:t,type:"function"}));let o=[];if(r.returns){let e=w(r.returns),n=e.length;for(let r=0;r<n;r++)o.push(b(e[r],{modifiers:c.functionModifiers,structs:t,type:"function"}))}return{name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:i,outputs:o}}function d(e,t={}){let r=(0,c.execEventSignature)(e);if(!r)throw new s.InvalidSignatureError({signature:e,type:"event"});let n=w(r.parameters),i=[],a=n.length;for(let e=0;e<a;e++)i.push(b(n[e],{modifiers:c.eventModifiers,structs:t,type:"event"}));return{name:r.name,type:"event",inputs:i}}function h(e,t={}){let r=(0,c.execErrorSignature)(e);if(!r)throw new s.InvalidSignatureError({signature:e,type:"error"});let n=w(r.parameters),i=[],a=n.length;for(let e=0;e<a;e++)i.push(b(n[e],{structs:t,type:"error"}));return{name:r.name,type:"error",inputs:i}}function p(e,t={}){let r=(0,c.execConstructorSignature)(e);if(!r)throw new s.InvalidSignatureError({signature:e,type:"constructor"});let n=w(r.parameters),i=[],a=n.length;for(let e=0;e<a;e++)i.push(b(n[e],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:i}}function f(e){let t=(0,c.execFallbackSignature)(e);if(!t)throw new s.InvalidSignatureError({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}let m=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,g=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,y=/^u?int$/;function b(e,t){let r,s=(0,l.getParameterCacheKey)(e,t?.type,t?.structs);if(l.parameterCache.has(s))return l.parameterCache.get(s);let o=n.isTupleRegex.test(e),u=(0,n.execTyped)(o?g:m,e);if(!u)throw new a.InvalidParameterError({param:e});if(u.name&&C(u.name))throw new a.SolidityProtectedKeywordError({param:e,name:u.name});let d=u.name?{name:u.name}:{},h="indexed"===u.modifier?{indexed:!0}:{},p=t?.structs??{},f={};if(o){r="tuple";let e=w(u.type),t=[],n=e.length;for(let r=0;r<n;r++)t.push(b(e[r],{structs:p}));f={components:t}}else if(u.type in p)r="tuple",f={components:p[u.type]};else if(y.test(u.type))r=`${u.type}256`;else if("address payable"===u.type)r="address";else if(r=u.type,t?.type!=="struct"&&!v(r))throw new i.UnknownSolidityTypeError({type:r});if(u.modifier){if(!t?.modifiers?.has?.(u.modifier))throw new a.InvalidModifierError({param:e,type:t?.type,modifier:u.modifier});if(c.functionModifiers.has(u.modifier)&&!A(r,!!u.array))throw new a.InvalidFunctionModifierError({param:e,type:t?.type,modifier:u.modifier})}let E={type:`${r}${u.array??""}`,...d,...h,...f};return l.parameterCache.set(s,E),E}function w(e,t=[],r="",n=0){let i=e.trim().length;for(let a=0;a<i;a++){let i=e[a],s=e.slice(a+1);switch(i){case",":return 0===n?w(s,[...t,r.trim()]):w(s,t,`${r}${i}`,n);case"(":return w(s,t,`${r}${i}`,n+1);case")":return w(s,t,`${r}${i}`,n-1);default:return w(s,t,`${r}${i}`,n)}}if(""===r)return t;if(0!==n)throw new o.InvalidParenthesisError({current:r,depth:n});return t.push(r.trim()),t}function v(e){return"address"===e||"bool"===e||"function"===e||"string"===e||n.bytesRegex.test(e)||n.integerRegex.test(e)}let E=/^(?: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 C(e){return"address"===e||"bool"===e||"function"===e||"string"===e||"tuple"===e||n.bytesRegex.test(e)||n.integerRegex.test(e)||E.test(e)}function A(e,t){return t||"bytes"===e||"string"===e||"tuple"===e}},20398:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(12050);r(79909),r(39909),r(83627),r(6077);var s=r(46756),o=r(63412),l=r(91392);let c=(0,l.AH)` 4197 :host { 4198 width: 100%; 4199 } 4200 4201 button { 4202 padding: ${({spacing:e})=>e[3]}; 4203 display: flex; 4204 gap: ${({spacing:e})=>e[3]}; 4205 justify-content: space-between; 4206 width: 100%; 4207 border-radius: ${({borderRadius:e})=>e[4]}; 4208 background-color: transparent; 4209 } 4210 4211 @media (hover: hover) { 4212 button:hover:enabled { 4213 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 4214 } 4215 } 4216 4217 button:focus-visible:enabled { 4218 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 4219 box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent040}; 4220 } 4221 4222 button[data-clickable='false'] { 4223 pointer-events: none; 4224 background-color: transparent; 4225 } 4226 4227 wui-image, 4228 wui-icon { 4229 width: ${({spacing:e})=>e[10]}; 4230 height: ${({spacing:e})=>e[10]}; 4231 } 4232 4233 wui-image { 4234 border-radius: ${({borderRadius:e})=>e[16]}; 4235 } 4236 4237 .token-name-container { 4238 flex: 1; 4239 } 4240`;var u=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let d=class extends n.WF{constructor(){super(...arguments),this.tokenName="",this.tokenImageUrl="",this.tokenValue=0,this.tokenAmount="0.0",this.tokenCurrency="",this.clickable=!1}render(){return(0,n.qy)` 4241 <button data-clickable=${String(this.clickable)}> 4242 <wui-flex gap="2" alignItems="center"> 4243 ${this.visualTemplate()} 4244 <wui-flex 4245 flexDirection="column" 4246 justifyContent="space-between" 4247 gap="1" 4248 class="token-name-container" 4249 > 4250 <wui-text variant="md-regular" color="primary" lineClamp="1"> 4251 ${this.tokenName} 4252 </wui-text> 4253 <wui-text variant="sm-regular-mono" color="secondary"> 4254 ${a.S.formatNumberToLocalString(this.tokenAmount,4)} ${this.tokenCurrency} 4255 </wui-text> 4256 </wui-flex> 4257 </wui-flex> 4258 <wui-flex 4259 flexDirection="column" 4260 justifyContent="space-between" 4261 gap="1" 4262 alignItems="flex-end" 4263 width="auto" 4264 > 4265 <wui-text variant="md-regular-mono" color="primary" 4266 >$${this.tokenValue.toFixed(2)}</wui-text 4267 > 4268 <wui-text variant="sm-regular-mono" color="secondary"> 4269 ${a.S.formatNumberToLocalString(this.tokenAmount,4)} 4270 </wui-text> 4271 </wui-flex> 4272 </button> 4273 `}visualTemplate(){return this.tokenName&&this.tokenImageUrl?(0,n.qy)`<wui-image alt=${this.tokenName} src=${this.tokenImageUrl}></wui-image>`:(0,n.qy)`<wui-icon name="coinPlaceholder" color="default"></wui-icon>`}};d.styles=[s.W5,s.fD,c],u([(0,i.MZ)()],d.prototype,"tokenName",void 0),u([(0,i.MZ)()],d.prototype,"tokenImageUrl",void 0),u([(0,i.MZ)({type:Number})],d.prototype,"tokenValue",void 0),u([(0,i.MZ)()],d.prototype,"tokenAmount",void 0),u([(0,i.MZ)()],d.prototype,"tokenCurrency",void 0),u([(0,i.MZ)({type:Boolean})],d.prototype,"clickable",void 0),d=u([(0,o.E)("wui-list-token")],d)},20438:(e,t,r)=>{"use strict";
4273Object.defineProperty(t,"__esModule",{value:!0}),t.getTotalSupply=s;let n=r(91472),i=r(527),a=r(55498);async function s(e,t){let{decimals:r,token:n,...o}=t,[l,{decimals:c}]=await Promise.all([(0,i.readContract)(e,{...o,...s.call(e,{token:n})}),(0,a.resolveTokenWithDecimals)(e,{decimals:r,token:n})]);return(0,a.toAmount)(l,c)}(s||(t.getTotalSupply=s={})).call=function(e,t){return(0,a.defineCall)({address:(0,a.resolveToken)(e,t).address,abi:n.erc20Abi,args:[],functionName:"totalSupply"})}},20471:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>d,B4:()=>l,P5:()=>o,WM:()=>c,im:()=>u,lD:()=>s});let n=BigInt(0x100000000-1),i=BigInt(32);function a(e,t=!1){return t?{h:Number(e&n),l:Number(e>>i&n)}:{h:0|Number(e>>i&n),l:0|Number(e&n)}}function s(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i<e.length;i++){let{h:s,l:o}=a(e[i],t);[r[i],n[i]]=[s,o]}return[r,n]}let o=(e,t,r)=>e<<r|t>>>32-r,l=(e,t,r)=>t<<r|e>>>32-r,c=(e,t,r)=>t<<r-32|e>>>64-r,u=(e,t,r)=>e<<r-32|t>>>64-r,d={fromBig:a,split:s,toBig:(e,t)=>BigInt(e>>>0)<<i|BigInt(t>>>0),shrSH:(e,t,r)=>e>>>r,shrSL:(e,t,r)=>e<<32-r|t>>>r,rotrSH:(e,t,r)=>e>>>r|t<<32-r,rotrSL:(e,t,r)=>e<<32-r|t>>>r,rotrBH:(e,t,r)=>e<<64-r|t>>>r-32,rotrBL:(e,t,r)=>e>>>r-32|t<<64-r,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:o,rotlSL:l,rotlBH:c,rotlBL:u,add:function(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/0x100000000|0)|0,l:0|i}},add3L:(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),add3H:(e,t,r,n)=>t+r+n+(e/0x100000000|0)|0,add4L:(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),add4H:(e,t,r,n,i)=>t+r+n+i+(e/0x100000000|0)|0,add5H:(e,t,r,n,i,a)=>t+r+n+i+a+(e/0x100000000|0)|0,add5L:(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0)}},21644:(e,t,r)=>{"use strict";function n(e){let t={formatters:void 0,fees:void 0,serializers:void 0,...e};return Object.assign(t,{extend:function e(t){return r=>{let n="function"==typeof r?r(t):r,i={...t,...n};return Object.assign(i,{extend:e(i)})}}(t)})}r.d(t,{x:()=>n})},21672:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeStateMapping=l,t.serializeAccountStateOverride=c,t.serializeStateOverride=function(e){if(!e)return;let t={};for(let{address:r,...i}of e){if(!(0,s.isAddress)(r,{strict:!1}))throw new n.InvalidAddressError({address:r});if(t[r])throw new a.AccountStateConflictError({address:r});t[r]=c(i)}return t};let n=r(9301),i=r(1107),a=r(37412),s=r(63402),o=r(27083);function l(e){if(e&&0!==e.length)return e.reduce((e,{slot:t,value:r})=>{if(66!==t.length)throw new i.InvalidBytesLengthError({size:t.length,targetSize:66,type:"hex"});if(66!==r.length)throw new i.InvalidBytesLengthError({size:r.length,targetSize:66,type:"hex"});return e[t]=r,e},{})}function c(e){let{balance:t,nonce:r,state:n,stateDiff:i,code:s}=e,c={};if(void 0!==s&&(c.code=s),void 0!==t&&(c.balance=(0,o.numberToHex)(t)),void 0!==r&&(c.nonce=(0,o.numberToHex)(r)),void 0!==n&&(c.state=l(n)),void 0!==i){if(c.state)throw new a.StateAssignmentConflictError;c.stateDiff=l(i)}return c}},21799:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toPrefixedMessage=function(e){let t="string"==typeof e?(0,s.stringToHex)(e):"string"==typeof e.raw?e.raw:(0,s.bytesToHex)(e.raw),r=(0,s.stringToHex)(`${n.presignMessagePrefix}${(0,a.size)(t)}`);return(0,i.concat)([r,t])};let n=r(44915),i=r(26504),a=r(29813),s=r(27083)},21813:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toFunctionHash=void 0;var n=r(26929);Object.defineProperty(t,"toFunctionHash",{enumerable:!0,get:function(){return n.toSignatureHash}})},21823:(e,t)=>{let r,n=[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];t.getSymbolSize=function(e){if(!e)throw Error('"version" cannot be null or undefined');if(e<1||e>40)throw Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return n[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw Error('"toSJISFunc" is not a valid function.');r=e},t.isKanjiModeEnabled=function(){return void 0!==r},t.toSJIS=function(e){return r(e)}},21918:(e,t,r)=>{"use strict";
4273Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiParameters=function(e){let t="",r=e.length;for(let i=0;i<r;i++){let a=e[i];t+=(0,n.formatAbiParameter)(a),i!==r-1&&(t+=", ")}return t};let n=r(35545)},22013:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeErrorResult=function(e){let{abi:t,errorName:r,args:u}=e,d=t[0];if(r){let e=(0,l.getAbiItem)({abi:t,args:u,name:r});if(!e)throw new n.AbiErrorNotFoundError(r,{docsPath:c});d=e}if("error"!==d.type)throw new n.AbiErrorNotFoundError(void 0,{docsPath:c});let h=(0,o.formatAbiItem)(d),p=(0,a.toFunctionSelector)(h),f="0x";if(u&&u.length>0){if(!d.inputs)throw new n.AbiErrorInputsNotFoundError(d.name,{docsPath:c});f=(0,s.encodeAbiParameters)(d.inputs,u)}return(0,i.concatHex)([p,f])};let n=r(82311),i=r(26504),a=r(16936),s=r(66008),o=r(71680),l=r(61569),c="/docs/contract/encodeErrorResult"},22016:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseAbiParameters=function(e){let t=[];if("string"==typeof e){let r=(0,s.splitParameters)(e),n=r.length;for(let e=0;e<n;e++)t.push((0,o.parseAbiParameter)(r[e],{modifiers:i.modifiers}))}else{let r=(0,a.parseStructs)(e),n=e.length;for(let a=0;a<n;a++){let n=e[a];if((0,i.isStructSignature)(n))continue;let l=(0,s.splitParameters)(n),c=l.length;for(let e=0;e<c;e++)t.push((0,o.parseAbiParameter)(l[e],{modifiers:i.modifiers,structs:r}))}}if(0===t.length)throw new n.InvalidAbiParametersError({params:e});return t};let n=r(46836),i=r(25065),a=r(8912),s=r(20295),o=r(20295)},22432:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let i=n(r(95859)),a=r(75726),s=r(72916),o=r(58886),l=r(12658);class c{constructor(e={}){let{allowedDomains:t=null,debug:r=!1}=e;this.communicator=new i.default(t,r),this.eth=new s.Eth(this.communicator),this.txs=new a.TXs(this.communicator),this.safe=new o.Safe(this.communicator),this.wallet=new l.Wallet(this.communicator)}}t.default=c},22500:(e,t,r)=>{"use strict";r.d(t,{X:()=>v,h:()=>E});var n,i=r(20801),a=Object.defineProperty,s=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,c=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))o.call(t,r)&&c(e,r,t[r]);if(s)for(var r of s(t))l.call(t,r)&&c(e,r,t[r]);return e},d=(e,t)=>{var r={};for(var n in e)o.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&s)for(var n of s(e))0>t.indexOf(n)&&l.call(e,n)&&(r[n]=e[n]);return r};(e=>{let t=class t{constructor(e,r,n,a){if(this.version=e,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError("Version value out of range");if(a<-1||a>7)throw RangeError("Mask value out of range");this.size=4*e+17;let s=[];for(let e=0;e<this.size;e++)s.push(!1);for(let e=0;e<this.size;e++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();let o=this.addEccAndInterleave(n);if(this.drawCodewords(o),-1==a){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);let r=this.getPenaltyScore();r<e&&(a=t,e=r),this.applyMask(t)}}i(0<=a&&a<=7),this.mask=a,this.applyMask(a),this.drawFormatBits(a),this.isFunction=[]}static encodeText(r,n){let i=e.QrSegment.makeSegments(r);return t.encodeSegments(i,n)}static encodeBinary(r,n){let i=e.QrSegment.makeBytes(r);return t.encodeSegments([i],n)}static encodeSegments(e,n,a=1,o=40,l=-1,c=!0){let u,d;if(!(t.MIN_VERSION<=a&&a<=o&&o<=t.MAX_VERSION)||l<-1||l>7)throw RangeError("Invalid value");for(u=a;;u++){let r=8*t.getNumDataCodewords(u,n),i=s.getTotalBits(e,u);if(i<=r){d=i;break}if(u>=o)throw RangeError("Data too long")}for(let e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])c&&d<=8*t.getNumDataCodewords(u,e)&&(n=e);let h=[];for(let t of e)for(let e of(r(t.mode.modeBits,4,h),r(t.numChars,t.mode.numCharCountBits(u),h),t.getData()))h.push(e);i(h.length==d);let p=8*t.getNumDataCodewords(u,n);i(h.length<=p),r(0,Math.min(4,p-h.length),h),r(0,(8-h.length%8)%8,h),i(h.length%8==0);for(let e=236;h.length<p;e^=253)r(e,8,h);let f=[];for(;8*f.length<h.length;)f.push(0);return h.forEach((e,t)=>f[t>>>3]|=e<<7-(7&t)),new t(u,n,f,l)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),t=e.length;for(let r=0;r<t;r++)for(let n=0;n<t;n++)(0!=r||0!=n)&&(0!=r||n!=t-1)&&(r!=t-1||0!=n)&&this.drawAlignmentPattern(e[r],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.errorCorrectionLevel.formatBits<<3|e,r=t;for(let e=0;e<10;e++)r=r<<1^(r>>>9)*1335;let a=(t<<10|r)^21522;i(a>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,n(a,e));this.setFunctionModule(8,7,n(a,6)),this.setFunctionModule(8,8,n(a,7)),this.setFunctionModule(7,8,n(a,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,n(a,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,n(a,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,n(a,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;i(t>>>18==0);for(let e=0;e<18;e++){let r=n(t,e),i=this.size-11+e%3,a=Math.floor(e/3);this.setFunctionModule(i,a,r),this.setFunctionModule(a,i,r)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){let i=Math.max(Math.abs(n),Math.abs(r)),a=e+n,s=t+r;0<=a&&a<this.size&&0<=s&&s<this.size&&this.setFunctionModule(a,s,2!=i&&4!=i)}}drawAlignmentPattern(e,t){for(let r=-2;r<=2;r++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,1!=Math.max(Math.abs(n),Math.abs(r)))}setFunctionModule(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0}addEccAndInterleave(e){let r=this.version,n=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(r,n))throw RangeError("Invalid argument");let a=t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][r],s=t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][r],o=Math.floor(t.getNumRawDataModules(r)/8),l=a-o%a,c=Math.floor(o/a),u=[],d=t.reedSolomonComputeDivisor(s);for(let r=0,n=0;r<a;r++){let i=e.slice(n,n+c-s+(r<l?0:1));n+=i.length;let a=t.reedSolomonComputeRemainder(i,d);r<l&&i.push(0),u.push(i.concat(a))}let h=[];for(let e=0;e<u[0].length;e++)u.forEach((t,r)=>{(e!=c-s||r>=l)&&h.push(t[e])});return i(h.length==o),h}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError("Invalid argument");let r=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let i=0;i<this.size;i++)for(let a=0;a<2;
vendor: 7,869 bytes, line 4273
4273a++){let s=t-a,o=(t+1&2)==0?this.size-1-i:i;!this.isFunction[o][s]&&r<8*e.length&&(this.modules[o][s]=n(e[r>>>3],7-(7&r)),r++)}}i(r==8*e.length)}applyMask(e){if(e<0||e>7)throw RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let r=0;r<this.size;r++){let n;switch(e){case 0:n=(r+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=r%3==0;break;case 3:n=(r+t)%3==0;break;case 4:n=(Math.floor(r/3)+Math.floor(t/2))%2==0;break;case 5:n=r*t%2+r*t%3==0;break;case 6:n=(r*t%2+r*t%3)%2==0;break;case 7:n=((r+t)%2+r*t%3)%2==0;break;default:throw Error("Unreachable")}!this.isFunction[t][r]&&n&&(this.modules[t][r]=!this.modules[t][r])}}getPenaltyScore(){let e=0;for(let r=0;r<this.size;r++){let n=!1,i=0,a=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[r][s]==n?5==++i?e+=t.PENALTY_N1:i>5&&e++:(this.finderPenaltyAddHistory(i,a),n||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),n=this.modules[r][s],i=1);e+=this.finderPenaltyTerminateAndCount(n,i,a)*t.PENALTY_N3}for(let r=0;r<this.size;r++){let n=!1,i=0,a=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[s][r]==n?5==++i?e+=t.PENALTY_N1:i>5&&e++:(this.finderPenaltyAddHistory(i,a),n||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),n=this.modules[s][r],i=1);e+=this.finderPenaltyTerminateAndCount(n,i,a)*t.PENALTY_N3}for(let r=0;r<this.size-1;r++)for(let n=0;n<this.size-1;n++){let i=this.modules[r][n];i==this.modules[r][n+1]&&i==this.modules[r+1][n]&&i==this.modules[r+1][n+1]&&(e+=t.PENALTY_N2)}let r=0;for(let e of this.modules)r=e.reduce((e,t)=>e+ +!!t,r);let n=this.size*this.size,a=Math.ceil(Math.abs(20*r-10*n)/n)-1;return i(0<=a&&a<=9),i(0<=(e+=a*t.PENALTY_N4)&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{let e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2)),r=[6];for(let n=this.size-7;r.length<e;n-=t)r.splice(1,0,n);return r}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError("Version number out of range");let r=(16*e+128)*e+64;if(e>=2){let t=Math.floor(e/7)+2;r-=(25*t-10)*t-55,e>=7&&(r-=36)}return i(208<=r&&r<=29648),r}static getNumDataCodewords(e,r){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError("Degree out of range");let r=[];for(let t=0;t<e-1;t++)r.push(0);r.push(1);let n=1;for(let i=0;i<e;i++){for(let e=0;e<r.length;e++)r[e]=t.reedSolomonMultiply(r[e],n),e+1<r.length&&(r[e]^=r[e+1]);n=t.reedSolomonMultiply(n,2)}return r}static reedSolomonComputeRemainder(e,r){let n=r.map(e=>0);for(let i of e){let e=i^n.shift();n.push(0),r.forEach((r,i)=>n[i]^=t.reedSolomonMultiply(r,e))}return n}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^(r>>>7)*285^(t>>>n&1)*e;return i(r>>>8==0),r}finderPenaltyCountPatterns(e){let t=e[1];i(t<=3*this.size);let r=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(r&&e[0]>=4*t&&e[6]>=t?1:0)+(r&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};function r(e,t,r){if(t<0||t>31||e>>>t!=0)throw RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function n(e,t){return(e>>>t&1)!=0}function i(e){if(!e)throw Error("Assertion error")}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;let a=class e{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(t){let n=[];for(let e of t)r(e,8,n);return new e(e.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!e.isNumeric(t))throw RangeError("String contains non-numeric characters");let n=[];for(let e=0;e<t.length;){let i=Math.min(t.length-e,3);r(parseInt(t.substring(e,e+i),10),3*i+1,n),e+=i}return new e(e.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){let n;if(!e.isAlphanumeric(t))throw RangeError("String contains unencodable characters in alphanumeric mode");let i=[];for(n=0;n+2<=t.length;n+=2){let a=45*e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n));r(a+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n+1)),11,i)}return n<t.length&&r(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n)),6,i),new e(e.Mode.ALPHANUMERIC,t.length,i)}static makeSegments(t){return""==t?[]:e.isNumeric(t)?[e.makeNumeric(t)]:e.isAlphanumeric(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]}static makeEci(t){let n=[];if(t<0)throw RangeError("ECI assignment value out of range");if(t<128)r(t,8,n);else if(t<16384)r(2,2,n),r(t,14,n);else if(t<1e6)r(6,3,n),r(t,21,n);else throw RangeError("ECI assignment value out of range");return new e(e.Mode.ECI,0,n)}static isNumeric(t){return e.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return e.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let r=0;for(let n of e){let e=n.mode.numCharCountBits(t);if(n.numChars>=1<<e)return 1/0;r+=4+e+n.bitData.length}return r}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let r=0;r<e.length;r++)"%"!=e.charAt(r)?t.push(e.charCodeAt(r)):(t.push(parseInt(e.substring(r+1,r+3),16)),r+=2);return t}};a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let s=a;e.QrSegment=a})(n||(n={})),(e=>{(e=>{let t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),e.Ecc=t})(e.QrCode||(e.QrCode={}))})(n||(n={})),(e=>{(e=>{let t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]),e.Mode=t})(e.QrSegment||(e.QrSegment={}))})(n||(n={}));var h=n,p={L:h.QrCode.Ecc.LOW,M:h.QrCode.Ecc.MEDIUM,Q:h.QrCode.Ecc.QUARTILE,H:h.QrCode.Ecc.HIGH},f="#FFFFFF",m="#000000";function g(e,t=0){let r=[];return e.forEach(function(e,n){let i=null;e.forEach(function(a,s){if(!a&&null!==i){r.push(`M${i+t} ${n+t}h${s-i}v1H${i+t}z`),i=null;return}if(s===e.length-1){if(!a)return;null===i?r.push(`M${s+t},${n+t} h1v1H${s+t}z`):r.push(`M${i+t},${n+t} h${s+1-i}v1H${i+t}z`);return}a&&null===i&&(i=s)})}),r.join("")}function y(e,t){return e.slice().map((e,r)=>r<t.y||r>=t.y+t.h?e:e.map((e,r)=>(r<t.x||r>=t.x+t.w)&&e))}function b({value:e,level:t,minVersion:r,includeMargin:n,marginSize:a,imageSettings:s,size:o,boostLevel:l}){let c=i.useMemo(()=>{let n=(Array.isArray(e)?e:[e]).reduce((e,t)=>
4273(e.push(...h.QrSegment.makeSegments(t)),e),[]);return h.QrCode.encodeSegments(n,p[t],r,void 0,void 0,l)},[e,t,r,l]),{cells:u,margin:d,numCells:f,calculatedImageSettings:m}=i.useMemo(()=>{let e=c.getModules(),t=null!=a?Math.max(Math.floor(a),0):4*!!n,r=e.length+2*t,i=function(e,t,r,n){if(null==n)return null;let i=e.length+2*r,a=Math.floor(.1*t),s=i/t,o=(n.width||a)*s,l=(n.height||a)*s,c=null==n.x?e.length/2-o/2:n.x*s,u=null==n.y?e.length/2-l/2:n.y*s,d=null==n.opacity?1:n.opacity,h=null;if(n.excavate){let e=Math.floor(c),t=Math.floor(u),r=Math.ceil(o+c-e),n=Math.ceil(l+u-t);h={x:e,y:t,w:r,h:n}}return{x:c,y:u,h:l,w:o,excavation:h,opacity:d,crossOrigin:n.crossOrigin}}(e,o,t,s);return{cells:e,margin:t,numCells:r,calculatedImageSettings:i}},[c,o,s,n,a]);return{qrcode:c,margin:d,cells:u,numCells:f,calculatedImageSettings:m}}var w=function(){try{new Path2D().addPath(new Path2D)}catch(e){return!1}return!0}(),v=i.forwardRef(function(e,t){let{value:r,size:n=128,level:a="L",bgColor:s=f,fgColor:o=m,includeMargin:l=!1,minVersion:c=1,boostLevel:h,marginSize:p,imageSettings:v}=e,E=d(e,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:C}=E,A=d(E,["style"]),x=null==v?void 0:v.src,I=i.useRef(null),S=i.useRef(null),T=i.useCallback(e=>{I.current=e,"function"==typeof t?t(e):t&&(t.current=e)},[t]),[P,O]=i.useState(!1),{margin:_,cells:N,numCells:k,calculatedImageSettings:R}=b({value:r,level:a,minVersion:c,boostLevel:h,includeMargin:l,marginSize:p,imageSettings:v,size:n});i.useEffect(()=>{if(null!=I.current){let e=I.current,t=e.getContext("2d");if(!t)return;let r=N,i=S.current,a=null!=R&&null!==i&&i.complete&&0!==i.naturalHeight&&0!==i.naturalWidth;a&&null!=R.excavation&&(r=y(N,R.excavation));let l=window.devicePixelRatio||1;e.height=e.width=n*l;let c=n/k*l;t.scale(c,c),t.fillStyle=s,t.fillRect(0,0,k,k),t.fillStyle=o,w?t.fill(new Path2D(g(r,_))):N.forEach(function(e,r){e.forEach(function(e,n){e&&t.fillRect(n+_,r+_,1,1)})}),R&&(t.globalAlpha=R.opacity),a&&t.drawImage(i,R.x+_,R.y+_,R.w,R.h)}}),i.useEffect(()=>{O(!1)},[x]);let M=u({height:n,width:n},C),B=null;return null!=x&&(B=i.createElement("img",{src:x,key:x,style:{display:"none"},onLoad:()=>{O(!0)},ref:S,crossOrigin:null==R?void 0:R.crossOrigin})),i.createElement(i.Fragment,null,i.createElement("canvas",u({style:M,height:n,width:n,ref:T,role:"img"},A)),B)});v.displayName="QRCodeCanvas";var E=i.forwardRef(function(e,t){let{value:r,size:n=128,level:a="L",bgColor:s=f,fgColor:o=m,includeMargin:l=!1,minVersion:c=1,boostLevel:h,title:p,marginSize:w,imageSettings:v}=e,E=d(e,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:C,cells:A,numCells:x,calculatedImageSettings:I}=b({value:r,level:a,minVersion:c,boostLevel:h,includeMargin:l,marginSize:w,imageSettings:v,size:n}),S=A,T=null;null!=v&&null!=I&&(null!=I.excavation&&(S=y(A,I.excavation)),T=i.createElement("image",{href:v.src,height:I.h,width:I.w,x:I.x+C,y:I.y+C,preserveAspectRatio:"none",opacity:I.opacity,crossOrigin:I.crossOrigin}));let P=g(S,C);return i.createElement("svg",u({height:n,width:n,viewBox:`0 0 ${x} ${x}`,ref:t,role:"img"},E),!!p&&i.createElement("title",null,p),i.createElement("path",{fill:s,d:`M0,0 h${x}v${x}H0z`,shapeRendering:"crispEdges"}),i.createElement("path",{fill:o,d:P,shapeRendering:"crispEdges"}),T)});E.displayName="QRCodeSVG"},22584:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,r){if(t.isValid(e))return e;try{if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw Error("Unknown EC Level: "+e)}}catch(e){return r}}},22804:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)}
4273,a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSDKVersion=void 0,t.default=a(r(22432)).default,i(r(22432),t),i(r(55082),t),i(r(25609),t),i(r(53938),t);var s=r(84340);Object.defineProperty(t,"getSDKVersion",{enumerable:!0,get:function(){return s.getSDKVersion}}),i(r(34717),t)},22866:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeFunctionData=function(e){let{abi:t,data:r}=e,l=(0,i.slice)(r,0,4),c=t.find(e=>"function"===e.type&&l===(0,a.toFunctionSelector)((0,o.formatAbiItem)(e)));if(!c)throw new n.AbiFunctionSignatureNotFoundError(l,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:c.name,args:"inputs"in c&&c.inputs&&c.inputs.length>0?(0,s.decodeAbiParameters)(c.inputs,(0,i.slice)(r,4)):void 0}};let n=r(82311),i=r(4906),a=r(16936),s=r(29060),o=r(71680)},22890:(e,t,r)=>{"use strict";r.d(t,{id:()=>a});var n=r(92391),i=r(13599);function a(e){return(0,n.S)((0,i.YW)(e))}},23028:(e,t,r)=>{"use strict";function n(e){return"version"in e}r.d(t,{Y:()=>n})},23246:(e,t,r)=>{"use strict";let n,i,a,s,o,l,c,u,d,h,p,f,m,g,y;r.d(t,{_y:()=>tZ,FR:()=>tJ,cP:()=>tG});var b=r(76859),w=r(97085),v=r(94622),E=r(92391),C=r(98668),A=r(56595),x=r(44582),I=r(10693),S=r(22890);let T=new Uint8Array(32);T.fill(0);let P=BigInt(-1),O=BigInt(0),_=BigInt(1),N=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),k=(0,A.up)(_,32),R=(0,A.up)(O,32),M={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},B=["name","version","chainId","verifyingContract","salt"];function j(e){return function(t){return(0,x.MR)("string"==typeof t,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}let U={name:j("name"),version:j("version"),chainId:function(e){let t=(0,A.Ab)(e,"domain.chainId");return((0,x.MR)(t>=0,"invalid chain ID","domain.chainId",e),Number.isSafeInteger(t))?Number(t):(0,A.nD)(t)},verifyingContract:function(e){try{return(0,w.b)(e).toLowerCase()}catch(e){}(0,x.MR)(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){let t=(0,C.q5)(e,"domain.salt");return(0,x.MR)(32===t.length,'invalid domain value "salt"',"domain.salt",e),(0,C.c$)(t)}};function $(e){{let t=e.match(/^(u?)int(\d+)$/);if(t){let r=""===t[1],n=parseInt(t[2]);(0,x.MR)(n%8==0&&0!==n&&n<=256&&t[2]===String(n),"invalid numeric width","type",e);let i=(0,A.dK)(N,r?n-1:n),a=r?(i+_)*P:O;return function(t){let n=(0,A.Ab)(t,"value");return(0,x.MR)(n>=a&&n<=i,`value out-of-bounds for ${e}`,"value",n),(0,A.up)(r?(0,A.JJ)(n,256):n,32)}}}{let t=e.match(/^bytes(\d+)$/);if(t){let r=parseInt(t[1]);return(0,x.MR)(0!==r&&r<=32&&t[1]===String(r),"invalid bytes width","type",e),function(t){let n=(0,C.q5)(t);(0,x.MR)(n.length===r,`invalid length for ${e}`,"value",t);let i=(0,C.q5)(t),a=i.length%32;return a?(0,C.xW)([i,T.slice(a)]):(0,C.c$)(i)}}}switch(e){case"address":return function(e){return(0,C.nx)((0,w.b)(e),32)};case"bool":return function(e){return e?k:R};case"bytes":return function(e){return(0,E.S)(e)};case"string":return function(e){return(0,S.id)(e)}}return null}function L(e,t){return`${e}(${t.map(({name:e,type:t})=>t+" "+e).join(",")})`}function D(e){let t=e.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:e}}class F{primaryType;#l;get types(){return JSON.parse(this.#l)}#c;#u;constructor(e){this.#c=new Map,this.#u=new Map;let t=new Map,r=new Map,n=new Map,i={};for(let a in Object.keys(e).forEach(a=>{i[a]=e[a].map(({name:t,type:r})=>{let{base:n,index:i}=D(r);return"int"!==n||e.int||(n="int256"),"uint"!==n||e.uint||(n="uint256"),{name:t,type:n+(i||"")}}),t.set(a,new Set),r.set(a,[]),n.set(a,new Set)}),this.#l=JSON.stringify(i),i){let n=new Set;for(let s of i[a]){(0,x.MR)(!n.has(s.name),`duplicate variable name ${JSON.stringify(s.name)} in ${JSON.stringify(a)}`,"types",e),n.add(s.name);let i=D(s.type).base;(0,x.MR)(i!==a,`circular type reference to ${JSON.stringify(i)}`,"types",e),$(i)||((0,x.MR)(r.has(i),`unknown type ${JSON.stringify(i)}`,"types",e),r.get(i).push(a),t.get(a).add(i))}}let a=Array.from(r.keys()).filter(e=>0===r.get(e).length);for(let[s,o]of((0,x.MR)(0!==a.length,"missing primary type","types",e),(0,x.MR)(1===a.length,`ambiguous primary types or unused types: ${a.map(e=>JSON.stringify(e)).join(", ")}`,"types",e),(0,I.n)(this,{primaryType:a[0]}),!function i(a,s){for(let o of((0,x.MR)(!s.has(a),`circular type reference to ${JSON.stringify(a)}`,"types",e),s.add(a),t.get(a)))if(r.has(o))for(let e of(i(o,s),s))n.get(e).add(o);s.delete(a)}(this.primaryType,new Set),n)){let e=Array.from(o);e.sort(),this.#c.set(s,L(s,i[s])+e.map(e=>L(e,i[e])).join(""))}}getEncoder(e){let t=this.#u.get(e);return t||(t=this.#d(e),this.#u.set(e,t)),t}#d(e){{let t=$(e);
4273if(t)return t}let t=D(e).array;if(t){let e=t.prefix,r=this.getEncoder(e);return n=>{(0,x.MR)(-1===t.count||t.count===n.length,`array length mismatch; expected length ${t.count}`,"value",n);let i=n.map(r);return this.#c.has(e)&&(i=i.map(E.S)),(0,E.S)((0,C.xW)(i))}}let r=this.types[e];if(r){let t=(0,S.id)(this.#c.get(e));return e=>{let n=r.map(({name:t,type:r})=>{let n=this.getEncoder(r)(e[t]);return this.#c.has(r)?(0,E.S)(n):n});return n.unshift(t),(0,C.xW)(n)}}(0,x.MR)(!1,`unknown type: ${e}`,"type",e)}encodeType(e){let t=this.#c.get(e);return(0,x.MR)(t,`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return(0,E.S)(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if($(e))return r(e,t);let n=D(e).array;if(n)return(0,x.MR)(-1===n.count||n.count===t.length,`array length mismatch; expected length ${n.count}`,"value",t),t.map(e=>this._visit(n.prefix,e,r));let i=this.types[e];if(i)return i.reduce((e,{name:n,type:i})=>(e[n]=this._visit(i,t[n],r),e),{});(0,x.MR)(!1,`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new F(e)}static getPrimaryType(e){return F.from(e).primaryType}static hashStruct(e,t,r){return F.from(t).hashStruct(e,r)}static hashDomain(e){let t=[];for(let r in e){if(null==e[r])continue;let n=M[r];(0,x.MR)(n,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort((e,t)=>B.indexOf(e.name)-B.indexOf(t.name)),F.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return(0,C.xW)(["0x1901",F.hashDomain(e),F.from(t).hash(r)])}static hash(e,t,r){return(0,E.S)(F.encode(e,t,r))}static async resolveNames(e,t,r,n){for(let t in e=Object.assign({},e))null==e[t]&&delete e[t];let i={};e.verifyingContract&&!(0,C.Lo)(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");let a=F.from(t);for(let e in a.visit(r,(e,t)=>("address"!==e||(0,C.Lo)(t,20)||(i[t]="0x"),t)),i)i[e]=await n(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),r=a.visit(r,(e,t)=>"address"===e&&i[t]?i[t]:t),{domain:e,value:r}}static getPayload(e,t,r){F.hashDomain(e);let n={},i=[];B.forEach(t=>{let r=e[t];null!=r&&(n[t]=U[t](r),i.push({name:t,type:M[t]}))});let a=F.from(t),s=Object.assign({},t=a.types);return(0,x.MR)(null==s.EIP712Domain,"types must not contain EIP712Domain type","types.EIP712Domain",t),s.EIP712Domain=i,a.encode(r),{types:s,domain:n,primaryType:a.primaryType,message:a.visit(r,(e,t)=>{if(e.match(/^bytes(\d*)/))return(0,C.c$)((0,C.q5)(t));if(e.match(/^u?int/))return(0,A.Ab)(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return(0,x.MR)("string"==typeof t,"invalid string","value",t),t}(0,x.MR)(!1,"unsupported type","type",e)})}}}var H=r(85885),z=r(59132),W=r(13599);function q(e){return async function(t,r){let n;(0,x.vA)(null==r||!r.cancelled,"request cancelled before sending","CANCELLED");let i=t.url.split(":")[0].toLowerCase();(0,x.vA)("http"===i||"https"===i,`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),(0,x.vA)("https"===i||!t.credentials||t.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let a=null,s=new AbortController,o=setTimeout(()=>{a=(0,x.xz)("request timeout","TIMEOUT"),s.abort()},t.timeout);r&&r.addListener(()=>{a=(0,x.xz)("request cancelled","CANCELLED"),s.abort()});let l=Object.assign({},e,{method:t.method,headers:new Headers(Array.from(t)),body:t.body||void 0,signal:s.signal});try{n=await fetch(t.url,l)}catch(e){if(clearTimeout(o),a)throw a;throw e}clearTimeout(o);let c={};n.headers.forEach((e,t)=>{c[t.toLowerCase()]=e});let u=await n.arrayBuffer(),d=null==u?null:new Uint8Array(u);return{statusCode:n.status,statusMessage:n.statusText,headers:c,body:d}}}q({});let V=q(),G=RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),K=RegExp("^ipfs://(ipfs/)?(.*)$","i"),Z=!1;async function J(e,t){try{var r;let t=e.match(G);if(!t)throw Error("invalid data");return new en(200,"OK",{"content-type":t[1]||"text/plain"},t[2]?function(e){let t=new Uint8Array((e=atob(e)).length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return(0,C.q5)(t)}(t[3]):(r=t[3],(0,W.YW)(r.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>
4273String.fromCharCode(parseInt(t,16))))))}catch(t){return new en(599,"BAD REQUEST (invalid data: URI)",{},null,new er(e))}}function Y(e){return async function(t,r){try{let r=t.match(K);if(!r)throw Error("invalid link");return new er(`${e}${r[2]}`)}catch(e){return new en(599,"BAD REQUEST (invalid IPFS URI)",{},null,new er(t))}}}let Q={data:J,ipfs:Y("https://gateway.ipfs.io/ipfs/")},X=new WeakMap;class ee{#h;#p;constructor(e){this.#h=[],this.#p=!1,X.set(e,()=>{if(!this.#p){for(let e of(this.#p=!0,this.#h))setTimeout(()=>{e()},0);this.#h=[]}})}addListener(e){(0,x.vA)(!this.#p,"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),this.#h.push(e)}get cancelled(){return this.#p}checkSignal(){(0,x.vA)(!this.cancelled,"cancelled","CANCELLED",{})}}function et(e){if(null==e)throw Error("missing signal; should not happen");return e.checkSignal(),e}class er{#f;#m;#g;#y;#b;#w;#v;#E;#C;#A;#x;#I;#S;#T;#P;get url(){return this.#w}set url(e){this.#w=String(e)}get body(){return null==this.#v?null:new Uint8Array(this.#v)}set body(e){if(null==e)this.#v=void 0,this.#E=void 0;else if("string"==typeof e)this.#v=(0,W.YW)(e),this.#E="text/plain";else if(e instanceof Uint8Array)this.#v=e,this.#E="application/octet-stream";else if("object"==typeof e)this.#v=(0,W.YW)(JSON.stringify(e)),this.#E="application/json";else throw Error("invalid body")}hasBody(){return null!=this.#v}get method(){return this.#y?this.#y:this.hasBody()?"POST":"GET"}set method(e){null==e&&(e=""),this.#y=String(e).toUpperCase()}get headers(){let e=Object.assign({},this.#g);return this.#C&&(e.authorization=`Basic ${function(e){let t=(0,C.q5)(e),r="";for(let e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return btoa(r)}((0,W.YW)(this.#C))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),null==e["content-type"]&&this.#E&&(e["content-type"]=this.#E),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,t){this.#g[String(e).toLowerCase()]=String(t)}clearHeaders(){this.#g={}}[Symbol.iterator](){let e=this.headers,t=Object.keys(e),r=0;return{next:()=>{if(r<t.length){let n=t[r++];return{value:[n,e[n]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return this.#C||null}setCredentials(e,t){(0,x.MR)(!e.match(/:/),"invalid basic authentication username","username","[REDACTED]"),this.#C=`${e}:${t}`}get allowGzip(){return this.#m}set allowGzip(e){this.#m=!!e}get allowInsecureAuthentication(){return!!this.#f}set allowInsecureAuthentication(e){this.#f=!!e}get timeout(){return this.#b}set timeout(e){(0,x.MR)(e>=0,"timeout must be non-zero","timeout",e),this.#b=e}get preflightFunc(){return this.#A||null}set preflightFunc(e){this.#A=e}get processFunc(){return this.#x||null}set processFunc(e){this.#x=e}get retryFunc(){return this.#I||null}set retryFunc(e){this.#I=e}get getUrlFunc(){return this.#P||V}set getUrlFunc(e){this.#P=e}constructor(e){this.#w=String(e),this.#f=!1,this.#m=!0,this.#g={},this.#y="",this.#b=3e5,this.#T={slotInterval:250,maxAttempts:12},this.#P=null}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${this.#v?(0,C.c$)(this.#v):"null"}>`}setThrottleParams(e){null!=e.slotInterval&&(this.#T.slotInterval=e.slotInterval),null!=e.maxAttempts&&(this.#T.maxAttempts=e.maxAttempts)}async #O(e,t,r,n,i){var a;if(e>=this.#T.maxAttempts)return i.makeServerError("exceeded maximum retry limit");(0,x.vA)(ei()<=t,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:n}),r>0&&await (a=r,new Promise(e=>setTimeout(e,a)));let s=this.clone(),o=(s.url.split(":")[0]||"").toLowerCase();if(o in Q){let e=await Q[o](s.url,et(n.#S));if(e instanceof en){let t=e;if(this.processFunc){et(n.#S);try{t=await this.processFunc(s,t)}catch(e){(null==e.throttle||"number"!=typeof e.stall)&&t.makeServerError("error in post-processing function",e).assertOk()}}return t}s=e}this.preflightFunc&&(s=await this.preflightFunc(s));let l=await this.getUrlFunc(s,et(n.#S)),c=new en(l.statusCode,l.statusMessage,l.headers,l.body,n);if([301,302,307,308].indexOf(c.statusCode)>=0){try{let r=c.headers.location||"";return s.redirect(r).#O(e+1,t,0,n,c)}catch(e){}return c}if(429===c.statusCode&&(null==this.retryFunc||await this.retryFunc(s,c,e))){let r=c.headers["retry-after"],i=this.#T.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return"string"==typeof r&&r.match(/^[1-9][0-9]*$/)&&(i=parseInt(r)),s.clone().#O(e+1,t,i,n,c)}if(this.processFunc){et(n.#S);try{c=await this.processFunc(s,c)}catch(i){(null==i.throttle||"number"!=typeof i.stall)&&c.makeServerError("error in post-processing function",i).assertOk();let r=this.#T.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return i.stall>=0&&(r=i.stall),s.clone().#O(e+1,t,r,n,c)}}return c}send(){return(0,x.vA)(null==this.#S,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),this.#S=new ee(this),this.#O(0,ei()+this.timeout,0,this,new en(0,"",{},null,this))}cancel(){(0,x.vA)(null!=this.#S,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});let e=X.get(this);if(!e)throw Error("missing signal; should not happen");e()}redirect(e){let t=this.url.split(":")[0].toLowerCase(),r=e.split(":")[0].toLowerCase();(0,x.vA)(("https"!==t||"http"!==r)&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});let n=new er(e);return n.method=this.method,n.allowGzip=this.allowGzip,n.timeout=this.timeout,n.#g=Object.assign({},this.#g),this.#v&&(n.#v=new Uint8Array(this.#v)),n.#E=this.#E,n}clone(){let e=new er(this.url);return e.#y=this.#y,this.#v&&(e.#v=this.#v),e.#E=this.#E,e.#g=Object.assign({},this.#g),e.#C=this.#C,this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),e.#A=this.#A,e.#x=this.#x,e.#I=this.#I,e.#T=Object.assign({},this.#T),e.#P=this.#P,e}static lockConfig(){Z=!0}static getGateway(e){return Q[e.toLowerCase()]||null}static registerGateway(e,t){if("http"===(e=e.toLowerCase())||"https"===e)throw Error(`cannot intercept ${e}; use registerGetUrl`);if(Z)throw Error("gateways locked");Q[e]=t}static registerGetUrl(e){if(Z)throw Error("gateways locked");V=e}static createGetUrlFunc(e){return q(e)}static createDataGateway(){return J}static createIpfsGatewayFunc(e){return Y(e)}}class en{#_;#N;#g;#v;#k;#R;toString(){return`<FetchResponse status=${this.statusCode} body=${this.#v?(0,C.c$)(this.#v):"null"}>`}get statusCode(){return this.#_}get statusMessage(){return this.#N}get headers(){return Object.assign({},this.#g)}get body(){return null==this.#v?null:new Uint8Array(this.#v)}get bodyText(){try{return null==this.#v?"":(0,W._v)(this.#v)}
4273catch(e){(0,x.vA)(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch(e){(0,x.vA)(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){let e=this.headers,t=Object.keys(e),r=0;return{next:()=>{if(r<t.length){let n=t[r++];return{value:[n,e[n]],done:!1}}return{value:void 0,done:!0}}}}constructor(e,t,r,n,i){this.#_=e,this.#N=t,this.#g=Object.keys(r).reduce((e,t)=>(e[t.toLowerCase()]=String(r[t]),e),{}),this.#v=null==n?null:new Uint8Array(n),this.#k=i||null,this.#R={message:""}}makeServerError(e,t){let r;e?r=`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${e})`:(e=`${this.statusCode} ${this.statusMessage}`,r=`CLIENT ESCALATED SERVER ERROR (${e})`);let n=new en(599,r,this.headers,this.body,this.#k||void 0);return n.#R={message:e,error:t},n}throwThrottleError(e,t){null==t?t=-1:(0,x.MR)(Number.isInteger(t)&&t>=0,"invalid stall timeout","stall",t);let r=Error(e||"throttling requests");throw(0,I.n)(r,{stall:t,throttle:!0}),r}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return null!=this.#v}get request(){return this.#k}ok(){return""===this.#R.message&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:t}=this.#R;""===e&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let r=null;this.request&&(r=this.request.url);let n=null;try{this.#v&&(n=(0,W._v)(this.#v))}catch(e){}(0,x.vA)(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:t,info:{requestUrl:r,responseBody:n,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}}function ei(){return new Date().getTime()}var ea=r(83066),es=r(31101),eo=r(66620),el=r(67535);let ec=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]);function eu(e){var t;let r;return t=function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,a=[0,1];for(let e=1;e<n;e++)a.push(i+=r());let s=r(),o=t;t+=s;let l=0,c=0;function u(){return 0==l&&(c=c<<8|e[t++],l=8),c>>--l&1}let d=0x80000000-1,h=0;for(let e=0;e<31;e++)h=h<<1|u();let p=[],f=0,m=0x80000000;for(;;){let e=Math.floor(((h-f+1)*i-1)/m),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e<a[n]?r=n:t=n}if(0==t)break;p.push(t);let s=f+Math.floor(m*a[t]/i),o=f+Math.floor(m*a[t+1]/i)-1;for(;((s^o)&0x40000000)==0;)h=h<<1&d|u(),s=s<<1&d,o=o<<1&d|1;for(;s&~o&0x20000000;)h=0x40000000&h|h<<1&d>>>1|u(),s=s<<1^0x40000000,o=(0x40000000^o)<<1|0x40000001;f=s,m=1+o-s}let g=n-4;return p.map(t=>{switch(t-g){case 3:return g+65792+(e[o++]<<16|e[o++]<<8|e[o++]);case 2:return g+256+(e[o++]<<8|e[o++]);case 1:return g+e[o++];default:return t-1}})}(function(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((e,r)=>t[e.charCodeAt(0)]=r);let r=e.length,n=new Uint8Array(6*r>>
42733);for(let i=0,a=0,s=0,o=0;i<r;i++)o=o<<6|t[e.charCodeAt(i)],(s+=6)>=8&&(n[a++]=o>>(s-=8));return n}(e)),r=0,()=>t[r++]}function ed(e,t=0){let r=[];for(;;){let n=e(),i=e();if(!i)break;t+=n;for(let e=0;e<i;e++)r.push(t+e);t+=i+1}return r}function eh(e){return ef(()=>{let t=ed(e);if(t.length)return t})}function ep(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(function(e,t){let r=1+t(),n=t(),i=ef(t);return em(i.length,1+e,t).flatMap((e,t)=>{let[a,...s]=e;return Array(i[t]).fill().map((e,t)=>{let i=t*n;return[a+t*r,s.map(e=>e+i)]})})}(r,e))}for(;;){var r,n;let i=e()-1;if(i<0)break;t.push((r=i,em(1+(n=e)(),1+r,n).map(e=>[e[0],e.slice(1)])))}return t.flat()}function ef(e){let t=[];for(;;){let r=e(t.length);if(!r)break;t.push(r)}return t}function em(e,t,r){let n=Array(e).fill().map(()=>[]);for(let i=0;i<t;i++)(function(e,t){let r=Array(e);for(let i=0,a=0;i<e;i++){var n;r[i]=a+=1&(n=t())?~n>>1:n>>1}return r})(e,r).forEach((e,t)=>n[t].push(e));return n}function eg(e){return`{${e.toString(16).toUpperCase().padStart(2,"0")}}`}function ey(e){let t=e.length;if(t<4096)return String.fromCodePoint(...e);let r=[];for(let n=0;n<t;)r.push(String.fromCodePoint(...e.slice(n,n+=4096)));return r.join("")}function eb(e,t){let r=e.length,n=r-t.length;for(let i=0;0==n&&i<r;i++)n=e[i]-t[i];return n}let ew=55204;function ev(e){return e>>24&255}function eE(e){return 0xffffff&e}function eC(e){return e>=44032&&e<ew}function eA(e){n||function(){let e=eu("AEUDWAHSCGYATwDVADIAdgAiADQAFAAtABQAIQAPACcADQASAAsAGQAJABIACQARAAUACwAFAAwABQAQAAMABwAEAAoABQAJAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACwANAA0AAwAKAAkABAAdAAYAZwDTAecDNACxCmIB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgPi89uj00MsvBXxEPAGPCDwBnQKoEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJEMAJpIBpob5AERSMAKNoAXqaQLRBMCzEiC+AZ4EWRJJFbEu7QDQLARtEbgECxDwAb/RyAk1AV4nD2cEQQKTAzsAGpobPgAahAGPCrysdy0OAKwAfFIcBAQFUmoA/PtZADkBIadVj2UMUgx5Il4ANQC9vLIBDAHUGVsQ8wCzfQIbGVcCHBZHAZ8CBAgXOhG7AqMZ4M7+1M0UAPDNAWsC+mcJDe8AAQA99zkEXLICyQozAo6lAobcP5JvjQLFzwKD9gU/OD8FEQCtEQL6bW+nAKUEvzjDHsuRyUvOFHcacUz5AqIFRSE2kzsBEQCuaQL5DQTlcgO6twSpTiUgCwIFCAUXBHQEqQV6swAVxUlmTmsCwjqsP/wKJQmXb793UgZBEBsnpRD3DDMBtQE7De1L2ATxBjsEyR99GRkPzZWcCKUt3QztJuMuoYBaI/UqgwXtS/Q83QtNUWgPWQtlCeM6Y4FOAyEBDSKLCt0NOQhtEPMKyWsN5RFFBzkD1UmaAKUHAQsRHTUVtSYQYqwLCTl3Bvsa9guPJq8TKXr8BdMaIQZNASka/wDPLueFsFoxXBxPXwYDCyUjxxSoUCANJUC3eEgaGwcVJakCkUNwSodRNh6TIfY8PQ1mLhNRfAf1PAUZTwuBPJ5Gq0UOEdI+jT1IIklMLAQ1fywvJ4sJzw+FDLl8cgFZCSEJsQxxEzERFzfFCDkHGS2XJCcVCCFGlWCaBPefA/MT0QMLBT8JQQcTA7UcLRMuFSkFDYEk1wLzNtUuswKPVoABFwXLDyUf3xBQR+AO6QibAmUDgyXrAC0VIQAXIpsIQ2MAX4/YUwUuywjHamwjdANnFOdhEXMHkQ5XB6ccMxW/HOFwyF4Lhggoo68JWwF1CZkBXwTjCAk1W4ygIEFnU4tYGJsgYUE/XfwCMQxlFZ9EvYd4AosPaxIbATUBcwc5DQECdxHtEWsQlQjrhgQ1tTP4OiUETyGDIBEKJwNPbM4LJyb5DPhpAaMSYgMMND137merYLYkF/0HGTLFQWAh8QuST80MnBrBGEJULhnkB78D8xrzJ+pBVwX/A6MDEzpNM+4EvQtpCIsJPwBJDqMXB9cYagpxjNABMYsBt5kDV5GDAm+PBjcHCwBnC4cFeeUAHQKnCKMABQDPA1cAOQKtB50AGQCFQQE9AycvASHlAo8DkwgxywGVLwHzKQQbwwwVAPc3bkoCw7ECgGpmogXdWAKOAkk1AU0lBAVOR1EDr3HhANsASwYT30cBFatKyxrjQwHfbysAxwD7AAU1BwVBAc0B820AtwFfCzEJorO1AU3pKQCDABVrAdcCiQDdADUAf/EBUwBNBVn5BdMCT0kBETEYK1dhAbsDHwEzAQ0AeQbLjaXJBx8EbQfTAhAbFeEC7y4HtQEDIt8TzULFAr3eVaFgAmSBAmJCW02vWzcgAqH3AmiYAmYJAp+EOBsLAmY7AmYmBG4EfwN/EwN+kjkGOXcXOYI6IyMCbB0CMjY4CgJtxwJtru+KM2dFKwFnAN4A4QBKBQeYDI0A/gvCAA21AncvAnaiPwJ5S0MCeLodXNtFrkbXAnw/AnrIAn0JAnzwBVkFIEgASH1jJAKBbQKAAAKABQJ/rklYSlsVF0rMAtEBAtDMSycDiE8Dh+ZExZEyAvKhXQMDA65LzkwtJQPPTUxNrwKLPwKK2MEbBx1DZwW3Ao43Ao5cQJeBAo7ZAo5ceFG0UzUKUtRUhQKT+wKTDADpABxVHlWvVdAGLBsplYYy4XhmRTs5ApefAu+yWCGoAFklApaPApZ8nACpWaxaCYFNADsClrUClk5cRFzRApnLAplkXMpdBxkCnJs5wjqdApwWAp+bAp64igAdDzEqDwKd8QKekgC1PWE0Ye8CntMCoG4BqQKenx8Cnk6lY8hkJyUrAievAiZ+AqD7AqBMAqLdAqHEAqYvAqXOAqf/AH0Cp/JofGixAANJahxq0QKs4wKsrgKtZwKtAgJXHQJV3AKx4dcDH05slwKyvQ0CsugXbOBtY21IXwMlzQK2XDs/bpADKUUCuF4CuUcVArkqd3A2cOECvRkCu9pwlgMyEQK+iHICAzNxAr4acyJzTwLDywLDBHOCdEs1RXTgAzynAzyaAz2/AsV8AsZHAsYQiQLIaVECyEQCyU8CyS4CZJ0C3dJ4eWF4rnklS9ADGKNnAgJh9BnzlSR7C16SXrsRAs9rAs9sL0tT0vMTnwDGrQLPcwEp6gNOEn5LBQLcJwLbigLSTwNSXANTXwEBA1WMgIk/AMsW7WBFghyC04LOg40C2scC2d6EEIRJpzwDhqUALwNkDoZxWfkAVQLfZQLeuHN3AuIv7RQB8zAnAfSbAfLShwLr8wLpcHkC6vkC6uQA+UcBuQLu
4273iQLrnJaqlwMC7j8DheCYeXDgcaEC8wMAaQOOFpmTAvcTA5FuA5KHAveYAvnZAvhmmhyaq7s3mx4DnYMC/voBGwA5nxyfswMFjQOmagOm2QDRxQMGaqGIogUJAwxJAtQAPwMA4UEXUwER8wNrB5dnBQCTLSu3r73bAYmZFH8RBDkB+ykFIQ6dCZ8Akv0TtRQrxQL3LScApQC3BbmOkRc/xqdtQS4UJo0uAUMBgPwBtSYAdQMOBG0ALAIWDKEAAAoCPQJqA90DfgSRASBFBSF8CgAFAEQAEwA2EgJ3AQAF1QNr7wrFAgD3Cp8nv7G35QGRIUFCAekUfxE0wIkABAAbAFoCRQKEiwAGOlM6lI1tALg6jzrQAI04wTrcAKUA6ADLATqBOjs5/Dn5O3aJOls7nok6bzkYAVYBMwFsBS81XTWeNa01ZjV1NbY1xTWCNZE10jXhNZ41rTXuNf01sjXBNgI2ETXGNdU2FjYnNd417TYuNj02LjUtITY6Nj02PDbJNwgEkDxXNjg23TcgNw82yiA3iTcwCgSwPGc2JDcZN2w6jTchQtRDB0LgQwscDw8JmyhtKFFVBgDpfwDpsAD+mxQ91wLpNSMArQC9BbeOkRdLxptzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgELgEaJZkC7aMAoQCjBcGOmxdNxrsBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUHqSvAj5Gqwr7YrMUACT9AN3rpF27H7fsd/twPt4l+UW1yQYKBt2Cgy7qJpGiLcdE2P1cQSImUbqJ6ICH27H4knQMIRMrFkHu3sx6tC35Y+eLIh4e4CMKJ4DfyV+8mfta499RCAJ0xfeZR8PsoYOApva9pjGn4PhvyZS7/h5JLuhaucfjuU+Z584wwqNO4hWYmaBCcjgQPale1bjoHzMUbut/zTgxHxBnAyrdKpF4IRMASLBtD/jviyLeCgj8twWjAd3HchN/uqaeRYeHJgl7JEY9/cTrvtfybx/r3Y/NtxJ9dp+MTVmiS9bwBH73s8Di56/Ma+mTPMHq4T1yEG1fWcqr0u+hrGnJEvU1JJAm/maQSrKrazIyvSkDFkj8UUlfBq8baniTGPng6YZRL661rDNw4w/1g2figG0IhXnL7wosd/sVNo5dYSmMBTP5c7rYLjRdCwg8quwljOMPf63D8ICAL0r71XRiyFHdgwHbwfgnPOf4Lzjf2v+j+IiDHG2isp5yUnzSDyDRb4i/Vs0qHSHq8PiEQ/JnBP7PxnjN0j6gT4AVAeRx/1o9VnEUlUwvFrzJqHk9jxAw4sYxCnrxaeBdCFFKbnE7z+x54F5W7ZZsU6kx8Qocul6FoAHHy01FGL/nne61mn4+uYXfQ1Uccn+HMLKE+cZzT8BB1E3FRskOgJrRsq25rauLm8+uamXpkS/bTy6y1wDbCrW4eD532kTWrtNUmVVZOIn/C+/JR9KVR5iG9TY8iaT67ubm/whL1xbKZoqtY+a6fNxMJrg211bGYJDUkYMNWA0BMB++9zOm6Eik4roqs9CCEFW0lyAK0PbvlzvoxrZuY/OEhNW/l/63U15Od/RSvmDvXpGLiVmeGi5PDSH2bYz5o2g6wFDQ2FbZgYgTF8rPlvA1ifjZD3NLtFdXdpSIJvgKR7GpjJWG7GZGawPomIH8B5tUmtHH9LpM+/KQKunEPa1GiQkCXv4Cnm9DLORo2joicHdPDZ64obQrPZ5bgqckkj0G6/NEiPYBY4bCkL7W8G5YzsUb6GakFjykSPkT7JGeLeB6uJOGMm+x7N381BCDfbJFx0dtLgV9Q477BfL1fvitX5anV/oYfxeYl+eF5x5bB8+Ep/L2nsmd56aKF4aAD4GbJWsdKyBW22xEmAD3XdbtsMyAFoR5mOla0gEd9U/YVB7zvHGpHbQonay9Sv0bQ8iZ8piaXVrKc5AG1AmqqgaEvzHSP2Wux7aZTWh6quVDVU01JtMIVRdCFwlSbbqqhoFlyzsotQzRexFvZ/MqUSFu3OhRIuNBbufvBpdVgb8XdGJ48/lJPCZ7dsOujTTbKPSEvGXkOnG2Xdi8/nM3EMRqITd5QeU7iOjKqC7URJY6TnLsHij22xAHKnVRD5MDtBYnoGFqZGMDmXCW6Oj+BAWw14hESY/xLF6bLku06AHkiXTHPCFZ0f9YSqqo27eAhhS67OrA2Het4M9JM3jm/yRX6bYxnfmzYl5qQdHxN08FsNuWDrWd4vMUY2QD3hr8vS73SCTkFoXZR3xNzOQt8d/6HfjBmXqvrE6EGkLzK6YK2U2/ksU/iUH+LvVIsJI+ri2AL/klo+ShdDyfs5A83i2prkMs51IKR7ZcqjZJi5X3+bd8GlyWvtddxKEoEqSgEO7A8jIgf2nH0h8FjM7oB6yte3X5mpL0i/E4Rx0CotKnILJj/vJqo4VkPQ93jRtRVfaitQPqldl5xRYPq8387Z0DcnZvOeION0Ht1+P27kFLGQIcLBX4FG3sffccNHh5cPfzp9INoRtqVtdViJfg8RjnXiIz/MNqEN6zvzX3hMzyWC7oSoXIT14ubc0abPX8Rp9GVa5NI/8iv+6ela1oTncbdimRKnrbRffDR/X4nH+bgqAuHWl7hOaeXPWVzIeRl7ga+JzD4Sx3mlj/q6Ra/E2HhDf21eEzTLNGfCZsY+/yxZzQzIAuijG65ii4O/waAJCrEJaWd/DRAKMQ5678Dw5AT7RCKzdadIwd8LsD+DgPBASmWsUlf8R0k1w/2k4lO2Wpb4zMI6EJVJs0xk/wn8/fRUPqrDKhbjHR41SqgFMx5RGMPuduFwlu5lK89tW11sTqiX/5EfGs5nO+y9FKvgXKPOEmgE05EKNL6Sjb3xS40H3BVPhm0ESOZgAjZoymc8be0inDVo4JdJVf+NKd3tN/CaB7GShhH27qf95NoFZVX/6ZkR2lX+CgWrQ2INgkh+bbMz68+uJ3Clsh8HSMPEQtAt+BBE6fXDab7KIlsKxU1lIXW/KWVstpdPanJ0pdXpQinDyUQjtY7ZVcfiecRxRDMAUhHFU2cEaciQ+htiPMPx1kdvtWG9T44w3r037ljHBFJdYR0r55qvMRixtAEFJAqA4T1ES87FAx7UozXasytg8MftZYt0rjYgLe6EJ5aWvy2qscBSBQ7yehoJIA3wIIZ9ukfkyBb6qnue5ko8W50rpV4kXqWjI5nbGRXrNW0tBZHXlY48nSgcUXBHWT4GcgLZJoLlKJnV96kCYpq9eWHh7xJzkCAyrQuQ5AJ0qq/uZ3toJglNterev+Qm0KXxPg/+YbFRJdfhbp1wOnVOEYdVHTya6CtO0afhEaBhx3oHwCb5Kq6RwHDzFMl2vfjL8GwzcCoTj7wZe+UFnYDV2yKpPU9dba29gYBdNqJg/KXozO+CJTlKmlKhnqTf5doeS35DZFV+cYJQVjd+oVY/Gtc/6XPzUxb1gMqf6cEjNNoRC8AObrp+fx0cVtGu4ffC2TgXRC8zPl8moUHCB5HZ25d87mlsiiK0aNwBtcEQjRNBT/QrXbw/8aVXdKMHn9EqYEKEyxSGTpYQOaes1G1Qq8pDgqkZtlO2HRyCXpmeM7TSrRPkAh004BfisVpF6zP44n2Jvxz/gOVocNCyy9V6lkod28QM4pbaMvVJigD/w3BrsjSJrXlqc4ulBYOCceiBN4b/gHajYyupbhEt63a619Ay4wsL6a6w6B+A7TnoyE7BliWHJfzVxxIKM/W3M/J8Bx99Op863Q8eNuIMGRx++VbYfjm+VGYBA3Ap/KEu/wxBNBpJJncwHPG45V8Gh98ZIrGCc20MwijGowZbcS7d1nEgcOW5cddZpHL2XPAIRbColiheZzXTvBxZOY3iMSDSKDrICyJ/iQs1vdplVdH/JrLJsQ2jtTnfCrITIghq3KFX3qAgLWAIp8IffNSdTYptnbGfc8s+qcr3zyzyHp1aJg+jxTF4kD1ry5Wauv5V3xnOGwTFecNzXSLHBW20/pCQjk4uorD0plIhMSTc79+/r4RKPClRYTBYex1Ob5crtfvRQBBv6re/6FhtCqtduag67glqRA77/3ulblh9YRtMdDxkCyJDeNnAuCLPQFmdRRWJtH20Z8DstfJf+5oj5SSB64d0iF5/Ya4KfTWxfivj9Ap2/zbYaTo/1gO3tM6RYsCZharMBFr7Fm61mLSrQnEI4OF1gbVS4k/JE9UotOrnLJZuswoWodCSV8zbybkJSVIP7n8UaE9xCR39rJZmf27HOAPVOGc9pdkQUcRrI0qyVF9Z3j1RHDbxIfwbWzmPVjwIdPJvtmBYwEQIUsIW1S939hcVikK00ozPRI02cqhzVUNzpOxVdrwRPvlh1aIOf0xFEqD3YkGnCnFah/cFN3J2gB7N+bZSGawwkKFu1tpQMrp1W+27YNkyT0TpcFpTqgOqqLabrgcCUPxh97mREOGy4xItzQ9xSl6rq+8BZsHcrQFReS+QeMxJ3P6CnL9EP/eOLDjumLhvrcQrpPiknsofbzBv9gTP0lU+TIVwE6E7CcKfT36q+ZiEOHJ9ayf0dyUJLezAb2M8aNHwd0+OJmsVgTzRWA");for(let[t,r]of(n=new Map(eh(e).flatMap((e,t)=>e.map(e=>[e,t+1<<24]))),i=new Set(ed(e)),a=new Map,s=new Map,ep(e))){if(!i.has(t)&&2==r.length){let[e,n]=r,i=s.get(e);i||(i=new Map,s.set(e,i)),i.set(n,t)}a.set(t,r.reverse())}}();let t=[],r=[],o=!1;function l(e){let r=n.get(e);r&&(o=!0,e|=r),t.push(e)}for(let n of e)for(;;){if(n<128)t.push(n);else if(eC(n)){let e=n-44032,t=e/588|0,r=e%588/28|0,i=e%28;l(4352+t),l(4449+r),i>0&&l(4519+i)}else{let e=a.get(n);e?r.push(...e):l(n)}if(!r.length)break;n=r.pop()}if(o&&t.length>1){let e=ev(t[0]);for(let r=1;r<t.length;r++){let n=ev(t[r]);if(0==n||e<=n){e=n;continue}let i=r-1;for(;;){let r=t[i+1];if(t[i+1]=t[i],t[i]=r,!i||(e=ev(t[--i]))<=n)break}e=ev(t[r])}}return t}function ex(e){return function(e){let t=[],r=[],n=-1,i=0;for(let a of e){let e=ev(a),o=eE(a);if(-1==n)0==e?n=o:t.push(o);else if(i>0&&i>=e)0==e?(t.push(n,...r),r.length=0,n=o):r.push(o),i=e;else{let a=function(e,t){if(e>=4352&&e<4371&&t>=4449&&t<4470)return 44032+(e-4352)*588+(t-4449)*28;{if(eC(e)&&t>4519&&t<4547&&(e-44032)%28==0)return e+(t-4519);let r=s.get(e);return r&&(r=r.get(t))?r:-1}}(n,o);a>=0?n=a:0==i&&0==e?(t.push(n),n=o):(r.push(o),i=e)}}return n>=0&&t.push(n,...r),t}(eA(e))}let eI=e=>Array.from(e);function eS(e,t){return e.P.has(t)||e.Q.has(t)}class eT extends Array{get is_emoji(){return!0}}function eP(){let e,t;if(o)return;let r=eu("
vendor: 20,100 bytes, line 4273
4273AEkVMQnvDV0B0wKWAQYBQgDpATQAoQDcAIUApwBsAOMAcACTAEUAigBRAHkAPgA/ACwANwAoAGIAHgAvACsAJQAXAC8AHAAhACIALwAVACsAEQAiAAsAGwARABgAFwA7ACoAKwAsADQAFgAtABIAHAAhAA4AHQAdABUAFgAZAA0ADgAXABAAGQAUABIEtAYQASIUOjfDBdMAsQCuPwFnAKUBA10jAK5/Ly8vLwE/pwUJ6/0HPwbkMQVXBVgAPSs5APa2EQbIwQuUCkEDyJ4zAsUKLwKOoQKG2D+Ob4kCxcsCg/IBH98JAPKtAUECLY0KP48A4wDiChUAF9S5yAwLPZ0EG3cA/QI5GL0P6wkGKekFBIFnDRsHLQCrAGmR76WcfwBbBpMjBukAGwA7DJMAWxVbqft7uycM2yDPCLspA7EUOwD3LWujAKF9GAAXBCXXFgEdALkZzQT6CSBMNwmXCYgeG1ZZTOODQgATAAwAFQAOa1QAIQAOAEfuFdg98zlYypXmLgoQHV9NWD3sABMADAAVAA5rIFxAlwDD6wAbADkMxQAbFVup+3EB224cHQVbBeIC0J8CxLAKTBykZRRzGm1M9QC7DWcC4QALLTSJF8mRAoF7ARMbAL0NZwLhAAstAUhQJZFMCgMt+wUyCddpF60B10MASSsSdwIxFiEC6ye5N2sAOeEB9SUAxw7LtQEbY4EAsQUABQCK00kFG8MfBxcAqCfRAaErLQObAGcBChk+7Td0BBgXAKoBxwIhANMrEnM681CwBZA6dyc1SAX6JwVZBVivuAVpO11CEjpYQZd7k2ZfofgLEwPFByXxdyMEo0sCU1MCdRurJwGPo6U1WwNFFwSDYQkA0QarPy8jBykCOV0AawFhH3EAgx0ZAJUBSbcAJ2kXAa/FAzctIUNTAW9ZBmUCZQDxSRcDKQEFAElBAKsAXQBzACu1Bgfz7xmNfwAJIQApALMbRwHRAdsHCzGXeIHoAAoAEQA0AD0AODN3edPAEF8QXAFNCUxsOhULAqwPpgvlERUM0SrL09gANKkH6wNTB+sDUwNTB+sH6wNTB+sDUwNTA1MDUxwK8BrTwBBfD0gEbQWOBYsE1giDJkkRgQcoCNJUDXQeHEcDRQD8IyVJHDuTMwslQkwMTQMH/DZCbKd9OANHMatU9ZCiA8syTzlsAR5xEqAAKg9zHDW1Tn56R3GgCktPrrV/SWJOZwK+Oqg/+AohCZNvu3dOBj0QFyehEPMMLwGxATcN6UvUBO0GNwTFH3kZFQ/JlZgIoS3ZDOkm3y6dgFYj8Sp/BelL8DzZC0lRZA9VC2EJ3zpfgUoDHQEJIocK2Q01CGkQ7wrFZw3hEUEHNQPRSZYAoQb9Cw0dMRWxJgxiqAsFOXMG9xryC4smqxMlevgFzxodBkkBJRr7AMsu44WsWi1cGE9bBf8LISPDFKRQHA0hQLN4RBoXBxElpQKNQ2xKg1EyHo8h8jw5DWIuD1F4B/E8ARlLC308mkanRQoRzj6JPUQiRUwoBDF7LCsnhwnLD4EMtXxuAVUJHQmtDG0TLRETN8EINQcVKZcgJxEIHUaRYJYE85sD7xPNAwcFOwk9Bw8DsRwpEyoVJQUJgSDTAu820S6vAotWfAETBccPIR/bEExH3A7lCJcCYQN/JecAKRUdABMilwg/XwBbj9RTAS7HCMNqaCNwA2MU410RbweNDlMHoxwvFbsc3XDEXgeGBCifqwlXAXEJlQFbBN8IBTVXjJwgPWdPi1QYlyBdQTtd+AItDGEVm0S5h3QChw9nEhcBMQFvBzUM/QJzEekRZxCRCOeGADWxM/Q6IQRLIX8gDQojA0tsygsjJvUM9GUBnxJeAwg0OXfqZ6dgsiAX+QcVMsFBXCHtC45PyQyYGr0YPlQqGeAHuwPvGu8n5kFTBfsDnw86STPqBLkLZQiHCTsARQ6fEwfTGGYKbYzMAS2HAbOVA1ONfwJriwYzBwcAYweDBXXhABkCowifAAEAywNTADUCqQeZABUAgT0BOQMjKwEd4QKLA48ILccBkSsB7yUEF78MEQDzM25GAsOtAoBmZp4F2VQCigJFMQFJIQQBSkNNA6tt3QDXAEcGD9tDARGnRscW3z8B22snAMMA9wABMQcBPQHJAe9pALMBWwstCZ6vsQFJ5SUAfwARZwHTAoUA2QAxAHvtAU8ASQVV9QXPAktFAQ0tFCdTXQG3AxsBLwEJAHUGx4mhxQMbBGkHzwIQFxXdAu8qB7EDItsTyULBAr3aUQAyEgo0CrUKtB9f81wvAi1uPUwACh+kPsM/SgVNO087VDtPO1Q7TztUO087VDtPO1QDk7veu94KaF9BYecMog3QRMQ6RRPXYE1gLhPELbMUvRXKJVIZORq4JwEl4FUFDwAtz2YsCCg0cRe4ADspZIM9Y4IeLApHHONTjVT0LRcArUueM6sNqBsRRDwFQ3XpYiYWCgoeAmR9AmI+V0mrVzccAqHzAmiUAmYFAp+AOBcHAmY3AmYiBGoEewN/DwN+jjkCOXMTOX46Hx8CbBkCMjI4BgJtwwJtquuGL2NBJwFjANoA3QBGAQeUDIkA+ge+AAmxAncrAnaeOwJ5Rz8CeLYZWNdFqkbTAnw7AnrEAn0FAnzsBVUFHEf8SHlfIAAnEUlUSlcRE0rIAtD9AtDISyMDiEsDh+JEwZEuAvKdXP8DA6pLykwpIctNSE2rAos7AorUvRcDGT9jAbMCjjMCjlg8k30CjtUCjlh0UbBTMQZS0FSBApP3ApMIAOUAGFUaVatVzAIsFymRgjLdeGJFNzUCl5sC765YHaQAVSEClosClniYAKVZqFoFfUkANwKWsQKWSlxAXM0CmccCmWBcxl0DFQKclzm+OpkCnBICn5cCnrSGABkLLSYLAp3tAp6OALE5YTBh6wKezwKgagGlAp6bGwKeSqFjxGQjIScCJ6sCJnoCoPcCoEgCotkCocACpisCpcoCp/sAeQKn7mh4aK3/RWoYas0CrN8CrKoCrWMCrP4CVxkCVdgCsd3TAx9KbJMCsrkJArLkE2zcbV9tRFsDJckCtlg3O26MAylBArhaArlDEQK5JnNwMnDdAr0VArvWcJIDMg0CvoRx/gMzbQK+FnMec0sCw8cCwwBzfnRHMUF03AM8owM8lgM9uwLFeALGQwLGDIUCyGVNAshAAslLAskqAmSZAt3OeHVdeKp5IUvMAxifZv4CYfAZ75Ugewdejl63DQLPZwLPaCtHT87vD5sAwqkCz28BJeYDTg5+RwEC3CMC24YC0ksDUlgDU1sA/QNViICFO8cS6VxBghiCz4LKg4kC2sMC2dqEDIRFpzgDhqEAKwNkCoZtVfUAUQLfYQLetG9zAuIr7RAB8ywjAfSXAfLOgwLr7wLpbHUC6vUC6uAA9UMBtQLuhQLrmJamlv8C7jsDhdyYdXDccZ0C8v8AZQOOEpmPAvcPA5FqA5KDAveUAvnVAvhimhiap7czmxoDnX8C/vYBFwA1nxifrwMFiQOmZgOm1QDNwQMGZqGEogEFAwxFAQsBGwdpBl21YwEAtwRnuw2HHq8JABNxNQAfAy8SSQOFewFfIx0AjOsAHQDmnwObjQizBhufwQCnBRG76R09PhZ4BWg3PkArQiFCtF9xEV+8AJbFBTIAkEwZm7k7JmAyEbrPDi8YxhiJyfYFVwVYBVcFWAVjBVgFVwVYBVcFWAVXBVgFVwVYRhUI14VnAgICCmRe6SsEyQOxBi+7uwC7BKe7AOdAKRayBUY+aT5wQj9Ctl91N1/oAFgRM6sAjP7Ma8v8pudGej0mIwQrFic2NX5t32rB8RnCLGkBa9duMBcFXwVqycHJuAjPSVsAAAAKfF59i74AMz+BAAMW0QblrSMFAIzDCwMBDQDlZR09JB9KQrFCvEE4I18nYDYnOCMJwT0KRD9DPng+gT5wPnECiUK8SUI7X8tOT2pNCixrVC9qC24fX+AzOhsJZ5sKYiMrPB0mQqtCvCvMAcv8X8kOHy4JCAkifp3fajotShfJq8msCWXBy8wKYEFfD+UQoxEAk40dRUIlG6ltOc44CjM/Qz5wQj8cBwodTEdsWywtWuG8Egp97R0rQj8cXQhKCQ4zVENCNwQ7Q5wsCoEbLUI/G/UIUyIjGDAxAAWPYfBeCnFkyWALYC0jbkNgGTkCGx5gswYCaxBlTmBNEQFk52AVYJVgfWCzYEtgkWgWFwa1DtxVqbxaC0MWqwG7K83BAh8VABwDHgF5AmwvMJVSgAGKCrhHGgDkI3SOCsoNpk3qAZsCh5xPBUBfAPf3BwA0FlcMC6UMJB+6r0eAgQw0ABUTnyuCCHoC0gtLZREbANhOBnUECh5aADEAtritAJQnCxZvqyQ4nxkBWwGGCfwD2e0PBqoGSga5AB3LValaCbthE4kLLT8OuwG7ASICR1ooKCggHh8hLBImBiEMjQBUAm5XkEmVAW4fD3FHAdN1D85RIBmpsE3qBxEFTF8A9/cHAHoGJGwKKwulODAtx69WDQsAX7wLAGNAlQh6AOpN7yIbvwAxALa4rQCUJy07Ds4CkBh7ULtYyHRyjsOlmw/ZFUkb7AEpEFwSBh/lAccJOhCTBQ8rDDYLABEAs+AiAQIApADhAJiCCrJrOS8AFABbG8YubHYqDcEQAjskHNPhHB4LG30CewTBCqrxbAAnLQ6mLs6hHAe7CQAQOg+7GkcczaF3HgE9Kl8cLs4RGQB9q9ocAuugCAHCAULz5B9lAb4Jtwz6CDwKPgAFwAs9AksNuwi8DTwKvAk8DrsFmAEbawouzqEqD4sa4QHDAREWOwCgCzsLuxC7BBiqe9wAO2sMPAACpgm8BRvQ9QUBvgH6bsoGewG7D00RErwBAQDqAQAAdBVbBhbLFPxvF7sYOxjbL7ZtvgNIqLsAB7sALrsC6w5WAAq7BAAeuwJVICp/FTwVuwG+J+QAsloBvSjgo7vIAAFbAAG7AAJbAALjAAg7AA67AgAbu6VbDr/EAPQAaPuoOwMBu5UnSwDn3Rm7CBp7CKEFCv9wAN+7p7sau6OLeXIG+6mbgwASuwYbCwG8AACGAG27BgALu6c7ARo7ugihnMoBuwvtB8CpOwDhewG/AADlABW7AAb7AAm7AGmLABq7GLuOaRX7AA5rAC5LHgAGuwAXuwghAA1KAcIAt68mAcAAALQADpsAHBsBv/7hCqEABcYLFRXbAAebAEK7AQIAabsAC3sAHbsACLsJoQAFygBunxnVAJEIIQAFygABOwAH2wAdmwghAAaaAAl7ABsrAG0bAOa7gAAIWwAUuwkhAAbKAOOLAAk7C6EOxPtfAAc7AG6cQEgARwADOwAJrQM3AAcbABl7Abv/Aab7AAobAAo7AAn7p+sGuwAJGwADCwAQOwAIPAAUOwARawAPiwAN6wANuwAZCwYWGwAVOwBumxm7ALobLgATOwMAaSsKAOFLAAI7AARSABd7BRsABtAAGLsAC/sAX7sAa/sA5IsBuwAXdgG8AAFyC6EABUoAbXYAB/sA5XsAHGseAXsoUgA5RQD+Bw0McgAoKnABpAUIXgG8XiMMCQdvS2xfKokfPBRiLTYDoQq0AdgAFgLRA24BdnJHUhQhA08CFT4BLAYDc0a8e1J6QAApADEB+wBTCtsAe5AsASsAduUNETJGAUoAVwUAAVABB4rMAHg7BCClAFoA1hUAlWg3H4sAzWuxAM/UFgjCdXMbGFYdCdEBiJCrIlNTTUgSPMKJ+QB/HDdAKSvgEZdPAHIBKSwwKUIZDwMwVQT3xe4AS2XcAGoCcQI/EXo6x3guNdUGBQAQGx0KCAwqBB8dKU5TTgi5ugAKEs0AJgABGgCGAIkAjjUA7gC0AOAAnTwAuwCrAKYAoQDyAJ8A0wCcAOsBDAEHAMAAeQBaAMsAzQEHANcA6wCIAKIBNQDjANgA1QMBByoz1NTU1LbA3M3QzkMyFwFNAVcvRwFVAWQBYwFWAUdLQ0VoDQFOFQcIAzI2DAcAIg0kJiksODo6PT09Pj8OQB5RUVFRU1NSUylUVVdWVhxdYWFgYmEjZmhwb3JycnJycnR0dHR0dHR0dHR0dnZ3dnVbAEDsAEUAlgB0AC4AYvIAigBTAFMAMwJz6QCH//LyAGAAj+wAmwBLAF4AYPn5qgCBAIEAZQBSAK0AHgCyAH8CPAI/APgA4wD6APoA5AD7AOUA5QDkAOIAKQJ3AU0BPAE6AVABOgE6AToBNQE0ATQBNAEYAVQPACsIAABNFwoWAxUWDgCKAJIAogBLAGQYAi0AcABpAJEDEgMkKgMeQT5HKQCLAksAwwJTAqAAugKSApICkgKSApICkgKHApICkgKSApICkgKSApECkQKUApwCkwKSApICkAKQApACkAKOApECcQHQApMCmwKSApICkRZ5CwD6BQOnAl0CNhcBUBA1At4RCisTAUo3E02RAXekPAFlWQD/Az1HAQAAkykeGI9qAClgAGkALgCJA5TMi/CuhFoFuisOwhEBndV0KgsEIzFsATNabAGyAN5+gH9+gH6BgoJ+g4aEfoWIhoCHgoiCiX6Kfot+jIqNfo5+j4KQfpF+kn6TfpSDlYiWgpd+2gLabOEC2GwAgmwkbKAAg2xsBEkERgRIBEsESQRPBEwERwRNBE8ETgRKBEwETwCWZmwAowOIbAC0ZgEFbADJUWxsAM9sAgxsAPZabAD2ARkA9gD0APQA9QD0A31ebNSEI2XAAPYA9AD0APUA9BxsbACJWmwA9gCJARkA9gCJAL4A6AAIAPYAiQN9XmzUhCNlwBxsAPdabAEZAPYA9gD0APQA9QD0APcA9AD0APUA9AN9XmzUhCNlwBxsbACJWmwBGQD2AIkA9gCJAu0A9gCJAL4CNwD3AIkDfV5s1IQjZcAcbAJDATZsAkoBOWwCS8FsbAJXbGwDnwLtA58DnwOgA6ADoAOg1IQjZcAGA31ebBxsbACJWmwBGQOfAIkDnwCJAu0DnwCJAL4CNwOfAInUhCNlwAYDfV5sHGwEPmwAiQQ/AIkGjTFtIDFs1m4DKGwDrAJsbABVWv4VMgJsbACJAmwAVAEAul5sAmxebGwAiV5sAmxebD3YAEls1gJsbEbCxxP/x5BApA0KYFA89AsjTx97EHmJQPyocItC2JnNFRCEnFU6SFTDoI0PxeRNRoNRWkpzVnWW8pTagkNmgf+jGupqZ3eu50LAFnc+OzfJwdub1AdpOy76VnijWNR/CMEevikQkFyQuLuPajxWi9chqOoMJ7qpCN4sx3LJG4Myu8kD68wC6+iAwt+pU1JEeY13rpCVkXSZfinVKn4xZpxsI3Lp8bJLrJ9ujkrIalMRBAcv/GSKEtowzcEn5XmJw2BagB8V2UWJoJHZ14SXhM7p0XeGFOuw6mlvyq99WYp5XxrO6ru9nn4RHcOkJ7hx5UqWtman7yVMLzYXQefQRUdIY70RYQE8+aAzCNSGQkXiHfnHYRMi+xczKDdZLk3AV1gzxkkSHLjBwuq8shIJ+/RAbqjqQbugFhe0rqklu432EERkM5k9y1DXzds46oLqKAx6OhPT2WiqEfhaITn7OF9Y694AmKmUvbpWp0xJqDaf3jeNJXnK6NpnGcFOmbclbARC+5+5U52ufw5b0Hh+2LrrNimvZe4eYmApRsZnJE310SqB+1xB6rSJfnV1f2D0awB18Oc0sXAFqIlgHgWiaZGdvP5CJUSsCTCQUC335+iSkwPlLJJ5lwjTSn9Lw22NbK1Tu8w+bUpHtDRDPho7Gun8aw2Jzu9i+N0Ot/kPMbLAb/rUQ82kfpk85qLDkfxLl39QPDngo72GYh/Xigbpcm1pA23D2ywt3D8GgMOao040wDqkHxOEx0OhC+ZmHiIdjK7yRbfJD2ouZbAedhD3p7s8WDmCJfNforgDYPGAXSI08fTjPZ5B37lc5VXGzc1vJmibDwBNVzXuaUzg7N5H4BxqjhJ+kz9HLUJys7bpBDYAPvbut13AwJCWd059tS8YTYgC8HwrkewBfa1LSSpmMr9uR2EekTiAMH+Mx4AGzgbquccwBDlLmRhgXL/YiLPCEb6d2k5qJ6o800qddABkpqt7NG+sc2uvHZwZs57W1AHTFM1KkMShasADAh2FvzbzJOzVDMS3ZlT2BSFKdnkZFB6JyqJbhm6XANis9TrtzJdlPVp+rl8v3nIke6Jou7m2TKu53Vounupgkz2LzrQPhhatLIG7rfF/gUKWp15X3LKt+ZvuCDSqPUigF9yJntimC1HJR7Yj/dUrLAXWrT+1tnwPJJLGKAlQ5VeNDWRKCTt2vz3rJuo4+gIt75/Mkfl/gSZblZ9r/SEeeosZXneli/xNh1WVCvkRt2RnyyjtMkMqhzXh1PVOCbILqv0r7rGYm0CHIyKdhHL90cl9E1I6eEtQTCt6RXj8M0HHrHCHLVRpNM6WIbT5BCMGVnL0o5895qSRbCJz+5I8PGMhAN/Xrj4BgIdlKqlHtBHqTJwmK169toZ2IWxNzrAbIG7zh85Q/LG2A4yBcaBel52zdunokB0lv3A7kXnTI7M6ZnfZ7nwuj5lkGhqSpW+w5CI/FmRlplBEbnZy1ZxS3DL8rf1YWhO5XivWZBSRh1gFsjjyj3qRG1cm/6ors7WsEif6WRxns1MKDZa6KrbfMQ/swIb+2nb0tqxHeii6FcgVeAjE/Xwac1owx04dJKG8R5YQgHNnEfHf0qb8WOnU0eQSjazq+IK7cSuCqYzPEUB/x+QgGZqM3dBoYvNvZVOHDkbgdilWdagqO5bkybXfLpyMPuGq8mvAAEZGbR6RwXGlW9ErOWTfnjfx6dXFJqBj0OBSGFz4lWQasNOmVJeN4SFWSLfOGB/7ehV5YuoNNROHZEG9ElVuMnqbDMMuDleOt/cN/gsWxGw128mwU8/HxkOKqdTZnI7dHka67WCTf/FmBrxpNCaKJ1GxBTCSS7MNfhNj8S4Gtotg6Z3AM9cAeVROnppUMaiV5jjudLnNqoVrKO1/FijLlAc74kxydxKX1RQuMqHR63eecYr5o6MJ+B78VsLlCrpelWh6GOrCOBIoQmIcdpJL1pwE2zzZqBkecGTdK8KMOB6r1eNRURyrz6M899TZaoS/vNOxHf+5gORU+OyYIcIW6diP25GHF6u8TNjuL/GJzCnLLXd01KrsjRa51v4+O/VIAWXESJxfxWjv628J+cWUQpoD+Yytzs3jSMRJ23/XT+vUdtUMLDQq1vnIoeg/GjWh88MT6k9dRqDaQ+vodilFgvjuNw5pJpId9mfwyYeLCGb3BmHXdfQfhfPRQaupe/f8TG4Bk3eDKlYBaEK3kZYNN2Sdxz47m/vYBxvIOKtnqplB1pebzuXmAr/MuzQCknKe653dzaWQQ7MUhWYWvzIZwLe1v0rXxImLaz+AkAu+sYikhouNF3EW6w4crZ6MuUiDbIAx8XhAfegcvW6x9BPb3/sCxGWu9YyatqExB+TSm69qIkI9IwhjrcnzME+jWBx4mNQm5WwLzUjSyY4FZ0aMF5YFlXUD4hL4XfOeYv5rDe2s2D/Cn+28fZ9UCnOQvXFMnQqfc0G+ZqOWWD9l/liqUPaNQzZjxCHpUAD8Rcc90MniQ02ugHWsUupFUvhC9usY7zNPt5F2jO7qgzhafsQSd50jgLrC6Qx6bpHbXR3WNAu1BzGmwbz+ebGmwTjdy006Y6zipP7n/OJlvSmbq+SY+nefAVKK6EBMPbce5n3IdRI8+vbxCpN53rw3TvgNds1SuMiuLGxt89L71mxPDeanGhyHvOjmO56tnVpoHalQnL6TqNuqKsHjHCIKB4pCgj4WyYPvRvYvqi5EMr7lN3MotPR/KH7JUD1lZbU0QzfbrEBJnuQiVAyAC9vwXWp2TRU1/0aapyAH2cbglEHVAdl+1rb1u147uV0td1eNoQZsqHrIMIYVPXtLk2TIU3cJE08PjoYNDpfF/IcJnYQHl6nsplczX3Rgah4NbJJHl//5scUufqsSd//kbIS406ZWoMP//+jhGUswX/5nVNz/jAj9KmXPtAmMiK+khhbn1w/mELzZMT/WxcW//y/jsHaOM/61oAW/CjYhJtY622/TtMYuP7bilBvbiT3vB9n8IcFPnwM78H0KfhYDRdY5PhWJ4jWRQzB+HT5NVZV56LG82hcQms+jOTT/c9Y9sx5rPi1/wB7f/+c5UfUCKk3iwwCuywUc2MGnAwsXf1E5hoI55x1Q/Qby+sWH8NRjavZ8VaDsdi1NUVhH86BJHX1yaFt1w1OYeL5LVmdN+5Q+KuTvXEPDzUCg6xp0HhsUhTWSe7MZMM/6rsTUb0/nbUE3YQlGGt48kT1/6cnf6yHnvHtQx9EosOXN077yyEq/jE3YTiG/5SEJmXFeocJJ1EAd6vKeK6VEdJLOZ1km/EwOnZWCQpzCLKPHxrfh4yJhGq//2dos2E/3+MOcdW5EsgIdmTQUQetzRy5fQHhDBl37XbWzsqO/cASEDjyst1/8NEROqVAxWnddQV+umJ8IrKVgKvGaTc0GsQ4s8h0Osql5QKwlddPDjJhKInyWqYUKmmlIts+FIcXZ6yM6cljbsjUG2ksSOkuIw4sYHffRNgBOLApvD6XrR6Rt0rV2Uf8IpnIUVnb9Twt91QjAaD/dStSWDxg7aYY+VXIgnuowYdOkjywa2hlgrnI6PjaU3e3UjQ5Yk5mdIJGyHnv3/P+1EkMav1yFyF+FeJE/RXnWBw+Nh0aOo6TGlKX7d+dkP9+brvr79SdtXJtcD/aXBGiMNfG6/NQniQHYQlK78FEHDqOh+bDI0o+2Ub0h53EL/vlzjrBczVEZz2bOtvIL+DIzDkk9nCWt7tlqsq3l9JMtJk3r5HG2iJ9b/X11TG6wwMAjHLQ2oasaMEsydh88QPvI+hmqIHhvalpKoKOueJR0eZ9J8G2alNOIOy98jwvbc87Ewk9d+5G/tUijTmlbjFlDKXV05HalKxaRTrucc73On7yzAPS6f2v4ogiaWyWeV73dv/MsQT5HjRrsYV9dLAcI3T+zC2qEVINyNpEhoKV+xVSuWtT4AhBfpnZ7unIM+HX3msI0HiI+P+z2PFgkjGi5PqEbG/wNIWeRUjPtDEgbbubN+I4JaDLrW9borRBDob7ZFx+JdKeFVUKVeWqb/c88Ol7DhM0suLtuEd8tkDSMTD3DFx8UphPINHMHi51hAPttXL4Ektt/lKEUG/R4qZKohHjVpAcPIMiHyWr6xR8/EWnNJvBFET76yCdk5er7ADB/1bgoImhpSiZ/omZjPKPCEeZsOwvPmXL+1vlJNeGO3TzySmGA1X6e58gLrazDM71jywM1XL8zKHN6G3kB31Y8vLtP982N975SZXk2JwDvmv7AY/aDsFFk1v+nE7/hbvuOWhBH4kuemeYozPk2K22Vx/YGiDTLU7YilpOt29u3RZMBh4UJjlTP5ItxTzWv6ebL9b+GSU1Vsm2S8LMfVfJczaBSqE8J1A4YUjpsALL7++bwCPXFhaufdpDFtBlHb9makeYbqdg9ltvK/HwF/rNE6KrtWUkEcxmTB7Iyu5TiVaIgW/YxzQhpArliIMkOoK5L7ShVtF+DYqV01mk7fwop04hQRwg4KFmr5z9nYf05VVqkSe7gfnx5bxxlQ0qEV0jiwzf064qG11iEqjHcUgDWWsDs/LEGlzX31T5KVL+7D4EoKim7HBagiqRo5JI3WfDBgpKIruWz9j/J6Hp5Q/EJbMWB8NeSMuFarNw3AEYPBJtYQO/4oD/ZgPTSQ06di0EeumX5EbrdThO+fvYEVSxLtZ3AJkee0Xn0sDwNtiiZhJjJRDuG1YRKB1vOulfd9JjHeyu+UHTmrtra/pm+8Rixh4WKiLaLOCxIbZNoWRZSyyUGLPjAaAo+SQBpfO2uruWrzFxLlpvrXJNMCWtlJDKGAnlWK5xpU2tcxXbeD+sbdfwYXt/qTwDk6UqXR/aUt099DhSNl4Nk8mXwpw+b0nvjKOG6Mg1PRXjrMUMANvNgEArv8nMJs3vj1aHi8MHz/UfJWWzkcrSpZTNBhduXlGR7i+ip/THDp5R9KRNcDKECgtwgXg4EFN5HHfikP/XvsoCkHTg+NbsD8Gl6eknk4Arwn/BWGJ0hgW0/gUKrzuGZhub7igRP3abetpIm+24xEOlWl3YKpm2qTBFvX8ddDRvm1LcwnCJuEfZx12qPY9TrntMIQsv316zvpyWnyStX8VU4j6tQk+CWlLBUCJR6MdH9Cp7g2qdn2WM9qFbREmejH09dlWEPm8hPF0L7RxwRRdiCs0DP8ewk6ApoELkKU9hckSdbnXm8UHJmaNXjxv/q0fTTpu8rnl9lN0vQCpDRbCtcz12rGRFEA7Cfg7FhZn5QFkNmv1ZURKEsiZce1nS9K7HrwpC7yJV4Xt3eAVbLJfoXHrtwG60Z8gwaSnmxoL3s2ZlRqggZN/MHo1oUS4L+GwObFI596Ld4Mvi8l+cQmF1gJpkpnDio7TuO35npaMHiWzFqPSX3qNgkIPGuX0qGYnPIVsM901Yu8oZnOZOY1TbtIdFUNKNq2dP8SJ4F/VCEzIjF0/Rh+7UrZj80tC6rognVH3mqa8eCs/lcQU1Pjj98kBmAKDbZUTwosv02UunRR3n0X6c+f73mtwB7/WbQ16gO431EtwZbNG1SM4TZPBnsQSESlsfG2JLQXx5xWf4bmQ/xcVCPISAX5897JxHKLD/Xkgu57+ABR2+MMtEbX64+MNlBHpKC7sjlWVEShf5qA+dGc59LFVlZrX/Enq9z/v+wnZ1HErmxmjJjxOA+hAjVUWgtq6ygAi/8ewJDjUMFw3zhQFtbyTLDPFd21Ji5S5QPZo9nMSxdg1+DGFSN0wlWt7XeYPbHqLfliV0J1kOhQNp0VbUPy0MS2Ms66OxtSWvaULaWHnfAA+sieVVgtjDwN3nKonWapkSKRN8BKKJQpCfqo8RQI5udhfu5s5+7vwsppmAJDgz2GNA7d43VdbV2l/SrvEu4RYslmNJmfSOVbssxAhSYy6WxpIQdDB0FVBpZ6IM8yr81QN+XLZ3n/wed/R+s6LslkxKbzzst/GkRbe6rFmtvJCwr1T44ETM+IMgOnjUO0eG6a1n2w7lwM1oFBvzMUWRkNFOvKcx3oSb5XdenZ5dXsute6nkRypBiSdAtA2fxAd8UdLOZW/MB7fZoEuFheQXijdaF8kuaRZoSeWdKOkKsGYEGaXfaDKTu0WMTcLniQs7KRCz9iK3SP+Y2xIjkfVGqFLSQ6vh+A1u6FdfwXsv1VPMfi2cxmdM+/xTgMXEyo2ZGcQ2YmPsghnYdv2+z48JpGZA4tUK1p1q2VdVxyfypXEXcrxKKtmt8UdW7sHWmKMqDuBBM3J/JUQx8eUYN4pJ5oRqvdiPHU1o/WPjiKvnlCqOdyxlxF54L9PrtLD1NejZ9aZDivVr6ZfMFK1/psVygoPIAnphcJWWb9+5IKMKmgRQULsTPZi6Bw4wP32zVEoKcHpP73CkFAqS98nSaGoWDjDJiaACJn4p5o1jq9R4Q4VcibhXF//LHP0bdf63kRVZdRbbhGe7sDQcyWS5tpkfeYHnff25WK+4FpzLlAcbaKmHdIBqOw3fImx1uqQIADH0TyHzFlqTG6nMoY81svP0T6BIyELMS8tMe+E1p6TFP6sVpZa6VNaTumufD5aj9goRa9SAmdJT4HhI2r0egj8UrgFb8L59wGLnYlzkLAiUd3m/WWIIEU61kPoEjd3gIVy/fiBcgqQqHnoXpL0SqLGdGGgn7DQeVMSYWHfjno1FngIKP9cjYaTlcRP6bZunjHP13/lbVm4awti894pTf/ZNNqr4OR+tDVie/m+rC8QpVnRbsCMPukOH87B2jM4AG6pHuXl1x9SiKdhYJVOhfo/+SCaGjUW2CoogL1FFhFGN9o+acoVLl0SXs/3vrSccmZeAF3NewFuOg/P12QYKQF+SH+KYcNnsAhIAELPBUgre/KRUJEA+KPD0MHRjv+3J/j2Z23MuJmkfy7leWcMsti8wXLSHgXFJTaksx1Woi6oljwxFVIJG12SBSZLNJDbXMYPekmiXT4FclKI35BFgqnYpKfcsr+f8HUXQoHJ9UYZ4J5YMiHHyAxg6eidhodgqJ2Htf/xYEx+G0zXchuzlt8hcAl+AT8NCQ4orFc4DerabF1enA7NTLnvtZh3FUwqIOvY7Q4DYmoDHwXTSw5UNNh6r7j0B/ezMYJMDcw4+6gCTZX4YQ+7Xs8de72vsR3cmfpxIX64/6KR1p3VX4F6vfHEzxzarh8aDH4G1DFoBBM6npXFpK+Rh+WrcFclAeAxi0PoaR9CpOxxGLSdvxKVSw8oOOanG/soKImRopN38AdcUhhM2GT/PgQeSQrG12njuJJD5Z7vWfAZmFybYLdSA91kB4aoBhoj1Z//KNIVVujqaLLRwCkbyn4vh0739C9V9iSjybeOIeSOvNs7LW1a7EUtNoKAnOGML4U8KBXpfrw73WjAszJG4Qscq+Xr3kZWR4Omm0xT6qE9y6FNSpstV4onMZSqCEJ+3VX9qjvdx5QVrM0WXxmPZxejdfnihcFAjzv5PjlTl6ickDbHe6+Lch52pjOPqk+m3RZ+bh2JSMGtFBuODbMchrpRVlt16NTQ05Ps0IDtWlUmWfP2vX8M4YDynIuOZ4Ck91+591B98Gw9fw+yQogTR8CSg0zaJu+rlBo/mr3A+1NziF+kdubz+whc857AZt6DwIBIF5+5yiaaf3ByQp1Fm3sOkZDAzwsYSQTM/Kv6idkugF63FDobDdUY3huruU+sCaBuRR+HmOowvmZoBjZHNh77SXFtmY/oOUE7ifN7nBHAo83S/xvcS6H4Ci2u/9Id62Wv6Ui+zMNLAzhfkTkVcW2BwrnYvpur0ZDlzs+ZLsmGTWvd1892t78gx1YjEJusGcxphjLkV0UfAKlekfSBVWHE2ahk4AbbRmHyL7GYdtKfdlINwrcdJuf3Cee1nfUojDQn/YmItESOFhtLzrkEv4k2XpMU9oaJQ3VUC+1INh6BE68pkHameGJm4Gvdb24Q0fXWxd9Tp3A9mzFSe4qXDGGDIV4AAGV1jIDfveknH1TwWpUT6HiQxKP3AAHJNkJeRlj/mXBmS4S1j8FK6YmpK7jyyAiRbsMCCLoJcx01fvgpMvKQRxu9IOwymconQjD56g7ksOrcOeoTbius4JnGesAS1DtgdaophYsw1wGIsMS3P7K6doE3K5czznqPQLSRRF/Ylzb5NtSKsL33SgskFNCF4khn5LWaDxI23ZRi2hzqN8uW8UzZEBYy68+VtGLSymQrXGUlr2nO2BbBIT5Vh1RmGAyDXaW0FPrpx3wv2UYdFk9tSl+906bMxCuXQaKDQP/U19UEcVGK4gmksL8lAorxQSAOwpeYX9xrZsh6yoGaL/X5O3tgQC8OM+/GvxnW9XvAtu/JxAigydfSmZfqZfg1XOcHNOpLlN8j64OZ36l5qawDBJ62YaTvxeNmm5gowCdBosgcpHOgNgwA+sknN8XmsR2IYChcafl9bGNMZ/nB5guWuvEziv6QI2bP2DtyKWG/qUjZMaxy+wASkkVGtuwGtywkTYG6MYrZBo18vYcww48G/+f+eITA/qMwbLlJC0S3+/ai2pPvkOhRRVmGTuSupaxhIk0xoXLtixCxSAn4Z3OnUS3wBqVscLI4P3GP7i/6gxYsswsVmkvDXFLhO/OKcur8flegCSKiqmVpIRvCzgbjEA0mXPn+RExXY/2OE1f/BYuWpRQY8gCDpMOYBx9Gn4tL3hihSIR1ixh2PIIT7cr2gUJbfs76EKYG52Jk0UZF/PQkBxGuFCEWXnG6ue/hTIqjTRq1sotVrKrwIGHDrITyuanUzbIYdgdEeV88K1VD82TYB2B61Ft+tB1KqHPmT9+hWoaV+iF3SuvtJqvnoLaA8wxrD56AUMULEgzO9SvBcBAfqz/dzMYzwMt/YLszDbmGe1bcHHfFMcvGql9bf/tp+Hrj4q18aNnftGjmXTfws39emn7/5IBxog9MrmftAA5Oq4awenm8HimWO72dwVlHcHmutVMdrMHw+p2vzpzT+B0iIZ+IEpplwWhClcXlxhxAsF3CHRnnaUEqq3ByQ+cqhe5SvR4SFxh/LZoQwtj8QZQGT1BzY2EMpYnUcZWQEPlwFZw+7UryK9qV8KgruYsvyMoK16KI2sN4SOblrVwhyiL8+IBZ8cpUhsJQSU7TFHAi+L2F0sn0y+FtDODlnuif2Mba8QddPZYYxjTsIgkMe3M6+7kXxUfZvbCUlyq71J1eNczGk6Vqw6rSx2K3vM+DjLxDRGzWepTO2qTT/W8S7u0QXcyFUahcB4vq8xCYTpy8iswtnyz7Kx6lgTEQJ9RqkgEIN6DOUqB0uRdeYuDa7AP7Zy9z+ZlTsmVR5vtV71m3dmdtNeWghbr5PnPJtjXAzcvZjxyV96VEx/B1TA0IEQSI50ywGuIbmAYdQg/l/rxhQLX+6uOLyFsaUt6mtjpAJkLfehnB6MlOHnNOrWLvCBqVBS07jcM+4RzLEed3f3/0Xwp92U+nataNHyEgnnuYR6PXEjRLETz0xrt3UglfK7Bn4aNlXG7cZco4lMziLv5+Mh2JCww3mz69Z9ZMRR/xv5EKJ38IFxKd9dw5CgPIXja/gzAshMbF14/qBIgNkdUQeP8YE7SrICGtiTnAKTyA9cXa3OauDHxZOdTP7yuYBzD1UcHstIO16FxF1bRUAlSkszI83YufTchU8OPnnozDl9bS0y6CnnjGwgj9M61cXcZsljjhLeT/Vq+30ScN2PcT/dOoxUDqDS38+OpCCzLDdnwHQc3ECQVIkaxmdPaZTSdfp2jjGzSdNLM5yPQsgJDl+ZnhclDQi8ltUnkqWJ323IvTZPN8rn0+EshL1cx9PiaLTzUsryn9Zp2Nt/detUAh4N/2I3dlMQqjHFxSihv0uykzflq5clMy2ZBaxoEb0/QMp03IQQus3vnZd/NOmSsmgqXqKFP3ozyDgY7RQS+npabe/hNG+5sa5FtvL8v0uYuag2NewYkcol3TOTadpuncCnDgOGpmLnTQ1PEPUN2cNsrW8LYfIv+hzfb7vod+ipXHzmbgj5Fzc6RcT/5PD7VQ8nTJBNj1urkVUx9uJvTWmqY08OC80rGDLaWXv243VB16gjt4Xtwp5H2UDR0LiKW24Ed/sOO8jl1yEU/XAb3h7ScKnCFy/V3sICrkY1D0K9fSokHIL0s5/7DLShLAPXRbV7fbv4qj6OwHC9d5PlEOX3LRpQ3P7hcSAKlIKPDM83ypz56U5+rJeo0cyUtC7wltL8wqEiNSgZsDWzACc7RFoZqhlD0+sihIBQlkQTXmvUyIOZhkQX2zqME5VRC7ms1sa3CY+odMn3mMBiTvCMKnnCxg5ZPLq4GUDB4jF8Br2K4x4sxfWjGXQatJ25I1JyrIv2Z4bP1jKw5C+B2/s0v4dGUOsaS6IPIQV3ETQ+F2fSl2BPBXHzyYN8VmwWIrKeMX9pyGWuAOVXwkxJsRBaBVzLhZDP8ONGncknL5DpTxHN32GgFWMwsc0GmL0oRDmRT8u2lvjAKUIi0MmXhIHSlFeh3Qh5pP6ap4YUd6b569ZIaHgya2AyD12cPxY0In/PBjzDctTaKJCU+xc6m9RkNLDEE8guvxtJP8sl8N9bLqw0F/qejaBlcHYqw31zYpsutQp07hsP1vhGdl4hJ1wA7OCsAHnKj9879uSHILEmuZ6vI1lT4tvnWCVKZhhYrWHW9oPKPKpbOC6FTjf/OtUvwmiXr2ykvyLzHGQeyS7BenZpL3N/CaF5T7Gkml7JXN5cj0PKaDpZVImD61FuMgFHPqSHvt4Ej4KBdAfdcoO3AjQPLwwtKsgGM+ty4lNZMBEItJSRLunG5ckrM/BeoXWoPZVvEoIzLgFQYPupMwZCXis4W2SCJ2zsefZqCj+aTfSq1FYdUj2UeJALvVTf7vuuikOE1Hit3UIAGUi/sqgMum9vw218y1FlY/9XnOji9nqhGAcMYICc7BiqLZj5N+cKEuSAuiyWbMg81ZD1lHovy/we2eaCcCv4MzEW3O0mVA/t2xdA0cxTVbXmFhn+tARDpvDz5ftLr15OAAmvo2QiAky+feVO4bGibv2nlBmBzqx0lEDfEm4UnEs11pbnwZlJ/0Y73/wBPYfTNZiJKR73TzdCW1BffiJq9bLjQmaKnU0+gN8sfe25IKSUCooQwxePDrFn3a/zUgWxvPoTYVXfobY/GV2qqTkeVDV9D8657fhY0/wiaJ5NfLxhXbE/naxs34N0hd6vxNfdm1TCnozm/NKSCThchoYgMF7Z2tzXFovRfsNVkf86JjrM60r7UIuV3bsmfrMOqzjXjN6HPBG25zCJ3QLueySbj9oFvX/HxWBqh31PBPxduCVAxMqC9HK+YL3oBZqBruoh6LKvdMqoz0PYXUBrwbiioyE8Tj5ImjJmiOOWLbAZvIZ/l9rIPljx3T5glJ2ewlfuIT5GlodQsAf/IEtmYkML5SRQGxxwW+rlZkD8belJNu09Itwx9xDULTnemVDeojdbgcd2gKGM9aO00Jivtbs7ZyOSE8IPh98GfvatD8Ud5uHcZfAfMiPSlIxd4UqeSDzuNfbKDuFepkyC/s3j9fawmhY1b9NqDi0ZS5eP35l7rL2eK5QlWLlyCmxx8AFaFiTuD2pMUxZV5mBSJuJduOaq2ZrWpu28DE8jl/hisBz7bGWH6qLF0ayWNq1Sejtcs8KQrQqJk5P9QHDYHOIolgNsMDmEaWcTelghbfFCDqWrq6YLwDWy+m68ec5nShgq2fduUBpQUuKKKgnttaUX9PRfMmxqJyU7e0RLr1bev+ge1KK0bZyhHKKDE8gQX9Vf7rNHWOxBtZcxwwGusyMpH77qWZxXsQmbgIGhtiO+gSSRCyu/ek+OFsz1HMiQH0IHV7PjJi3dszYfFp8ue9h4+AfKte4MTiehPvxNcm/T1t9vsFZx8rHN5ie77r2jzZOq/Em4Q+H9sNcZakf9HnzCc1fJixppxP8FQABmVnqa6GbJhwaka7WH7Wdoz1WxOjSNV8N9sgW5S3Ppgkut+TTCkjA+AodUOk1KIR+8G8S3WrSZG4nyqfJ6FEjXl6a/LEoRMHZUqfPRWvwqrtXYy9IUsmUGzkqi76ib4NANCe5DnyOxnFRZ9d8FdBVBjra3iNuZhJuWW5Omi/hBigqDsg0mu2AhfJDXdwyMIJ33HHHPfS2JtjegRejX11m41TbNL+Qp7mR0g9CPKTj9PIjuSycGN/YPozXI4zarXuAeLv5CHKtKcJKRbd6R2oLNiEt0T8+QIVJH7zt9ncKMgd49vV2P1AyScZ9Qzbu3m3LBnuu6dw7aE0b6r4kzVkI/GUS88mA53L/rLtntkFlZXGtIoqNP2mD3eVv08AVVPT3wJn81zpbJV9SuqZ6Pd1ge0Zz2RFHeCdV5CLPftH9V5o9+VzFu4R0QeumqDwUhXn3IyYotdJnxr1l3BqWnQVAeDBEOtPyJQx1q5+mODiClXtYeBLTWtsJ42AMBcf/IFIhpfhYO08hsg0Ik+DpQFNOKReK3o3cudkxWX0soPtI5eSFOA6yNylS+IQjrQtYQ/5s4UcixJfokumBUjpH9ofSjUTwPCapGFndfqqG5IHeMMvfg+88SXm7bNyjk6pGKzL+WxDAdqKtQ72WWVbOk3I+ueGuammmB2pvFZvqIcU/lvW3n9+r2lycnQLE4OX9R1jIgW4cDjJ3v8dAa66mVcfC7ptCr5io6mCaA9qI9T9FFWqo1ZAaMxgxAu8aXqmaOYryMND2sTUfoHvxcYK7hEiJhCLYFDx3PBhE97c2a0ub1/ePJcyJOqr7UaTAPTJ+xvZtjb/40sloY1ltRnTkWILmIP2b7S3AdXCR+YiArMUHwdncpjpyDGfzqGOUoAuaamWzAMacQtb34/M32FEgR5lUEf8fRzFrZUhzQj0fR7/6gdzdnVVvcSneLmtqJ930VCCDORY8CVdQWdo/S3PNkX3pQsPVKWIYGAMrFZoq8bQ/OJBDSXP7KSBdL3QN0Zqd393p6VFc7DnlnFiN00SY5Nux7yadeIM0Upl2rVsu8/VAI
4273"),n=()=>ed(r),i=()=>new Set(n()),a=(e,t)=>t.forEach(t=>e.add(t));o=new Map(ep(r)),l=i(),c=n(),u=new Set(n().map(e=>c[e])),c=new Set(c),d=i(),i();let s=eh(r),b=r(),w=()=>{let e=new Set;return n().forEach(t=>a(e,s[t])),a(e,n()),e};h=ef(e=>{let t=ef(r).map(e=>e+96);if(t.length){let n=e>=b;t[0]-=32,t=ey(t),n&&(t=`Restricted[${t}]`);let i=w();return{N:t,P:i,Q:w(),M:!r(),R:n}}}),p=i(),f=new Map;let v=n().concat(eI(p)).sort((e,t)=>e-t);for(let{V:e,M:t}of(v.forEach((e,t)=>{let n=r(),i=v[t]=n?v[t-n]:{V:[],M:new Map};i.V.push(e),p.has(e)||f.set(e,i)}),new Set(f.values()))){let r=[];for(let t of e){let e=h.filter(e=>eS(e,t)),n=r.find(({G:t})=>e.some(e=>t.has(e)));n||(n={G:new Set,V:[]},r.push(n)),n.V.push(t),a(n.G,e)}let n=r.flatMap(e=>eI(e.G));for(let{G:e,V:i}of r){let r=new Set(n.filter(t=>!e.has(t)));for(let e of i)t.set(e,r)}}m=new Set;let E=new Set,C=e=>m.has(e)?E.add(e):m.add(e);for(let e of h){for(let t of e.P)C(t);for(let t of e.Q)C(t)}for(let e of m)f.has(e)||E.has(e)||f.set(e,1);for(let n of(a(m,eA(m).map(eE)),g=(e=[],t=ed(r),function t({S:r,B:n},i,a){if(!(4&r)||a!==i[i.length-1])for(let s of(2&r&&(a=i[i.length-1]),1&r&&e.push(i),n))for(let e of s.Q)t(s,[...i,e],a)}(function e(n){return{S:r(),B:ef(()=>{let n=ed(r).map(e=>t[e]);if(n.length)return e(n)}),Q:n}}([]),[]),e).map(e=>eT.from(e)).sort(eb),y=new Map,g)){let e=[y];for(let t of n){let r=e.map(e=>{let r=e.get(t);return r||(r=new Map,e.set(t,r)),r});65039===t?e.push(...r):e=r}for(let t of e)t.V=n}}function eO(e){return(ek(e)?"":`${e_(eN([e]))} `)+eg(e)}function e_(e){return`"${e}"\u200E`}function eN(e,t=1/0,r=eg){var n;let i=[];n=e[0],eP(),c.has(n)&&i.push("â"),e.length>t&&(t>>=1,e=[...e.slice(0,t),8230,...e.slice(-t)]);let a=0,s=e.length;for(let t=0;t<s;t++){let n=e[t];ek(n)&&(i.push(ey(e.slice(a,t))),i.push(r(n)),a=t+1)}return i.push(ey(e.slice(a,s))),i.join("")}function ek(e){return eP(),d.has(e)}function eR(e){return Error(`disallowed character: ${eO(e)}`)}function eM(e,t){let r=eO(t),n=h.find(e=>e.P.has(t));return n&&(r=`${n.N} ${r}`),Error(`illegal mixture: ${e.N} + ${r}`)}function eB(e){return Error(`illegal placement: ${e}`)}function ej(e){return e.filter(e=>65039!=e)}let eU=new Uint8Array(32);function e$(e){return(0,x.MR)(0!==e.length,"invalid ENS name; empty component","comp",e),e}function eL(e){let t=(0,W.YW)(eD(e)),r=[];if(0===e.length)return r;let n=0;for(let e=0;e<t.length;e++)46===t[e]&&(r.push(e$(t.slice(n,e))),n=e+1);return(0,x.MR)(n<t.length,"invalid ENS name; empty component","name",e),r.push(e$(t.slice(n))),r}function eD(e){try{var t;if(0===e.length)throw Error("empty label");return(t=function(e,t,r){if(!e)return[];eP();let n=0;return e.split(".").map(e=>{let i=function(e){let t=[];for(let r=0,n=e.length;r<n;){let n=e.codePointAt(r);r+=n<65536?1:2,t.push(n)}return t}(e),a={input:i,offset:n};n+=i.length+1;try{let e,n=a.tokens=function(e,t,r){let n=[],i=[];for(e=e.slice().reverse();e.length;){let a=function(e,t){let r,n=y,i=e.length;for(;i&&(n=n.get(e[--i]));){let{V:t}=n;t&&(r=t,e.length=i)}return r}(e);if(a)i.length&&(n.push(t(i)),i=[]),n.push(r(a));else{let t=e.pop();if(m.has(t))i.push(t);else{let e=o.get(t);if(e)i.push(...e);else if(!l.has(t))throw eR(t)}}}return i.length&&n.push(t(i)),n}(i,t,r),s=n.length;if(!s)throw Error("empty label");let d=a.output=n.flat();for(let e=d.lastIndexOf(95);e>0;)if(95!==d[--e])throw Error("underscore allowed only at start");if(!(a.emoji=s>1||n[0].is_emoji)&&d.every(e=>e<128)){if(d.length>=4&&45==d[2]&&45==d[3])throw Error(`invalid label extension: "${ey(d.slice(0,4))}"`);e="ASCII"}else{let t=n.flatMap(e=>e.is_emoji?[]:e);if(t.length){if(c.has(d[0]))throw eB("leading combining mark");for(let e=1;e<s;e++){let t=n[e];
4273if(!t.is_emoji&&c.has(t[0]))throw eB(`emoji + combining mark: "${ey(n[e-1])} + ${eN([t[0]])}"`)}!function(e){let t=e[0],r=ec.get(t);if(r)throw eB(`leading ${r}`);let n=e.length,i=-1;for(let a=1;a<n;a++){t=e[a];let n=ec.get(t);if(n){if(i==a)throw eB(`${r} + ${n}`);i=a+1,r=n}}if(i==n)throw eB(`trailing ${r}`)}(d);let r=eI(new Set(t)),[i]=function(e){let t=h;for(let r of e){let e=t.filter(e=>eS(e,r));if(!e.length)if(h.some(e=>eS(e,r)))throw eM(t[0],r);else throw eR(r);if(t=e,1==e.length)break}return t}(r);(function(e,t){for(let r of t)if(!eS(e,r))throw eM(e,r);if(e.M){let e=eA(t).map(eE);for(let t=1,r=e.length;t<r;t++)if(u.has(e[t])){let n=t+1;for(let i;n<r&&u.has(i=e[n]);n++)for(let r=t;r<n;r++)if(e[r]==i)throw Error(`duplicate non-spacing marks: ${eO(i)}`);if(n-t>4)throw Error(`excessive non-spacing marks: ${e_(eN(e.slice(t-1,n)))} (${n-t}/4)`);t=n}}})(i,t),function(e,t){let r,n=[];for(let e of t){let t=f.get(e);if(1===t)return;if(t){let n=t.M.get(e);if(!(r=r?r.filter(e=>n.has(e)):eI(n)).length)return}else n.push(e)}if(r){for(let t of r)if(n.every(e=>eS(t,e)))throw Error(`whole-script confusable: ${e.N}/${t.N}`)}}(i,r),e=i.N}else e="Emoji"}a.type=e}catch(e){a.error=e}return a})}(e,ex,ej)).map(({input:e,error:r,output:n})=>{if(r){let n=r.message;throw Error(1==t.length?n:`Invalid label ${e_(eN(e,63))}: ${n}`)}return ey(n)}).join(".")}catch(t){(0,x.MR)(!1,`invalid ENS name (${t.message})`,"name",e)}}function eF(e){try{return 0!==eL(e).length}catch(e){}return!1}function eH(e){(0,x.MR)("string"==typeof e,"invalid ENS name; not a string","name",e),(0,x.MR)(e.length,"invalid ENS name (empty label)","name",e);let t=eU,r=eL(e);for(;r.length;)t=(0,E.S)((0,C.xW)([t,(0,E.S)(r.pop())]));return(0,C.c$)(t)}function ez(e,t){let r=null!=t?t:63;return(0,x.MR)(r<=255,"DNS encoded label cannot exceed 255","length",r),(0,C.c$)((0,C.xW)(eL(e).map(t=>{(0,x.MR)(t.length<=r,`label ${JSON.stringify(e)} exceeds ${r} bytes`,"name",e);let n=new Uint8Array(t.length+1);return n.set(t,1),n[0]=n.length-1,n})))+"00"}eU.fill(0);let eW="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";BigInt(0);let eq=BigInt(58),eV=BigInt(60);function eG(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):(0,x.MR)(!1,"unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}class eK{name;constructor(e){(0,I.n)(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,t){throw Error("unsupported coin")}async decodeAddress(e,t){throw Error("unsupported coin")}}let eZ=RegExp("^(ipfs)://(.*)$","i"),eJ=[RegExp("^(https)://(.*)$","i"),RegExp("^(data):(.*)$","i"),eZ,RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function eY(e){return e===eV||e>=0x80000000&&e<=0xffffffff}class eQ{provider;address;name;#M;#B;constructor(e,t,r,n){(0,I.n)(this,{provider:e,address:t,name:r}),this.#M=null!=n?Promise.resolve(n):null,this.#B=new el.NZ(t,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)","function name(bytes32) view returns (string)"],e)}async supportsWildcard(){return null==this.#M&&(this.#M=(async()=>{try{return await this.#B.supportsInterface("0x9061b923")}catch(e){if((0,x.bJ)(e,"CALL_EXCEPTION"))return!1;throw this.#M=null,e}})()),await this.#M}async #j(e,t){t=(t||[]).slice();let r=this.#B.interface;t.unshift(eH(this.name));let n=null;await this.supportsWildcard()&&(n=r.getFunction(e),(0,x.vA)(n,"missing fragment","UNKNOWN_ERROR",{info:{funcName:e}}),t=[ez(this.name,255),r.encodeFunctionData(n,t)],e="resolve(bytes,bytes)"),t.push({enableCcipRead:!0});try{let i=await this.#B[e](...t);if(n)return r.decodeFunctionResult(n,i)[0];return i}catch(e){if(!(0,x.bJ)(e,"CALL_EXCEPTION"))throw e}return null}async getAddress(e){let t=null==e?eV:(0,A.Ab)(e);if(t===eV)try{let e=await this.#j("addr(bytes32)");if(null==e||e===eo.j)return null;return e}catch(e){if((0,x.bJ)(e,"CALL_EXCEPTION"))return null;throw e}if(eY(t)){let e=await this.#j("addr(bytes32,uint)",[t]);return(0,C.Lo)(e,20)?(0,w.b)(e):null}if(t>=0&&t<0x80000000){let e=t+BigInt(0x80000000),r=await this.#j("addr(bytes32,uint)",[e]);if((0,C.Lo)(r,20))return(0,w.b)(r)}let r=null;for(let e of this.provider.plugins)if(e instanceof eK&&t<=0x80000000&&e.supportsCoinType(Number(t))){r=e;break}if(null==r)return null;let n=await this.#j("addr(bytes32,uint)",[t]);if(null==n||"0x"===n)return null;if(t<0x80000000){let e=await r.decodeAddress(Number(t),n);if(null!=e)return e}(0,x.vA)(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${t})`,info:{coinType:t,data:n}})}async getText(e){let t=await this.#j("text(bytes32,string)",[e]);return null==t||"0x"===t?null:t}async getContentHash(){let e=await this.#j("contenthash(bytes32)");if(null==e||"0x"===e)return null;let t=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){let e="e3010170"===t[1]?"ipfs":"ipns",r=parseInt(t[4],16);if(t[5].length===2*r)return`${e}://${function(e){let t=(0,C.q5)(e),r=(0,A.Dg)(t),n="";for(;r;)n=eW[Number(r%eq)]+n,r/=eq;for(let e=0;e<t.length&&!t[e];e++)n=eW[0]+n;return n}("0x"+t[2])}`}let r=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(r&&64===r[1].length)return`bzz://${r[1]}`;(0,x.vA)(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getName(){return await this.#j("name(bytes32)")}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){let e=[{type:"name",value:this.name}];try{let t=await this.getText("avatar");if(null==t)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:t});for(let r=0;r<eJ.length;r++){let n=t.match(eJ[r]);if(null==n)continue;let i=n[1].toLowerCase();switch(i){case"https":case"data":return e.push({type:"url",value:t}),{linkage:e,url:t};case"ipfs":{let r=eG(t);return e.push({type:"ipfs",value:t}),e.push({type:"url",value:r}),{linkage:e,url:r}}case"erc721":case"erc1155":{let r="erc721"===i?"tokenURI(uint256)":"uri(uint256)";e.push({type:i,value:t});let a=await this.getAddress();if(null==a)return e.push({type:"!owner",value:""}),{url:null,linkage:e};let s=(n[2]||"").split("/");if(2!==s.length)return e.push({type:`!${i}caip`,value:n[2]||""}),{url:null,linkage:e};let o=s[1],l=new el.NZ(s[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if("erc721"===i){let t=await l.ownerOf(o);if(a!==t)return e.push({type:"!owner",value:t}),{url:null,linkage:e};e.push({type:"owner",value:t})}else if("erc1155"===i){let t=await l.balanceOf(a,o);
4273if(!t)return e.push({type:"!balance",value:"0"}),{url:null,linkage:e};e.push({type:"balance",value:t.toString()})}let c=await l[r](o);if(null==c||"0x"===c)return e.push({type:"!metadata-url",value:""}),{url:null,linkage:e};e.push({type:"metadata-url-base",value:c}),"erc1155"===i&&(c=c.replace("{id}",(0,A.up)(o,32).substring(2)),e.push({type:"metadata-url-expanded",value:c})),c.match(/^ipfs:/i)&&(c=eG(c)),e.push({type:"metadata-url",value:c});let u={},d=await new er(c).send();d.assertOk();try{u=d.bodyJson}catch(t){try{e.push({type:"!metadata",value:d.bodyText})}catch(r){let t=d.body;t&&e.push({type:"!metadata",value:(0,C.c$)(t)})}return{url:null,linkage:e}}if(!u)return e.push({type:"!metadata",value:""}),{url:null,linkage:e};e.push({type:"metadata",value:JSON.stringify(u)});let h=u.image;if("string"!=typeof h)return e.push({type:"!imageUrl",value:""}),{url:null,linkage:e};if(h.match(/^(https:\/\/|data:)/i));else{let t=h.match(eZ);if(null==t)return e.push({type:"!imageUrl-ipfs",value:h}),{url:null,linkage:e};e.push({type:"imageUrl-ipfs",value:h}),h=eG(h)}return e.push({type:"url",value:h}),{linkage:e,url:h}}}}}catch(e){}return{linkage:e,url:null}}static async getEnsAddress(e){let t=await e.getNetwork(),r=t.getPlugin("org.ethers.plugins.network.Ens");return(0,x.vA)(r,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:t}}),r.address}static async getUniversalResolverAddress(e){let t=(await e.getNetwork()).getPlugin("org.ethers.plugins.network.Ens");return t&&t.universalResolver?t.universalResolver:null}static async #U(e,t){let r=await eQ.getEnsAddress(e);try{let n=new el.NZ(r,["function resolver(bytes32) view returns (address)"],e),i=await n.resolver(eH(t),{enableCcipRead:!0});if(i===eo.j)return null;return i}catch(e){throw e}}static async lookupAddress(e,t,r){let n=null==r?eV:(0,A.Ab)(r);eY(n)&&(t=(0,w.b)(t));let i=await eX(e);if(i)try{let e=(await i.reverse(t,n,{enableCcipRead:!0})).primary;if(!eF(e))return null;return e}catch(e){if((0,x.bJ)(e,"CALL_EXCEPTION")&&"ResolverNotFound(bytes)"===e.reason)return null;throw e}(0,x.vA)(n===eV,"lookupAddress coinType requires ENS Universal Resolver","UNSUPPORTED_OPERATION",{operation:"lookupAddress"});try{let r=await eQ.fromName(e,`${t.toLowerCase().substring(2)}.addr.reverse`);if(!r)return null;let n=await r.getName();if(null==n||!eF(n)||await e.resolveName(n)!==t)return null;return n}catch(e){if((0,x.bJ)(e,"BAD_DATA")&&"0x"===e.value||(0,x.bJ)(e,"CALL_EXCEPTION"))return null;throw e}}static async fromName(e,t){let r=await eX(e);if(r){let n;try{n=ez(eD(t),255)}catch(e){return null}let i=await r.requireResolver(n);return new eQ(e,i.resolver,t,i.extended)}let n=t;for(;;){if(""===n||"."===n||"eth"!==t&&"eth"===n)return null;let r=await eQ.#U(e,n);if(null!=r){let i=new eQ(e,r,t);if(n!==t&&!await i.supportsWildcard())return null;return i}n=n.split(".").slice(1).join(".")}}}async function eX(e){let t=await eQ.getUniversalResolverAddress(e);return t?new el.NZ(t,["function requireResolver(bytes) view returns ((bytes name, uint256 offset, bytes32 node, address resolver, bool extended))","function findResolver(bytes) view returns (address resolver, bytes32 node, uint offset)","function resolve(bytes name, bytes data) view returns (bytes result, address resolver)","function reverse(bytes name, uint coinType) view returns (string primary, address resolver, address reverseResolver)","error ResolverNotFound(bytes name)","error ResolverNotContract(bytes name, address resolver)","error ReverseAddressMismatch(string primary, bytes primaryAddress)","error HttpError(uint16 statusCode, string statusMessage)"],e):null}var e0=r(49411),e1=r(41906);let e2=BigInt(0);function e5(e,t){return function(r){return null==r?t:e(r)}}function e6(e,t){return r=>{if(t&&null==r)return null;if(!Array.isArray(r))throw Error("not an array");return r.map(t=>e(t))}}function e3(e,t){return r=>{let n={};for(let i in e){let a=i;if(t&&i in t&&!(a in r)){for(let e of t[i])if(e in r){a=e;break}}try{let t=e[i](r[a]);void 0!==t&&(n[i]=t)}catch(t){let e=t instanceof Error?t.message:"not-an-error";(0,x.vA)(!1,`invalid value for value.${i} (${e})`,"BAD_DATA",{value:r})}}return n}}function e4(e){return(0,x.MR)((0,C.Lo)(e,!0),"invalid data","value",e),e}function e8(e){return(0,x.MR)((0,C.Lo)(e,32),"invalid hash","value",e),e}let e9=e3({address:w.b,blockHash:e8,blockNumber:A.WZ,data:e4,index:A.WZ,removed:e5(function(e){switch(e){case!0:case"true":return!0;case!1:case"false":return!1}(0,x.MR)(!1,`invalid boolean; ${JSON.stringify(e)}`,"value",e)},!1),topics:e6(e8),transactionHash:e8,transactionIndex:A.WZ},{index:["logIndex"]}),e7=e3({hash:e5(e8),parentHash:e8,parentBeaconBlockRoot:e5(e8,null),number:A.WZ,timestamp:A.WZ,nonce:e5(e4),difficulty:A.Ab,gasLim
4273it:A.Ab,gasUsed:A.Ab,stateRoot:e5(e8,null),receiptsRoot:e5(e8,null),transactionsRoot:e5(e8,null),blobGasUsed:e5(A.Ab,null),excessBlobGas:e5(A.Ab,null),miner:e5(w.b),prevRandao:e5(e8,null),extraData:e4,baseFeePerGas:e5(A.Ab)},{prevRandao:["mixHash"]}),te=e3({transactionIndex:A.WZ,blockNumber:A.WZ,transactionHash:e8,address:w.b,topics:e6(e8),data:e4,index:A.WZ,blockHash:e8},{index:["logIndex"]}),tt=e3({to:e5(w.b,null),from:e5(w.b,null),contractAddress:e5(w.b,null),index:A.WZ,root:e5(C.c$),gasUsed:A.Ab,blobGasUsed:e5(A.Ab,null),logsBloom:e5(e4),blockHash:e8,hash:e8,logs:e6(function(e){return te(e)}),blockNumber:A.WZ,cumulativeGasUsed:A.Ab,effectiveGasPrice:e5(A.Ab),blobGasPrice:e5(A.Ab,null),status:e5(A.WZ),type:e5(A.WZ,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function tr(e){e.to&&(0,A.Ab)(e.to)===e2&&(e.to="0x0000000000000000000000000000000000000000");let t=e3({hash:e8,index:e5(A.WZ,void 0),type:e=>"0x"===e||null==e?0:(0,A.WZ)(e),accessList:e5(H.$,null),blobVersionedHashes:e5(e6(e8,!0),null),authorizationList:e5(e6(e=>{let t;if(e.signature)t=e.signature;else{let r=e.yParity;"0x1b"===r?r=0:"0x1c"===r&&(r=1),t=Object.assign({},e,{yParity:r})}return{address:(0,w.b)(e.address),chainId:(0,A.Ab)(e.chainId),nonce:(0,A.Ab)(e.nonce),signature:e1.t.from(t)}},!1),null),blockHash:e5(e8,null),blockNumber:e5(A.WZ,null),transactionIndex:e5(A.WZ,null),from:w.b,gasPrice:e5(A.Ab),maxPriorityFeePerGas:e5(A.Ab),maxFeePerGas:e5(A.Ab),maxFeePerBlobGas:e5(A.Ab,null),gasLimit:A.Ab,to:e5(w.b,null),value:A.Ab,nonce:A.WZ,data:e4,creates:e5(w.b,null),chainId:e5(A.Ab,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(e);if(null==t.to&&null==t.creates&&(t.creates=function(e){let t=(0,w.b)(e.from),r=(0,A.Ab)(e.nonce,"tx.nonce").toString(16);return r="0"===r?"0x":r.length%2?"0x0"+r:"0x"+r,(0,w.b)((0,C.ZG)((0,E.S)((0,e0.R)([t,r])),12))}(t)),(1===e.type||2===e.type)&&null==e.accessList&&(t.accessList=[]),e.signature?t.signature=e1.t.from(e.signature):t.signature=e1.t.from(e),null==t.chainId){let e=t.signature.legacyChainId;null!=e&&(t.chainId=e)}return t.blockHash&&(0,A.Ab)(t.blockHash)===e2&&(t.blockHash=null),t}let tn=Symbol.for("nodejs.util.inspect.custom");class ti{name;constructor(e){(0,I.n)(this,{name:e})}[tn](){return this.toString()}toString(){return`${this.name} { }`}clone(){return new ti(this.name)}}class ta extends ti{effectiveBlock;txBase;txCreate;txDataZero;txDataNonzero;txAccessListStorageKey;txAccessListAddress;constructor(e,t){null==e&&(e=0),super(`org.ethers.network.plugins.GasCost#${e||0}`);let r={effectiveBlock:e};function n(e,n){let i=(t||{})[e];null==i&&(i=n),(0,x.MR)("number"==typeof i,`invalud value for ${e}`,"costs",t),r[e]=i}n("txBase",21e3),n("txCreate",32e3),n("txDataZero",4),n("txDataNonzero",16),n("txAccessListStorageKey",1900),n("txAccessListAddress",2400),(0,I.n)(this,r)}toString(){return`${this.name} { txBase: ${this.txBase}, txCreate: ${this.txCreate}, txDataZero: ${this.txDataZero}, txAccessListStorageKey: ${this.txAccessListStorageKey}, txAccessListAddress: ${this.txAccessListAddress} }`}clone(){return new ta(this.effectiveBlock,this)}}class ts extends ti{address;targetNetwork;universalResolver;constructor(e,t,r){super("org.ethers.plugins.network.Ens"),(0,I.n)(this,{address:e||"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",targetNetwork:null==t?1:t,universalResolver:r})}toString(){return`${this.name} { address: ${this.address}, targetNetwork: ${this.targetNetwork}, universalResolver: ${this.universalResolver} }`}clone(){return new ts(this.address,this.targetNetwork,this.universalResolver)}}class to extends ti{#w;#$;get url(){return this.#w}get processFunc(){return this.#$}constructor(e,t){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin"),this.#w=e,this.#$=t}toString(){return`${this.name} { url: ${this.url} }`}clone(){return this}}let tl=Symbol.for("nodejs.util.inspect.custom"),tc=new Map;class tu{#L;#D;#F;constructor(e,t){this.#L=e,this.#D=(0,A.Ab)(t),this.#F=new Map}[tl](){return this.toString()}toString(){let e=[];for(let t of this.#F.values())e.push(t.toString());return`Network { name: ${this.name}, chainId: ${this.chainId}, plugins: [ ${e.join(", ")} ] }`}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return this.#L}set name(e){this.#L=e}get chainId(){return this.#D}set chainId(e){this.#D=(0,A.Ab)(e,"chainId")}matches(e){if(null==e)return!1;if("string"==typeof e){try{return this.chainId===(0,A.Ab)(e)}catch(e){}return this.name===e}if("number"==typeof e||"bigint"==typeof e){try{return this.chainId===(0,A.Ab)(e)}catch(e){}return!1}if("object"==typeof e){if(null!=e.chainId){try{return this.chainId===(0,A.Ab)(e.chainId)}catch(e){}return!1}if(null!=e.name)return this.name===e.name}return!1}get plugins(){return Array.from(this.#F.values())}attachPlugin(e){if(this.#F.get(e.name))throw Error(`cannot replace existing plugin: ${e.name} `);return this.#F.set(e.name,e.clone()),this}getPlugin(e){return this.#F.get(e)||null}getPlugins(e){return this.plugins.filter(t=>t.name.split("#")[0]===e)}clone(){let e=new tu(this.name,this.chainId);return this.plugins.forEach(t=>{e.attachPlugin(t.clone())}),e}computeIntrinsicGas(e){let t=this.getPlugin("org.ethers.plugins.network.GasCost")||new ta,r=t.txBase;if(null==e.to&&(r+=t.txCreate),e.data)for(let n=2;n<e.data.length;n+=2)"00"===e.data.substring(n,n+2)?r+=t.txDataZero:r+=t.txDataNonzero;if(e.accessList){let n=(0,H.$)(e.accessList);for(let e in n)r+=t.txAccessListAddress+t.txAccessListStorageKey*n[e].storageKeys.length}return r}static from(e){if(function(){if(tp)return;function e(e,t,r){let n=function(){let n=new tu(e,t);return null!=r.ensNetwork&&n.attachPlugin(new ts(null,r.ensNetwork,r.ensUniversalResolver)),n.attachPlugin(new ta),(r.plugins||[]).forEac
4273h(e=>{n.attachPlugin(e)}),n};tu.register(e,n),tu.register(t,n),r.altNames&&r.altNames.forEach(e=>{tu.register(e,n)})}tp=!0;let t="0xeEeEEEeE14D718C2B47D9923Deab1335E144EeEe";e("mainnet",1,{ensUniversalResolver:t,ensNetwork:1,altNames:["homestead"]}),e("ropsten",3,{ensNetwork:3}),e("rinkeby",4,{ensNetwork:4}),e("goerli",5,{ensNetwork:5}),e("kovan",42,{ensNetwork:42}),e("sepolia",0xaa36a7,{ensUniversalResolver:t,ensNetwork:0xaa36a7}),e("holesky",17e3,{ensNetwork:17e3}),e("classic",61,{}),e("classicKotti",6,{}),e("arbitrum",42161,{ensNetwork:1}),e("arbitrum-goerli",421613,{}),e("arbitrum-sepolia",421614,{}),e("base",8453,{ensNetwork:1}),e("base-goerli",84531,{}),e("base-sepolia",84532,{}),e("bnb",56,{ensNetwork:1}),e("bnbt",97,{}),e("filecoin",314,{}),e("filecoin-calibration",314159,{}),e("linea",59144,{ensNetwork:1}),e("linea-goerli",59140,{}),e("linea-sepolia",59141,{}),e("matic",137,{ensNetwork:1,plugins:[th("https://gasstation.polygon.technology/v2")]}),e("matic-amoy",80002,{}),e("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[th("https://gasstation-testnet.polygon.technology/v2")]}),e("optimism",10,{ensNetwork:1,plugins:[]}),e("optimism-goerli",420,{}),e("optimism-sepolia",0xaa37dc,{}),e("xdai",100,{ensNetwork:1})}(),null==e)return tu.from("mainnet");if("number"==typeof e&&(e=BigInt(e)),"string"==typeof e||"bigint"==typeof e){let t=tc.get(e);if(t)return t();if("bigint"==typeof e)return new tu("unknown",e);(0,x.MR)(!1,"unknown network","network",e)}if("function"==typeof e.clone)return e.clone();if("object"==typeof e){(0,x.MR)("string"==typeof e.name&&"number"==typeof e.chainId,"invalid network object name or chainId","network",e);let t=new tu(e.name,e.chainId),r=e;return(r.ensAddress||null!=r.ensNetwork||r.ensUniversalResolver)&&t.attachPlugin(new ts(r.ensAddress,r.ensNetwork,r.ensUniversalResolver)),t}(0,x.MR)(!1,"invalid network","network",e)}static register(e,t){"number"==typeof e&&(e=BigInt(e));let r=tc.get(e);r&&(0,x.MR)(!1,`conflicting network for ${JSON.stringify(r.name)}`,"nameOrChainId",e),tc.set(e,t)}}function td(e,t){let r=String(e);if(!r.match(/^[0-9.]+$/))throw Error(`invalid gwei value: ${e}`);let n=r.split(".");if(1===n.length&&n.push(""),2!==n.length)throw Error(`invalid gwei value: ${e}`);for(;n[1].length<t;)n[1]+="0";if(n[1].length>9){let e=BigInt(n[1].substring(0,9));!n[1].substring(9).match(/^0+$/)&&e++,n[1]=e.toString()}return BigInt(n[0]+n[1])}function th(e){return new to(e,async(e,t,r)=>{let n;r.setHeader("User-Agent","ethers");try{let[t,i]=await Promise.all([r.send(),e()]),a=(n=t).bodyJson.standard;return{gasPrice:i.gasPrice,maxFeePerGas:td(a.maxFee,9),maxPriorityFeePerGas:td(a.maxPriorityFee,9)}}catch(e){(0,x.vA)(!1,`error encountered with polygon gas station (${JSON.stringify(r.url)})`,"SERVER_ERROR",{request:r,response:n,error:e})}})}let tp=!1;var tf=r(47148);function tm(e){return JSON.parse(JSON.stringify(e))}class tg{#H;#z;#W;#q;constructor(e){this.#H=e,this.#z=null,this.#W=4e3,this.#q=-2}get pollingInterval(){return this.#W}set pollingInterval(e){this.#W=e}async #V(){try{let e=await this.#H.getBlockNumber();if(-2===this.#q){this.#q=e;return}if(e!==this.#q){for(let t=this.#q+1;t<=e;t++){if(null==this.#z)return;await this.#H.emit("block",t)}this.#q=e}}catch(e){}null!=this.#z&&(this.#z=this.#H._setTimeout(this.#V.bind(this),this.#W))}start(){this.#z||(this.#z=this.#H._setTimeout(this.#V.bind(this),this.#W),this.#V())}stop(){this.#z&&(this.#H._clearTimeout(this.#z),this.#z=null)}pause(e){this.stop(),e&&(this.#q=-2)}resume(){this.start()}}class ty{#H;#V;#G;constructor(e){this.#H=e,this.#G=!1,this.#V=e=>{this._poll(e,this.#H)}}async _poll(e,t){throw Error("sub-classes must override this")}start(){this.#G||(this.#G=!0,this.#V(-2),this.#H.on("block",this.#V))}stop(){this.#G&&(this.#G=!1,this.#H.off("block",this.#V))}pause(e){this.stop()}resume(){this.start()}}class tb extends ty{#K;#Z;constructor(e,t){super(e),this.#K=t,this.#Z=-2}pause(e){e&&(this.#Z=-2),super.pause(e)}async _poll(e,t){let r=await t.getBlock(this.#K);null!=r&&(-2===this.#Z?this.#Z=r.number:r.number>this.#Z&&(t.emit(this.#K,r.number),this.#Z=r.number))}}class tw extends ty{#J;constructor(e,t){super(e),this.#J=tm(t)}async _poll(e,t){throw Error("@TODO")}}class tv extends ty{#Y;constructor(e,t){super(e),this.#Y=t}async _poll(e,t){let r=await t.getTransactionReceipt(this.#Y);r&&t.emit(this.#Y,r)}}class tE{#H;#J;#z;#G;#q;constructor(e,t){this.#H=e,this.#J=tm(t),this.#z=this.#V.bind(this),this.#G=!1,this.#q=-2}async #V(e){if(-2===this.#q)return;let t=tm(this.#J);t.fromBlock=this.#q+1,t.toBlock=e;
4273let r=await this.#H.getLogs(t);if(0===r.length){this.#q<e-60&&(this.#q=e-60);return}for(let e of r)this.#H.emit(this.#J,e),this.#q=e.blockNumber}start(){this.#G||(this.#G=!0,-2===this.#q&&this.#H.getBlockNumber().then(e=>{this.#q=e}),this.#H.on("block",this.#z))}stop(){this.#G&&(this.#G=!1,this.#H.off("block",this.#z))}pause(e){this.stop(),e&&(this.#q=-2)}resume(){this.start()}}let tC=BigInt(2);function tA(e){return new Promise(t=>{setTimeout(t,e)})}function tx(e){return e&&"function"==typeof e.then}function tI(e,t){return e+":"+JSON.stringify(t,(e,t)=>{if(null==t)return"null";if("bigint"==typeof t)return`bigint:${t.toString()}`;if("string"==typeof t)return t.toLowerCase();if("object"==typeof t&&!Array.isArray(t)){let e=Object.keys(t);return e.sort(),e.reduce((e,r)=>(e[r]=t[r],e),{})}return t})}class tS{name;constructor(e){(0,I.n)(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function tT(e){return(e=Array.from(new Set(e).values())).sort(),e}async function tP(e,t){if(null==e)throw Error("invalid event");if(Array.isArray(e)&&(e={topics:e}),"string"==typeof e)switch(e){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:e,tag:e}}if((0,C.Lo)(e,32)){let t=e.toLowerCase();return{type:"transaction",tag:tI("tx",{hash:t}),hash:t}}if(e.orphan){let t=e;return{type:"orphan",tag:tI("orphan",t),filter:JSON.parse(JSON.stringify(t))}}if(e.address||e.topics){let r=e,n={topics:(r.topics||[]).map(e=>null==e?null:Array.isArray(e)?tT(e.map(e=>e.toLowerCase())):e.toLowerCase())};if(r.address){let e=[],i=[],a=r=>{(0,C.Lo)(r)?e.push(r):i.push((async()=>{e.push(await (0,v.tG)(r,t))})())};Array.isArray(r.address)?r.address.forEach(a):a(r.address),i.length&&await Promise.all(i),n.address=tT(e.map(e=>e.toLowerCase()))}return{filter:n,tag:tI("event",n),type:"event"}}(0,x.MR)(!1,"unknown ProviderEvent","event",e)}function tO(){return new Date().getTime()}let t_={cacheTimeout:250,pollingInterval:4e3};class tN{#Q;#F;#X;#ee;#et;#er;#en;#ei;#ea;#es;#eo;#el;#ec;#eu;constructor(e,t){if(this.#eu=Object.assign({},t_,t||{}),"any"===e)this.#er=!0,this.#et=null;else if(e){let t=tu.from(e);this.#er=!1,this.#et=Promise.resolve(t),setTimeout(()=>{this.emit("network",t,null)},0)}else this.#er=!1,this.#et=null;this.#ei=-1,this.#en=new Map,this.#Q=new Map,this.#F=new Map,this.#X=null,this.#ee=!1,this.#ea=1,this.#es=new Map,this.#eo=!1,this.#el=0,this.#ec=[]}get _requestRate(){let e=this.#el;return 0==e?null:e}set _requestRate(e){(null==e||e<0)&&(e=0),this.#el=(0,A.WZ)(e)}get pollingInterval(){return this.#eu.pollingInterval}get provider(){return this}get plugins(){return Array.from(this.#F.values())}attachPlugin(e){if(this.#F.get(e.name))throw Error(`cannot replace existing plugin: ${e.name} `);return this.#F.set(e.name,e.connect(this)),this}getPlugin(e){return this.#F.get(e)||null}get disableCcipRead(){return this.#eo}set disableCcipRead(e){this.#eo=!!e}#ed(){let e=this.#el;if(0===e)return 0;let t=this.#ec,r=tO();t.push(r);let n=r-1e3;for(;t.length&&t[0]<n;)t.shift();return t.length<e?0:t[0]+1e3-r}async #eh(e){let t=this.#eu.cacheTimeout;if(t<0){let t=this.#ed();return t&&await tA(t),await this._perform(e)}let r=tI(e.method,e),n=this.#en.get(r);if(!n){let i=this.#ed();i&&await tA(i),n=this._perform(e),this.#en.set(r,n),setTimeout(()=>{this.#en.get(r)===n&&this.#en.delete(r)},t)}return await n}async ccipReadFetch(e,t,r){if(this.disableCcipRead||0===r.length||null==e.to)return null;let n=e.to.toLowerCase(),i=t.toLowerCase(),a=[];for(let t=0;t<r.length;t++){let s,o=r[t],l=new er(o.replace("{sender}",n).replace("{data}",i));-1===o.indexOf("{data}")&&(l.body={data:i,sender:n}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:l,index:t,urls:r});let c="unknown error";try{s=await l.send()}catch(e){a.push(e.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:l,result:{error:e}});continue}try{let e=s.bodyJson;if(e.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:l,result:e}),e.data;e.message&&(c=e.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:l,result:e})}catch(e){}(0,x.vA)(s.statusCode<400||s.statusCode>=500,`response not found during CCIP fetch: ${c}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:o,errorMessage:c}}),a.push(c)}(0,x.vA)(!1,`error encountered during CCIP fetch: ${a.map(e=>JSON.stringify(e)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:r,errorMessages:a}})}_wrapBlock(e,t){return new tf.eB(function(e){let t=e7(e);return t.transactions=e.transactions.map(e=>"string"==typeof e?e:tr(e)),t}(e),this)}_wrapLog(e,t){return new tf.tG(e9(e),this)}_wrapTransactionReceipt(e,t){return new tf.z5(tt(e),this)}_wrapTransactionResponse(e,t){return new tf.uI(tr(e),this)}_detectNetwork(){(0,x.vA)(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){(0,x.vA)(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){let e=(0,A.WZ)(await this.#eh({method:"getBlockNumber"}),"%response");return this.#ei>=0&&(this.#ei=e),e}_getAddress(e){return(0,v.tG)(e,this)}_getBlockTag(e){if(null==e)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}return(0,C.Lo)(e)?(0,C.Lo)(e,32)?e:(0,A.nD)(e):("bigint"==typeof e&&(e=(0,A.WZ)(e,"blockTag")),"number"==typeof e)?e>=0?(0,A.nD)(e):this.#ei>=0?(0,A.nD)(this.#ei+e):this.getBlockNumber().then(t=>(0,A.nD)(t+e)):void(0,x.MR)(!1,"invalid blockTag","blockTag",e)}_getFilter(e){let t,r,n=(e.topics||[]).map(e=>null==e?null:Array.isArray(e)?tT(e.map(e=>e.toLowerCase())):e.toLowerCase()),i="blockHash"in e?e.blockHash:void 0,a=(e,t,r)=>{let a;switch(e.length){case 0:break;case 1:a=e[0];break;default:e.sort(),a=e}if(i&&(null!=t||null!=r))throw Error("invalid filter");let s={};return a&&(s.address=a),n.length&&(s.topics=n),t&&(s.fromBlock=t),r&&(s.toBlock=r),i&&(s.blockHash=i),s},s=[];if(e.address)if(Array.isArray(e.address))for(let t of e.address)s.push(this._getAddress(t));else s.push(this._getAddress(e.address));return"fromBlock"in e&&(t=this._getBlockTag(e.fromBlock)),("toBlock"in e&&(r=this._getBlockTag(e.toBlock)),s.filter(e=>"string"!=typeof e).length||null!=t&&"string"!=typeof t||null!=r&&"string"!=typeof r)?Promise.all([Promise.all(s),t,r]).then(e=>a(e[0],e[1],e[2])):a(s,t,r)}_getTransactionRequest(e){let t=(0,tf.VS)(e),r=[];
4273if(["to","from"].forEach(e=>{if(null==t[e])return;let n=(0,v.tG)(t[e],this);tx(n)?r.push(async function(){t[e]=await n}()):t[e]=n}),null!=t.blockTag){let e=this._getBlockTag(t.blockTag);tx(e)?r.push(async function(){t.blockTag=await e}()):t.blockTag=e}return r.length?async function(){return await Promise.all(r),t}():t}async getNetwork(){if(null==this.#et){let e=(async()=>{try{let e=await this._detectNetwork();return this.emit("network",e,null),e}catch(t){throw this.#et===e&&(this.#et=null),t}})();return this.#et=e,(await e).clone()}let e=this.#et,[t,r]=await Promise.all([e,this._detectNetwork()]);return t.chainId!==r.chainId&&(this.#er?(this.emit("network",r,t),this.#et===e&&(this.#et=Promise.resolve(r))):(0,x.vA)(!1,`network changed: ${t.chainId} => ${r.chainId} `,"NETWORK_ERROR",{event:"changed"})),t.clone()}async getFeeData(){let e=await this.getNetwork(),t=async()=>{let{_block:t,gasPrice:r,priorityFee:n}=await (0,I.k)({_block:this.#ep("latest",!1),gasPrice:(async()=>{try{let e=await this.#eh({method:"getGasPrice"});return(0,A.Ab)(e,"%response")}catch(e){}return null})(),priorityFee:(async()=>{try{let e=await this.#eh({method:"getPriorityFee"});return(0,A.Ab)(e,"%response")}catch(e){}return null})()}),i=null,a=null,s=this._wrapBlock(t,e);return s&&s.baseFeePerGas&&(a=null!=n?n:BigInt("1000000000"),i=s.baseFeePerGas*tC+a),new tf.J9(r,i,a)},r=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(r){let e=new er(r.url),n=await r.processFunc(t,this,e);return new tf.J9(n.gasPrice,n.maxFeePerGas,n.maxPriorityFeePerGas)}return await t()}async estimateGas(e){let t=this._getTransactionRequest(e);return tx(t)&&(t=await t),(0,A.Ab)(await this.#eh({method:"estimateGas",transaction:t}),"%response")}async #ef(e,t,r){(0,x.vA)(r<10,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},e,{blockTag:t,enableCcipRead:!0})});let n=(0,tf.VS)(e);try{let e=this.#ed();return e&&await tA(e),(0,C.c$)(await this._perform({method:"call",transaction:n,blockTag:t}))}catch(e){if(!this.disableCcipRead&&(0,x.E)(e)&&e.data&&r>=0&&"latest"===t&&null!=n.to&&"0x556f1830"===(0,C.ZG)(e.data,0,4)){let i,a=e.data,s=await (0,v.tG)(n.to,this);try{i=function(e){let t={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};(0,x.vA)((0,C.pO)(e)>=160,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});let r=(0,C.ZG)(e,0,32);(0,x.vA)((0,C.ZG)(r,0,12)===(0,C.ZG)(tB,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),t.sender=(0,C.ZG)(r,12);try{let r=[],n=(0,A.WZ)((0,C.ZG)(e,32,64)),i=(0,A.WZ)((0,C.ZG)(e,n,n+32)),a=(0,C.ZG)(e,n+32);for(let e=0;e<i;e++){let t=function(e,t){try{let r=tk(e,t);if(r)return(0,W._v)(r)}catch(e){}return null}(a,32*e);if(null==t)throw Error("abort");r.push(t)}t.urls=r}catch(e){(0,x.vA)(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{let r=tk(e,64);if(null==r)throw Error("abort");t.calldata=r}catch(e){(0,x.vA)(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}(0,x.vA)((0,C.ZG)(e,100,128)===(0,C.ZG)(tB,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),t.selector=(0,C.ZG)(e,96,100);try{let r=tk(e,128);if(null==r)throw Error("abort");t.extraData=r}catch(e){(0,x.vA)(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return t.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map(e=>t[e]),t}((0,C.ZG)(e.data,4))}catch(e){(0,x.vA)(!1,e.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:n,info:{data:a}})}(0,x.vA)(i.sender.toLowerCase()===s.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:a,reason:"OffchainLookup",transaction:n,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:i.errorArgs}});let o=await this.ccipReadFetch(n,i.calldata,i.urls);(0,x.vA)(null!=o,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:n,info:{data:e.data,errorArgs:i.errorArgs}});let l={to:s,data:(0,C.xW)([i.selector,function(e){let t=[],r=0;for(let n=0;n<e.length;n++)t.push(tM),r+=32;for(let n=0;n<e.length;n++){let i=(0,C.q5)(e[n]);t[n]=tR(r),t.push(tR(i.length)),t.push(function(e){if(e.length%32==0)return e;let t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}(i)),r+=32+32*Math.ceil(i.length/32)}return(0,C.xW)(t)}([o,i.extraData])])};
4273this.emit("debug",{action:"sendCcipReadCall",transaction:l});try{let e=await this.#ef(l,t,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},l),result:e}),e}catch(e){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},l),error:e}),e}}throw e}}async #em(e){let{value:t}=await (0,I.k)({network:this.getNetwork(),value:e});return t}async call(e){let{tx:t,blockTag:r}=await (0,I.k)({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await this.#em(this.#ef(t,r,e.enableCcipRead?0:-1))}async #eg(e,t,r){let n=this._getAddress(t),i=this._getBlockTag(r);return("string"!=typeof n||"string"!=typeof i)&&([n,i]=await Promise.all([n,i])),await this.#em(this.#eh(Object.assign(e,{address:n,blockTag:i})))}async getBalance(e,t){return(0,A.Ab)(await this.#eg({method:"getBalance"},e,t),"%response")}async getTransactionCount(e,t){return(0,A.WZ)(await this.#eg({method:"getTransactionCount"},e,t),"%response")}async getCode(e,t){return(0,C.c$)(await this.#eg({method:"getCode"},e,t))}async getStorage(e,t,r){let n=(0,A.Ab)(t,"position");return(0,C.c$)(await this.#eg({method:"getStorage",position:n},e,r))}async broadcastTransaction(e){let{blockNumber:t,hash:r,network:n}=await (0,I.k)({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),i=ea.Z.from(e);if(i.hash!==r)throw Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(i,n).replaceableTransaction(t)}async #ep(e,t){if((0,C.Lo)(e,32))return await this.#eh({method:"getBlock",blockHash:e,includeTransactions:t});let r=this._getBlockTag(e);return"string"!=typeof r&&(r=await r),await this.#eh({method:"getBlock",blockTag:r,includeTransactions:t})}async getBlock(e,t){let{network:r,params:n}=await (0,I.k)({network:this.getNetwork(),params:this.#ep(e,!!t)});return null==n?null:this._wrapBlock(n,r)}async getTransaction(e){let{network:t,params:r}=await (0,I.k)({network:this.getNetwork(),params:this.#eh({method:"getTransaction",hash:e})});return null==r?null:this._wrapTransactionResponse(r,t)}async getTransactionReceipt(e){let{network:t,params:r}=await (0,I.k)({network:this.getNetwork(),params:this.#eh({method:"getTransactionReceipt",hash:e})});if(null==r)return null;if(null==r.gasPrice&&null==r.effectiveGasPrice){let t=await this.#eh({method:"getTransaction",hash:e});if(null==t)throw Error("report this; could not find tx or effectiveGasPrice");r.effectiveGasPrice=t.gasPrice}return this._wrapTransactionReceipt(r,t)}async getTransactionResult(e){let{result:t}=await (0,I.k)({network:this.getNetwork(),result:this.#eh({method:"getTransactionResult",hash:e})});return null==t?null:(0,C.c$)(t)}async getLogs(e){let t=this._getFilter(e);tx(t)&&(t=await t);let{network:r,params:n}=await (0,I.k)({network:this.getNetwork(),params:this.#eh({method:"getLogs",filter:t})});return n.map(e=>this._wrapLog(e,r))}_getProvider(e){(0,x.vA)(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await eQ.fromName(this,e)}async getAvatar(e){let t=await this.getResolver(e);return t?await t.getAvatar():null}async resolveName(e,t){let r=await this.getResolver(e);return r?await r.getAddress(t):null}async lookupAddress(e,t){return await eQ.lookupAddress(this,e,t)}async waitForTransaction(e,t,r){let n=null!=t?t:1;return 0===n?this.getTransactionReceipt(e):new Promise(async(t,i)=>{let a=null,s=async r=>{try{let i=await this.getTransactionReceipt(e);if(null!=i&&r-i.blockNumber+1>=n){t(i),a&&(clearTimeout(a),a=null);return}}catch(e){console.log("EEE",e)}this.once("block",s)};null!=r&&(a=setTimeout(()=>{null!=a&&(a=null,this.off("block",s),i((0,x.xz)("timeout","TIMEOUT",{reason:"timeout"})))},r)),s(await this.getBlockNumber())})}async waitForBlock(e){(0,x.vA)(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){let t=this.#es.get(e);t&&(t.timer&&clearTimeout(t.timer),this.#es.delete(e))}_setTimeout(e,t){null==t&&(t=0);let r=this.#ea++,n=()=>{this.#es.delete(r),e()};if(this.paused)this.#es.set(r,{timer:null,func:n,time:t});else{let e=setTimeout(n,t);this.#es.set(r,{timer:e,func:n,time:tO()})}return r}_forEachSubscriber(e){for(let t of this.#Q.values())e(t.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new tS(e.type);case"block":{let e=new tg(this);return e.pollingInterval=this.pollingInterval,e}case"safe":case"finalized":return new tb(this,e.type);case"event":return new tE(this,e.filter);case"transaction":return new tv(this,e.hash);case"orphan":return new tw(this,e.filter)}throw Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,t){for(let r of this.#Q.values())if(r.subscriber===e){r.started&&r.subscriber.stop(),r.subscriber=t,r.started&&t.start(),null!=this.#X&&t.pause(this.#X);break}}async #ey(e,t){let r=await tP(e,this);return"event"===r.type&&t&&t.length>0&&!0===t[0].removed&&(r=await tP({orphan:"drop-log",log:t[0]},this)),this.#Q.get(r.tag)||null}async #eb(e){let t=await tP(e,this),r=t.tag,n=this.#Q.get(r);if(!n){let e=this._getSubscriber(t);n={subscriber:e,tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},this.#Q.set(r,n)}return n}async on(e,t){let r=await this.#eb(e);return r.listeners.push({listener:t,once:!1}),r.started||(r.subscriber.start(),r.started=!0,null!=this.#X&&r.subscriber.pause(this.#X)),this}async once(e,t){let r=await this.#eb(e);return r.listeners.push({listener:t,once:!0}),r.started||(r.subscriber.start(),r.started=!0,null!=this.#X&&r.subscriber.pause(this.#X)),this}async emit(e,...t){let r=await this.#ey(e,t);if(!r||0===r.listeners.length)return!1;let n=r.listeners.length;return r.listeners=r.listeners.filter(({listener:r,once:n}
4273)=>{let i=new es.z(this,n?null:r,e);try{r.call(this,...t,i)}catch(e){}return!n}),0===r.listeners.length&&(r.started&&r.subscriber.stop(),this.#Q.delete(r.tag)),n>0}async listenerCount(e){if(e){let t=await this.#ey(e);return t?t.listeners.length:0}let t=0;for(let{listeners:e}of this.#Q.values())t+=e.length;return t}async listeners(e){if(e){let t=await this.#ey(e);return t?t.listeners.map(({listener:e})=>e):[]}let t=[];for(let{listeners:e}of this.#Q.values())t=t.concat(e.map(({listener:e})=>e));return t}async off(e,t){let r=await this.#ey(e);if(!r)return this;if(t){let e=r.listeners.map(({listener:e})=>e).indexOf(t);e>=0&&r.listeners.splice(e,1)}return t&&0!==r.listeners.length||(r.started&&r.subscriber.stop(),this.#Q.delete(r.tag)),this}async removeAllListeners(e){if(e){let{tag:t,started:r,subscriber:n}=await this.#eb(e);r&&n.stop(),this.#Q.delete(t)}else for(let[e,{started:t,subscriber:r}]of this.#Q)t&&r.stop(),this.#Q.delete(e);return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return this.off(e,t)}get destroyed(){return this.#ee}destroy(){for(let e of(this.removeAllListeners(),this.#es.keys()))this._clearTimeout(e);this.#ee=!0}get paused(){return null!=this.#X}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(this.#ei=-1,null!=this.#X){if(!!e==this.#X)return;(0,x.vA)(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}for(let t of(this._forEachSubscriber(t=>t.pause(e)),this.#X=!!e,this.#es.values()))t.timer&&clearTimeout(t.timer),t.time=tO()-t.time}resume(){if(null!=this.#X)for(let e of(this._forEachSubscriber(e=>e.resume()),this.#X=null,this.#es.values())){let t=e.time;t<0&&(t=0),e.time=tO(),setTimeout(e.func,t)}}}function tk(e,t){if("0x"===e)return null;try{let r=(0,A.WZ)((0,C.ZG)(e,t,t+32)),n=(0,A.WZ)((0,C.ZG)(e,r,r+32));return(0,C.ZG)(e,r+32,r+32+n)}catch(e){}return null}function tR(e){let t=(0,A.c4)(e);if(t.length>32)throw Error("internal; should not happen");let r=new Uint8Array(32);return r.set(t,32-t.length),r}let tM=new Uint8Array([]),tB="0x0000000000000000000000000000000000000000000000000000000000000000";function tj(e,t){if(e.provider)return e.provider;(0,x.vA)(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:t})}async function tU(e,t){let r=(0,tf.VS)(t);if(null!=r.to&&(r.to=(0,v.tG)(r.to,e)),null!=r.from){let t=r.from;r.from=Promise.all([e.getAddress(),(0,v.tG)(t,e)]).then(([e,t])=>((0,x.MR)(e.toLowerCase()===t.toLowerCase(),"transaction from mismatch","tx.from",t),e))}else r.from=e.getAddress();return await (0,I.k)(r)}class t${provider;constructor(e){(0,I.n)(this,{provider:e||null})}async getNonce(e){return tj(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await tU(this,e)}async populateTransaction(e){let t=tj(this,"populateTransaction"),r=await tU(this,e);null==r.nonce&&(r.nonce=await this.getNonce("pending")),null==r.gasLimit&&(r.gasLimit=await this.estimateGas(r));let n=await this.provider.getNetwork();if(null!=r.chainId){let t=(0,A.Ab)(r.chainId);(0,x.MR)(t===n.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else r.chainId=n.chainId;let i=null!=r.maxFeePerGas||null!=r.maxPriorityFeePerGas;if(null!=r.gasPrice&&(2===r.type||i)?(0,x.MR)(!1,"eip-1559 transaction do not support gasPrice","tx",e):(0===r.type||1===r.type)&&i&&(0,x.MR)(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(2===r.type||null==r.type)&&null!=r.maxFeePerGas&&null!=r.maxPriorityFeePerGas)r.type=2;else if(0===r.type||1===r.type){let e=await t.getFeeData();(0,x.vA)(null!=e.gasPrice,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice)}else{let e=await t.getFeeData();if(null==r.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(r.authorizationList&&r.authorizationList.length?r.type=4:r.type=2,null!=r.gasPrice){let e=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=e,r.maxPriorityFeePerGas=e}else null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?((0,x.vA)(!i,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice),r.type=0):(0,x.vA)(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else(2===r.type||3===r.type||4===r.type)&&(null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}return await (0,I.k)(r)}async populateAuthorization(e){let t=Object.assign({},e);return null==t.chainId&&(t.chainId=(await tj(this,"getNetwork").getNetwork()).chainId),null==t.nonce&&(t.nonce=await this.getNonce()),t}async estimateGas(e){return tj(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return tj(this,"call").call(await this.populateCall(e))}async resolveName(e){let t=tj(this,"resolveName");return await t.resolveName(e)}async sendTransaction(e){let t=tj(this,"sendTransaction"),r=await this.populateTransaction(e);delete r.from;let n=ea.Z.from(r);return await t.broadcastTransaction(await this.signTransaction(n))}authorize(e){(0,x.vA)(!1,"authorization not implemented for this signer","UNSUPPORTED_OPERATION",{operation:"authorize"})}}class tL{#H;#ew;#z;#G;#ev;#eE;constructor(e){this.#H=e,this.#ew=null,this.#z=this.#V.bind(this),this.#G=!1,this.#ev=null,this.#eE=!1}_subscribe(e){throw Error("subclasses must override this")}_emitResults(e,t){throw Error("subclasses must override this")}_recover(e){throw Error("subclasses must override this")}async #V(e){try{null==this.#ew&&(this.#ew=this._subscribe(this.#H));let e=null;try{e=await this.#ew}catch(e){if(!(0,x.bJ)(e,"UNSUPPORTED_OPERATION")||"eth_newFilter"!==e.operation)throw e}if(null==e){this.#ew=null,this.#H._recoverSubscriber(this,this._recover(this.#H));return}let t=await this.#H.getNetwork();if(this.#ev||(this.#ev=t),this.#ev.chainId!==t.chainId)throw Error("chaid changed");if(this.#eE)return;let r=await this.#H.send("eth_getFilterChanges",[e]);await this._emitResults(this.#H,r)}catch(e){console.log("@TODO",e)}this.#H.once("block",this.#z)}#eC(){let e=this.#ew;e&&(this.#ew=null,e.then(e=>{this.#H.destroyed||this.#H.send("eth_uninstallFilter",[e])}))}start(){this.#G||(this.#G=!0,this.#V(-2))}stop(){this.#G&&(this.#G=!1,this.#eE=!0,this.#eC(),this.#H.off("block",this.#z))}pause(e){e&&this.#eC(),this.#H.off("block",this.#z)}resume(){this.start()}}class tD extends tL{#eA;constructor(e,t){super(e),this.#eA=JSON.parse(JSON.stringify(t))}_recover(e){return new tE(e,this.#eA)}async _subscribe(e){return await e.send("eth_newFilter",[this.#eA])}async _emitResults(e,t){for(let r of t)e.emit(this.#eA,e._wrapLog(r,e._network))}}class tF extends tL{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,t){for(let r of t)e.emit("pending",r)}}let tH="bigint,boolean,function,number,string,symbol".split(/,/g);function tz(e){if(null==e||tH.indexOf(typeof e)>=0||"function"==typeof e.getAddress)return e;if(Array.isArray(e))return e.map(tz);if("object"==typeof e)return Object.keys(e).reduce((t,r)=>(t[r]=e[r],t),{});throw Error(`should not happen: ${e} (${typeof e})`)}function tW(e){return e?e.toLowerCase():e}function tq(e){return e&&"number"==typeof e.pollingInterval}let tV={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1048576,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class tG extends t${address;constructor(e,t){super(e),t=(0,w.b)(t),(0,I.n)(this,{address:t})}connect(e){(0,x.vA)(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(e){return await this.populateCall(e)}async sendUncheckedTransaction(e){let t=tz(e),r=[];if(t.from){let n=t.from;r.push((async()=>{let r=await (0,v.tG)(n,this.provider);(0,x.MR)(null!=r&&r.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=r})())}else t.from=this.address;if(null==t.gasLimit&&r.push((async()=>
4273{t.gasLimit=await this.provider.estimateGas({...t,from:this.address})})()),null!=t.to){let e=t.to;r.push((async()=>{t.to=await (0,v.tG)(e,this.provider)})())}r.length&&await Promise.all(r);let n=this.provider.getRpcTransaction(t);return this.provider.send("eth_sendTransaction",[n])}async sendTransaction(e){let t=await this.provider.getBlockNumber(),r=await this.sendUncheckedTransaction(e);return await new Promise((e,n)=>{let i=[1e3,100],a=0,s=async()=>{try{let n=await this.provider.getTransaction(r);if(null!=n)return void e(n.replaceableTransaction(t))}catch(e){if((0,x.bJ)(e,"CANCELLED")||(0,x.bJ)(e,"BAD_DATA")||(0,x.bJ)(e,"NETWORK_ERROR")||(0,x.bJ)(e,"UNSUPPORTED_OPERATION")){null==e.info&&(e.info={}),e.info.sendTransactionHash=r,n(e);return}if((0,x.bJ)(e,"INVALID_ARGUMENT")&&(a++,null==e.info&&(e.info={}),e.info.sendTransactionHash=r,a>10))return void n(e);this.provider.emit("error",(0,x.xz)("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:e}))}this.provider._setTimeout(()=>{s()},i.pop()||4e3)};s()})}async signTransaction(e){let t=tz(e);if(t.from){let r=await (0,v.tG)(t.from,this.provider);(0,x.MR)(null!=r&&r.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=r}else t.from=this.address;let r=this.provider.getRpcTransaction(t);return await this.provider.send("eth_signTransaction",[r])}async signMessage(e){let t="string"==typeof e?(0,W.YW)(e):e;return await this.provider.send("personal_sign",[(0,C.c$)(t),this.address.toLowerCase()])}async signTypedData(e,t,r){let n=tz(r),i=await F.resolveNames(e,t,n,async e=>{let t=await (0,v.tG)(e);return(0,x.MR)(null!=t,"TypedData does not support null address","value",e),t});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(F.getPayload(i.domain,t,i.value))])}async unlock(e){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),e,null])}async _legacySignMessage(e){let t="string"==typeof e?(0,W.YW)(e):e;return await this.provider.send("eth_sign",[this.address.toLowerCase(),(0,C.c$)(t)])}}class tK extends tN{#eu;#ex;#eI;#eS;#eT;#ev;#eP;#eO(){if(this.#eS)return;let e=1===this._getOption("batchMaxCount")?0:this._getOption("batchStallTime");this.#eS=setTimeout(()=>{this.#eS=null;let e=this.#eI;for(this.#eI=[];e.length;){let t=[e.shift()];for(;e.length&&t.length!==this.#eu.batchMaxCount;)if(t.push(e.shift()),JSON.stringify(t.map(e=>e.payload)).length>this.#eu.batchMaxSize){e.unshift(t.pop());break}(async()=>{let e=1===t.length?t[0].payload:t.map(e=>e.payload);this.emit("debug",{action:"sendRpcPayload",payload:e});try{let r=await this._send(e);for(let{resolve:e,reject:n,payload:i}of(this.emit("debug",{action:"receiveRpcResult",result:r}),t)){if(this.destroyed){n((0,x.xz)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:i.method}));continue}let t=r.filter(e=>e.id===i.id)[0];if(null==t){let e=(0,x.xz)("missing response for request","BAD_DATA",{value:r,info:{payload:i}});this.emit("error",e),n(e);continue}if("error"in t){n(this.getRpcError(i,t));continue}e(t.result)}}catch(e){for(let{reject:r}of(this.emit("debug",{action:"receiveRpcError",error:e}),t))r(e)}})()}},e)}constructor(e,t){super(e,t),this.#ex=1,this.#eu=Object.assign({},tV,t||{}),this.#eI=[],this.#eS=null,this.#ev=null,this.#eP=null;{let e=null,t=new Promise(t=>{e=t});this.#eT={promise:t,resolve:e}}let r=this._getOption("staticNetwork");"boolean"==typeof r?((0,x.MR)(!r||"any"!==e,"staticNetwork cannot be used on special network 'any'","options",t),r&&null!=e&&(this.#ev=tu.from(e))):r&&((0,x.MR)(null==e||r.matches(e),"staticNetwork MUST match network object","options",t),this.#ev=r)}_getOption(e){return this.#eu[e]}get _network(){return(0,x.vA)(this.#ev,"network is not available yet","NETWORK_ERROR"),this.#ev}async _perform(e){if("call"===e.method||"estimateGas"===e.method){let t=e.transaction;if(t&&null!=t.type&&(0,A.Ab)(t.type)&&null==t.maxFeePerGas&&null==t.maxPriorityFeePerGas){let r=await this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&(e=Object.assign({},e,{transaction:Object.assign({},t,{type:void 0})}))}}let t=this.getRpcRequest(e);return null!=t?await this.send(t.method,t.args):super._perform(e)}async _detectNetwork(){let e=this._getOption("staticNetwork");if(e){if(!0!==e)return e;else if(this.#ev)return this.#ev}return this.#eP||(this.ready?this.#eP=(async()=>{try{let e=tu.from((0,A.Ab)(await this.send("eth_chainId",[])));return this.#eP=null,e}catch(e){throw this.#eP=null,e}})():this.#eP=(async()=>{let e,t={id:this.#ex++,method:"eth_chainId",params:[],jsonrpc:"2.0"};
4273this.emit("debug",{action:"sendRpcPayload",payload:t});try{e=(await this._send(t))[0],this.#eP=null}catch(e){throw this.#eP=null,this.emit("debug",{action:"receiveRpcError",error:e}),e}if(this.emit("debug",{action:"receiveRpcResult",result:e}),"result"in e)return tu.from((0,A.Ab)(e.result));throw this.getRpcError(t,e)})()),await this.#eP}_start(){null!=this.#eT&&null!=this.#eT.resolve&&(this.#eT.resolve(),this.#eT=null,(async()=>{for(;null==this.#ev&&!this.destroyed;)try{this.#ev=await this._detectNetwork()}catch(e){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",(0,x.xz)("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:e}})),await new Promise(e=>{setTimeout(e,1e3)})}this.#eO()})())}async _waitUntilReady(){if(null!=this.#eT)return await this.#eT.promise}_getSubscriber(e){return"pending"===e.type?new tF(this):"event"===e.type?this._getOption("polling")?new tE(this,e.filter):new tD(this,e.filter):"orphan"===e.type&&"drop-log"===e.filter.orphan?new tS("orphan"):super._getSubscriber(e)}get ready(){return null==this.#eT}getRpcTransaction(e){let t={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(r=>{if(null==e[r])return;let n=r;"gasLimit"===r&&(n="gas"),t[n]=(0,A.nD)((0,A.Ab)(e[r],`tx.${r}`))}),["from","to","data"].forEach(r=>{null!=e[r]&&(t[r]=(0,C.c$)(e[r]))}),e.accessList&&(t.accessList=(0,H.$)(e.accessList)),e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.map(e=>e.toLowerCase())),e.authorizationList&&(t.authorizationList=e.authorizationList.map(e=>{let t=(0,z.M)(e);return{address:t.address,nonce:(0,A.nD)(t.nonce),chainId:(0,A.nD)(t.chainId),yParity:(0,A.nD)(t.signature.yParity),r:(0,A.nD)(t.signature.r),s:(0,A.nD)(t.signature.s)}})),t}getRpcRequest(e){switch(e.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[tW(e.address),e.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[tW(e.address),e.blockTag]};case"getCode":return{method:"eth_getCode",args:[tW(e.address),e.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[tW(e.address),"0x"+e.position.toString(16),e.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[e.signedTransaction]};case"getBlock":if("blockTag"in e)return{method:"eth_getBlockByNumber",args:[e.blockTag,!!e.includeTransactions]};if("blockHash"in e)return{method:"eth_getBlockByHash",args:[e.blockHash,!!e.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[e.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[e.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(e.transaction),e.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(e.transaction)]};case"getLogs":return e.filter&&null!=e.filter.address&&(Array.isArray(e.filter.address)?e.filter.address=e.filter.address.map(tW):e.filter.address=tW(e.filter.address)),{method:"eth_getLogs",args:[e.filter]}}return null}getRpcError(e,t){let{method:r}=e,{error:n}=t;if("eth_estimateGas"===r&&n.message){let t=n.message;if(!t.match(/revert/i)&&t.match(/insufficient funds/i))return(0,x.xz)("insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.params[0],info:{payload:e,error:n}});if(t.match(/nonce/i)&&t.match(/too low/i))return(0,x.xz)("nonce has already been used","NONCE_EXPIRED",{transaction:e.params[0],info:{payload:e,error:n}})}if("eth_call"===r||"eth_estimateGas"===r){let t=function e(t){if(null==t)return null;if("string"==typeof t.message&&t.message.match(/revert/i)&&(0,C.Lo)(t.data))return{message:t.message,data:t.data};if("object"==typeof t){for(let r in t){let n=e(t[r]);if(n)return n}return null}if("string"==typeof t)try{return e(JSON.parse(t))}catch(e){}return null}(n),i=b.y.getBuiltinCallException("eth_call"===r?"call":"estimateGas",e.params[0],t?t.data:null);return i.info={error:n,payload:e},i}let i=JSON.stringify(function(e){let t=[];return!function e(t,r){if(null!=t){if("string"==typeof t.message&&r.push(t.message),"object"==typeof t)for(let n in t)e(t[n],r);if("string"==typeof t)try{return e(JSON.parse(t),r)}catch(e){}}}(e,t),t}(n));if("string"==typeof n.message&&n.message.match(/user denied|ethers-user-denied/i))return(0,x.xz)("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[r]||"unknown",reason:"rejected",info:{payload:e,error:n}});if("eth_sendRawTransaction"===r||"eth_sendTransaction"===r){let t=e.params[0];if(i.match(/insufficient funds|base fee exceeds gas limit/i))return(0,x.xz)("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:t,info:{error:n}});if(i.match(/nonce/i)&&i.match(/too low/i))return(0,x.xz)("nonce has already been used","NONCE_EXPIRED",{transaction:t,info:{error:n}});if(i.match(/replacement transaction/i)&&i.match(/underpriced/i))return(0,x.xz)("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:t,info:{error:n}});if(i.match(/only replay-protected/i))return(0,x.xz)("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:r,info:{transaction:t,info:{error:n}}})}let a=!!i.match(/the method .* does not exist/i);return(!a&&n&&n.details&&n.details.startsWith("Unauthorized method:")&&(a=!0),a)?(0,x.xz)("unsupported operation","UNSUPPORTED_OPERATION",{operation:e.method,info:{error:n,payload:e}}):(0,x.xz)("could not coalesce error","UNKNOWN_ERROR",{error:n,payload:e})}send(e,t){if(this.destroyed)return Promise.reject((0,x.xz)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e}));let r=this.#ex++,n=new Promise((n,i)=>{this.#eI.push({resolve:n,reject:i,payload:{method:e,params:t,id:r,jsonrpc:"2.0"}})});return this.#eO(),n}async getSigner(e){null==e&&(e=0);let t=this.send("eth_accounts",[]);if("number"==typeof e){let r=await t;if(e>=r.length)throw Error("no such account");return new tG(this,r[e])}let{accounts:r}=await (0,I.k)({network:this.getNetwork(),accounts:t});for(let t of(e=(0,w.b)(e),r))if((0,w.b)(t)===e)return new tG(this,e);throw Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(e=>new tG(this,e))}destroy(){for(let{payload:e,reject:t}of(this.#eS&&(clearTimeout(this.#eS),this.#eS=null),this.#eI))t((0,x.xz)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e.method}));this.#eI=[],super.destroy()}}class tZ extends tK{#e_;constructor(e,t){super(e,t);let r=this._getOption("pollingInterval");null==r&&(r=tV.pollingInterval),this.#e_=r}_getSubscriber(e){let t=super._getSubscriber(e);return tq(t)&&(t.pollingInterval=this.#e_),t}get pollingInterval(){return this.#e_}set pollingInterval(e){if(!Number.isInteger(e)||e<0)throw Error("invalid interval");
4273this.#e_=e,this._forEachSubscriber(e=>{tq(e)&&(e.pollingInterval=this.#e_)})}}class tJ extends tZ{#eN;constructor(e,t,r){null==e&&(e="http://localhost:8545"),super(t,r),"string"==typeof e?this.#eN=new er(e):this.#eN=e.clone()}_getConnection(){return this.#eN.clone()}async send(e,t){return await this._start(),await super.send(e,t)}async _send(e){let t=this._getConnection();t.body=JSON.stringify(e),t.setHeader("content-type","application/json");let r=await t.send();r.assertOk();let n=r.bodyJson;return Array.isArray(n)||(n=[n]),n}}},23331:(e,t,r)=>{"use strict";function n(e){let t=BigInt(e),r=[],n=0;if(0n===t)return[0];for(;t>0;)r[n]=Number(127n&t),(t>>=7n)>0n&&(r[n]|=128),n+=1;return r}function i(e){let t=0n,r=0n,n=0;for(;;){if(n>=e.length)throw Error("ULEB decode error: buffer overflow");let i=e[n];if(n+=1,t+=BigInt(127&i)<<r,(128&i)==0)break;r+=7n}if(t>BigInt(Number.MAX_SAFE_INTEGER))throw Error("ULEB decode error: value exceeds MAX_SAFE_INTEGER");return{value:Number(t),length:n}}r.d(t,{h:()=>n,j:()=>i})},23476:(e,t,r)=>{"use strict";r.d(t,{H:()=>Q}),r(49135);var n=r(23246),i=r(44582),a=r(98668),s=r(56595),o=r(10693);let l=BigInt(-1),c=BigInt(0),u=BigInt(1),d=BigInt(5),h={},p="0000";for(;p.length<80;)p+=p;function f(e){let t=p;for(;t.length<e;)t+=t;return BigInt("1"+t.substring(0,e))}function m(e,t,r){let n=BigInt(t.width);if(t.signed){let t=u<<n-u;(0,i.vA)(null==r||e>=-t&&e<t,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:e}),e=e>c?(0,s.ST)((0,s.dK)(e,n),n):-(0,s.ST)((0,s.dK)(-e,n),n)}else{let t=u<<n;(0,i.vA)(null==r||e>=0&&e<t,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:e}),e=(e%t+t)%t&t-u}return e}function g(e){"number"==typeof e&&(e=`fixed128x${e}`);let t=!0,r=128,n=18;if("string"==typeof e)if("fixed"===e);else if("ufixed"===e)t=!1;else{let a=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);(0,i.MR)(a,"invalid fixed format","format",e),t="u"!==a[1],r=parseInt(a[2]),n=parseInt(a[3])}else if(e){let a=e,s=(e,t,r)=>null==a[e]?r:((0,i.MR)(typeof a[e]===t,"invalid fixed format ("+e+" not "+t+")","format."+e,a[e]),a[e]);t=s("signed","boolean",t),r=s("width","number",r),n=s("decimals","number",n)}(0,i.MR)(r%8==0,"invalid FixedNumber width (not byte aligned)","format.width",r),(0,i.MR)(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);let a=(t?"":"u")+"fixed"+String(r)+"x"+String(n);return{signed:t,width:r,decimals:n,name:a}}class y{format;#ek;#eR;#eM;_value;constructor(e,t,r){(0,i.gk)(e,h,"FixedNumber"),this.#eR=t,this.#ek=r;let n=function(e,t){let r="";e<c&&(r="-",e*=l);let n=e.toString();if(0===t)return r+n;for(;n.length<=t;)n=p+n;let i=n.length-t;for(n=n.substring(0,i)+"."+n.substring(i);"0"===n[0]&&"."!==n[1];)n=n.substring(1);for(;"0"===n[n.length-1]&&"."!==n[n.length-2];)n=n.substring(0,n.length-1);return r+n}(t,r.decimals);(0,o.n)(this,{format:r.name,_value:n}),this.#eM=f(r.decimals)}get signed(){return this.#ek.signed}get width(){return this.#ek.width}get decimals(){return this.#ek.decimals}get value(){return this.#eR}#eB(e){(0,i.MR)(this.format===e.format,"incompatible format; use fixedNumber.toFormat","other",e)}#ej(e,t){return new y(h,e=m(e,this.#ek,t),this.#ek)}#eU(e,t){return this.#eB(e),this.#ej(this.#eR+e.#eR,t)}addUnsafe(e){return this.#eU(e)}add(e){return this.#eU(e,"add")}#e$(e,t){return this.#eB(e),this.#ej(this.#eR-e.#eR,t)}subUnsafe(e){return this.#e$(e)}sub(e){return this.#e$(e,"sub")}#eL(e,t){return this.#eB(e),this.#ej(this.#eR*e.#eR/this.#eM,t)}mulUnsafe(e){return this.#eL(e)}mul(e){return this.#eL(e,"mul")}mulSignal(e){this.#eB(e);let t=this.#eR*e.#eR;return(0,i.vA)(t%this.#eM===c,"precision lost during signalling mul","NUMERIC_FAULT",{operation:"mulSignal",fault:"underflow",value:this}),this.#ej(t/this.#eM,"mulSignal")}#eD(e,t){return(0,i.vA)(e.#eR!==c,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),this.#eB(e),this.#ej(this.#eR*this.#eM/e.#eR,t)}divUnsafe(e){return this.#eD(e)}div(e){return this.#eD(e,"div")}divSignal(e){(0,i.vA)(e.#eR!==c,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),this.#eB(e);let t=this.#eR*this.#eM;return(0,i.vA)(t%e.#eR===c,"precision lost during signalling div","NUMERIC_FAULT",{operation:"divSignal",fault:"underflow",value:this}),this.#ej(t/e.#eR,"divSignal")}cmp(e){let t=this.value,r=e.value,n=this.decimals-e.decimals;return(n>0?r*=f(n):n<0&&(t*=f(-n)),t<r)?-1:+(t>r)}eq(e){return 0===this.cmp(e)}lt(e){return 0>this.cmp(e)}lte(e){return 0>=this.cmp(e)}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=this.#eR;return this.#eR<c&&(e-=this.#eM-u),e=this.#eR/this.#eM*this.#eM,this.#ej(e,"floor")}ceiling(){let e=this.#eR;return this.#eR>c&&(e+=this.#eM-u),e=this.#eR/this.#eM*this.#eM,this.#ej(e,"ceiling")}round(e){if(null==e&&(e=0),e>=this.decimals)return this;let t=this.decimals-e,r=d*f(t-1),n=this.value+r,i=f(t);return m(n=n/i*i,this.#ek,"round"),new y(h,n,this.#ek)}isZero(){return this.#eR===c}isNegative(){return this.#eR<c}toString(){return this._value}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return y.fromString(this.toString(),e)}static fromValue(e,t,r){let n=null==t?0:(0,s.WZ)(t),a=g(r),o=(0,s.Ab)(e,"value"),l=n-a.decimals;if(l>0){let t=f(l);(0,i.vA)(o%t===c,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),o/=t}else l<0&&(o*=f(-l));return m(o,a,"fromValue"),new y(h,o,a)}static fromString(e,t){let r=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);(0,i.MR)(r&&r[2].length+r[3].length>0,"invalid FixedNumber string value","value",e);let n=g(t),a=r[2]||"0",s=r[3]||"";for(;s.length<n.decimals;)s+=p;(0,i.vA)(s.substring(n.decimals).match(/^0*$/),"too many decimals for format","NUMERIC_FAULT",{operation:"fromString",fault:"underflow",value:e}),s=s.substring(0,n.decimals);let o=BigInt(r[1]+a+s);return m(o,n,"fromString"),new y(h,o,n)}static fromBytes(e,t){let r=(0,s.Dg)((0,a.q5)(e,"value")),n=g(t);return n.signed&&(r=(0,s.ST)(r,n.width)),m(r,n,"fromBytes"),new y(h,r,n)}}let b=["wei","kwei","mwei","gwei","szabo","finney","ether"];function w(e,t){let r=18;if("string"==typeof t){let e=b.indexOf(t);(0,i.MR)(e>=0,"invalid unit","unit",t),r=3*e}else null!=t&&(r=(0,s.WZ)(t,"unit"));return y.fromValue(e,r,{decimals:r,width:512}).toString()}
4273var v=r(97085),E=r(37037),C=r(57873),A=r(52335),x=r(43850),I=r(31480),S=r(18627),T=r(33432),P=r(82376),O=r(12573),_=r(57217),N=r(30898),k=r(25340),R=r(89188),M=r(29092),B=r(3770),j=r(90411),U=r(79482),$=r(33384);class L{constructor(){this.initialized=!1}async getProvider(){return Promise.resolve(this.provider)}}class D extends L{async initialize(){if("undefined"!=typeof window&&window.ethereum)return this.provider=window.ethereum,this.initialized=!0,Promise.resolve()}}class F extends L{async initialize(){let e=P.W.getCaipNetworks(),{metadata:t,coinbasePreference:n}=S.H.state;try{let{createBaseAccountSDK:i}=await Promise.all([r.e(2896),r.e(7529),r.e(7321),r.e(9324)]).then(r.bind(r,99324));if("undefined"==typeof window)return Promise.resolve();let a=i({appName:t?.name,appLogoUrl:t?.icons[0],appChainIds:e?.map(e=>e.id)||[1,84532],preference:{options:n??"all"}});return this.provider=a.getProvider(),this.initialized=!0,Promise.resolve()}catch(e){return console.error("Failed to import Coinbase Wallet SDK:",e),Promise.resolve()}}async getProvider(){return Promise.resolve(this.provider)}}class H extends L{async initialize(){let e=P.W.getCaipNetworks(),{metadata:t,coinbasePreference:n}=S.H.state;try{let{CoinbaseWalletSDK:i}=await Promise.all([r.e(2896),r.e(7529),r.e(7321),r.e(7)]).then(r.bind(r,80007));if("undefined"==typeof window)return Promise.resolve();let a=e?.map(e=>e.id)||[1],s=new i({appName:t?.name||"AppKit",appLogoUrl:t?.icons[0],appChainIds:a});return this.provider=s.makeWeb3Provider({options:n??"all"}),this.initialized=!0,Promise.resolve()}catch(e){return console.error("Failed to import Coinbase Wallet SDK:",e),Promise.resolve()}}async getProvider(){return Promise.resolve(this.provider)}}var z=r(60852);class W extends z.U{request(e){return"eth_requestAccounts"===e.method?this.request({method:"eth_accounts",params:[]}):super.request(e)}}class q extends L{async initialize(){let{default:e}=await Promise.all([r.e(2896),r.e(2108)]).then(r.bind(r,92108)),t=new e,n=new W(await t.safe.getInfo(),t);await n.connect().catch(e=>{console.info("Failed to auto-connect to Safe:",e)}),this.provider=n,this.initialized=!0}async getProvider(){return Promise.resolve(this.provider)}}var V=r(91753);let G={hexStringToNumber:e=>parseInt(e.startsWith("0x")?e.slice(2):e,16),numberToHexString:e=>`0x${e.toString(16)}`,async getUserInfo(e){let[t,r]=await Promise.all([G.getAddresses(e),G.getChainId(e)]);return{chainId:r,addresses:t}},getChainId:async e=>Number(await e.request({method:"eth_chainId"})),async getAddress(e){let[t]=await e.request({method:"eth_accounts"});return t},getAddresses:async e=>await e.request({method:"eth_accounts"}),async addEthereumChain(e,t){let r=t.rpcUrls.chainDefault?.http||[];await e.request({method:"wallet_addEthereumChain",params:[{chainId:G.numberToHexString(t.id),rpcUrls:[...r],chainName:t.name,nativeCurrency:{name:t.nativeCurrency.name,decimals:t.nativeCurrency.decimals,symbol:t.nativeCurrency.symbol},blockExplorerUrls:[t.blockExplorers?.default.url],iconUrls:[V.L.NetworkImageIds[t.id]]}]})}};var K=r(13599),Z=r(50029),J=r(67535);let Y={signMessage:async(e,t,r)=>{if(!t)throw Error("signMessage - provider is undefined");let n=(0,a.Lo)(e)?e:(0,a.c$)((0,K.YW)(e));return await t.request({method:"personal_sign",params:[n,r]})},estimateGas:async(e,t,r,i)=>{if(!t)throw Error("estimateGas - provider is undefined");if(!r)throw Error("estimateGas - address is undefined");if(e.chainNamespace&&"eip155"!==e.chainNamespace)throw Error("estimateGas - chainNamespace is not eip155");let a={from:e.address,to:e.to,data:e.data,type:0},s=new Z.k(t,i),o=new n.cP(s,r);return await o.estimateGas(a)},sendTransaction:async(e,t,r,i)=>{if(!t)throw Error("sendTransaction - provider is undefined");if(!r)throw Error("sendTransaction - address is undefined");if(e.chainNamespace&&"eip155"!==e.chainNamespace)throw Error("sendTransaction - chainNamespace is not eip155");let a={to:e.to,value:e.value,gasLimit:e.gas,gasPrice:e.gasPrice,data:e.data,type:0},s=new Z.k(t,i),o=new n.cP(s,r),l=await o.sendTransaction(a),c=await l.wait();return c?.hash||null},writeContract:async(e,t,r,i)=>{if(!t)throw Error("writeContract - provider is undefined");if(!r)throw Error("writeContract - address is undefined");let a=new Z.k(t,i),s=new n.cP(a,r),o=new J.NZ(e.tokenAddress,e.abi,s);if(!o||!e.method)throw Error("Contract method is undefined");let l=o[e.method];if(l)return await l(...e.args);throw Error("Contract method is undefined")}
4273,parseUnits:function(e,t){(0,i.MR)("string"==typeof e,"value must be a string","value",e);let r=18;if("string"==typeof t){let e=b.indexOf(t);(0,i.MR)(e>=0,"invalid unit","unit",t),r=3*e}else null!=t&&(r=(0,s.WZ)(t,"unit"));return y.fromString(e,{decimals:r,width:512}).value},formatUnits:w};class Q extends B.X{constructor(){super({adapterType:C.o.ADAPTER_TYPES.ETHERS,namespace:C.o.CHAIN.EVM}),this.balancePromises={},this.ethersProviders={}}async createEthersConfig(){let{metadata:e,enableCoinbase:t,enableBaseAccount:r,enableInjected:n,enableEIP6963:i}=S.H.state;if(e){if(!1!==n){let e=new D;await e.initialize(),this.ethersProviders.injected=e}if(!1!==r&&(this.ethersProviders.baseAccount=new F),!1!==t&&(this.ethersProviders.coinbaseWallet=new H),T.w.isSafeApp()){let e=new q;await e.initialize(),this.ethersProviders.safe=e}return{...this.ethersProviders,EIP6963:!1!==i,metadata:e}}}async signMessage(e){let{message:t,address:r,provider:n}=e;if(!n)throw Error("Provider is undefined");try{return{signature:await Y.signMessage(t,n,r)}}catch(e){throw Error("EthersAdapter:signMessage - Sign message failed")}}async sendTransaction(e){if(!e.provider)throw Error("Provider is undefined");let t=P.W.getAccountData(C.o.CHAIN.EVM)?.address;if(!t)throw Error("Address is undefined");return{hash:await Y.sendTransaction({value:Number.isNaN(Number(e.value))?BigInt(0):BigInt(e.value),to:e.to,data:e.data?e.data:"0x",gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,address:t},e.provider,t,Number(e.caipNetwork?.id))}}async writeContract(e){if(!e.provider)throw Error("Provider is undefined");let{address:t}=A.C.parseCaipAddress(e.caipAddress);return{hash:await Y.writeContract(e,e.provider,t,Number(e.caipNetwork?.id))}}async estimateGas(e){let{provider:t,caipNetwork:r,address:n}=e;if(!t)throw Error("Provider is undefined");try{return{gas:await Y.estimateGas({data:e.data,to:e.to,address:n},t,n,Number(r?.id))}}catch(e){throw Error("EthersAdapter:estimateGas - Estimate gas failed")}}parseUnits(e){return Y.parseUnits(e.value,e.decimals)}formatUnits(e){return Y.formatUnits(e.value,e.decimals)}async syncConnection(e){let{id:t,chainId:r}=e,n=this.connectors.find(e=>e.id===t),i=n?.provider;if(!i)throw Error("Provider not found");let a=await i.request({method:"eth_requestAccounts"}),s=await i.request({method:"eth_chainId"});if(this.listenProviderEvents(t,i),!a[0])throw Error("No accounts found");if(!n?.type)throw Error("Connector type not found");return{address:this.toChecksummedAddress(a[0]),chainId:Number(s)||Number(r),provider:i,type:n.type,id:t}}async syncConnectors(){this.ethersConfig=await this.createEthersConfig(),this.ethersConfig?.EIP6963&&this.listenInjectedConnector(!0);let e=Object.keys(this.ethersConfig||{}).filter(e=>"metadata"!==e&&"EIP6963"!==e).map(async e=>{let t=e===C.o.CONNECTOR_ID.INJECTED;if(this.namespace){let r=this.ethersProviders[e];this.addConnector({id:e,explorerId:I.L.ConnectorExplorerIds[e],imageUrl:O.j.state.connectorImages?.[e],name:I.L.ConnectorNamesMap[e]||"Unknown",imageId:I.L.ConnectorImageIds[e],type:I.L.ConnectorTypesMap[e]??"EXTERNAL",info:t?void 0:{rdns:e},chain:this.namespace,chains:[],provider:await r?.getProvider()})}});await Promise.all(e)}async disconnectAll(){return{connections:await Promise.all(this.connections.map(async e=>{let t=this.connectors.find(t=>$.y.isLowerCaseMatch(t.id,e.connectorId));if(!t)throw Error("Connector not found");return await this.disconnect({id:t.id}),e}))}}async writeSolanaTransaction(){return Promise.resolve({hash:""})}async syncConnections({connectToFirstConnector:e}){let t=this.getCaipNetworks();await Promise.all(this.connectors.filter(e=>{let{hasDisconnected:t,hasConnected:r}=$.y.getConnectorStorageInfo(e.id,this.namespace);return!t&&r}).map(async e=>{if(e.id===C.o.CONNECTOR_ID.WALLET_CONNECT){let r=_.k.getWalletConnectAccounts(this.universalProvider,this.namespace),n=t.find(e=>e.chainNamespace===this.namespace&&e.id.toString()===r[0]?.chainId?.toString());r.length>0&&this.addConnection({connectorId:e.id,accounts:r.map(e=>({address:e.address})),caipNetwork:n})}else{let{accounts:r,chainId:n}
4273=await N.g.fetchProviderData(e);if(r.length>0&&n){let i=t.find(e=>e.chainNamespace===this.namespace&&e.id.toString()===n.toString());this.addConnection({connectorId:e.id,accounts:r.map(e=>({address:e})),caipNetwork:i}),e.provider&&e.id!==C.o.CONNECTOR_ID.AUTH&&e.id!==C.o.CONNECTOR_ID.WALLET_CONNECT&&this.listenProviderEvents(e.id,e.provider)}}})),e&&this.emitFirstAvailableConnection()}async setUniversalProvider(e){this.universalProvider=e;let t=C.o.CONNECTOR_ID.WALLET_CONNECT;return _.k.listenWcProvider({universalProvider:e,namespace:C.o.CHAIN.EVM,onConnect:e=>this.onConnect(e,t),onDisconnect:()=>this.onDisconnect(t),onAccountsChanged:e=>this.onAccountsChanged(e,t,!1),onChainChanged:e=>this.onChainChanged(e,t)}),this.addConnector(new j.F({provider:e,caipNetworks:this.getCaipNetworks(),namespace:C.o.CHAIN.EVM})),Promise.resolve()}eip6963EventHandler(e){if(e.detail){let{info:t,provider:r}=e.detail;if(!this.connectors?.find(e=>e.name===t?.name)){let e=I.L.ConnectorTypesMap[C.o.CONNECTOR_ID.EIP6963],n=t?.rdns||t?.name||t?.uuid;e&&this.namespace&&n&&this.addConnector({id:n,type:e,explorerId:I.L.ConnectorExplorerIds[t.rdns||""]??I.L.ConnectorExplorerIds[t.name||""],imageUrl:t?.icon,name:t?.name||"Unknown",provider:r,info:t,chain:this.namespace,chains:[]})}}}listenInjectedConnector(e){if("undefined"!=typeof window&&e){let e=this.eip6963EventHandler.bind(this);window.addEventListener(C.o.EIP6963_ANNOUNCE_EVENT,e),window.dispatchEvent(new Event(C.o.EIP6963_REQUEST_EVENT))}}async connect({id:e,address:t,type:r,chainId:n,socialUri:i}){try{let a,s=this.connectors.find(t=>$.y.isLowerCaseMatch(t.id,e));if(!s)throw Error("Connector not found");let o=this.getConnection({address:t,connectorId:e,connections:this.connections,connectors:this.connectors});if(o){let t=o.caipNetwork;if(!t)throw Error("EthersAdapter:connect - could not find the caipNetwork to connect");if(o.account){let r=this.ethersProviders[s.id];return!s.provider&&r&&(await r.initialize(),s.provider=await r.getProvider()),this.emit("accountChanged",{address:this.toChecksummedAddress(o.account.address),chainId:t.id,connector:s}),{address:this.toChecksummedAddress(o.account.address),chainId:t.id,provider:s.provider,type:s.type,id:e}}}let l=s?.provider,c=this.ethersProviders[s.id];if(c&&(await c.initialize(),l=await c.getProvider()),!l)throw Error("Provider not found");s.provider=l;let u=[];if(r===C.o.CONNECTOR_TYPE_AUTH){let{address:t,accounts:r}=await k.U.authConnectorAuthenticate({authConnector:l,chainNamespace:C.o.CHAIN.EVM,chainId:n,socialUri:i,preferredAccountType:(0,R.lj)("eip155")}),a=this.getCaipNetworks().find(e=>e.id.toString()===n?.toString());u=[t],this.addConnection({connectorId:e,accounts:r?r.map(e=>({address:e.address})):u.map(e=>({address:e})),caipNetwork:a,auth:{name:M.i.getConnectedSocialProvider(),username:M.i.getConnectedSocialUsername()}}),this.emit("accountChanged",{address:this.toChecksummedAddress(u[0]),chainId:Number(n),connector:s})}else{u=await l.request({method:"eth_requestAccounts"}),a=await l.request({method:"eth_chainId"});let t=this.getCaipNetworks().find(e=>e.id.toString()===n?.toString());if(a!==n){if(!t)throw Error("EthersAdapter:connect - could not find the caipNetwork to switch");try{await l?.request({method:"wallet_switchEthereumChain",params:[{chainId:G.numberToHexString(t.id)}]})}catch(e){throw Error("EthersAdapter:connect - Switch network failed")}}this.emit("accountChanged",{address:this.toChecksummedAddress(u[0]),chainId:Number(n),connector:s}),this.addConnection({connectorId:e,accounts:u.map(e=>({address:e})),caipNetwork:t}),s.id!==C.o.CONNECTOR_ID.WALLET_CONNECT&&this.listenProviderEvents(e,l)}return{address:this.toChecksummedAddress(u[0]),chainId:Number(n),provider:l,type:r,id:e}}catch(e){if(x.RQ.isUserRejectedRequestError(e))throw new x.vx(e);throw e}}async reconnect(e){let{id:t,chainId:r}=e,n=this.connectors.find(e=>e.id===t);n&&"AUTH"===n.type&&r&&await k.U.authConnectorAuthenticate({authConnector:n.provider,chainNamespace:C.o.CHAIN.EVM,chainId:r,preferredAccountType:(0,R.lj)("eip155")})}async getAccounts(e){let t=this.connectors.find(t=>
4273t.id===e.id),r=t?.provider;if(!r||!t)throw Error("Provider not found");let n=this.getConnection({connectorId:e.id,connections:this.connections,connectors:this.connectors});if(n&&n.caipNetwork)return{accounts:n.accounts.map(({address:e})=>T.w.createAccount({caipAddress:`${n?.caipNetwork?.caipNetworkId}:${e}`,type:"eoa"}))};if(e.id===C.o.CONNECTOR_ID.AUTH){let e=t.provider;if(!e.user)return{accounts:[]};let{accounts:r,address:n,chainId:i}=e.user;return Promise.resolve({accounts:(r||[{address:n,type:"eoa"}]).map(e=>T.w.createAccount({caipAddress:`eip155:${i}:${e.address}`,type:e.type}))})}let i=await r.request({method:"eth_requestAccounts"}),a=P.W.getActiveCaipNetwork(this.namespace);return{accounts:a?i.map(e=>T.w.createAccount({caipAddress:`${a?.caipNetworkId}:${e}`,type:"eoa"})):[]}}async disconnect(e){if(e.id){let t=this.connectors.find(t=>$.y.isLowerCaseMatch(t.id,e.id));if(!t)throw Error("Connector not found");let r=this.getConnection({connectorId:e.id,connections:this.connections,connectors:this.connectors});switch(t.type){case C.o.CONNECTOR_TYPE_WALLET_CONNECT:t.provider.session&&t.provider.disconnect();break;case C.o.CONNECTOR_TYPE_AUTH:await t.provider?.disconnect();break;case C.o.CONNECTOR_TYPE_ANNOUNCED:case C.o.CONNECTOR_TYPE_EXTERNAL:await this.revokeProviderPermissions(t.provider);break;default:throw Error("Unsupported provider type")}return t.id&&(this.removeProviderListeners(t.id),this.deleteConnection(t.id)),0===this.connections.length?this.emit("disconnect"):this.emitFirstAvailableConnection(),{connections:r?[r]:[]}}return this.disconnectAll()}async getBalance(e){let t=e.address,r=this.getCaipNetworks().find(t=>t.id.toString()===e.chainId?.toString());if(!t)return Promise.resolve({balance:"0.00",symbol:"ETH"});if(r&&r.chainNamespace===C.o.CHAIN.EVM){let e=`${r.caipNetworkId}:${t}`,i=this.balancePromises[e];if(i)return i;let a=M.i.getNativeBalanceCacheForCaipAddress(e);if(a)return{balance:a.balance,symbol:a.symbol};let s=new n.FR(r.rpcUrls.default.http[0],{chainId:r.id,name:r.name});if(s)try{return this.balancePromises[e]=new Promise(async n=>{try{var i;let a=(i=await s.getBalance(t),w(i,18));M.i.updateNativeBalanceCache({caipAddress:e,balance:a,symbol:r.nativeCurrency.symbol,timestamp:Date.now()}),n({balance:a,symbol:r.nativeCurrency.symbol})}catch(e){n({balance:"0.00",symbol:"ETH"})}}).finally(()=>{delete this.balancePromises[e]}),this.balancePromises[e]||{balance:"0.00",symbol:"ETH"}}catch(e){}}return{balance:"0.00",symbol:"ETH"}}async switchNetwork(e){let{caipNetwork:t}=e,r=U.G.getProviderId(t.chainNamespace),n=U.G.getProvider(t.chainNamespace);if("AUTH"===r||"WALLET_CONNECT"===r)return void await super.switchNetwork(e);if(!n)throw Error("Provider not found");try{await n?.request({method:"wallet_switchEthereumChain",params:[{chainId:G.numberToHexString(t.id)}]})}catch(e){if(e.code===E.E1.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||e.code===E.E1.ERROR_INVALID_CHAIN_ID||e.code===E.E1.ERROR_CODE_DEFAULT||e?.data?.originalError?.code===E.E1.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)await G.addEthereumChain(n,t);else if("ANNOUNCED"===r||"EXTERNAL"===r||"INJECTED"===r)throw Error("Chain is not supported")}}getWalletConnectProvider(){return this.connectors.find(e=>"WALLET_CONNECT"===e.type)?.provider}async revokeProviderPermissions(e){try{(await e.request({method:"wallet_getPermissions"})).find(e=>"eth_accounts"===e.parentCapability)&&await e.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]})}catch(e){console.info("Could not revoke permissions from wallet. Disconnecting...",e)}}async getCapabilities(e){let t=U.G.getProvider(C.o.CHAIN.EVM);if(!t)throw Error("Provider is undefined");return await t.request({method:"wallet_getCapabilities",params:[e]})}async grantPermissions(e){let t=U.G.getProvider(C.o.CHAIN.EVM);if(!t)throw Error("Provider is undefined");return await t.request({method:"wallet_grantPermissions",params:e})}async revokePermissions(e){let t=U.G.getProvider(C.o.CHAIN.EVM);if(!t)throw Error("Provider is undefined");return await t.request({method:"wallet_revokePermissions",params:[e]})}async walletGetAssets(e){let t=U.G.getProvider(C.o.CHAIN.EVM);if(!t)throw Error("Provider is undefined");return await t.request({method:"wallet_getAssets",params:[e]})}toChecksummedAddress(e){try{return(0,v.b)(e.toLowerCase())}catch{return e}}}},23503:(e,t,r)=>{"use strict";
4273Object.defineProperty(t,"__esModule",{value:!0}),t.parseAvatarRecord=i;let n=r(11289);async function i(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?a(e,{gatewayUrls:t,record:r}):(0,n.parseAvatarUri)({uri:r,gatewayUrls:t})}async function a(e,{gatewayUrls:t,record:r}){let i=(0,n.parseNftUri)(r),a=await (0,n.getNftTokenUri)(e,{nft:i}),{uri:s,isOnChain:o,isEncoded:l}=(0,n.resolveAvatarUri)({uri:a,gatewayUrls:t});if(o&&(s.includes("data:application/json;base64,")||s.startsWith("{"))){let e=JSON.parse(l?atob(s.replace("data:application/json;base64,","")):s);return(0,n.parseAvatarUri)({uri:(0,n.getJsonImage)(e),gatewayUrls:t})}let c=i.tokenID;return"erc1155"===i.namespace&&(c=c.replace("0x","").padStart(64,"0")),(0,n.getMetadataAvatarUri)({gatewayUrls:t,uri:s.replace(/(?:0x)?{id}/,c)})}},23655:(e,t,r)=>{"use strict";r.d(t,{h:()=>c});var n=r(91004),i=r(36442),a=r(57873),s=r(17052),o=r(18627);let l=(0,n.BX)({message:"",variant:"info",open:!1}),c=(0,s.X)({state:l,subscribeKey:(e,t)=>(0,i.u$)(l,e,t),open(e,t){let{debug:r}=o.H.state,{code:n,displayMessage:i,debugMessage:s}=e;if(i&&r&&(l.message=i,l.variant=t,l.open=!0),s){if(!a.o.IS_DEVELOPMENT)return;let e="function"==typeof s?s():s,r=n?{code:n}:void 0;"error"===t?console.error(e,r):"warning"===t?console.warn(e,r):console.info(e,r)}},warn(e,t,r){l.open=!0,l.message=e,l.variant="warning",t&&console.warn(t,r)},close(){l.open=!1,l.message="",l.variant="info"}})},23691:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBlockTransactionCount=a;let n=r(14972),i=r(27083);async function a(e,{blockHash:t,blockNumber:r,blockTag:s="latest"}={}){let o,l=void 0!==r?(0,i.numberToHex)(r):void 0;return o=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[l||s]},{dedupe:!!l}),(0,n.hexToNumber)(o)}},23704:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyMessage=s;let n=r(24998),i=r(18978),a=r(3053);async function s({address:e,message:t,signature:r}){return(0,i.isAddressEqual)((0,n.getAddress)(e),await (0,a.recoverMessageAddress)({message:t,signature:r}))}},23833:(e,t,r)=>{"use strict";r(86921)},23981:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};let r={N1:3,N2:3,N3:40,N4:10};t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){let t=e.size,n=0,i=0,a=0,s=null,o=null;for(let l=0;l<t;l++){i=a=0,s=o=null;for(let c=0;c<t;c++){let t=e.get(l,c);t===s?i++:(i>=5&&(n+=r.N1+(i-5)),s=t,i=1),(t=e.get(c,l))===o?a++:(a>=5&&(n+=r.N1+(a-5)),o=t,a=1)}i>=5&&(n+=r.N1+(i-5)),a>=5&&(n+=r.N1+(a-5))}return n},t.getPenaltyN2=function(e){let t=e.size,n=0;for(let r=0;r<t-1;r++)for(let i=0;i<t-1;i++){let t=e.get(r,i)+e.get(r,i+1)+e.get(r+1,i)+e.get(r+1,i+1);(4===t||0===t)&&n++}return n*r.N2},t.getPenaltyN3=function(e){let t=e.size,n=0,i=0,a=0;for(let r=0;r<t;r++){i=a=0;for(let s=0;s<t;s++)i=i<<1&2047|e.get(r,s),s>=10&&(1488===i||93===i)&&n++,a=a<<1&2047|e.get(s,r),s>=10&&(1488===a||93===a)&&n++}return n*r.N3},t.getPenaltyN4=function(e){let t=0,n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return Math.abs(Math.ceil(100*t/n/5)-10)*r.N4},t.applyMask=function(e,r){let n=r.size;for(let i=0;i<n;i++)for(let a=0;a<n;a++)r.isReserved(a,i)||r.xor(a,i,function(e,r,n){switch(e){case t.Patterns.PATTERN000:return(r+n)%2==0;case t.Patterns.PATTERN001:return r%2==0;case t.Patterns.PATTERN010:return n%3==0;case t.Patterns.PATTERN011:return(r+n)%3==0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(n/3))%2==0;case t.Patterns.PATTERN101:return r*n%2+r*n%3==0;case t.Patterns.PATTERN110:return(r*n%2+r*n%3)%2==0;case t.Patterns.PATTERN111:return(r*n%3+(r+n)%2)%2==0;default:throw Error("bad maskPattern:"+e)}}(e,a,i))},t.getBestMask=function(e,r){let n=Object.keys(t.Patterns).length,i=0,a=1/0;for(let s=0;s<n;s++){r(s),t.applyMask(s,e);let n=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);
4273t.applyMask(s,e),n<a&&(a=n,i=s)}return i}},24052:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContractEvents=s;let n=r(61569),i=r(95847),a=r(6084);async function s(e,t){let{abi:r,address:s,args:o,blockHash:l,eventName:c,fromBlock:u,toBlock:d,strict:h}=t,p=c?(0,n.getAbiItem)({abi:r,name:c}):void 0,f=p?void 0:r.filter(e=>"event"===e.type);return(0,i.getAction)(e,a.getLogs,"getLogs")({address:s,args:o,blockHash:l,event:p,events:f,fromBlock:u,toBlock:d,strict:h})}},24227:(e,t,r)=>{"use strict";r.d(t,{OA:()=>n,WL:()=>a,u$:()=>i});let n={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},i=e=>(...t)=>({_$litDirective$:e,values:t});class a{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)}}},24465:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LruMap=void 0;class r extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}t.LruMap=r},24584:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeTransaction=function(e,t){let r=(0,f.getTransactionType)(e);return"eip1559"===r?function(e,t){let{chainId:r,gas:n,nonce:i,to:a,value:s,maxFeePerGas:o,maxPriorityFeePerGas:l,accessList:u,data:f}=e;(0,p.assertTransactionEIP1559)(e);let y=(0,m.serializeAccessList)(u),b=[(0,d.numberToHex)(r),i?(0,d.numberToHex)(i):"0x",l?(0,d.numberToHex)(l):"0x",o?(0,d.numberToHex)(o):"0x",n?(0,d.numberToHex)(n):"0x",a??"0x",s?(0,d.numberToHex)(s):"0x",f??"0x",y,...g(e,t)];return(0,c.concatHex)(["0x02",(0,h.toRlp)(b)])}(e,t):"eip2930"===r?function(e,t){let{chainId:r,gas:n,data:i,nonce:a,to:s,value:o,accessList:l,gasPrice:u}=e;(0,p.assertTransactionEIP2930)(e);let f=(0,m.serializeAccessList)(l),y=[(0,d.numberToHex)(r),a?(0,d.numberToHex)(a):"0x",u?(0,d.numberToHex)(u):"0x",n?(0,d.numberToHex)(n):"0x",s??"0x",o?(0,d.numberToHex)(o):"0x",i??"0x",f,...g(e,t)];return(0,c.concatHex)(["0x01",(0,h.toRlp)(y)])}(e,t):"eip4844"===r?function(e,t){let{chainId:r,gas:n,nonce:i,to:u,value:f,maxFeePerBlobGas:y,maxFeePerGas:b,maxPriorityFeePerGas:w,accessList:v,data:E}=e;(0,p.assertTransactionEIP4844)(e);let C=e.blobVersionedHashes,A=e.sidecars;if(e.blobs&&(void 0===C||void 0===A)){let t="string"==typeof e.blobs[0]?e.blobs:e.blobs.map(e=>(0,d.bytesToHex)(e)),r=e.kzg,n=(0,a.blobsToCommitments)({blobs:t,kzg:r});if(void 0===C&&(C=(0,o.commitmentsToVersionedHashes)({commitments:n})),void 0===A){let e=(0,s.blobsToProofs)({blobs:t,commitments:n,kzg:r});A=(0,l.toBlobSidecars)({blobs:t,commitments:n,proofs:e})}}let x=(0,m.serializeAccessList)(v),I=[(0,d.numberToHex)(r),i?(0,d.numberToHex)(i):"0x",w?(0,d.numberToHex)(w):"0x",b?(0,d.numberToHex)(b):"0x",n?(0,d.numberToHex)(n):"0x",u??"0x",f?(0,d.numberToHex)(f):"0x",E??"0x",x,y?(0,d.numberToHex)(y):"0x",C??[],...g(e,t)],S=[],T=[],P=[];if(A)for(let e=0;e<A.length;e++){let{blob:t,commitment:r,proof:n}=A[e];S.push(t),T.push(r),P.push(n)}return(0,c.concatHex)(["0x03",A?(0,h.toRlp)([I,S,T,P]):(0,h.toRlp)(I)])}(e,t):"eip7702"===r?function(e,t){let{authorizationList:r,chainId:n,gas:a,nonce:s,to:o,value:l,maxFeePerGas:u,maxPriorityFeePerGas:f,accessList:y,data:b}=e;(0,p.assertTransactionEIP7702)(e);let w=(0,m.serializeAccessList)(y),v=(0,i.serializeAuthorizationList)(r);return(0,c.concatHex)(["0x04",(0,h.toRlp)([(0,d.numberToHex)(n),s?(0,d.numberToHex)(s):"0x",f?(0,d.numberToHex)(f):"0x",u?(0,d.numberToHex)(u):"0x",a?(0,d.numberToHex)(a):"0x",o??"0x",l?(0,d.numberToHex)(l):"0x",b??"0x",w,v,...g(e,t)])])}(e,t):function(e,t){let{chainId:r=0,gas:i,data:a,nonce:s,to:o,value:l,gasPrice:c}=e;(0,p.assertTransactionLegacy)(e);let f=[s?(0,d.numberToHex)(s):"0x",c?(0,d.numberToHex)(c):"0x",i?(0,d.numberToHex)(i):"0x",o??"0x",l?(0,d.numberToHex)(l):"0x",a??"0x"];if(t){let e=(()=>
4273{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n);if(r>0)return BigInt(2*r)+BigInt(35n+t.v-27n);let e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new n.InvalidLegacyVError({v:t.v});return e})(),i=(0,u.trim)(t.r),a=(0,u.trim)(t.s);f=[...f,(0,d.numberToHex)(e),"0x00"===i?"0x":i,"0x00"===a?"0x":a]}else r>0&&(f=[...f,(0,d.numberToHex)(r),"0x","0x"]);return(0,h.toRlp)(f)}(e,t)},t.toYParitySignatureArray=g;let n=r(44789),i=r(56694),a=r(80076),s=r(55085),o=r(32309),l=r(64751),c=r(26504),u=r(62704),d=r(27083),h=r(36504),p=r(27756),f=r(75638),m=r(66498);function g(e,t){let r=t??e,{v:n,yParity:i}=r;if(void 0===r.r||void 0===r.s||void 0===n&&void 0===i)return[];let a=(0,u.trim)(r.r),s=(0,u.trim)(r.s);return["number"==typeof i?i?(0,d.numberToHex)(1):"0x":0n===n?"0x":1n===n?(0,d.numberToHex)(1):27n===n?"0x":(0,d.numberToHex)(1),"0x00"===a?"0x":a,"0x00"===s?"0x":s]}},24773:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.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)))}}},24998:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checksumAddress=c,t.getAddress=function(e,t){if(!(0,o.isAddress)(e,{strict:!1}))throw new n.InvalidAddressError({address:e});return c(e,t)};let n=r(9301),i=r(60037),a=r(4319),s=r(6724),o=r(63402),l=new s.LruMap(8192);function c(e,t){if(l.has(`${e}.${t}`))return l.get(`${e}.${t}`);let r=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),n=(0,a.keccak256)((0,i.stringToBytes)(r),"bytes"),s=(t?r.substring(`${t}0x`.length):r).split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&s[e]&&(s[e]=s[e].toUpperCase()),(15&n[e>>1])>=8&&s[e+1]&&(s[e+1]=s[e+1].toUpperCase());let o=`0x${s.join("")}`;return l.set(`${e}.${t}`,o),o}},25065:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.functionModifiers=t.eventModifiers=t.modifiers=void 0,t.isErrorSignature=function(e){return i.test(e)},t.execErrorSignature=function(e){return(0,n.execTyped)(i,e)},t.isEventSignature=function(e){return a.test(e)},t.execEventSignature=function(e){return(0,n.execTyped)(a,e)},t.isFunctionSignature=function(e){return s.test(e)},t.execFunctionSignature=function(e){return(0,n.execTyped)(s,e)},t.isStructSignature=function(e){return o.test(e)},t.execStructSignature=function(e){return(0,n.execTyped)(o,e)},t.isConstructorSignature=function(e){return l.test(e)},t.execConstructorSignature=function(e){return(0,n.execTyped)(l,e)},t.isFallbackSignature=function(e){return c.test(e)},t.execFallbackSignature=function(e){return(0,n.execTyped)(c,e)},t.isReceiveSignature=function(e){return u.test(e)};let n=r(62561),i=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/,a=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/,s=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/,o=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/,l=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/,c=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/,u=/^receive\(\) external payable$/;t.modifiers=new Set(["memory","indexed","storage","calldata"]),t.eventModifiers=new Set(["indexed"]),t.functionModifiers=new Set(["calldata","memory","storage"])},25230:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeFunctionData=function(e){let{args:t}=e,{abi:r,functionName:s}=1===e.abi.length&&e.functionName?.startsWith("0x")?e:(0,a.prepareEncodeFunctionData)(e),o=r[0],l="inputs"in o&&o.inputs?(0,i.encodeAbiParameters)(o.inputs,t??[]):void 0;return(0,n.concatHex)([s,l??"0x"])};let n=r(26504),i=r(66008),a=r(16105)},25340:(e,t,r)=>{"use strict";r.d(t,{U:()=>y}),r(49135);var n=r(52335),i=r(57873),a=r(47482),s=r(82376),o=r(36071),l=r(32590),c=r(42242),u=r(53984),d=r(18627),h=r(26274),p=r(82875),f=r(89188),m=r(33432);let g=null,y={getSIWX:()=>d.H.state.siwx,async initializeIfEnabled(e=s.W.getActiveCaipAddress()){let t=d.H.state.siwx;if(!(t&&e))return;let[r,n,i]=e.split(":");if(s.W.checkIfSupportedNetwork(r,`${r}:${n}`))try{if(d.H.state.remoteFeatures?.emailCapture){let e=s.W.getAccountData(r)?.user;await u.W.open({view:"DataCapture",data:{email:e?.email??void 0}});return}if(g&&await g,(await t.getSessions(`${r}:${n}`,i)).length)return;await u.W.open({view:"SIWXSignMessage"})}catch(e){console.error("SIWXUtil:initializeIfEnabled",e),c.E.sendEvent({type:"track",event:"SIWX_AUTH_ERROR",properties:this.getSIWXEventProperties(e)}),await o.x._getClient()?.disconnect().catch(console.error),h.I.reset("Connect"),p.P.showError("A problem occurred while trying initialize authentication")}}
4273,async isAuthenticated(e=s.W.getActiveCaipAddress()){if(!d.H.state.siwx||!e)return!0;let{chainNamespace:t,chainId:r,address:i}=n.C.parseCaipAddress(e),a=`${t}:${r}`;return(await y.getSessions({address:i,caipNetworkId:a})).length>0},async requestSignMessage(){let e=d.H.state.siwx,t=m.w.getPlainAddress(s.W.getActiveCaipAddress()),r=(0,f.kg)();if(!e)throw Error("SIWX is not enabled");if(!t)throw Error("No ActiveCaipAddress found");if(!r)throw Error("No ActiveCaipNetwork or client found");try{let n=await e.createMessage({chainId:r.caipNetworkId,accountAddress:t}),a=n.toString(),d="";e.signMessage?d=await e.signMessage({message:a,chainId:r.caipNetworkId,accountAddress:t}):(l.a.getConnectorId(r.chainNamespace)===i.o.CONNECTOR_ID.AUTH&&h.I.pushTransactionStack({}),d=await o.x.signMessage(a)||""),await e.addSession({data:n,message:a,signature:d}),s.W.setLastConnectedSIWECaipNetwork(r),u.W.close(),c.E.sendEvent({type:"track",event:"SIWX_AUTH_SUCCESS",properties:this.getSIWXEventProperties()})}catch(e){u.W.state.open&&"ApproveTransaction"!==h.I.state.view||await u.W.open({view:"SIWXSignMessage"}),p.P.showError("Error signing message"),c.E.sendEvent({type:"track",event:"SIWX_AUTH_ERROR",properties:this.getSIWXEventProperties(e)}),console.error("SWIXUtil:requestSignMessage",e)}},async cancelSignMessage(){try{let e=this.getSIWX();if(e?.getRequired?.()){let t=s.W.getLastConnectedSIWECaipNetwork();if(t){let r=await e?.getSessions(t?.caipNetworkId,m.w.getPlainAddress(s.W.getActiveCaipAddress())||"");r&&r.length>0?await s.W.switchActiveNetwork(t):await o.x.disconnect()}else await o.x.disconnect()}else u.W.close();u.W.close(),c.E.sendEvent({event:"CLICK_CANCEL_SIWX",type:"track",properties:this.getSIWXEventProperties()})}catch(e){console.error("SIWXUtil:cancelSignMessage",e)}},async getAllSessions(){let e=this.getSIWX(),t=s.W.getAllRequestedCaipNetworks(),r=[];return await Promise.all(t.map(async t=>{let n=await e?.getSessions(t.caipNetworkId,m.w.getPlainAddress(s.W.getActiveCaipAddress())||"");n&&r.push(...n)})),r},async getSessions(e){let t=d.H.state.siwx,r=e?.address;if(!r){let e=s.W.getActiveCaipAddress();r=m.w.getPlainAddress(e)}let n=e?.caipNetworkId;if(!n){let e=s.W.getActiveCaipNetwork();n=e?.caipNetworkId}return t&&r&&n?t.getSessions(n,r):[]},async isSIWXCloseDisabled(){let e=this.getSIWX();if(e){let t="ApproveTransaction"===h.I.state.view,r="SIWXSignMessage"===h.I.state.view;
4273if(t||r)return e.getRequired?.()&&0===(await this.getSessions()).length}return!1},async authConnectorAuthenticate({authConnector:e,chainId:t,socialUri:r,preferredAccountType:n,chainNamespace:a}){let o=y.getSIWX(),l=(0,f.kg)();if(!o||!a.includes(i.o.CHAIN.EVM)||d.H.state.remoteFeatures?.emailCapture){let i=await e.connect({chainId:t,socialUri:r,preferredAccountType:n});return{address:i.address,chainId:i.chainId,accounts:i.accounts}}let c=`${a}:${t}`,u=await o.createMessage({chainId:c,accountAddress:"<<AccountAddress>>"}),h={accountAddress:u.accountAddress,chainId:u.chainId,domain:u.domain,uri:u.uri,version:u.version,nonce:u.nonce,notBefore:u.notBefore,statement:u.statement,resources:u.resources,requestId:u.requestId,issuedAt:u.issuedAt,expirationTime:u.expirationTime,serializedMessage:u.toString()},p=await e.connect({chainId:t,socialUri:r,siwxMessage:h,preferredAccountType:n});if(h.accountAddress=p.address,h.serializedMessage=p.message||"",p.signature&&p.message){let e=y.addEmbeddedWalletSession(h,p.message,p.signature);await e}return s.W.setLastConnectedSIWECaipNetwork(l),{address:p.address,chainId:p.chainId,accounts:p.accounts}},async addEmbeddedWalletSession(e,t,r){if(g)return g;let n=y.getSIWX();return n?g=n.addSession({data:e,message:t,signature:r}).finally(()=>{g=null}):Promise.resolve()},async universalProviderAuthenticate({universalProvider:e,chains:t,methods:r}){let n=y.getSIWX(),i=(0,f.kg)(),a=new Set(t.map(e=>e.split(":")[0]));if(!n||1!==a.size||!a.has("eip155"))return!1;let o=await n.createMessage({chainId:(0,f.kg)()?.caipNetworkId||"",accountAddress:""}),l=await e.authenticate({nonce:o.nonce,domain:o.domain,uri:o.uri,exp:o.expirationTime,iat:o.issuedAt,nbf:o.notBefore,requestId:o.requestId,version:o.version,resources:o.resources,statement:o.statement,chainId:o.chainId,methods:r,chains:[o.chainId,...t.filter(e=>e!==o.chainId)]});p.P.showLoading("Authenticating...",{autoClose:!1});let u={...l.session.peer.metadata,name:l.session.peer.metadata.name,icon:l.session.peer.metadata.icons?.[0],type:"WALLET_CONNECT"};if(s.W.setAccountProp("connectedWalletInfo",u,Array.from(a)[0]),l?.auths?.length){let t=l.auths.map(t=>{let r=e.client.formatAuthMessage({request:t.p,iss:t.p.iss});return{data:{...t.p,accountAddress:t.p.iss.split(":").slice(-1).join(""),chainId:t.p.iss.split(":").slice(2,4).join(":"),uri:t.p.aud??"",version:t.p.version||o.version,expirationTime:t.p.exp,issuedAt:t.p.iat,notBefore:t.p.nbf},message:r,signature:t.s.s,cacao:t}});try{await n.setSessions(t),i&&s.W.setLastConnectedSIWECaipNetwork(i),c.E.sendEvent({type:"track",event:"SIWX_AUTH_SUCCESS",properties:y.getSIWXEventProperties()})}catch(t){throw console.error("SIWX:universalProviderAuth - failed to set sessions",t),c.E.sendEvent({type:"track",event:"SIWX_AUTH_ERROR",properties:y.getSIWXEventProperties(t)}),await e.disconnect().catch(console.error),t}finally{p.P.hide()}}return!0},getSIWXEventProperties(e){let t=s.W.state.activeChain;if(!t)throw Error("SIWXUtil:getSIWXEventProperties - namespace is required");return{network:s.W.state.activeCaipNetwork?.caipNetworkId||"",isSmartAccount:(0,f.lj)(t)===a.Vl.ACCOUNT_TYPES.SMART_ACCOUNT,message:e?m.w.parseError(e):void 0}},async clearSessions(){let e=this.getSIWX();e&&await e.setSessions([])}}},25588:(e,t,r)=>{"use strict";r.d(t,{o:()=>i});var n=r(55036);let i={ACCOUNT_TABS:[{label:"Tokens"},{label:"Activity"}],SECURE_SITE_ORIGIN:(void 0!==n&&void 0!==n.env?n.env.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",VIEW_DIRECTION:{Next:"next",Prev:"prev"},ANIMATION_DURATIONS:{HeaderText:120,ModalHeight:150,ViewTransition:150},VIEWS_WITH_LEGAL_FOOTER:["Connect","ConnectWallets","OnRampTokenSelect","OnRampFiatSelect","OnRampProviders"],VIEWS_WITH_DEFAULT_FOOTER:["Networks"]}},25609:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.RestrictedMethods=t.Methods=void 0,function(e){e.sendTransactions="sendTransactions",e.rpcCall="rpcCall",e.getChainInfo="getChainInfo",e.getSafeInfo="getSafeInfo",e.getTxBySafeTxHash="getTxBySafeTxHash",e.getSafeBalances="getSafeBalances",e.signMessage="signMessage",e.signTypedMessage="signTypedMessage",e.getEnvironmentInfo="getEnvironmentInfo",e.getOffChainSignature="getOffChainSignature",e.requestAddressBook="requestAddressBook",e.wallet_getPermissions="wallet_getPermissions",e.wallet_requestPermissions="wallet_requestPermissions"}(r||(t.Methods=r={})),(n||(t.RestrictedMethods=n={})).requestAddressBook="requestAddressBook"},25891:(e,t)=>{"use strict";var r,n,i;
4273Object.defineProperty(t,"__esModule",{value:!0}),t.FEATURES=t.GAS_PRICE_TYPE=t.RPC_AUTHENTICATION=void 0,function(e){e.API_KEY_PATH="API_KEY_PATH",e.NO_AUTHENTICATION="NO_AUTHENTICATION",e.UNKNOWN="UNKNOWN"}(r||(t.RPC_AUTHENTICATION=r={})),function(e){e.ORACLE="ORACLE",e.FIXED="FIXED",e.FIXED_1559="FIXED1559",e.UNKNOWN="UNKNOWN"}(n||(t.GAS_PRICE_TYPE=n={})),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"}(i||(t.FEATURES=i={}))},25940:(e,t,r)=>{let n=r(21823),i=n.getBCHDigit(1335);t.getEncodedBits=function(e,t){let r=e.bit<<3|t,a=r<<10;for(;n.getBCHDigit(a)-i>=0;)a^=1335<<n.getBCHDigit(a)-i;return(r<<10|a)^21522}},25984:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deployContract=function(e,t){let{abi:r,args:a,bytecode:s,...o}=t,l=(0,n.encodeDeployData)({abi:r,args:a,bytecode:s});return(0,i.sendTransaction)(e,{...o,...o.authorizationList?{to:null}:{},data:l})};let n=r(11985),i=r(60149)},26209:(e,t,r)=>{"use strict";let n=r(39945).v4;e.exports=function(e,t,r,i){if("string"!=typeof e)throw TypeError(e+" must be a string");let a="number"==typeof(i=i||{}).version?i.version:2;if(1!==a&&2!==a)throw TypeError(a+" must be 1 or 2");let s={method:e};if(2===a&&(s.jsonrpc="2.0"),t){if("object"!=typeof t&&!Array.isArray(t))throw TypeError(t+" must be an object, array or omitted");s.params=t}return void 0===r?s.id=("function"==typeof i.generator?i.generator:function(){return n()})(s,i):2===a&&null===r?i.notificationIdNull&&(s.id=null):s.id=r,s}},26274:(e,t,r)=>{"use strict";r.d(t,{I:()=>p});var n=r(91004),i=r(36442),a=r(17052),s=r(79561),o=r(82376),l=r(32590),c=r(53984),u=r(18627);let d=["ConnectingExternal","ConnectingMultiChain","ConnectingSocial","ConnectingFarcaster"],h=(0,n.BX)({view:"Connect",history:["Connect"],transactionStack:[]}),p=(0,a.X)({state:h,subscribeKey:(e,t)=>(0,i.u$)(h,e,t),pushTransactionStack(e){h.transactionStack.push(e)},popTransactionStack(e){let t=h.transactionStack.pop();if(!t)return;let{onSuccess:r,onError:n,onCancel:i}=t;switch(e){case"success":r?.();break;case"error":n?.(),p.goBack();break;case"cancel":i?.(),p.goBack()}},push(e,t){let r=e,n=t;s.N.state.plan.hasExceededUsageLimit&&d.includes(e)&&(r="UsageExceeded",n=void 0),r!==h.view&&(h.view=r,h.history.push(r),h.data=n)},reset(e,t){h.view=e,h.history=[e],h.data=t},replace(e,t){h.history.at(-1)!==e&&(h.view=e,h.history[h.history.length-1]=e,h.data=t)},goBack(){let e=o.W.state.activeCaipAddress,t="ConnectingFarcaster"===p.state.view,r=!e&&t;if(h.history.length>1){h.history.pop();let[t]=h.history.slice(-1);t&&(e&&"Connect"===t?h.view="Account":h.view=t)}else c.W.close();h.data?.wallet&&(h.data.wallet=void 0),h.data?.redirectView&&(h.data.redirectView=void 0),setTimeout(()=>{if(r){o.W.setAccountProp("farcasterUrl",void 0,o.W.state.activeChain);let e=l.a.getAuthConnector();e?.provider?.reload();let t=(0,n.P9)(u.H.state);e?.provider?.syncDappData?.({metadata:t.metadata,sdkVersion:t.sdkVersion,projectId:t.projectId,sdkType:t.sdkType})}},100)},goBackToIndex(e){if(h.history.length>1){h.history=h.history.slice(0,e+1);let[t]=h.history.slice(-1);t&&(h.view=t)}},goBackOrCloseModal(){p.state.history.length>1?p.goBack():c.W.close()}})},26333:(e,t,r)=>{"use strict";r.d(t,{y:()=>n});let n={isLowerCaseMatch:(e,t)=>e?.toLowerCase()===t?.toLowerCase()}},26376:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(55284);r(79909),r(83627),r(86921);var s=r(46756),o=r(63412);r(77805);var l=r(91392);let c=(0,l.AH)` 4274 :host { 4275 position: relative; 4276 border-radius: ${({borderRadius:e})=>e[2]}; 4277 width: 40px; 4278 height: 40px; 4279 overflow: hidden; 4280 background: ${({tokens:e})=>e.theme.foregroundPrimary}; 4281 display: flex; 4282 justify-content: center; 4283 align-items: center; 4284 flex-wrap: wrap; 4285 column-gap: ${({spacing:e})=>e[1]}; 4286 padding: ${({spacing:e})=>e[1]}; 4287 } 4288 4289 :host > wui-wallet-image { 4290 width: 14px; 4291 height: 14px; 4292 border-radius: 2px; 4293 } 4294`;var u=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let d=class extends n.WF{constructor(){super(...arguments),this.walletImages=[]}render(){let e=this.walletImages.length<4;return(0,n.qy)`${this.walletImages.slice(0,4).map(({src:e,walletName:t})=>(0,n.qy)` 4295 <wui-wallet-image 4296 size="sm" 4297 imageSrc=${e}
4298 name=${(0,a.J)(t)} 4299 ></wui-wallet-image> 4300 `)} 4301 ${e?[...Array(4-this.walletImages.length)].map(()=>(0,n.qy)` <wui-wallet-image size="sm" name=""></wui-wallet-image>`):null} `}};d.styles=[s.W5,c],u([(0,i.MZ)({type:Array})],d.prototype,"walletImages",void 0),d=u([(0,o.E)("wui-all-wallets-image")],d),r(62982);let h=(0,l.AH)` 4302 :host { 4303 width: 100%; 4304 } 4305 4306 button { 4307 column-gap: ${({spacing:e})=>e[2]}; 4308 padding: ${({spacing:e})=>e[3]}; 4309 width: 100%; 4310 background-color: transparent; 4311 border-radius: ${({borderRadius:e})=>e[4]}; 4312 color: ${({tokens:e})=>e.theme.textPrimary}; 4313 } 4314 4315 button > wui-wallet-image { 4316 background: ${({tokens:e})=>e.theme.foregroundSecondary}; 4317 } 4318 4319 button > wui-text:nth-child(2) { 4320 display: flex; 4321 flex: 1; 4322 } 4323 4324 button:hover:enabled { 4325 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 4326 } 4327 4328 button[data-all-wallets='true'] { 4329 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 4330 } 4331 4332 button[data-all-wallets='true']:hover:enabled { 4333 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 4334 } 4335 4336 button:focus-visible:enabled { 4337 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 4338 box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent020}; 4339 } 4340 4341 button:disabled { 4342 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 4343 opacity: 0.5; 4344 cursor: not-allowed; 4345 } 4346 4347 button:disabled > wui-tag { 4348 background-color: ${({tokens:e})=>e.core.glass010}; 4349 color: ${({tokens:e})=>e.theme.foregroundTertiary}; 4350 } 4351 4352 wui-flex.namespace-icon { 4353 width: 16px; 4354 height: 16px; 4355 border-radius: ${({borderRadius:e})=>e.round}; 4356 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 4357 box-shadow: 0 0 0 2px ${({tokens:e})=>e.theme.backgroundPrimary}; 4358 transition: box-shadow var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2); 4359 } 4360 4361 button:hover:enabled wui-flex.namespace-icon { 4362 box-shadow: 0 0 0 2px ${({tokens:e})=>e.theme.foregroundPrimary}; 4363 } 4364 4365 wui-flex.namespace-icon > wui-icon { 4366 width: 10px; 4367 height: 10px; 4368 } 4369 4370 wui-flex.namespace-icon:not(:first-child) { 4371 margin-left: -4px; 4372 } 4373`;var p=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let f={eip155:"ethereum",solana:"solana",bip122:"bitcoin",polkadot:void 0,cosmos:void 0,sui:void 0,stacks:void 0,ton:"ton",tron:"tron"},m=class extends n.WF{constructor(){super(...arguments),this.walletImages=[],this.imageSrc="",this.name="",this.size="md",this.tabIdx=void 0,this.namespaces=[],this.disabled=!1,this.showAllWallets=!1,this.loading=!1,this.loadingSpinnerColor="accent-100"}render(){return this.dataset.size=this.size,(0,n.qy)` 4374 <button 4375 ?disabled=${this.disabled} 4376 data-all-wallets=${this.showAllWallets} 4377 tabindex=${(0,a.J)(this.tabIdx)} 4378 > 4379 ${this.templateAllWallets()} ${this.templateWalletImage()} 4380 <wui-flex flexDirection="column" justifyContent="center" alignItems="flex-start" gap="1"> 4381 <wui-text variant="lg-regular" color="inherit">${this.name}</wui-text> 4382 ${this.templateNamespaces()} 4383 </wui-flex> 4384 ${this.templateStatus()} 4385 <wui-icon name="chevronRight" size="lg" color="default"></wui-icon> 4386 </button> 4387 `}templateNamespaces(){return this.namespaces?.length?(0,n.qy)`<wui-flex alignItems="center" gap="0"> 4388 ${this.namespaces.map((e,t)=>(0,n.qy)`<wui-flex 4389 alignItems="center" 4390 justifyContent="center" 4391 zIndex=${(this.namespaces?.length??0)*2-t} 4392 class="namespace-icon" 4393 > 4394 <wui-icon 4395 name=${(0,a.J)(f[e])} 4396 size="sm" 4397 color="default" 4398 ></wui-icon> 4399 </wui-flex>`)} 4400 </wui-flex>`:null}templateAllWallets(){return this.showAllWallets&&this.imageSrc?(0,n.qy)` <wui-all-wallets-image .imageeSrc=${this.imageSrc}> </wui-all-wallets-image> `:this.showAllWallets&&this.walletIcon?(0,n.qy)` <wui-wallet-image .walletIcon=${this.walletIcon} size="sm"> </wui-wallet-image> `:null}templateWalletImage(){return!this.showAllWallets&&this.imageSrc?(0,n.qy)`<wui-wallet-image 4401 size=${(0,a.J)("sm"===this.size?"sm":"md")} 4402 imageSrc=${this.imageSrc} 4403 name=${this.name} 4404 ></wui-wallet-image>`:this.showAllWallets||this.imageSrc?null:(0,n.qy)`<wui-wallet-image size="sm" name=${this.name}></wui-wallet-image>`}templateStatus(){return this.loading?(0,n.qy)`<wui-loading-spinner size="lg" color="accent-primary"></wui-loading-spinner>`:this.tagLabel&&this.tagVariant?(0,n.qy)`<wui-tag size="sm" variant=${this.tagVariant}>${this.tagLabel}</wui-tag>`:null}};m.styles=[s.W5,s.fD,h],p([(0,i.MZ)({type:Array})],m.prototype,"walletImages",void 0),p([(0,i.MZ)()],m.prototype,"imageSrc",void 0),p([(0,i.MZ)()],m.prototype,"name",void 0),p([(0,i.MZ)()],m.prototype,"size",void 0),p([(0,i.MZ)()],m.prototype,"tagLabel",void 0),p([(0,i.MZ)()],m.prototype,"tagVariant",void 0),p([(0,i.MZ)()],m.prototype,"walletIcon",void 0),p([(0,i.MZ)()],m.prototype,"tabIdx",void 0),p([(0,i.MZ)({type:Array})],m.prototype,"namespaces",void 0),p([(0,i.MZ)({type:Boolean})],m.prototype,"disabled",void 0),p([(0,i.MZ)({type:Boolean})],m.prototype,"showAllWallets",void 0),p([(0,i.MZ)({type:Boolean})],m.prototype,"loading",void 0),p([(0,i.MZ)({type:String})],m.prototype,"loadingSpinnerColor",void 0),m=p([(0,o.E)("wui-list-wallet")],m)},26504:(e,t)=>
4404{"use strict";function r(e){let t=0;for(let r of e)t+=r.length;let r=new Uint8Array(t),n=0;for(let t of e)r.set(t,n),n+=t.length;return r}function n(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}Object.defineProperty(t,"__esModule",{value:!0}),t.concat=function(e){return"string"==typeof e[0]?n(e):r(e)},t.concatBytes=r,t.concatHex=n},26616:(e,t,r)=>{"use strict";r.d(t,{ev:()=>x});var n=r(84410),i=r(26531),a=r(2022),s=r(40537),o=r(14319);let l=BigInt(0),c=BigInt(1),u=BigInt(2),d=BigInt(8);class h{constructor(e){this.ep=e}static fromBytes(e){(0,s.SJ)()}static fromHex(e){(0,s.SJ)()}get x(){return this.toAffine().x}get y(){return this.toAffine().y}clearCofactor(){return this}assertValidity(){this.ep.assertValidity()}toAffine(e){return this.ep.toAffine(e)}toHex(){return(0,i.My)(this.toBytes())}toString(){return this.toHex()}isTorsionFree(){return!0}isSmallOrder(){return!1}add(e){return this.assertSame(e),this.init(this.ep.add(e.ep))}subtract(e){return this.assertSame(e),this.init(this.ep.subtract(e.ep))}multiply(e){return this.init(this.ep.multiply(e))}multiplyUnsafe(e){return this.init(this.ep.multiplyUnsafe(e))}double(){return this.init(this.ep.double())}negate(){return this.init(this.ep.negate())}precompute(e,t){return this.init(this.ep.precompute(e,t))}toRawBytes(){return this.toBytes()}}(0,i.AI)("HashToScalar-");let p=BigInt(0),f=BigInt(1),m=BigInt(2);BigInt(3);let g=BigInt(5),y=BigInt(8),b=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),w={p:b,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:y,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")},v=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function E(e,t){let r=(0,o.zi)(t*t*t,b),n=function(e){let t=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),a=e*e%b*e%b,s=(0,o.zH)(a,m,b)*a%b,l=(0,o.zH)(s,f,b)*e%b,c=(0,o.zH)(l,g,b)*l%b,u=(0,o.zH)(c,t,b)*c%b,d=(0,o.zH)(u,r,b)*u%b,h=(0,o.zH)(d,n,b)*d%b,p=(0,o.zH)(h,i,b)*h%b,y=(0,o.zH)(p,i,b)*h%b,w=(0,o.zH)(y,t,b)*c%b;return{pow_p_5_8:(0,o.zH)(w,m,b)*e%b,b2:a}}(e*(0,o.zi)(r*r*t,b)).pow_p_5_8,i=(0,o.zi)(e*r*n,b),a=(0,o.zi)(t*i*i,b),s=i,l=(0,o.zi)(i*v,b),c=a===e,u=a===(0,o.zi)(-e,b),d=a===(0,o.zi)(-e*v,b);return c&&(i=s),(u||d)&&(i=l),(0,o.dQ)(i,b)&&(i=(0,o.zi)(-i,b)),{isValid:c||u,value:i}}let C=(0,o.D0)(w.p,{isLE:!0}),A=(0,o.D0)(w.n,{isLE:!0}),x=function(e){let{CURVE:t,curveOpts:r,hash:n,eddsaOpts:h}=function(e){let t={a:e.a,d:e.d,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},r={Fp:e.Fp,Fn:(0,o.D0)(t.n,e.nBitLength,!0),uvRatio:e.uvRatio},n={randomBytes:e.randomBytes,adjustScalarBytes:e.adjustScalarBytes,domain:e.domain,prehash:e.prehash,mapToCurve:e.mapToCurve};return{CURVE:t,curveOpts:r,hash:e.hash,eddsaOpts:n}}(e),p=function(e,t,r={}){if("function"!=typeof t)throw Error('"hash" function param is required');(0,s.DS)(r,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});let{prehash:n}=r,{BASE:a,Fp:o,Fn:l}=e,u=r.randomBytes||i.po,d=r.adjustScalarBytes||(e=>e),h=r.domain||((e,t,r)=>{if((0,s.d6)(r,"phflag"),t.length||r)throw Error("Contexts/pre-hash are not supported");return e});function p(e){return l.create((0,s.lX)(e))}function f(e){let{head:r,prefix:n,scalar:i}=function(e){let r=w.secretKey;e=(0,s.qj)("private key",e,r);let n=(0,s.qj)("hashed private key",t(e),2*r),i=d(n.slice(0,r)),a=n.slice(r,2*r),o=p(i);return{head:i,prefix:a,scalar:o}}(e),o=a.multiply(i),l=o.toBytes();return{head:r,prefix:n,scalar:i,point:o,pointBytes:l}}function m(e){return f(e).pointBytes}function g(e=Uint8Array.of(),...r){return p(t(h((0,i.Id)(...r),(0,s.qj)("context",e),!!n)))}let y={zip215:!0},b=o.BYTES,w={secretKey:b,publicKey:b,signature:2*b,seed:b};function v(e=u(w.seed)){return(0,s.eV)(e,w.seed,"seed")}let E={getExtendedPublicKey:f,randomSecretKey:v,isValidSecretKey:function(e){return(0,i.aY)(e)&&e.length===l.BYTES},isValidPublicKey:function(t,r){try{return!!e.fromBytes(t,r)}catch(e){return!1}},toMontgomery(t){let{y:r}=e.fromBytes(t),n=w.publicKey,i=32===n;if(!i&&57!==n)throw Error("only defined for 25519 and 448");let a=i?o.div(c+r,c-r):o.div(r-c,r+c);return o.toBytes(a)},toMontgomerySecret(e){let r=w.secretKey;return(0,s.eV)(e,r),d(t(e.subarray(0,r))).subarray(0,r)},randomPrivateKey:v,precompute:(t=8,r=e.BASE)=>r.precompute(t,!1)};return Object.freeze({keygen:function(e){let t=E.randomSecretKey(e);return{secretKey:t,publicKey:m(t)}},getPublicKey:m,sign:function(e,t,r={}){e=(0,s.qj)("message",e),n&&(e=n(e));let{prefix:o,scalar:c,pointBytes:u}=f(t),d=g(r.context,o,e),h=a.multiply(d).toBytes(),p=g(r.context,h,u,e),m=l.create(d+p*c);
4404if(!l.isValid(m))throw Error("sign failed: invalid s");let y=(0,i.Id)(h,l.toBytes(m));return(0,s.eV)(y,w.signature,"result")},verify:function(t,r,i,o=y){let l,c,u,{context:d,zip215:h}=o,p=w.signature;t=(0,s.qj)("signature",t,p),r=(0,s.qj)("message",r),i=(0,s.qj)("publicKey",i,w.publicKey),void 0!==h&&(0,s.d6)(h,"zip215"),n&&(r=n(r));let f=p/2,m=t.subarray(0,f),b=(0,s.lX)(t.subarray(f,p));try{l=e.fromBytes(i,h),c=e.fromBytes(m,h),u=a.multiplyUnsafe(b)}catch(e){return!1}if(!h&&l.isSmallOrder())return!1;let v=g(d,c.toBytes(),l.toBytes(),r);return c.add(l.multiplyUnsafe(v)).subtract(u).clearCofactor().is0()},utils:E,Point:e,lengths:w})}(function(e,t={}){let r=(0,a.UT)("edwards",e,t,t.FpFnLE),{Fp:n,Fn:o}=r,h=r.CURVE,{h:p}=h;(0,s.DS)(t,{},{uvRatio:"function"});let f=u<<BigInt(8*o.BYTES)-c,m=e=>n.create(e),g=t.uvRatio||((e,t)=>{try{return{isValid:!0,value:n.sqrt(n.div(e,t))}}catch(e){return{isValid:!1,value:l}}});if(!function(e,t,r,n){let i=e.sqr(r),a=e.sqr(n),s=e.add(e.mul(t.a,i),a),o=e.add(e.ONE,e.mul(t.d,e.mul(i,a)));return e.eql(s,o)}(n,h,h.Gx,h.Gy))throw Error("bad curve params: generator point");function y(e,t,r=!1){let n=r?c:l;return(0,s.aK)("coordinate "+e,t,n,f),t}function b(e){if(!(e instanceof E))throw Error("ExtendedPoint expected")}let w=(0,s.x)((e,t)=>{let{X:r,Y:i,Z:a}=e,s=e.is0();null==t&&(t=s?d:n.inv(a));let o=m(r*t),u=m(i*t),h=n.mul(a,t);if(s)return{x:l,y:c};if(h!==c)throw Error("invZ was invalid");return{x:o,y:u}}),v=(0,s.x)(e=>{let{a:t,d:r}=h;if(e.is0())throw Error("bad point: ZERO");let{X:n,Y:i,Z:a,T:s}=e,o=m(n*n),l=m(i*i),c=m(a*a),u=m(c*c),d=m(o*t);if(m(c*m(d+l))!==m(u+m(r*m(o*l))))throw Error("bad point: equation left != right (1)");if(m(n*i)!==m(a*s))throw Error("bad point: equation left != right (2)");return!0});class E{constructor(e,t,r,n){this.X=y("x",e),this.Y=y("y",t),this.Z=y("z",r,!0),this.T=y("t",n),Object.freeze(this)}static CURVE(){return h}static fromAffine(e){if(e instanceof E)throw Error("extended point not allowed");let{x:t,y:r}=e||{};return y("x",t),y("y",r),new E(t,r,c,m(t*r))}static fromBytes(e,t=!1){let r=n.BYTES,{a:i,d:a}=h;e=(0,s.nC)((0,s.eV)(e,r,"point")),(0,s.d6)(t,"zip215");let o=(0,s.nC)(e),u=e[r-1];o[r-1]=-129&u;let d=(0,s.lX)(o),p=t?f:n.ORDER;(0,s.aK)("point.y",d,l,p);let y=m(d*d),{isValid:b,value:w}=g(m(y-c),m(a*y-i));if(!b)throw Error("bad point: invalid y coordinate");let v=(w&c)===c,C=(128&u)!=0;if(!t&&w===l&&C)throw Error("bad point: x=0 and x_0=1");return C!==v&&(w=m(-w)),E.fromAffine({x:w,y:d})}static fromHex(e,t=!1){return E.fromBytes((0,s.qj)("point",e),t)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return C.createCache(this,e),t||this.multiply(u),this}assertValidity(){v(this)}equals(e){b(e);let{X:t,Y:r,Z:n}=this,{X:i,Y:a,Z:s}=e,o=m(t*s),l=m(i*n),c=m(r*s),u=m(a*n);return o===l&&c===u}is0(){return this.equals(E.ZERO)}negate(){return new E(m(-this.X),this.Y,this.Z,m(-this.T))}double(){let{a:e}=h,{X:t,Y:r,Z:n}=this,i=m(t*t),a=m(r*r),s=m(u*m(n*n)),o=m(e*i),l=t+r,c=m(m(l*l)-i-a),d=o+a,p=d-s,f=o-a,g=m(c*p),y=m(d*f),b=m(c*f);return new E(g,y,m(p*d),b)}add(e){b(e);let{a:t,d:r}=h,{X:n,Y:i,Z:a,T:s}=this,{X:o,Y:l,Z:c,T:u}=e,d=m(n*o),p=m(i*l),f=m(s*r*u),g=m(a*c),y=m((n+i)*(o+l)-d-p),w=g-f,v=g+f,C=m(p-t*d),A=m(y*w),x=m(v*C),I=m(y*C);return new E(A,x,m(w*v),I)}subtract(e){return this.add(e.negate())}multiply(e){if(!o.isValidNot0(e))throw Error("invalid scalar: expected 1 <= sc < curve.n");let{p:t,f:r}=C.cached(this,e,e=>(0,a.Ak)(E,e));return(0,a.Ak)(E,[t,r])[0]}multiplyUnsafe(e,t=E.ZERO){if(!o.isValid(e))throw Error("invalid scalar: expected 0 <= sc < curve.n");return e===l?E.ZERO:this.is0()||e===c?this:C.unsafe(this,e,e=>(0,a.Ak)(E,e),t)}isSmallOrder(){return this.multiplyUnsafe(p).is0()}isTorsionFree(){return C.unsafe(this,h.n).is0()}toAffine(e){return w(this,e)}clearCofactor(){return p===c?this:this.multiplyUnsafe(p)}toBytes(){let{x:e,y:t}=this.toAffine(),r=n.toBytes(t);return r[r.length-1]|=e&c?128:0,r}toHex(){return(0,i.My)(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get ex(){return this.X}get ey(){return this.Y}get ez(){return this.Z}get et(){return this.T}static normalizeZ(e){return(0,a.Ak)(E,e)}static msm(e,t){return(0,a.Xf)(E,o,e,t)}
4404_setWindowSize(e){this.precompute(e)}toRawBytes(){return this.toBytes()}}E.BASE=new E(h.Gx,h.Gy,c,m(h.Gx*h.Gy)),E.ZERO=new E(l,c,c,l),E.Fp=n,E.Fn=o;let C=new a.hT(E,o.BITS);return E.BASE.precompute(8),E}(t,r),n,h),f=p.Point;return Object.assign({},p,{ExtendedPoint:f,CURVE:e,nBitLength:f.Fn.BITS,nByteLength:f.Fn.BYTES})}({...w,Fp:C,hash:n.Zf,adjustScalarBytes:function(e){return e[0]&=248,e[31]&=127,e[31]|=64,e},uvRatio:E}),I=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),S=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),T=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),P=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),O=e=>E(f,e),_=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),N=e=>x.Point.Fp.create((0,s.lX)(e)&_);function k(e){let{d:t}=w,r=e=>C.create(e),n=r(v*e*e),i=r((n+f)*T),a=BigInt(-1),s=r((a-t*n)*r(n+t)),{isValid:l,value:c}=E(i,s),u=r(c*e);(0,o.dQ)(u,b)||(u=r(-u)),l||(c=u),l||(a=n);
4404let d=r(a*(n-f)*P-s),h=c*c,p=r((c+c)*s),m=r(d*I),g=r(f-h),y=r(f+h);return new x.Point(r(p*y),r(g*m),r(m*y),r(p*g))}class R extends h{constructor(e){super(e)}static fromAffine(e){return new R(x.Point.fromAffine(e))}assertSame(e){if(!(e instanceof R))throw Error("RistrettoPoint expected")}init(e){return new R(e)}static hashToCurve(e){var t=(0,s.qj)("ristrettoHash",e,64);(0,i.DO)(t,64);let r=k(N(t.subarray(0,32))),n=k(N(t.subarray(32,64)));return new R(r.add(n))}static fromBytes(e){(0,i.DO)(e,32);let{a:t,d:r}=w,n=e=>C.create(e),a=N(e);if(!(0,s.ex)(C.toBytes(a),e)||(0,o.dQ)(a,b))throw Error("invalid ristretto255 encoding 1");let l=n(a*a),c=n(f+t*l),u=n(f-t*l),d=n(c*c),h=n(u*u),m=n(t*r*d-h),{isValid:g,value:y}=O(n(m*h)),v=n(y*u),E=n(y*v*m),A=n((a+a)*v);(0,o.dQ)(A,b)&&(A=n(-A));let I=n(c*E),S=n(A*I);if(!g||(0,o.dQ)(S,b)||I===p)throw Error("invalid ristretto255 encoding 2");return new R(new x.Point(A,I,f,S))}static fromHex(e){return R.fromBytes((0,s.qj)("ristrettoHex",e,32))}static msm(e,t){return(0,a.Xf)(R,x.Point.Fn,e,t)}toBytes(){let e,{X:t,Y:r,Z:n,T:i}=this.ep,a=e=>C.create(e),s=a(a(n+r)*a(n-r)),l=a(t*r),c=a(l*l),{value:u}=O(a(s*c)),d=a(u*s),h=a(u*l),p=a(d*h*i);if((0,o.dQ)(i*p,b)){let n=a(r*v),i=a(t*v);t=n,r=i,e=a(d*S)}else e=h;(0,o.dQ)(t*p,b)&&(r=a(-r));let f=a((n-r)*e);return(0,o.dQ)(f,b)&&(f=a(-f)),C.toBytes(f)}equals(e){this.assertSame(e);let{X:t,Y:r}=this.ep,{X:n,Y:i}=e.ep,a=e=>C.create(e),s=a(t*i)===a(r*n),o=a(r*i)===a(t*n);return s||o}is0(){return this.equals(R.ZERO)}}R.BASE=new R(x.Point.BASE),R.ZERO=new R(x.Point.ZERO),R.Fp=C,R.Fn=A},26802:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateRequestId=void 0;let r=e=>e.toString(16).padStart(2,"0");t.generateRequestId=()=>"undefined"!=typeof window?(e=>{let t=new Uint8Array((e||40)/2);return window.crypto.getRandomValues(t),Array.from(t,r).join("")})(10):new Date().getTime().toString(36)},26929:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toSignatureHash=function(e){return(0,n.hashSignature)((0,i.toSignature)(e))};let n=r(63266),i=r(13745)},27083:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toHex=function(e,t={}){return"number"==typeof e||"bigint"==typeof e?c(e,t):"string"==typeof e?d(e,t):"boolean"==typeof e?o(e,t):l(e,t)},t.boolToHex=o,t.bytesToHex=l,t.numberToHex=c,t.stringToHex=d;let n=r(51674),i=r(3669),a=r(14972),s=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function o(e,t={}){let r=`0x${Number(e)}`;return"number"==typeof t.size?((0,a.assertSize)(r,{size:t.size}),(0,i.pad)(r,{size:t.size})):r}function l(e,t={}){let r="";for(let t=0;t<e.length;t++)r+=s[e[t]];let n=`0x${r}`;return"number"==typeof t.size?((0,a.assertSize)(n,{size:t.size}),(0,i.pad)(n,{dir:"right",size:t.size})):n}function c(e,t={}){let r,{signed:a,size:s}=t,o=BigInt(e);s?r=a?(1n<<8n*BigInt(s)-1n)-1n:2n**(8n*BigInt(s))-1n:"number"==typeof e&&(r=BigInt(Number.MAX_SAFE_INTEGER));let l="bigint"==typeof r&&a?-r-1n:0;if(r&&o>r||o<l){let t="bigint"==typeof e?"n":"";throw new n.IntegerOutOfRangeError({max:r?`${r}${t}`:void 0,min:`${l}${t}`,signed:a,size:s,value:`${e}${t}`})}let u=`0x${(a&&o<0?(1n<<BigInt(8*s))+BigInt(o):o).toString(16)}`;return s?(0,i.pad)(u,{size:s}):u}let u=new TextEncoder;function d(e,t={}){return l(u.encode(e),t)}},27126:(e,t,r)=>{"use strict";r.d(t,{H:()=>d});var n=r(56059),i=r(81767),a=r(26274),s=r(42242),o=r(2076);r(80847),r(62736);var l=r(63884);let c=(0,o.AH)` 4405 :host { 4406 display: block; 4407 } 4408 4409 div.container { 4410 position: absolute; 4411 bottom: 0; 4412 left: 0; 4413 right: 0; 4414 overflow: hidden; 4415 height: auto; 4416 display: block; 4417 } 4418 4419 div.container[status='hide'] { 4420 animation: fade-out; 4421 animation-duration: var(--apkt-duration-dynamic); 4422 animation-timing-function: ${({easings:e})=>e["ease-out-power-2"]}; 4423 animation-fill-mode: both; 4424 animation-delay: 0s; 4425 } 4426 4427 div.container[status='show'] { 4428 animation: fade-in; 4429 animation-duration: var(--apkt-duration-dynamic); 4430 animation-timing-function: ${({easings:e})=>e["ease-out-power-2"]}; 4431 animation-fill-mode: both; 4432 animation-delay: var(--apkt-duration-dynamic); 4433 } 4434 4435 @keyframes fade-in { 4436 from { 4437 opacity: 0; 4438 filter: blur(6px); 4439 } 4440 to { 4441 opacity: 1; 4442 filter: blur(0px); 4443 } 4444 } 4445 4446 @keyframes fade-out { 4447 from { 4448 opacity: 1; 4449 filter: blur(0px); 4450 } 4451 to { 4452 opacity: 0; 4453 filter: blur(6px); 4454 } 4455 } 4456`;var u=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let d=class extends n.WF{constructor(){super(...arguments),this.resizeObserver=void 0,this.unsubscribe=[],this.status="hide",this.view=a.I.state.view}firstUpdated(){this.status=l.y.hasFooter()?"show":"hide",this.unsubscribe.push(a.I.subscribeKey("view",e=>{this.view=e,this.status=l.y.hasFooter()?"show":"hide","hide"===this.status&&document.documentElement.style.setProperty("--apkt-footer-height","0px")})),this.resizeObserver=new ResizeObserver(e=>{for(let t of e)if(t.target===this.getWrapper()){let e=`${t.contentRect.height}px`;document.documentElement.style.setProperty("--apkt-footer-height",e)}}),this.resizeObserver.observe(this.getWrapper())}render(){return(0,n.qy)` 4457 <div class="container" status=${this.status}>${this.templatePageContainer()}</div> 4458 `}templatePageContainer(){return l.y.hasFooter()?(0,n.qy)` ${this.templateFooter()}`:null}templateFooter(){switch(this.view){case"Networks":return this.templateNetworksFooter();case"Connect":case"ConnectWallets":case"OnRampFiatSelect":case"OnRampTokenSelect":return(0,n.qy)`<w3m-legal-footer></w3m-legal-footer>`;case"OnRampProviders":return(0,n.qy)`<w3m-onramp-providers-footer></w3m-onramp-providers-footer>`;default:return null}}templateNetworksFooter(){return(0,n.qy)` <wui-flex 4459 class="footer-in" 4460 padding="3" 4461 flexDirection="column" 4462 gap="3" 4463 alignItems="center" 4464 > 4465 <wui-text variant="md-regular" color="secondary" align="center"> 4466 Your connected wallet may not support some of the networks available for this dApp 4467 </wui-text> 4468 <wui-link @click=${this.onNetworkHelp.bind(this)}> 4469 <wui-icon size="sm" color="accent-primary" slot="iconLeft" name="helpCircle"></wui-icon> 4470 What is a network 4471 </wui-link> 4472 </wui-flex>`}onNetworkHelp(){s.E.sendEvent({type:"track",event:"CLICK_NETWORK_HELP"}),a.I.push("WhatIsANetwork")}getWrapper(){return this.shadowRoot?.querySelector("div.container")}};d.styles=[c],u([(0,i.wk)()],d.prototype,"status",void 0),u([(0,i.wk)()],d.prototype,"view",void 0),d=u([(0,o.EM)("w3m-footer")],d)},27259:(e,t,r)=>{"use strict";
4472Object.defineProperty(t,"__esModule",{value:!0}),t.parseAbiParameter=function(e){let t;if("string"==typeof e)t=(0,s.parseAbiParameter)(e,{modifiers:i.modifiers});else{let r=(0,a.parseStructs)(e),n=e.length;for(let a=0;a<n;a++){let n=e[a];if(!(0,i.isStructSignature)(n)){t=(0,s.parseAbiParameter)(n,{modifiers:i.modifiers,structs:r});break}}}if(!t)throw new n.InvalidAbiParameterError({param:e});return t};let n=r(46836),i=r(25065),a=r(8912),s=r(20295)},27315:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;let n=r(92565);class i extends n.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.ahash)(e);let r=(0,n.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let i=this.blockLen,a=new Uint8Array(i);a.set(r.length>i?e.create().update(r).digest():r);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),(0,n.clean)(a)}update(e){return(0,n.aexists)(this),this.iHash.update(e),this}digestInto(e){(0,n.aexists)(this),(0,n.abytes)(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:n,destroyed:i,blockLen:a,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=a,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.HMAC=i,t.hmac=(e,t,r)=>new i(e,t).update(r).digest(),t.hmac.create=(e,t)=>new i(e,t)},27342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchBlocks=function(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:r=!1,emitOnBegin:l=!1,onBlock:c,onError:u,includeTransactions:d,poll:h,pollingInterval:p=e.pollingInterval}){let f,m,g,y,b=void 0!==h?h:"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
4472onfig.type&&"ipc"!==e.transport.transports[0].config.type),w=d??!1;return b?(()=>{let d=(0,s.stringify)(["watchBlocks",e.uid,t,r,l,w,p]);return(0,i.observe)(d,{onBlock:c,onError:u},i=>(0,a.poll)(async()=>{try{let a=await (0,n.getAction)(e,o.getBlock,"getBlock")({blockTag:t,includeTransactions:w});if(null!==a.number&&f?.number!=null){if(a.number===f.number)return;if(a.number-f.number>1&&r)for(let t=f?.number+1n;t<a.number;t++){let r=await (0,n.getAction)(e,o.getBlock,"getBlock")({blockNumber:t,includeTransactions:w});i.onBlock(r,f),f=r}}(f?.number==null||"pending"===t&&a?.number==null||null!==a.number&&a.number>f.number)&&(i.onBlock(a,f),f=a)}catch(e){i.onError?.(e)}},{emitOnBegin:l,interval:p}))})():(m=!0,g=!0,y=()=>m=!1,(async()=>{try{l&&(0,n.getAction)(e,o.getBlock,"getBlock")({blockTag:t,includeTransactions:w}).then(e=>{m&&g&&(c(e,void 0),g=!1)}).catch(u);let r=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:i}=await r.subscribe({params:["newHeads"],async onData(t){if(!m)return;let r=await (0,n.getAction)(e,o.getBlock,"getBlock")({blockNumber:t.result?.number,includeTransactions:w}).catch(()=>{});m&&(c(r,f),g=!1,f=r)},onError(e){u?.(e)}});y=i,m||y()}catch(e){u?.(e)}})(),()=>y())};let n=r(95847),i=r(84053),a=r(63342),s=r(68508),o=r(70200)},27470:(e,t,r)=>{"use strict";r.d(t,{E:()=>n.E});var n=r(51735)},27697:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBlockNumberCache=function(e){return(0,n.getCache)(i(e))},t.getBlockNumber=a;let n=r(1953),i=e=>`blockNumber.${e}`;async function a(e,{cacheTime:t=e.cacheTime}={}){return BigInt(await (0,n.withCache)(()=>e.request({method:"eth_blockNumber"}),{cacheKey:i(e.uid),cacheTime:t}))}},27712:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CircularReferenceError=void 0;let n=r(86737);class i extends n.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"})}}t.CircularReferenceError=i},27756:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertTransactionEIP7702=function(e){let{authorizationList:t}=e;if(t)for(let e of t){let{chainId:t}=e,r=e.address;if(!(0,u.isAddress)(r))throw new a.InvalidAddressError({address:r});if(t<0)throw new l.InvalidChainIdError({chainId:t})}f(e)},t.assertTransactionEIP4844=function(e){let{blobVersionedHashes:t}=e;if(t){if(0===t.length)throw new o.EmptyBlobError;for(let e of t){let t=(0,d.size)(e),r=(0,p.hexToNumber)((0,h.slice)(e,0,1));if(32!==t)throw new o.InvalidVersionedHashSizeError({hash:e,size:t});if(r!==n.versionedHashVersionKzg)throw new o.InvalidVersionedHashVersionError({hash:e,version:r})}}f(e)},t.assertTransactionEIP1559=f,t.assertTransactionEIP2930=function(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:d}=e;if(t<=0)throw new l.InvalidChainIdError({chainId:t});if(d&&!(0,u.isAddress)(d))throw new a.InvalidAddressError({address:d});if(r||o)throw new s.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>i.maxUint256)throw new c.FeeCapTooHighError({maxFeePerGas:n})},t.assertTransactionLegacy=function(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:d}=e;if(d&&!(0,u.isAddress)(d))throw new a.InvalidAddressError({address:d});if(void 0!==t&&t<=0)throw new l.InvalidChainIdError({chainId:t});if(r||o)throw new s.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>i.maxUint256)throw new c.FeeCapTooHighError({maxFeePerGas:n})};let n=r(19775),i=r(97446),a=r(9301),s=r(45226),o=r(73592),l=r(34844),c=r(80779),u=r(63402),d=r(29813),h=r(4906),p=r(14972);function f(e){let{chainId:t,maxPriorityFeePerGas:r,maxFeePerGas:n,to:s}=e;if(t<=0)throw new l.InvalidChainIdError({chainId:t});if(s&&!(0,u.isAddress)(s))throw new a.InvalidAddressError({address:s});if(n&&n>i.maxUint256)throw new c.FeeCapTooHighError({maxFeePerGas:n});if(r&&n&&r>n)throw new c.TipAboveFeeCapError({maxFeePerGas:n,maxPriorityFeePerGas:r})}},27806:(e,t)=>{"use strict";
4472Object.defineProperty(t,"__esModule",{value:!0})},27872:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignature=function({r:e,s:t,to:r="hex",v:s,yParity:o}){let l=(()=>{if(0===o||1===o)return o;if(s&&(27n===s||28n===s||s>=35n))return+(s%2n===0n);throw Error("Invalid `v` or `yParity` value")})(),c=`0x${new n.secp256k1.Signature((0,i.hexToBigInt)(e),(0,i.hexToBigInt)(t)).toCompactHex()}${0===l?"1b":"1c"}`;return"hex"===r?c:(0,a.hexToBytes)(c)};let n=r(6792),i=r(14972),a=r(60037)},28302:(e,t,r)=>{"use strict";r.d(t,{AU:()=>y,Q7:()=>f,Ue:()=>g,Yx:()=>o,mP:()=>b});var n=r(56595),i=r(44582),a=r(98668),s=r(10693);let o=32,l=new Uint8Array(32),c=["then"],u={},d=new WeakMap;function h(e){return d.get(e)}function p(e,t){let r=Error(`deferred error during ABI decoding triggered accessing ${e}`);throw r.error=t,r}class f extends Array{#eF;constructor(...e){var t,r;let i=e[0],a=e[1],s=(e[2]||[]).slice(),o=!0;i!==u&&(a=e,s=[],o=!1),super(a.length),a.forEach((e,t)=>{this[t]=e});let l=s.reduce((e,t)=>("string"==typeof t&&e.set(t,(e.get(t)||0)+1),e),new Map);if(t=Object.freeze(a.map((e,t)=>{let r=s[t];return null!=r&&1===l.get(r)?r:null})),d.set(this,t),this.#eF=[],null==this.#eF&&this.#eF,!o)return;Object.freeze(this);let f=new Proxy(this,{get:(e,t,r)=>{if("string"==typeof t){if(t.match(/^[0-9]+$/)){let r=(0,n.WZ)(t,"%index");if(r<0||r>=this.length)throw RangeError("out of result range");let i=e[r];return i instanceof Error&&p(`index ${r}`,i),i}if(c.indexOf(t)>=0)return Reflect.get(e,t,r);let i=e[t];if(i instanceof Function)return function(...t){return i.apply(this===r?e:this,t)};if(!(t in e))return e.getValue.apply(this===r?e:this,[t])}return Reflect.get(e,t,r)}});return r=h(this),d.set(f,r),f}toArray(e){let t=[];return this.forEach((r,n)=>{r instanceof Error&&p(`index ${n}`,r),e&&r instanceof f&&(r=r.toArray(e)),t.push(r)}),t}toObject(e){let t=h(this);return t.reduce((r,n,a)=>((0,i.vA)(null!=n,`value at index ${a} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),function e(t,r,n){return t.indexOf(null)>=0?r.map((t,r)=>t instanceof f?e(h(t),t,n):t):t.reduce((t,i,a)=>{let s=r.getValue(i);return i in t||(n&&s instanceof f&&(s=e(h(s),s,n)),t[i]=s),t},{})}(t,this,e)),{})}slice(e,t){null==e&&(e=0),e<0&&(e+=this.length)<0&&(e=0),null==t&&(t=this.length),t<0&&(t+=this.length)<0&&(t=0),t>this.length&&(t=this.length);let r=h(this),n=[],i=[];for(let a=e;a<t;a++)n.push(this[a]),i.push(r[a]);return new f(u,n,i)}filter(e,t){let r=h(this),n=[],i=[];for(let a=0;a<this.length;a++){let s=this[a];s instanceof Error&&p(`index ${a}`,s),e.call(t,s,a,this)&&(n.push(s),i.push(r[a]))}return new f(u,n,i)}map(e,t){let r=[];for(let n=0;n<this.length;n++){let i=this[n];i instanceof Error&&p(`index ${n}`,i),r.push(e.call(t,i,n,this))}return r}getValue(e){let t=h(this).indexOf(e);if(-1===t)return;let r=this[t];return r instanceof Error&&p(`property ${JSON.stringify(e)}`,r.error),r}static fromItems(e,t){return new f(u,e,t)}}function m(e){let t=(0,n.c4)(e);return(0,i.vA)(t.length<=o,"value out-of-bounds","BUFFER_OVERRUN",{buffer:t,length:o,offset:t.length}),t.length!==o&&(t=(0,a.Lm)((0,a.xW)([l.slice(t.length%o),t]))),t}class g{name;type;localName;dynamic;constructor(e,t,r,n){(0,s.n)(this,{name:e,type:t,localName:r,dynamic:n},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(e,t){(0,i.MR)(!1,e,this.localName,t)}}class y{#eH;#ez;constructor(){this.#eH=[],this.#ez=0}get data(){return(0,a.xW)(this.#eH)}get length(){return this.#ez}#eW(e){return this.#eH.push(e),this.#ez+=e.length,e.length}appendWriter(e){return this.#eW((0,a.Lm)(e.data))}writeBytes(e){let t=(0,a.Lm)(e),r=t.length%o;return r&&(t=(0,a.Lm)((0,a.xW)([t,l.slice(r)]))),this.#eW(t)}writeValue(e){return this.#eW(m(e))}writeUpdatableValue(){let e=this.#eH.length;return this.#eH.push(l),this.#ez+=o,t=>{this.#eH[e]=m(t)}}}class b{allowLoose;#eH;#e;#eq;#eV;#eG;constructor(e,t,r){(0,s.n)(this,{allowLoose:!!t}),this.#eH=(0,a.Lm)(e),this.#eq=0,this.#eV=null,this.#eG=null!=r?r:1024,this.#e=0}get data(){return(0,a.c$)(this.#eH)}get dataLength(){return this.#eH.length}get consumed(){return this.#e}get bytes(){return new Uint8Array(this.#eH)}#eK(e){if(this.#eV)return this.#eV.#eK(e);this.#eq+=e,(0,i.vA)(this.#eG<1||this.#eq<=this.#eG*this.dataLength,`c
4472ompressed ABI data exceeds inflation ratio of ${this.#eG} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:(0,a.Lm)(this.#eH),offset:this.#e,length:e,info:{bytesRead:this.#eq,dataLength:this.dataLength}})}#eZ(e,t,r){let n=Math.ceil(t/o)*o;return this.#e+n>this.#eH.length&&(this.allowLoose&&r&&this.#e+t<=this.#eH.length?n=t:(0,i.vA)(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:(0,a.Lm)(this.#eH),length:this.#eH.length,offset:this.#e+n})),this.#eH.slice(this.#e,this.#e+n)}subReader(e){let t=new b(this.#eH.slice(this.#e+e),this.allowLoose,this.#eG);return t.#eV=this,t}readBytes(e,t){let r=this.#eZ(0,e,!!t);return this.#eK(e),this.#e+=r.length,r.slice(0,e)}readValue(){return(0,n.Dg)(this.readBytes(o))}readIndex(){return(0,n.Ro)(this.readBytes(o))}}},28455:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCallError=function(e,{docsPath:t,...r}){let s=(()=>{let t=(0,a.getNodeError)(e,r);return t instanceof i.UnknownNodeError?e:t})();return new n.CallExecutionError(s,{docsPath:t,...r})};let n=r(81701),i=r(80779),a=r(49259)},28770:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(97379);let s=(0,n.JW)`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"> 4473 <rect width="64" height="64" fill="#F7931A"/> 4474 <g clip-path="url(#clip0_1045_17)"> 4475 <path d="M63.0394 39.7409C58.7654 56.8839 41.4024 67.3169 24.2574 63.0419C7.11937 58.7679 -3.31363 41.4039 0.962367 24.2619C5.23437 7.11686 22.5974 -3.31714 39.7374 0.956863C56.8814 5.23086 67.3134 22.5969 63.0394 39.7409Z" fill="#F7931A"/> 4476 <path d="M46.1092 27.4409C46.7462 23.1829 43.5042 20.8939 39.0712 19.3669L40.5092 13.5989L36.9982 12.7239L35.5982 18.3399C34.6752 18.1099 33.7272 17.8929 32.7852 17.6779L34.1952 12.0249L30.6862 11.1499L29.2472 16.9159C28.4832 16.7419 27.7332 16.5699 27.0052 16.3889L27.0092 16.3709L22.1672 15.1619L21.2332 18.9119C21.2332 18.9119 23.8382 19.5089 23.7832 19.5459C25.2052 19.9009 25.4622 20.8419 25.4192 21.5879L23.7812 28.1589C23.8792 28.1839 24.0062 28.2199 24.1462 28.2759C24.0292 28.2469 23.9042 28.2149 23.7752 28.1839L21.4792 37.3889C21.3052 37.8209 20.8642 38.4689 19.8702 38.2229C19.9052 38.2739 17.3182 37.5859 17.3182 37.5859L15.5752 41.6049L20.1442 42.7439C20.9942 42.9569 21.8272 43.1799 22.6472 43.3899L21.1942 49.2239L24.7012 50.0989L26.1402 44.3269C27.0982 44.5869 28.0282 44.8269 28.9382 45.0529L27.5042 50.7979L31.0152 51.6729L32.4682 45.8499C38.4552 46.9829 42.9572 46.5259 44.8522 41.1109C46.3792 36.7509 44.7762 34.2359 41.6262 32.5959C43.9202 32.0669 45.6482 30.5579 46.1092 27.4409ZM38.0872 38.6899C37.0022 43.0499 29.6612 40.6929 27.2812 40.1019L29.2092 32.3729C31.5892 32.9669 39.2212 34.1429 38.0872 38.6899ZM39.1732 27.3779C38.1832 31.3439 32.0732 29.3289 30.0912 28.8349L31.8392 21.8249C33.8212 22.3189 40.2042 23.2409 39.1732 27.3779Z" fill="white"/> 4477 </g> 4478 <defs> 4479 <clipPath id="clip0_1045_17"> 4480 <rect width="64" height="64" fill="white"/> 4481 </clipPath> 4482 </defs> 4483</svg> 4484`,o=(0,n.JW)`<svg fill="none" viewBox="0 0 60 60"> 4485 <rect width="60" height="60" fill="#1DC956" rx="30" /> 4486 <circle cx="30" cy="30" r="3" fill="#fff" /> 4487 <path 4488 fill="#2BEE6C" 4489 stroke="#fff" 4490 stroke-width="2" 4491 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" 4492 /> 4493 <path 4494 fill="#1DC956" 4495 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" 4496 /> 4497 <path 4498 fill="#86F999" 4499 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" 4500 /> 4501 <circle cx="30" cy="30" r="3" fill="#fff" transform="rotate(45 30 30)" /> 4502 <rect width="59" height="59" x=".5" y=".5" stroke="#062B2B" stroke-opacity=".1" rx="29.5" /> 4503</svg> `,l=(0,n.JW)`<svg viewBox="0 0 60 60" fill="none"> 4504 <g clip-path="url(#clip0_7734_50402)"> 4505 <path 4506 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.
45066985 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" 4507 fill="#EB8B47" 4508 /> 4509 <path 4510 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" 4511 stroke="#062B2B" 4512 stroke-opacity="0.1" 4513 /> 4514 <path 4515 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" 4516 fill="#FF974C" 4517 stroke="white" 4518 stroke-width="2" 4519 /> 4520 <path 4521 fill-rule="evenodd" 4522 clip-rule="evenodd" 4523 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" 4524 fill="white" 4525 /> 4526 <path 4527 fill-rule="evenodd" 4528 clip-rule="evenodd" 4529 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" 4530 fill="#FF974C" 4531 /> 4532 <path 4533 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" 4534 fill="#FF974C" 4535 stroke="white" 4536 stroke-width="2" 4537 /> 4538 <circle cx="19" cy="18" r="4" fill="#EB8B47" stroke="white" stroke-width="2" /> 4539 <circle cx="19" cy="42" r="4" fill="#EB8B47" stroke="white" stroke-width="2" /> 4540 </g> 4541 <defs> 4542 <clipPath id="clip0_7734_50402"> 4543 <rect width="60" height="60" fill="white" /> 4544 </clipPath> 4545 </defs> 4546</svg> `,c=(0,n.JW)`<svg fill="none" viewBox="0 0 60 60"> 4547 <g clip-path="url(#a)"> 4548 <path 4549 fill="#1DC956" 4550 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" 4551 /> 4552 <path 4553 fill="#2BEE6C" 4554 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" 4555 /> 4556 <path 4557 fill="#fff" 4558 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" 4559 /> 4560 <path 4561 fill="#fff" 4562 fill-rule="evenodd" 4563 d="M49.5 19a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z" 4564 clip-rule="evenodd" 4565 /> 4566 <path fill="#fff" d="M45 .28v59.66l-2 .1V.19c.7.02 1.37.05 2 .1Z" /> 4567 <path fill="#2BEE6C" d="M47.5 19a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z" /> 4568 <path 4569 stroke="#fff" 4570 stroke-opacity=".1" 4571 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" 4572 /> 4573 </g>
4574 <defs> 4575 <clipPath id="a"><path fill="#fff" d="M0 0h60v60H0z" /></clipPath> 4576 </defs> 4577</svg>`,u=(0,n.JW)`<svg fill="none" viewBox="0 0 60 60"> 4578 <g clip-path="url(#a)"> 4579 <rect width="60" height="60" fill="#C653C6" rx="30" /> 4580 <path 4581 fill="#E87DE8" 4582 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" 4583 /> 4584 <path 4585 fill="#fff" 4586 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" 4587 /> 4588 <path 4589 fill="#fff" 4590 fill-rule="evenodd" 4591 d="M35.5 27a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z" 4592 clip-rule="evenodd" 4593 /> 4594 <path fill="#fff" d="M31 0v60h-2V0h2Z" /> 4595 <path fill="#E87DE8" d="M33.5 27a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z" /> 4596 </g> 4597 <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="29.5" /> 4598 <defs> 4599 <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="30" /></clipPath> 4600 </defs> 4601</svg> `,d=(0,n.JW)`<svg fill="none" viewBox="0 0 60 60"> 4602 <g clip-path="url(#a)"> 4603 <rect width="60" height="60" fill="#987DE8" rx="30" /> 4604 <path 4605 fill="#fff" 4606 fill-rule="evenodd" 4607 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" 4608 clip-rule="evenodd" 4609 /> 4610 <path 4611 fill="#643CDD" 4612 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" 4613 /> 4614 <path 4615 fill="#BDADEB" 4616 d="M30 9.65a1 1 0 0 0-.85.46L17.66 28.64a2 2 0 0 0-.26 1.39L30 24.5V9.65Z" 4617 /> 4618 <path 4619 fill="#643CDD" 4620 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" 4621 /> 4622 <path 4623 fill="#BDADEB" 4624 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" 4625 /> 4626 <path 4627 fill="#401AB3" 4628 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" 4629 /> 4630 <path 4631 fill="#7C5AE2" 4632 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" 4633 /> 4634 </g> 4635 <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="29.5" /> 4636 <defs> 4637 <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="30" /></clipPath> 4638 </defs> 4639</svg> `,h=(0,n.JW)`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"> 4640 <rect width="64" height="64" rx="30" fill="#1DC956"/> 4641 <rect x="0.5" y="0.5" width="63" height="63" rx="29.5" stroke="#141414" stroke-opacity="0.1"/> 4642 <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"/> 4643 <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"/> 4644 <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"/> 4645 <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"/> 4646 <path d="M21.056 35.8507C20.6507 34.6347 20.4111 33.345 20.4111 32C20.4111 30.655 20.6507 29.3
4646653 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"/> 4647 <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"/> 4648</svg> 4649`,p=(0,n.JW)`<svg fill="none" viewBox="0 0 60 60"> 4650 <rect width="60" height="60" fill="#1DC956" rx="3" /> 4651 <path 4652 fill="#1FAD7E" 4653 stroke="#fff" 4654 stroke-width="2" 4655 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" 4656 /> 4657 <path 4658 fill="#2BEE6C" 4659 stroke="#fff" 4660 stroke-width="2" 4661 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" 4662 /> 4663 <path 4664 fill="#86F999" 4665 stroke="#fff" 4666 stroke-width="2" 4667 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" 4668 /> 4669 <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" /> 4670</svg>`,f=(0,n.JW)`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"> 4671 <g clip-path="url(#clip0_241_31636)"> 4672 <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"/> 4673 <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"/> 4674 <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"/> 4675 <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"/> 4676 <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"/> 4677 <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"/> 4678 <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"/> 4679 <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"/> 4680 </g>
4681 <defs> 4682 <clipPath id="clip0_241_31636"> 4683 <rect width="64" height="64" fill="white"/> 4684 </clipPath> 4685 </defs> 4686</svg> 4687`,m=(0,n.JW)`<svg fill="none" viewBox="0 0 60 60"> 4688 <rect width="60" height="60" fill="#C653C6" rx="3" /> 4689 <path 4690 fill="#fff" 4691 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" 4692 /> 4693 <path 4694 fill="#E87DE8" 4695 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" 4696 /> 4697 <path 4698 fill="#E87DE8" 4699 fill-rule="evenodd" 4700 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" 4701 clip-rule="evenodd" 4702 /> 4703 <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" /> 4704</svg>`,g=(0,n.JW)`<svg fill="none" viewBox="0 0 60 60"> 4705 <g clip-path="url(#a)"> 4706 <path 4707 fill="#EB8B47" 4708 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" 4709 /> 4710 <path 4711 stroke="#062B2B" 4712 stroke-opacity=".1" 4713 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" 4714 /> 4715 <path 4716 fill="#FF974C" 4717 stroke="#fff" 4718 stroke-width="2" 4719 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-.
471965-.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" 4720 /> 4721 <circle cx="30" cy="17" r="4" fill="#EB8B47" stroke="#fff" stroke-width="2" /> 4722 </g> 4723 <defs> 4724 <clipPath id="a"><path fill="#fff" d="M0 0h60v60H0z" /></clipPath> 4725 </defs> 4726</svg> `,y=(0,n.JW)`<svg width="40" height="42" viewBox="0 0 40 42" fill="none"> 4727<path opacity="0.7" d="M19.9526 41.9076L7.3877 34.655V26.1226L19.9526 33.3751V41.9076Z" fill="url(#paint0_linear_2113_32117)"/> 4728<path opacity="0.7" d="M19.9521 41.9076L32.5171 34.655V26.1226L19.9521 33.3751V41.9076Z" fill="url(#paint1_linear_2113_32117)"/> 4729<path opacity="0.7" d="M39.9095 7.34521V21.8562L32.5166 26.1225V11.6114L39.9095 7.34521Z" fill="url(#paint2_linear_2113_32117)"/> 4730<path d="M39.9099 7.34536L27.345 0.0927734L19.9521 4.359L32.5171 11.6116L39.9099 7.34536Z" fill="url(#paint3_linear_2113_32117)"/> 4731<path d="M0 7.34536L12.5649 0.0927734L19.9519 4.359L7.387 11.6116L0 7.34536Z" fill="#F969D3"/> 4732<path opacity="0.7" d="M0 7.34521V21.8562L7.387 26.1225V11.6114L0 7.34521Z" fill="url(#paint4_linear_2113_32117)"/> 4733<defs> 4734<linearGradient id="paint0_linear_2113_32117" x1="18.6099" y1="41.8335" x2="7.73529" y2="8.31842" gradientUnits="userSpaceOnUse"> 4735<stop stop-color="#E98ADA"/> 4736<stop offset="1" stop-color="#7E4DBD"/> 4737</linearGradient> 4738<linearGradient id="paint1_linear_2113_32117" x1="26.2346" y1="26.1226" x2="26.2346" y2="41.9076" gradientUnits="userSpaceOnUse"> 4739<stop stop-color="#719DED"/> 4740<stop offset="1" stop-color="#2545BE"/> 4741</linearGradient> 4742<linearGradient id="paint2_linear_2113_32117" x1="36.213" y1="7.34521" x2="36.213" y2="26.1225" gradientUnits="userSpaceOnUse"> 4743<stop stop-color="#93EBFF"/> 4744<stop offset="1" stop-color="#197DDB"/> 4745</linearGradient> 4746<linearGradient id="paint3_linear_2113_32117" x1="29.931" y1="0.0927734" x2="38.2156" y2="14.8448" gradientUnits="userSpaceOnUse"> 4747<stop stop-color="#F969D3"/> 4748<stop offset="1" stop-color="#4F51C0"/> 4749</linearGradient> 4750<linearGradient id="paint4_linear_2113_32117" x1="18.1251" y1="44.2539" x2="-7.06792" y2="15.2763" gradientUnits="userSpaceOnUse"> 4751<stop stop-color="#E98ADA"/> 4752<stop offset="1" stop-color="#7E4DBD"/> 4753</linearGradient> 4754</defs> 4755</svg>`,b=(0,n.JW)`<svg fill="none" viewBox="0 0 60 60"> 4756 <g clip-path="url(#a)"> 4757 <rect width="60" height="60" fill="#00ACE6" rx="30" /> 4758 <circle cx="64" cy="39" r="50" fill="#1AC6FF" stroke="#fff" stroke-width="2" /> 4759 <circle cx="78" cy="30" r="50" fill="#4DD2FF" stroke="#fff" stroke-width="2" /> 4760 <circle cx="72" cy="15" r="35" fill="#80DFFF" stroke="#fff" stroke-width="2" /> 4761 <circle cx="34" cy="-17" r="45" stroke="#fff" stroke-width="2" /> 4762 <circle cx="34" cy="-5" r="50" stroke="#fff" stroke-width="2" /> 4763 <circle cx="30" cy="45" r="4" fill="#4DD2FF" stroke="#fff" stroke-width="2" /> 4764 <circle cx="39.5" cy="27.5" r="4" fill="#80DFFF" stroke="#fff" stroke-width="2" /> 4765 <circle cx="16" cy="24" r="4" fill="#19C6FF" stroke="#fff" stroke-width="2" /> 4766 </g> 4767 <rect width="59" height="59" x=".5" y=".5" stroke="#062B2B" stroke-opacity=".1" rx="29.5" /> 4768 <defs> 4769 <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="30" /></clipPath> 4770 </defs> 4771</svg>`,w=(0,n.JW)`<svg fill="none" viewBox="0 0 60 60"> 4772 <g clip-path="url(#a)"> 4773 <rect width="60" height="60" fill="#C653C6" rx="3" /> 4774 <path 4775 fill="#E87DE8" 4776 stroke="#fff" 4777 stroke-width="2" 4778 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" 4779 /> 4780 <path 4781 fill="#fff" 4782 fill-rule="evenodd" 4783 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" 4784 clip-rule="evenodd" 4785 /> 4786 </g> 4787 <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" /> 4788 <defs> 4789 <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="3" /></clipPath> 4790 </defs> 4791</svg> `,v=(0,n.JW)`<svg fill="none" viewBox="0 0 60 60"> 4792 <rect width="60" height="60" fill="#794CFF" rx="3" /> 4793 <path 4794 fill="#987DE8" 4795 stroke="#fff" 4796 stroke-width="2" 4797 d="M33 22.5v-1H16v5H8.5V36H13v-5h3v7.5h17V31h1v7.5h17v-17H34v5h-1v-4Z" 4798 /> 4799 <path fill="#fff" d="M37.5 25h10v10h-10z" /> 4800 <path fill="#4019B2" d="M42.5 25h5v10h-5z" /> 4801 <path fill="#fff" d="M19.5 25h10v10h-10z" /> 4802 <path fill="#4019B2" d="M24.5 25h5v10h-5z" /> 4803 <path fill="#fff" d="M12 30.5h4V37h-4v-6.5Z" /> 4804 <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" /> 4805</svg>
4805`,E=(0,n.JW)`<svg width="60" height="60" viewBox="0 0 60 60" fill="none"> 4806<g clip-path="url(#clip0_13859_31161)"> 4807 <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"/> 4808 <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"/> 4809 <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"/> 4810 <path d="M39.5 36.667H36.6666" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/> 4811 <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"/> 4812</g> 4813<defs> 4814 <clipPath id="clip0_13859_31161"> 4815 <rect width="60" height="60" fill="white"/> 4816 </clipPath> 4817</defs> 4818</svg>`,C=(0,n.JW)`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"> 4819 <g clip-path="url(#clip0_241_31635)"> 4820 <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"/> 4821 <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.3199
4821C3.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"/> 4822 <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"/> 4823 <path d="M38.5962 20.5376L22.4199 36.7139" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> 4824 <path d="M43.7727 25.714L27.5964 41.8903" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> 4825 <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"/> 4826 <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"/> 4827 <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"/> 4828 <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"/> 4829 <path d="M49.2862 29.5805L34.7275 15.0219" stroke="#E4E7E7" stroke-width="2" stroke-linejoin="round"/> 4830 </g> 4831 <defs> 4832 <clipPath id="clip0_241_31635"> 4833 <rect width="64" height="64" fill="white"/> 4834 </clipPath> 4835 </defs> 4836</svg> 4837`,A=(0,n.JW)`<svg 4838 viewBox="0 0 60 60" 4839 fill="none" 4840> 4841 <g clip-path="url(#1)"> 4842 <rect width="60" height="60" rx="30" fill="#00ACE6" /> 4843 <path 4844 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" 4845 fill="#1AC6FF" 4846 stroke="white" 4847 stroke-width="2" 4848 /> 4849 <path 4850 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" 4851 fill="#1AC6FF" 4852 stroke="white" 4853 stroke-width="2" 4854 /> 4855 <circle cx="24.5" cy="23.5" r="1.5" fill="white" /> 4856 <circle cx="35.5" cy="23.5" r="1.5" fill="white" /> 4857 <path 4858 d="M31 20L28 28H32" 4859 stroke="white" 4860 stroke-width="2" 4861 stroke-linecap="round" 4862 stroke-linejoin="round" 4863 /> 4864 </g> 4865 <rect x="0.5" y="0.5" width="59" height="59" rx="29.5" stroke="white" stroke-opacity="0.1" /> 4866 <defs> 4867 <clipPath id="1"> 4868 <rect width="60" height="60" rx="30" fill="white" /> 4869 </clipPath> 4870 </defs> 4871</svg> `,x=(0,n.JW)`<svg fill="none" viewBox="0 0 80 80"> 4872 <g clip-path="url(#a)"> 4873 <path fill="url(#b)" d="M40 80a40 40 0 1 0 0-80 40 40 0 0 0 0 80Z" /> 4874 <path 4875 stroke="#fff" 4876 stroke-opacity=".1" 4877 d="M79.5 40a39.5 39.5 0 1 1-79 0 39.5 39.5 0 0 1 79 0Z" 4878 /> 4879 <path 4880 fill="#fff" 4881 d="m62.62 51.54-7.54 7.91a1.75 1.75 0 0 1-1.29.55H18.02a.9.9 0 0 1-.8-.52.84.84 0 0 1 .16-.92l7.55-7.92a1.75 1.75 0 0 1 1.28-.55h35.77a.87.87 0 0 1 .8.52.84.84 0 0 1-.16.93Zm-7.54-15.95a1.75 1.75 0 0 0-1.29-.54H18.02a.89.89 0 0 0-.8.51.84.84 0 0 0 .16.93l7.55 7.92a1.75 1.75 0 0 0 1.28.54h35.77a.89.89 0 0 0 .8-.51.84.84 0 0 0-.16-.93l-7.54-7.92ZM18.02 29.9h35.77a1.79 1.79 0 0 0 1.29-.54l7.54-7.92a.85.85 0 0 0 .16-.93.87.87 0 0 0-.8-.51H26.21a1.79 1.79 0 0 0-1.28.54l-7.55 7.92a.85.85 0 0 0-.16.93.89.89 0 0 0 .8.52Z" 4882 /> 4883 </g>
4884 <defs> 4885 <linearGradient id="b" x1="6.75" x2="80.68" y1="81.91" y2="7.37" gradientUnits="userSpaceOnUse"> 4886 <stop offset=".08" stop-color="#9945FF" /> 4887 <stop offset=".3" stop-color="#8752F3" /> 4888 <stop offset=".5" stop-color="#5497D5" /> 4889 <stop offset=".6" stop-color="#43B4CA" /> 4890 <stop offset=".72" stop-color="#28E0B9" /> 4891 <stop offset=".97" stop-color="#19FB9B" /> 4892 </linearGradient> 4893 <clipPath id="a"><path fill="#fff" d="M0 0h80v80H0z" /></clipPath> 4894 </defs> 4895</svg> `,I=(0,n.JW)`<svg viewBox="0 0 60 60" fill="none"> 4896 <g clip-path="url(#1)"> 4897 <path 4898 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" 4899 fill="#794CFF" 4900 /> 4901 <path 4902 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" 4903 stroke="#062B2B" 4904 stroke-opacity="0.1" 4905 /> 4906 <path 4907 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.5
4907717 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" 4908 fill="#906EF7" 4909 stroke="white" 4910 stroke-width="2" 4911 /> 4912 <path 4913 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" 4914 fill="#906EF7" 4915 stroke="white" 4916 stroke-width="2" 4917 /> 4918 <circle cx="23" cy="23" r="6" fill="#794CFF" stroke="white" stroke-width="2" /> 4919 <circle cx="41" cy="41" r="4" fill="#794CFF" stroke="white" stroke-width="2" /> 4920 </g> 4921 <defs> 4922 <clipPath id="1"> 4923 <rect width="60" height="60" fill="white" /> 4924 </clipPath> 4925 </defs> 4926</svg> `;var S=r(46756),T=r(63412);let P=(0,n.AH)` 4927 :host { 4928 display: block; 4929 width: var(--local-size); 4930 height: var(--local-size); 4931 } 4932 4933 :host svg { 4934 width: 100%; 4935 height: 100%; 4936 } 4937`;var O=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let _={browser:o,dao:l,defi:c,defiAlt:u,eth:d,layers:p,lock:m,login:g,network:b,nft:w,noun:v,profile:A,system:I,meld:y,onrampCard:E,google:h,pencil:C,lightbulb:f,solana:x,ton:a._,bitcoin:s},N=class extends n.WF{constructor(){super(...arguments),this.name="browser",this.size="md"}render(){return this.style.cssText=` 4938 --local-size: var(--apkt-visual-size-${this.size}); 4939 `,(0,n.qy)`${_[this.name]}`}};N.styles=[S.W5,P],O([(0,i.MZ)()],N.prototype,"name",void 0),O([(0,i.MZ)()],N.prototype,"size",void 0),N=O([(0,T.E)("wui-visual")],N)},28877:(e,t,r)=>{"use strict";r.d(t,{$:()=>u});var n=r(91004),i=r(57873),a=r(79561),s=r(12573),o=r(18627);let l={eip155:"ba0ba0cd-17c6-4806-ad93-f9d174f17900",solana:"a1b58899-f671-4276-6a5e-56ca5bd59700",polkadot:"",bip122:"0b4838db-0161-4ffe-022d-532bf03dba00",cosmos:"",sui:"",stacks:"",ton:"20f673c0-095e-49b2-07cf-eb5049dcf600",tron:"3502bb86-cc4e-420f-a387-59ea63a28b00"},c=(0,n.BX)({networkImagePromises:{},tokenImagePromises:{}}),u={async fetchWalletImage(e){if(e)return await a.N._fetchWalletImage(e),this.getWalletImageById(e)},async fetchNetworkImage(e){if(!e)return;let t=this.getNetworkImageById(e);return t||(c.networkImagePromises[e]||(c.networkImagePromises[e]=a.N._fetchNetworkImage(e)),await c.networkImagePromises[e],this.getNetworkImageById(e))},async fetchTokenImage(e){if(e)return c.tokenImagePromises[e]||(c.tokenImagePromises[e]=a.N._fetchTokenImage(e)),await c.tokenImagePromises[e],this.getTokenImage(e)},getWalletImageById(e){if(e)return s.j.state.walletImages[e]},getWalletImage:e=>e?.image_url?e?.image_url:e?.image_id?s.j.state.walletImages[e.image_id]:void 0,getNetworkImage:e=>e?.assets?.imageUrl?e?.assets?.imageUrl:e?.assets?.imageId?s.j.state.networkImages[e.assets.imageId]:void 0,getNetworkImageById(e){if(e)return s.j.state.networkImages[e]},getConnectorImage:e=>e?.imageUrl?e.imageUrl:e?.info?.icon?e.info.icon:e?.imageId?s.j.state.connectorImages[e.imageId]:void 0,getChainImage:e=>s.j.state.networkImages[l[e]],getTokenImage(e){if(e)return s.j.state.tokenImages[e]},getWalletImageUrl(e){if(!e)return"";let{projectId:t,sdkType:r,sdkVersion:n}=o.H.state,a=new URL(`${i.o.W3M_API_URL}/getWalletImage/${e}`);return a.searchParams.set("projectId",t),a.searchParams.set("st",r),a.searchParams.set("sv",n),a.toString()},getAssetImageUrl(e){if(!e)return"";let{projectId:t,sdkType:r,sdkVersion:n}=o.H.state,a=new URL(`${i.o.W3M_API_URL}/public/getAssetImage/${e}`);return a.searchParams.set("projectId",t),a.searchParams.set("st",r),a.searchParams.set("sv",n),a.toString()},getChainNamespaceImageUrl(e){return this.getAssetImageUrl(l[e])},async getImageByToken(e,t){if("native"===e){let e=i.o.NATIVE_IMAGE_IDS_BY_NAMESPACE[t]??null;if(!e)return;return u.fetchNetworkImage(e)}let[,r]=Object.entries(i.o.TOKEN_SYMBOLS_BY_ADDRESS).find(([t])=>t.toLowerCase()===e.toLowerCase())??[];if(r)return u.fetchTokenImage(r)}}},28939:(e,t,r)=>{"use strict";
4939Object.defineProperty(t,"__esModule",{value:!0}),t.toEventHash=void 0;var n=r(26929);Object.defineProperty(t,"toEventHash",{enumerable:!0,get:function(){return n.toSignatureHash}})},29018:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendRawTransactionSync=a;let n=r(44789),i=r(63178);async function a(e,{serializedTransaction:t,throwOnReceiptRevert:r,timeout:a}){let s=await e.request({method:"eth_sendRawTransactionSync",params:a?[t,a]:[t]},{retryCount:0}),o=(e.chain?.formatters?.transactionReceipt?.format||i.formatTransactionReceipt)(s);if("reverted"===o.status&&r)throw new n.TransactionReceiptRevertedError({receipt:o});return o}},29060:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeAbiParameters=function(e,t){let r="string"==typeof t?(0,u.hexToBytes)(t):t,f=(0,a.createCursor)(r);if(0===(0,s.size)(r)&&e.length>0)throw new n.AbiDecodingZeroDataError;if((0,s.size)(t)&&32>(0,s.size)(t))throw new n.AbiDecodingDataSizeTooSmallError({data:"string"==typeof t?t:(0,d.bytesToHex)(t),params:e,size:(0,s.size)(t)});let m=0,g=[];for(let t=0;t<e.length;++t){let a=e[t];m<r.length&&f.setPosition(m);let[s,u]=function e(t,r,{staticPosition:a}){let s=(0,h.getArrayComponents)(r.type);if(s){let[n,i]=s;return function(t,r,{length:n,staticPosition:i}){if(null===n){let n=i+(0,c.bytesToNumber)(t.readBytes(32)),a=n+32;t.setPosition(n);let s=(0,c.bytesToNumber)(t.readBytes(32)),o=p(r),l=0,u=[];for(let n=0;n<s;++n){t.setPosition(a+(o?32*n:l));let[i,s]=e(t,r,{staticPosition:a});l+=s,u.push(i),0===s&&(t.assertReadLimit(),t._touch())}return t.setPosition(i+32),[u,32]}if(p(r)){let a=i+(0,c.bytesToNumber)(t.readBytes(32)),s=[];for(let i=0;i<n;++i){t.setPosition(a+32*i);let[n]=e(t,r,{staticPosition:a});s.push(n)}return t.setPosition(i+32),[s,32]}let a=0,s=[];for(let o=0;o<n;++o){let[n,o]=e(t,r,{staticPosition:i+a});a+=o,s.push(n),0===o&&(t.assertReadLimit(),t._touch())}return[s,a]}(t,{...r,type:i},{length:n,staticPosition:a})}if("tuple"===r.type)return function(t,r,{staticPosition:n}){let i=0===r.components.length||r.components.some(({name:e})=>!e),a=i?[]:{},s=0;if(p(r)){let o=n+(0,c.bytesToNumber)(t.readBytes(32));for(let n=0;n<r.components.length;++n){let l=r.components[n];t.setPosition(o+s);let[c,u]=e(t,l,{staticPosition:o});s+=u,a[i?n:l?.name]=c}return t.setPosition(n+32),[a,32]}for(let o=0;o<r.components.length;++o){let l=r.components[o],[c,u]=e(t,l,{staticPosition:n});a[i?o:l?.name]=c,s+=u}return[a,s]}(t,r,{staticPosition:a});if("address"===r.type){var u,f=t;let e=f.readBytes(32);return[(0,i.checksumAddress)((0,d.bytesToHex)((0,o.sliceBytes)(e,-20))),32]}if("bool"===r.type){return u=t,[(0,c.bytesToBool)(u.readBytes(32),{size:32}),32]}if(r.type.startsWith("bytes"))return function(e,t,{staticPosition:r}){let[n,i]=t.type.split("bytes");if(!i){let t=(0,c.bytesToNumber)(e.readBytes(32));e.setPosition(r+t);let n=(0,c.bytesToNumber)(e.readBytes(32));if(0===n)return e.setPosition(r+32),["0x",32];let i=e.readBytes(n);return e.setPosition(r+32),[(0,d.bytesToHex)(i),32]}return[(0,d.bytesToHex)(e.readBytes(Number.parseInt(i,10),32)),32]}(t,r,{staticPosition:a});if(r.type.startsWith("uint")||r.type.startsWith("int")){var m=t,g=r;let e=g.type.startsWith("int"),n=Number.parseInt(g.type.split("int")[1]||"256",10),i=m.readBytes(32);return[n>48?(0,c.bytesToBigInt)(i,{signed:e}):(0,c.bytesToNumber)(i,{signed:e}),32]}if("string"===r.type)return function(e,{staticPosition:t}){let r=(0,c.bytesToNumber)(e.readBytes(32));e.setPosition(t+r);let n=(0,c.bytesToNumber)(e.readBytes(32));if(0===n)return e.setPosition(t+32),["",32];let i=e.readBytes(n,32),a=(0,c.bytesToString)((0,l.trim)(i));return e.setPosition(t+32),[a,32]}(t,{staticPosition:a});throw new n.InvalidAbiDecodingTypeError(r.type,{docsPath:"/docs/contract/decodeAbiParameters"})}(f,a,{staticPosition:0});m+=u,g.push(s)}return g};let n=r(82311),i=r(24998),a=r(60469),s=r(29813),o=r(4906),l=r(62704),c=r(3562),u=r(60037),d=r(27083),h=r(66008);function p(e){let{type:t}=e;if("string"===t||"bytes"===t||t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(p);let r=(0,h.getArrayComponents)(e.type);return!!(r&&p({...e,type:r[1]}))}},29092:(e,t,r)=>{"use strict";r.d(t,{i:()=>a});var n=r(15405),i=r(57873);let a={cacheExpiry:{portfolio:3e4,nativeBalance:3e4,ens:3e5,identity:3e5,transactionsHistory:15e3,tokenPrice:15e3,latestAppKitVersion:6048e5,tonWallets:864e5},isCacheExpired:(e,t)=>Date.now()-e>t,getActiveNetworkProps(){let e=a.getActiveNamespace(),t=a.getActiveCaipNetworkId(),r=t?t.split(":")[1]:void 0;return{namespace:e,caipNetworkId:t,chainId:r?isNaN(Number(r))?r:Number(r):void 0}},setWalletConnectDeepLink({name:e,href:t}){try{n.Ud.setItem(n.Ws.DEEPLINK_CHOICE,JSON.stringify({href:t,name:e}))}catch{console.info("Unable to set WalletConnect deep link")}},getWalletConnectDeepLink(){try{let e=n.Ud.getItem(n.Ws.DEEPLINK_CHOICE);if(e)return JSON.parse(e)}catch{console.info("Unable to get WalletConnect deep link")}},deleteWalletConnectDeepLink(){try{n.Ud.removeItem(n.Ws.DEEPLINK_CHOICE)}catch{console.info("Unable to delete WalletConnect deep link")}},setActiveNamespace(e){try{n.Ud.setItem(n.Ws.ACTIVE_NAMESPACE,e)}catch{console.info("Unable to set active namespace")}},setActiveCaipNetworkId(e){try{n.Ud.setItem(n.Ws.ACTIVE_CAIP_NETWORK_ID,e),a.setActiveNamespace(e.split(":")[0])}catch{console.info("Unable to set active caip network id")}},getActiveCaipNetworkId(){try{return n.Ud.getItem(n.Ws.ACTIVE_CAIP_NETWORK_ID)}catch{console.info("Unable to get active caip network id");return}},deleteActiveCaipNetworkId(){try{n.Ud.removeItem(n.Ws.ACTIVE_CAIP_NETWORK_ID)}catch{console.info("Unable to delete active caip network id")}},deleteConnectedConnectorId(e){try{let t=(0,n.T8)(e);n.Ud.removeItem(t)}catch{console.info("Unable to delete connected connector id")}},setAppKitRecent(e){try{let t=a.getRecentWallets();t.find(t=>
4939t.id===e.id)||(t.unshift(e),t.length>2&&t.pop(),n.Ud.setItem(n.Ws.RECENT_WALLETS,JSON.stringify(t)),n.Ud.setItem(n.Ws.RECENT_WALLET,JSON.stringify(e)))}catch{console.info("Unable to set AppKit recent")}},getRecentWallets(){try{let e=n.Ud.getItem(n.Ws.RECENT_WALLETS);return e?JSON.parse(e):[]}catch{console.info("Unable to get AppKit recent")}return[]},getRecentWallet(){try{let e=n.Ud.getItem(n.Ws.RECENT_WALLET);return e?JSON.parse(e):null}catch{console.info("Unable to get AppKit recent")}return null},deleteRecentWallet(){try{n.Ud.removeItem(n.Ws.RECENT_WALLET)}catch{console.info("Unable to delete AppKit recent")}},setConnectedConnectorId(e,t){try{let r=(0,n.T8)(e);n.Ud.setItem(r,t)}catch{console.info("Unable to set Connected Connector Id")}},getActiveNamespace(){try{return n.Ud.getItem(n.Ws.ACTIVE_NAMESPACE)}catch{console.info("Unable to get active namespace")}},getConnectedConnectorId(e){if(e)try{let t=(0,n.T8)(e);return n.Ud.getItem(t)}catch(t){console.info("Unable to get connected connector id in namespace",e)}},setConnectedSocialProvider(e){try{n.Ud.setItem(n.Ws.CONNECTED_SOCIAL,e)}catch{console.info("Unable to set connected social provider")}},getConnectedSocialProvider(){try{return n.Ud.getItem(n.Ws.CONNECTED_SOCIAL)}catch{console.info("Unable to get connected social provider")}},deleteConnectedSocialProvider(){try{n.Ud.removeItem(n.Ws.CONNECTED_SOCIAL)}catch{console.info("Unable to delete connected social provider")}},getConnectedSocialUsername(){try{return n.Ud.getItem(n.Ws.CONNECTED_SOCIAL_USERNAME)}catch{console.info("Unable to get connected social username")}},getStoredActiveCaipNetworkId(){let e=n.Ud.getItem(n.Ws.ACTIVE_CAIP_NETWORK_ID);return e?.split(":")?.[1]},setConnectionStatus(e){try{n.Ud.setItem(n.Ws.CONNECTION_STATUS,e)}catch{console.info("Unable to set connection status")}},getConnectionStatus(){try{return n.Ud.getItem(n.Ws.CONNECTION_STATUS)}catch{return}},getConnectedNamespaces(){try{let e=n.Ud.getItem(n.Ws.CONNECTED_NAMESPACES);if(!e?.length)return[];return e.split(",")}catch{return[]}},setConnectedNamespaces(e){try{let t=Array.from(new Set(e));n.Ud.setItem(n.Ws.CONNECTED_NAMESPACES,t.join(","))}catch{console.info("Unable to set namespaces in storage")}},addConnectedNamespace(e){try{let t=a.getConnectedNamespaces();t.includes(e)||(t.push(e),a.setConnectedNamespaces(t))}catch{console.info("Unable to add connected namespace")}},removeConnectedNamespace(e){try{let t=a.getConnectedNamespaces(),r=t.indexOf(e);r>-1&&(t.splice(r,1),a.setConnectedNamespaces(t))}catch{console.info("Unable to remove connected namespace")}},getTelegramSocialProvider(){try{return n.Ud.getItem(n.Ws.TELEGRAM_SOCIAL_PROVIDER)}catch{return console.info("Unable to get telegram social provider"),null}},setTelegramSocialProvider(e){try{n.Ud.setItem(n.Ws.TELEGRAM_SOCIAL_PROVIDER,e)}catch{console.info("Unable to set telegram social provider")}},removeTelegramSocialProvider(){try{n.Ud.removeItem(n.Ws.TELEGRAM_SOCIAL_PROVIDER)}catch{console.info("Unable to remove telegram social provider")}},getBalanceCache(){let e={};try{let t=n.Ud.getItem(n.Ws.PORTFOLIO_CACHE);e=t?JSON.parse(t):{}}catch{console.info("Unable to get balance cache")}return e},removeAddressFromBalanceCache(e){try{let t=a.getBalanceCache();n.Ud.setItem(n.Ws.PORTFOLIO_CACHE,JSON.stringify({...t,[e]:void 0}))}catch{console.info("Unable to remove address from balance cache",e)}},getBalanceCacheForCaipAddress(e){try{let t=a.getBalanceCache()[e];if(t&&!this.isCacheExpired(t.timestamp,this.cacheExpiry.portfolio))return t.balance;a.removeAddressFromBalanceCache(e)}catch{console.info("Unable to get balance cache for address",e)}},updateBalanceCache(e){try{let t=a.getBalanceCache();t[e.caipAddress]=e,n.Ud.setItem(n.Ws.PORTFOLIO_CACHE,JSON.stringify(t))}catch{console.info("Unable to update balance cache",e)}},getNativeBalanceCache(){let e={};try{let t=n.Ud.getItem(n.Ws.NATIVE_BALANCE_CACHE);e=t?JSON.parse(t):{}}catch{console.info("Unable to get balance cache")}return e},removeAddressFromNativeBalanceCache(e){try{let t=a.getBalanceCache();n.Ud.setItem(n.Ws.NATIVE_BALANCE_CACHE,JSON.stringify({...t,[e]:void 0}))}catch{console.info("Unable to remove address from balance cache",e)}},getNativeBalanceCacheForCaipAddress(e){try{let t=a.getNativeBalanceCache()[e];if(t&&!this.isCacheExpired(t.timestamp,this.cacheExpiry.nativeBalance))return t;console.info("Discarding cache for address",e),a.removeAddressFromBalanceCache(e)}catch{console.info("Unable to get balance cache for address",e)}},updateNativeBalanceCache(e){try{let t=a.getNativeBalanceCache();t[e.caipAddress]=e,n.Ud.setItem(n.Ws.NATIVE_BALANCE_CACHE,JSON.stringify(t))}catch{console.info("Unable to update balance cache",e)}},getEnsCache(){let e={};try{let t=n.Ud.getItem(n.Ws.ENS_CACHE);e=t?JSON.parse(t):{}}catch{console.info("Unable to get ens name cache")}return e}
4939,getEnsFromCacheForAddress(e){try{let t=a.getEnsCache()[e];if(t&&!this.isCacheExpired(t.timestamp,this.cacheExpiry.ens))return t.ens;a.removeEnsFromCache(e)}catch{console.info("Unable to get ens name from cache",e)}},updateEnsCache(e){try{let t=a.getEnsCache();t[e.address]=e,n.Ud.setItem(n.Ws.ENS_CACHE,JSON.stringify(t))}catch{console.info("Unable to update ens name cache",e)}},removeEnsFromCache(e){try{let t=a.getEnsCache();n.Ud.setItem(n.Ws.ENS_CACHE,JSON.stringify({...t,[e]:void 0}))}catch{console.info("Unable to remove ens name from cache",e)}},getIdentityCache(){let e={};try{let t=n.Ud.getItem(n.Ws.IDENTITY_CACHE);e=t?JSON.parse(t):{}}catch{console.info("Unable to get identity cache")}return e},getIdentityFromCacheForAddress(e){try{let t=a.getIdentityCache()[e];if(t&&!this.isCacheExpired(t.timestamp,this.cacheExpiry.identity))return t.identity;a.removeIdentityFromCache(e)}catch{console.info("Unable to get identity from cache",e)}},updateIdentityCache(e){try{let t=a.getIdentityCache();t[e.address]={identity:e.identity,timestamp:e.timestamp},n.Ud.setItem(n.Ws.IDENTITY_CACHE,JSON.stringify(t))}catch{console.info("Unable to update identity cache",e)}},removeIdentityFromCache(e){try{let t=a.getIdentityCache();n.Ud.setItem(n.Ws.IDENTITY_CACHE,JSON.stringify({...t,[e]:void 0}))}catch{console.info("Unable to remove identity from cache",e)}},getTonWalletsCache(){try{let e=n.Ud.getItem(n.Ws.TON_WALLETS_CACHE),t=e?JSON.parse(e):void 0;if(t&&!this.isCacheExpired(t.timestamp,this.cacheExpiry.tonWallets))return t;a.removeTonWalletsCache()}catch{console.info("Unable to get ton wallets cache")}},updateTonWalletsCache(e){try{let t=a.getTonWalletsCache()||{timestamp:0,wallets:[]};t.timestamp=new Date().getTime(),t.wallets=e,n.Ud.setItem(n.Ws.TON_WALLETS_CACHE,JSON.stringify(t))}catch{console.info("Unable to update ton wallets cache",e)}},removeTonWalletsCache(){try{n.Ud.removeItem(n.Ws.TON_WALLETS_CACHE)}catch{console.info("Unable to remove ton wallets cache")}},clearAddressCache(){try{n.Ud.removeItem(n.Ws.PORTFOLIO_CACHE),n.Ud.removeItem(n.Ws.NATIVE_BALANCE_CACHE),n.Ud.removeItem(n.Ws.ENS_CACHE),n.Ud.removeItem(n.Ws.IDENTITY_CACHE),n.Ud.removeItem(n.Ws.HISTORY_TRANSACTIONS_CACHE)}catch{console.info("Unable to clear address cache")}},setPreferredAccountTypes(e){try{n.Ud.setItem(n.Ws.PREFERRED_ACCOUNT_TYPES,JSON.stringify(e))}catch{console.info("Unable to set preferred account types",e)}},getPreferredAccountTypes(){try{let e=n.Ud.getItem(n.Ws.PREFERRED_ACCOUNT_TYPES);if(!e)return{};return JSON.parse(e)}catch{console.info("Unable to get preferred account types")}return{}},setConnections(e,t){try{let r=a.getConnections(),s=r[t]??[],o=new Map;for(let e of s)o.set(e.connectorId,{...e});for(let t of e){let e=o.get(t.connectorId),r=t.connectorId===i.o.CONNECTOR_ID.AUTH;if(e&&!r){let r=new Set(e.accounts.map(e=>e.address.toLowerCase())),n=t.accounts.filter(e=>!r.has(e.address.toLowerCase()));e.accounts.push(...n)}else o.set(t.connectorId,{...t})}let l={...r,[t]:Array.from(o.values())};n.Ud.setItem(n.Ws.CONNECTIONS,JSON.stringify(l))}catch(e){console.error("Unable to sync connections to storage",e)}},getConnections(){try{let e=n.Ud.getItem(n.Ws.CONNECTIONS);if(!e)return{};return JSON.parse(e)}catch(e){return console.error("Unable to get connections from storage",e),{}}},deleteAddressFromConnection({connectorId:e,address:t,namespace:r}){try{let i=a.getConnections(),s=i[r]??[],o=new Map(s.map(e=>[e.connectorId,e])),l=o.get(e);if(l){let r=l.accounts.filter(e=>e.address.toLowerCase()!==t.toLowerCase());0===r.length?o.delete(e):o.set(e,{...l,accounts:l.accounts.filter(e=>e.address.toLowerCase()!==t.toLowerCase())})}n.Ud.setItem(n.Ws.CONNECTIONS,JSON.stringify({...i,[r]:Array.from(o.values())}))}catch{console.error(`Unable to remove address "${t}" from connector "${e}" in namespace "${r}"`)}},getDisconnectedConnectorIds(){try{let e=n.Ud.getItem(n.Ws.DISCONNECTED_CONNECTOR_IDS);if(!e)return{};return JSON.parse(e)}catch{console.info("Unable to get disconnected connector ids")}return{}},addDisconnectedConnectorId(e,t){try{let r=a.getDisconnectedConnectorIds(),i=r[t]??[];i.push(e),n.Ud.setItem(n.Ws.DISCONNECTED_CONNECTOR_IDS,JSON.stringify({...r,[t]:Array.from(new Set(i))}))}catch{console.error(`Unable to set disconnected connector id "${e}" for namespace "${t}"`)}},removeDisconnectedConnectorId(e,t){try{let r=a.getDisconnectedConnectorIds(),i=r[t]??[];i=i.filter(t=>t.toLowerCase()!==e.toLowerCase()),n.Ud.setItem(n.Ws.DISCONNECTED_CONNECTOR_IDS,JSON.stringify({...r,[t]:Array.from(new Set(i))}))}catch{console.error(`Unable to remove disconnected connector id "${e}" for namespace "${t}"`)}},isConnectorDisconnected(e,t){try{return(a.getDisconnectedConnectorIds()[t]??[]).some(t=>t.toLowerCase()===e.toLowerCase())}catch{console.info(`Unable to get disconnected connector id "${e}" for namespace "${t}"`)}return!1},getTransactionsCache(){try{let e=n.Ud.getItem(n.Ws.HISTORY_TRANSACTIONS_CACHE);return e?JSON.parse(e):{}}catch{console.info("Unable to get transactions cache")}return{}},getTransactionsCacheForAddress({address:e,chainId:t=""}){try{let r=a.getTransactionsCache(),n=r[e]?.[t];if(n&&!this.isCacheExpired(n.timestamp,this.cacheExpiry.transactionsHistory)
4939)return n.transactions;a.removeTransactionsCache({address:e,chainId:t})}catch{console.info("Unable to get transactions cache")}},updateTransactionsCache({address:e,chainId:t="",timestamp:r,transactions:i}){try{let s=a.getTransactionsCache();s[e]={...s[e],[t]:{timestamp:r,transactions:i}},n.Ud.setItem(n.Ws.HISTORY_TRANSACTIONS_CACHE,JSON.stringify(s))}catch{console.info("Unable to update transactions cache",{address:e,chainId:t,timestamp:r,transactions:i})}},removeTransactionsCache({address:e,chainId:t}){try{let r=a.getTransactionsCache(),{[t]:i,...s}=r?.[e]||{};n.Ud.setItem(n.Ws.HISTORY_TRANSACTIONS_CACHE,JSON.stringify({...r,[e]:s}))}catch{console.info("Unable to remove transactions cache",{address:e,chainId:t})}},getTokenPriceCache(){try{let e=n.Ud.getItem(n.Ws.TOKEN_PRICE_CACHE);return e?JSON.parse(e):{}}catch{console.info("Unable to get token price cache")}return{}},getTokenPriceCacheForAddresses(e){try{let t=a.getTokenPriceCache()[e.join(",")];if(t&&!this.isCacheExpired(t.timestamp,this.cacheExpiry.tokenPrice))return t.tokenPrice;a.removeTokenPriceCache(e)}catch{console.info("Unable to get token price cache for addresses",e)}},updateTokenPriceCache(e){try{let t=a.getTokenPriceCache();t[e.addresses.join(",")]={timestamp:e.timestamp,tokenPrice:e.tokenPrice},n.Ud.setItem(n.Ws.TOKEN_PRICE_CACHE,JSON.stringify(t))}catch{console.info("Unable to update token price cache",e)}},removeTokenPriceCache(e){try{let t=a.getTokenPriceCache();n.Ud.setItem(n.Ws.TOKEN_PRICE_CACHE,JSON.stringify({...t,[e.join(",")]:void 0}))}catch{console.info("Unable to remove token price cache",e)}},getLatestAppKitVersion(){try{let e=this.getLatestAppKitVersionCache(),t=e?.version;if(t&&!this.isCacheExpired(e.timestamp,this.cacheExpiry.latestAppKitVersion))return t}catch{console.info("Unable to get latest AppKit version")}},getLatestAppKitVersionCache(){try{let e=n.Ud.getItem(n.Ws.LATEST_APPKIT_VERSION);return e?JSON.parse(e):{}}catch{console.info("Unable to get latest AppKit version cache")}return{}},updateLatestAppKitVersion(e){try{let t=a.getLatestAppKitVersionCache();t.timestamp=e.timestamp,t.version=e.version,n.Ud.setItem(n.Ws.LATEST_APPKIT_VERSION,JSON.stringify(t))}catch{console.info("Unable to update latest AppKit version on local storage",e)}}}},29414:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.solidityPanic=t.solidityError=t.panicReasons=void 0,t.panicReasons={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."},t.solidityError={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},t.solidityPanic={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},29716:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchBlockNumber=function(e,{emitOnBegin:t=!1,emitMissed:r=!1,onBlockNumber:c,onError:u,poll:d,pollingInterval:h=e.pollingInterval}){let p;return(void 0!==d?d:"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
4939onfig.type&&"ipc"!==e.transport.transports[0].config.type))?(()=>{let n=(0,o.stringify)(["watchBlockNumber",e.uid,t,r,h]);return(0,a.observe)(n,{onBlockNumber:c,onError:u},n=>(0,s.poll)(async()=>{try{let t=await (0,i.getAction)(e,l.getBlockNumber,"getBlockNumber")({cacheTime:0});if(void 0!==p){if(t===p)return;if(t-p>1&&r)for(let e=p+1n;e<t;e++)n.onBlockNumber(e,p),p=e}(void 0===p||t>p)&&(n.onBlockNumber(t,p),p=t)}catch(e){n.onError?.(e)}},{emitOnBegin:t,interval:h}))})():(()=>{let i=(0,o.stringify)(["watchBlockNumber",e.uid,t,r]);return(0,a.observe)(i,{onBlockNumber:c,onError:u},t=>{let r=!0,i=()=>r=!1;return(async()=>{try{let a=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:s}=await a.subscribe({params:["newHeads"],onData(e){if(!r)return;let i=(0,n.hexToBigInt)(e.result?.number);t.onBlockNumber(i,p),p=i},onError(e){t.onError?.(e)}});i=s,r||i()}catch(e){u?.(e)}})(),()=>i()})})()};let n=r(14972),i=r(95847),a=r(84053),s=r(63342),o=r(68508),l=r(27697)},29813:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.size=function(e){return(0,n.isHex)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length};let n=r(80217)},30087:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromBlobs=function(e){let t=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),r="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,i.hexToBytes)(e)):e.blobs,s=r.reduce((e,t)=>e+t.length,0),o=(0,n.createCursor)(new Uint8Array(s)),l=!0;for(let e of r){let t=(0,n.createCursor)(e);for(;l&&t.position<e.length;){t.incrementPosition(1);let r=31;for(let n in e.length-t.position<31&&(r=e.length-t.position),Array.from({length:r})){let e=t.readByte();if(128===e&&!t.inspectBytes(t.remaining).includes(128)){l=!1;break}o.pushByte(e)}}}let c=o.bytes.slice(0,o.position);return"hex"===t?(0,a.bytesToHex)(c):c};let n=r(60469),i=r(60037),a=r(27083)},30445:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,n,a,s){if("function"!=typeof n)throw TypeError("The listener must be a function");var o=new i(n,a||e,s),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function o(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1)),o.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},o.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,s=Array(a);i<a;i++)s[i]=n[i].fn;return s},o.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},o.prototype.emit=function(e,t,n,i,a,s){var o=r?r+e:e;if(!this._events[o])return!1;var l,c,u=this._events[o],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,n),!0;case 4:return u.fn.call(u.context,t,n,i),!0;case 5:return u.fn.call(u.context,t,n,i,a),!0;case 6:return u.fn.call(u.context,t,n,i,a,s),!0}for(c=1,l=Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var h,p=u.length;for(c=0;c<p;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,i);break;default:if(!l)for(h=1,l=Array(d-1);h<d;h++)l[h-1]=arguments[h];u[c].fn.apply(u[c].context,l)}}return!0},o.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},o.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},o.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn!==t||i&&!o.once||n&&o.context!==n||s(this,a);else{for(var l=0,c=[],u=o.length;l<u;l++)(o[l].fn!==t||i&&!o[l].once||n&&o[l].context!==n)&&c.push(o[l]);c.length?this._events[a]=1===c.length?c[0]:c:s(this,a)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=r,o.EventEmitter=o,e.exports=o},30873:(e,t,r)=>{"use strict";
4939Object.defineProperty(t,"__esModule",{value:!0}),t.signAuthorization=s;let n=r(83562),i=r(85926),a=r(1529);async function s(e,t){let{account:r=e.account}=t;if(!r)throw new i.AccountNotFoundError({docsPath:"/docs/eip7702/signAuthorization"});let s=(0,n.parseAccount)(r);if(!s.signAuthorization)throw new i.AccountTypeNotSupportedError({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:s.type});let o=await (0,a.prepareAuthorization)(e,t);return s.signAuthorization(o)}},30898:(e,t,r)=>{"use strict";r.d(t,{g:()=>f});var n=r(26333),i=r(57873),a=r(79561),s=r(82376),o=r(36071),l=r(32590),c=r(18627),u=r(33432),d=r(35763),h=r(29092),p=r(37454);let f={getConnectorsByType(e,t,r){let{customWallets:n}=c.H.state,i=h.i.getRecentWallets(),a=p.A.filterOutDuplicateWallets(t),s=p.A.filterOutDuplicateWallets(r),o=e.filter(e=>"MULTI_CHAIN"===e.type),l=e.filter(e=>"ANNOUNCED"===e.type),u=e.filter(e=>"INJECTED"===e.type);return{custom:n,recent:i,external:e.filter(e=>"EXTERNAL"===e.type),multiChain:o,announced:l,injected:u,recommended:a,featured:s}},showConnector(e){let t=e.info?.rdns,r=!!t&&a.N.state.excludedWallets.some(e=>!!e.rdns&&e.rdns===t),i=!!e.name&&a.N.state.excludedWallets.some(t=>n.y.isLowerCaseMatch(t.name,e.name));if("INJECTED"===e.type&&("Browser Wallet"===e.name&&(!u.w.isMobile()||u.w.isMobile()&&!t&&!o.x.checkInstalled())||r||i))return!1;if(("ANNOUNCED"===e.type||"EXTERNAL"===e.type)&&(r||i))return!1;let{includeWalletIds:s,excludeWalletIds:l}=c.H.state;if("INJECTED"===e.type||"ANNOUNCED"===e.type||"MULTI_CHAIN"===e.type){let t=e.explorerId||e.explorerWallet?.id;if(l?.length&&t&&l.includes(t)||s?.length&&(!t||!s.includes(t)))return!1}return!0},getIsConnectedWithWC:()=>Array.from(s.W.state.chains.values()).some(e=>l.a.getConnectorId(e.namespace)===i.o.CONNECTOR_ID.WALLET_CONNECT),getConnectorTypeOrder({recommended:e,featured:t,custom:r,recent:n,announced:i,injected:a,multiChain:s,external:o,overriddenConnectors:l=c.H.state.features?.connectorTypeOrder??[]}){let u=[{type:"walletConnect",isEnabled:!0},{type:"recent",isEnabled:n.length>0},{type:"injected",isEnabled:[...a,...i,...s].length>0},{type:"featured",isEnabled:t.length>0},{type:"custom",isEnabled:r&&r.length>0},{type:"external",isEnabled:o.length>0},{type:"recommended",isEnabled:e.length>0}].filter(e=>e.isEnabled),d=new Set(u.map(e=>e.type)),h=l.filter(e=>d.has(e)).map(e=>({type:e,isEnabled:!0})),p=u.filter(({type:e})=>!h.some(({type:t})=>t===e));return Array.from(new Set([...h,...p].map(({type:e})=>e)))},sortConnectorsByExplorerWallet:e=>[...e].sort((e,t)=>e.explorerWallet&&t.explorerWallet?(e.explorerWallet.order??0)-(t.explorerWallet.order??0):e.explorerWallet?-1:+!!t.explorerWallet),getPriority:e=>e.id===i.o.CONNECTOR_ID.BASE_ACCOUNT?0:e.id===i.o.CONNECTOR_ID.COINBASE||e.id===i.o.CONNECTOR_ID.COINBASE_SDK?1:2,sortConnectorsByPriority:e=>[...e].sort((e,t)=>f.getPriority(e)-f.getPriority(t)),getAuthName:({email:e,socialUsername:t,socialProvider:r})=>t?r&&"discord"===r&&t.endsWith("0")?t.slice(0,-1):t:e.length>30?`${e.slice(0,-3)}...`:e,async fetchProviderData(e){try{if("Browser Wallet"===e.name&&!u.w.isMobile()||e.id===i.o.CONNECTOR_ID.AUTH)return{accounts:[],chainId:void 0};let[t,r]=await Promise.all([e.provider?.request({method:"eth_accounts"}),e.provider?.request({method:"eth_chainId"}).then(e=>Number(e))]);return{accounts:t,chainId:r}}catch(t){return console.warn(`Failed to fetch provider data for ${e.name}`,t),{accounts:[],chainId:void 0}}},getFilteredCustomWallets(e){let t=h.i.getRecentWallets(),r=l.a.state.connectors.map(e=>e.info?.rdns).filter(Boolean),n=t.map(e=>e.rdns).filter(Boolean),i=r.concat(n);if(i.includes("io.metamask.mobile")&&u.w.isMobile()){let e=i.indexOf("io.metamask.mobile");i[e]="io.metamask"}return e.filter(e=>!i.includes(String(e?.rdns)))},hasWalletConnector:e=>l.a.state.connectors.some(t=>t.id===e.id||t.name===e.name),isWalletCompatibleWithCurrentChain(e){let t=s.W.state.activeChain;return!t||!e.chains||e.chains.some(e=>t===e.split(":")[0])},getFilteredRecentWallets(){return h.i.getRecentWallets().filter(e=>!p.A.isExcluded(e)).filter(e=>!this.hasWalletConnector(e)).filter(e=>this.isWalletCompatibleWithCurrentChain(e))}
4939,getCappedRecommendedWallets(e){let{connectors:t}=l.a.state,{customWallets:r,featuredWalletIds:n}=c.H.state,i=t.find(e=>"walletConnect"===e.id),a=t.filter(e=>"INJECTED"===e.type||"ANNOUNCED"===e.type||"MULTI_CHAIN"===e.type);if(!i&&!a.length&&!r?.length)return[];let s=d.D.isEmailEnabled(),o=d.D.isSocialsEnabled(),u=a.filter(e=>"Browser Wallet"!==e.name&&"WalletConnect"!==e.name),h=n?.length||0,f=r?.length||0,m=Math.max(0,4-(h+f+(u.length||0)+ +!!s+ +!!o));return m<=0?[]:p.A.filterOutDuplicateWallets(e).slice(0,m)},processConnectorsByType(e,t=!0){let r=f.sortConnectorsByExplorerWallet([...e]);return t?r.filter(f.showConnector):r},connectorList(){let e=f.getConnectorsByType(l.a.state.connectors,a.N.state.recommended,a.N.state.featured),t=this.processConnectorsByType(e.announced.filter(e=>"walletConnect"!==e.id)),r=this.processConnectorsByType(e.injected),n=this.processConnectorsByType(e.multiChain.filter(e=>"WalletConnect"!==e.name),!1),s=e.custom,o=e.recent,c=this.processConnectorsByType(e.external.filter(e=>e.id!==i.o.CONNECTOR_ID.COINBASE_SDK&&e.id!==i.o.CONNECTOR_ID.BASE_ACCOUNT)),d=e.recommended,h=e.featured,p=f.getConnectorTypeOrder({custom:s,recent:o,announced:t,injected:r,multiChain:n,recommended:d,featured:h,external:c}),m=l.a.state.connectors.find(e=>"walletConnect"===e.id),g=u.w.isMobile(),y=[];for(let e of p)switch(e){case"walletConnect":!g&&m&&y.push({kind:"connector",subtype:"walletConnect",connector:m});break;case"recent":f.getFilteredRecentWallets().forEach(e=>y.push({kind:"wallet",subtype:"recent",wallet:e}));break;case"injected":n.forEach(e=>y.push({kind:"connector",subtype:"multiChain",connector:e})),t.forEach(e=>y.push({kind:"connector",subtype:"announced",connector:e})),r.forEach(e=>y.push({kind:"connector",subtype:"injected",connector:e}));break;
4939case"featured":h.forEach(e=>y.push({kind:"wallet",subtype:"featured",wallet:e}));break;case"custom":f.getFilteredCustomWallets(s??[]).forEach(e=>y.push({kind:"wallet",subtype:"custom",wallet:e}));break;case"external":c.forEach(e=>y.push({kind:"connector",subtype:"external",connector:e}));break;case"recommended":f.getCappedRecommendedWallets(d).forEach(e=>y.push({kind:"wallet",subtype:"recommended",wallet:e}));break;default:console.warn(`Unknown connector type: ${e}`)}return y},hasInjectedConnectors:()=>l.a.state.connectors.filter(e=>("INJECTED"===e.type||"ANNOUNCED"===e.type||"MULTI_CHAIN"===e.type)&&"Browser Wallet"!==e.name&&"WalletConnect"!==e.name).length}},31101:(e,t,r)=>{"use strict";r.d(t,{z:()=>i});var n=r(10693);class i{filter;emitter;#eJ;constructor(e,t,r){this.#eJ=t,(0,n.n)(this,{emitter:e,filter:r})}async removeListener(){null!=this.#eJ&&await this.emitter.off(this.filter,this.#eJ)}}},31137:(e,t,r)=>{"use strict";r.d(t,{u:()=>a});var n=r(80563);let i=new Map;function a({fn:e,id:t,shouldSplitBatch:r,wait:a=0,sort:s}){let o=async()=>{let t=c();l();let r=t.map(({args:e})=>e);0!==r.length&&e(r).then(e=>{s&&Array.isArray(e)&&e.sort(s);for(let r=0;r<t.length;r++){let{resolve:n}=t[r];n?.([e[r],e])}}).catch(e=>{for(let r=0;r<t.length;r++){let{reject:n}=t[r];n?.(e)}})},l=()=>i.delete(t),c=()=>i.get(t)||[],u=e=>i.set(t,[...c(),e]);return{flush:l,async schedule(e){let{promise:t,resolve:i,reject:s}=(0,n.Y)();return(r?.([...c().map(({args:e})=>e),e])&&o(),c().length>0)?u({args:e,resolve:i,reject:s}):(u({args:e,resolve:i,reject:s}),setTimeout(o,a)),t}}}},31157:(e,t,r)=>{var n=r(44168),i=n.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(a(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),a(i,s),s.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw 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},s.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},31320:(e,t,r)=>{"use strict";r.d(t,{_:()=>ef});var n=r(57873),i=r(99817),a=r(25340),s=r(89188),o=r(32590),l=r(42242),c=r(26274),u=r(36071),d=r(95987),h=r(79561),p=r(81920),f=r(18627),m=r(82376),g=r(51636),y=r(29092),b=r(33432),w=r(23655),v=r(79482),E=r(33384),C=r(41776),A=r(88239),x=r(99347),I=r(47482),S=r(49359);class T{constructor(){}static getInstance({projectId:e,chainId:t,enableLogger:r,onTimeout:n,abortController:i,getActiveCaipNetwork:a,getCaipNetworks:s}){let{metadata:o,sdkVersion:l,sdkType:c}=f.H.getSnapshot();return T.instance||(T.instance=new S.Y({projectId:e,chainId:t,enableLogger:r,onTimeout:n,abortController:i,getActiveCaipNetwork:a,getCaipNetworks:s,enableCloudAuthAccount:!!f.H.state.remoteFeatures?.emailCapture,metadata:o,sdkVersion:l,sdkType:c})),T.instance}}var P=r(49135),O=r(52335),_=r(42846),N=r(45283),k=r(53032),R=r(28877),M=r(6875),B=r(30898),j=r(20134),U=r(53984),$=r(18577),L=r(57217),D=r(14429);let F=Symbol("appkit.coinbaseReauthWrapped"),H=new WeakMap;async function z(e){let t=m.W.getActiveCaipNetwork("eip155")?.id;"number"==typeof t&&await e.request({method:"wallet_switchEthereumChain",params:[{chainId:`0x${t.toString(16)}`}]})}var W=r(36442),q=r(37454);let V={getInitialWallets(){return B.g.connectorList().map(e=>"connector"===e.kind?this.mapConnectorToWalletItem(e.connector,e.subtype):"wallet"===e.kind?this.mapWalletToWalletItem(e.wallet):null).filter(Boolean)},getWalletConnectWallets(e,t){return t.length>0?t.map(e=>this.mapWalletToWalletItem(e)):q.A.getWalletConnectWallets(e).map(e=>this.mapWalletToWalletItem(e))},serializeWcWallet:e=>e?{walletInfo:{description:e.description,supportedChains:e.chains,website:e.homepage,installationLinks:{appStore:e.app_store,playStore:e.play_store,chromeStore:e.chrome_store,desktopLink:e.desktop_link},deepLink:e.mobile_link,linkMode:e.link_mode,isCertified:"certified"===e.badge_type,supportsWcPay:e.supports_wcpay??!1}}:{walletInfo:{}},mapConnectorToWalletItem(e,t){let r=e.connectors?.length?e.connectors?.map(e=>({id:e.id,chain:e.chain,chainImageUrl:R.$.getChainNamespaceImageUrl(e.chain)}))||[]:[{id:e.id,chain:e.chain,chainImageUrl:R.$.getChainNamespaceImageUrl(e.chain)}];return{id:e.id,connectors:"walletConnect"===t?[]:r,name:e.name,imageUrl:e.imageUrl||R.$.getAssetImageUrl(e.imageId),imageId:e.imageId,isInjected:"walletConnect"!==t,isRecent:!1,...this.serializeWcWallet(e.explorerWallet)}},mapWalletToWalletItem(e){return{id:e.id,connectors:[],name:e.name,imageUrl:R.$.getWalletImageUrl(e.image_id),imageId:e.image_id,isInjected:!1,isRecent:!1,...this.serializeWcWallet(e)}},mapWalletItemToWcWallet:e=>({id:e.id,name:e.name,image_id:e.imageId,image_url:e.imageUrl,description:e.walletInfo.description,mobile_link:e.walletInfo.deepLink,link_mode:e.walletInfo.linkMode??null,chains:e.walletInfo.supportedChains})};var G=r(13434),K=r(76916);let Z={async fetchWallets(e){let{query:t,...r}=e??{},n=r.search??t;n?await h.N.searchWallet({...r,search:n}):(h.N.state.search=[],await h.N.fetchWalletsByPage({page:1,...r}))},getWalletList:()=>({wallets:V.getInitialWallets(),wcWallets:V.getWalletConnectWallets(h.N.state.wallets,h.N.state.search),page:h.N.state.page,count:h.N.state.count}),subscribeWalletList(e){let t=[(0,W.u$)(h.N.state,"wallets",e),(0,W.u$)(h.N.state,"search",e),(0,W.u$)(h.N.state,"page",e),(0,W.u$)(h.N.state,"count",e)];return()=>
4939t.forEach(e=>e())},async prefetchWalletConnectUri(e){this.resetWcUri(),await u.x.connectWalletConnect({cache:"auto"})},getWalletConnectUri:()=>({wcUri:u.x.state.wcUri,wcError:!!u.x.state.wcError,wcFetchingUri:u.x.state.wcFetchingUri}),subscribeWalletConnectUri(e){let t=[(0,W.u$)(u.x.state,"wcUri",e),(0,W.u$)(u.x.state,"wcError",e),(0,W.u$)(u.x.state,"wcFetchingUri",e)];return()=>t.forEach(e=>e())},async connect(e,t,r){d.z.set({connectingWallet:e});let n=b.w.isMobile(),i=t||m.W.state.activeChain;try{let t=e?.connectors.find(e=>e.chain===i),a=t&&i?o.a.getConnector({id:t?.id,namespace:i}):void 0,s=!a&&i?o.a.getConnector({id:e?.id,namespace:i}):void 0;if(e?.isInjected&&a)await G.g.connectExternal(a);else if(s)await G.g.connectExternal(s);else if(n){let t=V.mapWalletItemToWcWallet(e);t.mobile_link?M.b.onConnectMobile(t,r?.wcPayUrl):K.W.handleMobileDeeplinkRedirect(e.id,i,{isCoinbaseDisabled:!1===f.H.state.enableCoinbase})}else await u.x.connectWalletConnect({cache:"never"})}catch(e){throw d.z.set({connectingWallet:void 0}),e}},resetWcUri(){u.x.resetUri(),u.x.setWcLinking(void 0)},resetConnectingWallet(){d.z.set({connectingWallet:void 0})}};var J=r(82875),Y=r(2076),Q=r(93346);let X={TOKEN_ADDRESSES_BY_SYMBOL:{USDC:{8453:Q.$f.asset,84532:Q.sP.asset}},getTokenSymbolByAddress(e){if(!e)return;let[t]=Object.entries(X.TOKEN_ADDRESSES_BY_SYMBOL).find(([t,r])=>Object.values(r).includes(e))??[];return t}};var ee=r(73626),et=r(43805);let er={createLogger(e,t="error"){let r=(0,et.iP)({level:t}),{logger:n}=(0,et.D5)({opts:r});return n.error=(...t)=>{for(let r of t)if(r instanceof Error)return void e(r,...t);e(void 0,...t)},n}};var en=r(69760),ei=r(42182),ea=r(3770),es=r(90411),eo=r(51735);class el extends ea.X{async setUniversalProvider(e){if(!this.namespace)throw Error("UniversalAdapter:setUniversalProvider - namespace is required");return this.addConnector(new es.F({provider:e,caipNetworks:this.getCaipNetworks(),namespace:this.namespace})),Promise.resolve()}async connect(e){return Promise.resolve({id:"WALLET_CONNECT",type:"WALLET_CONNECT",chainId:Number(e.chainId),provider:this.provider,address:""})}async disconnect(){try{let e=this.getWalletConnectConnector();await e.disconnect(),this.emit("disconnect")}catch(e){console.warn("UniversalAdapter:disconnect - error",e)}return{connections:[]}}syncConnections(){return Promise.resolve()}async writeSolanaTransaction(){return Promise.resolve({hash:""})}async getAccounts({namespace:e}){let t=this.provider;return Promise.resolve({accounts:(t?.session?.namespaces?.[e]?.accounts||[]).filter((e,t,r)=>r.indexOf(e)===t).map(t=>b.w.createAccount({caipAddress:t,type:"bip122"===e?"payment":"eoa"}))})}async syncConnectors(){return Promise.resolve()}async getBalance(e){if(!(e.caipNetwork&&p.oU.BALANCE_SUPPORTED_CHAINS.includes(e.caipNetwork?.chainNamespace))||e.caipNetwork?.testnet)return{balance:"0.00",symbol:e.caipNetwork?.nativeCurrency.symbol||""};let t=m.W.getAccountData();if(t?.balanceLoading&&e.chainId===m.W.state.activeCaipNetwork?.id)return{balance:t?.balance||"0.00",symbol:t?.balanceSymbol||""};let r=(await m.W.fetchTokenBalance()).find(t=>t.chainId===`${e.caipNetwork?.chainNamespace}:${e.chainId}`&&t.symbol===e.caipNetwork?.nativeCurrency.symbol);return{balance:r?.quantity.numeric||"0.00",symbol:r?.symbol||e.caipNetwork?.nativeCurrency.symbol||""}}async signMessage(e){let{provider:t,message:r,address:i}=e;if(!t)throw Error("UniversalAdapter:signMessage - provider is undefined");return{signature:m.W.state.activeCaipNetwork?.chainNamespace===n.o.CHAIN.SOLANA?(await t.request({method:"solana_signMessage",params:{message:en.A.encode(ne
4939w TextEncoder().encode(r)),pubkey:i}},m.W.state.activeCaipNetwork?.caipNetworkId)).signature:await t.request({method:"personal_sign",params:[r,i]},m.W.state.activeCaipNetwork?.caipNetworkId)}}async estimateGas(){return Promise.resolve({gas:BigInt(0)})}async sendTransaction(){return Promise.resolve({hash:""})}walletGetAssets(e){return Promise.resolve({})}async writeContract(){return Promise.resolve({hash:""})}emitFirstAvailableConnection(){}parseUnits(){return 0n}formatUnits(){return"0"}async getCapabilities(){return Promise.resolve({})}async grantPermissions(){return Promise.resolve({})}async revokePermissions(){return Promise.resolve("0x")}async syncConnection(){return Promise.resolve({id:"WALLET_CONNECT",type:"WALLET_CONNECT",chainId:1,provider:this.provider,address:""})}async switchNetwork(e){let{caipNetwork:t}=e,r=this.getWalletConnectConnector();if(t.chainNamespace===n.o.CHAIN.EVM)try{await r.provider?.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,ei.nj)(t.id)}]})}catch(e){if(e.code===eo.E.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||e.code===eo.E.ERROR_INVALID_CHAIN_ID||e.code===eo.E.ERROR_CODE_DEFAULT||e?.data?.originalError?.code===eo.E.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)try{await r.provider?.request({method:"wallet_addEthereumChain",params:[{chainId:(0,ei.nj)(t.id),rpcUrls:[t?.rpcUrls.chainDefault?.http],chainName:t.name,nativeCurrency:t.nativeCurrency,blockExplorerUrls:[t.blockExplorers?.default.url]}]})}catch(e){throw Error("Chain is not supported")}}r.provider?.setDefaultChain(t.caipNetworkId)}getWalletConnectProvider(){let e=this.connectors.find(e=>"WALLET_CONNECT"===e.type);return e?.provider}}let ec=["email","socials","swaps","onramp","activity","reownBranding","multiWallet","emailCapture","payWithExchange","payments","reownAuthentication","headless"],eu={email:{apiFeatureName:"social_login",localFeatureName:"email",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>{if(!e?.config)return!1;let t=e.config;return!!e.isEnabled&&t.includes("email")},processFallback:e=>void 0===e?p.oU.DEFAULT_REMOTE_FEATURES.email:!!e},socials:{apiFeatureName:"social_login",localFeatureName:"socials",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>{if(!e?.config)return!1;let t=e.config;return!!e.isEnabled&&t.length>0&&t.filter(e=>"email"!==e)},processFallback:e=>void 0===e?p.oU.DEFAULT_REMOTE_FEATURES.socials:"boolean"==typeof e?!!e&&p.oU.DEFAULT_REMOTE_FEATURES.socials:e},swaps:{apiFeatureName:"swap",localFeatureName:"swaps",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>{if(!e?.config)return!1;let t=e.config;return!!e.isEnabled&&t.length>0&&t},processFallback:e=>void 0===e?p.oU.DEFAULT_REMOTE_FEATURES.swaps:"boolean"==typeof e?!!e&&p.oU.DEFAULT_REMOTE_FEATURES.swaps:e},onramp:{apiFeatureName:"onramp",localFeatureName:"onramp",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>{if(!e?.config)return!1;let t=e.config;return!!e.isEnabled&&t.length>0&&t},processFallback:e=>void 0===e?p.oU.DEFAULT_REMOTE_FEATURES.onramp:"boolean"==typeof e?!!e&&p.oU.DEFAULT_REMOTE_FEATURES.onramp:e},activity:{apiFeatureName:"activity",localFeatureName:"history",returnType:!1,isLegacy:!0,isAvailableOnBasic:!1,processApi:e=>!!e.isEnabled,processFallback:e=>void 0===e?p.oU.DEFAULT_REMOTE_FEATURES.activity:!!e},reownBranding:{apiFeatureName:"reown_branding",localFeatureName:"reownBranding",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>!!e.isEnabled,processFallback:e=>void 0===e?p.oU.DEFAULT_REMOTE_FEATURES.reownBranding:!!e},emailCapture:{apiFeatureName:"email_capture",localFeatureName:"emailCapture",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>e.isEnabled&&(e.config??[]),processFallback:e=>!1},multiWallet:{apiFeatureName:"multi_wallet",localFeatureName:"multiWallet",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>!!e.isEnabled,processFallback:()=>p.oU.DEFAULT_REMOTE_FEATURES.multiWallet},payWithExchange:{apiFeatureName:"fund_from_exchange",localFeatureName:"payWithExchange",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>!!e.isEnabled,processFallback:()=>p.oU.DEFAULT_REMOTE_FEATURES.payWithExchange},payments:{apiFeatureName:"payments",localFeatureName:"payments",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>!!e.isEnabled,processFallback:()=>p.oU.DEFAULT_REMOTE_FEATURES.payments},reownAuthentication:{apiFeatureName:"reown_authentication",localFeatureName:"reownAuthentication",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>!!e.isEnabled,processFallback:e=>void 0===e?p.oU.DEFAULT_REMOTE_FEATURES.reownAuthentication:!!e},headless:{apiFeatureName:"headless",localFeatureName:"headless",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>!!e.isEnabled,processFallback:()=>p.oU.DEFAULT_REMOTE_FEATURES.headless}},ed={localSettingsOverridden:new Set,getApiConfig:(e,t)=>
4939t?.find(t=>t.id===e),addWarning(e,t){if(void 0!==e){let e=eu[t],r=e.isLegacy?`"features.${e.localFeatureName}" (now "${t}")`:`"features.${t}"`;this.localSettingsOverridden.add(r)}},processFeature(e,t,r,n,i){let a=eu[e],s=t[a.localFeatureName];if(i&&!a.isAvailableOnBasic)return!1;if(n){let t=this.getApiConfig(a.apiFeatureName,r);return t?.config===null?this.processFallbackFeature(e,s):!!t?.config&&(void 0!==s&&this.addWarning(s,e),this.processApiFeature(e,t))}return this.processFallbackFeature(e,s)},processApiFeature:(e,t)=>eu[e].processApi(t),processFallbackFeature:(e,t)=>eu[e].processFallback(t),async fetchRemoteFeatures(e){let t=e.basic??!1,r=e.features||{};this.localSettingsOverridden.clear();let n=null,i=!1;try{i=null!=(n=await h.N.fetchProjectConfig())}catch(e){console.warn("[Reown Config] Failed to fetch remote project configuration. Using local/default values.",e)}let a=i&&!t?p.oU.DEFAULT_REMOTE_FEATURES:p.oU.DEFAULT_REMOTE_FEATURES_DISABLED;try{for(let e of ec){let s=this.processFeature(e,r,n,i,t);Object.assign(a,{[e]:s})}}catch(e){return console.warn("[Reown Config] Failed to process the configuration from Cloud. Using default values.",e),p.oU.DEFAULT_REMOTE_FEATURES}if(i&&this.localSettingsOverridden.size>0){let e=`Your local configuration for ${Array.from(this.localSettingsOverridden).join(", ")} was ignored because a remote configuration was successfully fetched. Please manage these features via your project dashboard on dashboard.reown.com.`;w.h.open({debugMessage:A.R.ALERT_WARNINGS.LOCAL_CONFIGURATION_IGNORED.debugMessage(e)},"warning")}return a}};class eh{constructor(e){this.chainNamespaces=[],this.features={},this.remoteFeatures={},this.reportedAlertErrors={},this.getCaipNetwork=(e,t)=>{if(e){let r=m.W.getCaipNetworks(e)?.find(e=>e.id===t);if(r)return r;let n=m.W.getNetworkData(e)?.caipNetwork;if(n)return n;let i=m.W.getRequestedCaipNetworks(e);return i.filter(t=>t.chainNamespace===e)?.[0]}return m.W.state.activeCaipNetwork||this.defaultCaipNetwork},this.getCaipNetworkId=()=>{let e=this.getCaipNetwork();if(e)return e.id},this.getCaipNetworks=e=>m.W.getCaipNetworks(e),this.getActiveChainNamespace=()=>m.W.state.activeChain,this.setRequestedCaipNetworks=(e,t)=>{m.W.setRequestedCaipNetworks(e,t)},this.getApprovedCaipNetworkIds=()=>m.W.getAllApprovedCaipNetworkIds(),this.getCaipAddress=e=>m.W.state.activeChain!==e&&e?m.W.state.chains.get(e)?.accountState?.caipAddress:m.W.state.activeCaipAddress,this.setClientId=e=>{N.T.setClientId(e)},this.getProvider=e=>v.G.getProvider(e),this.getProviderType=e=>v.G.getProviderId(e),this.getPreferredAccountType=e=>(0,s.lj)(e),this.setCaipAddress=(e,t,r=!1)=>{if(null!==e){let t=e.split(":");if(3!==t.length||t.some(e=>!e))return void console.warn(`[AppKit] setCaipAddress: invalid CAIP-10 address rejected: "${e}"`)}m.W.setAccountProp("caipAddress",e,t,r),m.W.setAccountProp("address",b.w.getPlainAddress(e),t,r)},this.setBalance=(e,t,r)=>{m.W.setAccountProp("balance",e,r),m.W.setAccountProp("balanceSymbol",t,r)},this.setProfileName=(e,t)=>{m.W.setAccountProp("profileName",e,t)},this.setProfileImage=(e,t)=>{m.W.setAccountProp("profileImage",e,t)},this.setUser=(e,t)=>{m.W.setAccountProp("user",e,t)},this.resetAccount=e=>{m.W.resetAccount(e)},this.setCaipNetwork=e=>{m.W.setActiveCaipNetwork(e)},this.setCaipNetworkOfNamespace=(e,t)=>{m.W.setChainNetworkData(t,{caipNetwork:e})},this.setStatus=(e,t)=>{m.W.setAccountProp("status",e,t),o.a.isConnected()?y.i.setConnectionStatus("connected"):y.i.setConnectionStatus("disconnected")},this.getAddressByChainNamespace=e=>m.W.getAccountData(e)?.address,this.setConnectors=e=>{let t=[...o.a.state.allConnectors,...e];o.a.setConnectors(t)},this.setConnections=(e,t)=>{y.i.setConnections(e,t),u.x.setConnections(e,t)},this.fetchIdentity=e=>N.T.fetchIdentity(e),this.getReownName=e=>k.f.getNamesForAddress(e),this.getConnectors=()=>o.a.getConnectors(),this.getConnectorImage=e=>R.$.getConnectorImage(e),this.getConnections=e=>this.remoteFeatures.multiWallet?M.b.getConnectionsData(e).connections:(w.h.open(n.o.REMOTE_FEATURES_ALERTS.MULTI_WALLET_NOT_ENABLED.DEFAULT,"info"),[]),this.getRecentConnections=e=>this.remoteFeatures.multiWallet?M.b.getConnectionsData(e).recentConnections:(w.h.open(n.o.REMOTE_FEATURES_ALERTS.MULTI_WALLET_NOT_ENABLED.DEFAULT,"info"),[]),this.switchConnection=async e=>{if(!this.remoteFeatures.multiWallet)return void w.h.open(n.o.REMOTE_FEATURES_ALERTS.MULTI_WALLET_NOT_ENABLED.DEFAULT,"info");await u.x.switchConnection(e)},this.deleteConnection=e=>{if(!this.remoteFeatures.multiWallet)return void w.h.open(n.o.REMOTE_FEATURES_ALERTS.MULTI_WALLET_NOT_ENABLED.DEFAULT,"info");y.i.deleteAddressFromConnection(e),u.x.syncStorageConnections()},this.setConnectedWalletInfo=(e,t)=>{let r=v.G.getProviderId(t),n=e?{...e,type:r}:void 0;m.W.setAccountProp("connectedWalletInfo",n,t)},this.getIsConnectedState=()=>!!m.W.state.activeCaipAddress,this.addAddressLabel=(e,t,r)=>{let n=m.W.getAccountData(r)?.addressLabels||{};m.W.setAccountProp("addressLabels",{...n,[e]:t},r)},this.removeAddressLabel=(e,t)=>
4939{let r=m.W.getAccountData(t)?.addressLabels||{};m.W.setAccountProp("addressLabels",{...r,[e]:void 0},t)},this.getAddress=e=>{let t=e||m.W.state.activeChain;return m.W.getAccountData(t)?.address},this.resetNetwork=e=>{m.W.resetNetwork(e)},this.addConnector=e=>{o.a.addConnector(e)},this.resetWcConnection=()=>{u.x.resetWcConnection()},this.setAddressExplorerUrl=(e,t)=>{m.W.setAccountProp("addressExplorerUrl",e,t)},this.setSmartAccountDeployed=(e,t)=>{m.W.setAccountProp("smartAccountDeployed",e,t)},this.setPreferredAccountType=(e,t)=>{m.W.setAccountProp("preferredAccountType",e,t)},this.setEIP6963Enabled=e=>{f.H.setEIP6963Enabled(e)},this.handleUnsafeRPCRequest=()=>{this.isOpen()?this.isTransactionStackEmpty()||this.redirect("ApproveTransaction"):this.open({view:"ApproveTransaction"})},this.options=e,this.version=e.sdkVersion,this.caipNetworks=this.extendCaipNetworks(e),this.chainNamespaces=this.getChainNamespacesSet(e.adapters,this.caipNetworks),this.defaultCaipNetwork=this.extendDefaultCaipNetwork(e),this.chainAdapters=this.createAdapters(e.adapters),this.readyPromise=this.initialize(e)}getChainNamespacesSet(e,t){let r=e?.map(e=>e.namespace).filter(e=>!!e);return r?.length?[...new Set(r)]:[...new Set(t?.map(e=>e.chainNamespace))]}async initialize(e){if(this.initializeProjectSettings(e),this.initControllers(e),await this.initChainAdapters(),this.sendInitializeEvent(e),e.features?.headless&&!B.g.hasInjectedConnectors()&&h.N.prefetch({fetchNetworkImages:!1,fetchConnectorImages:!1,fetchWalletRanks:!1,fetchRecommendedWallets:!0}),f.H.state.enableReconnect?(await this.syncExistingConnection(),await this.syncAdapterConnections()):await this.unSyncExistingConnection(),e.basic||e.manualWCControl||(this.remoteFeatures=await ed.fetchRemoteFeatures(e)),await h.N.fetchUsage(),f.H.setRemoteFeatures(this.remoteFeatures),this.remoteFeatures.onramp&&j.aG.setOnrampProviders(this.remoteFeatures.onramp),(f.H.state.remoteFeatures?.email||Array.isArray(f.H.state.remoteFeatures?.socials)&&f.H.state.remoteFeatures?.socials.length>0)&&await this.checkAllowedOrigins(),f.H.state.features?.reownAuthentication||f.H.state.remoteFeatures?.reownAuthentication){let{ReownAuthentication:e}=await r.e(7124).then(r.bind(r,7124)),t=f.H.state.siwx;t instanceof e||(t&&console.warn("ReownAuthentication option is enabled, SIWX configuration will be overridden."),f.H.setSIWX(new e))}}async openSend(e){let t=e.namespace||m.W.state.activeChain,r=this.getCaipAddress(t),n=this.getCaipNetwork(t)?.id;if(!r)throw Error("openSend: caipAddress not found");if(n?.toString()!==e.chainId.toString()){let r=m.W.getCaipNetworkById(e.chainId,t);if(!r)throw Error(`openSend: caipNetwork with chainId ${e.chainId} not found`);await this.switchNetwork(r,{throwOnFailure:!0})}try{let t=X.getTokenSymbolByAddress(e.assetAddress);t&&await h.N.fetchTokenImages([t])}catch{}return await U.W.open({view:"WalletSend",data:{send:e}}),new Promise((e,t)=>{let r=$.R.subscribeKey("hash",t=>{t&&(i(),e({hash:t}))}),n=U.W.subscribe(e=>{e.open||(i(),t(Error("Modal closed")))}),i=this.createCleanupHandler([r,n])})}toModalOptions(){return{isSwap:function(e){return e?.view==="Swap"},isSend:function(e){return e?.view==="WalletSend"}}}async checkAllowedOrigins(){try{let e=await h.N.fetchAllowedOrigins();if(!b.w.isClient())return;let t=window.location.origin;L.k.isOriginAllowed(t,e,n.o.DEFAULT_ALLOWED_ANCESTORS)||w.h.open(A.R.ALERT_ERRORS.ORIGIN_NOT_ALLOWED,"error")}catch(e){if(!(e instanceof Error))return;switch(e.message){case"RATE_LIMITED":w.h.open(A.R.ALERT_ERRORS.RATE_LIMITED_APP_CONFIGURATION,"error");break;case"SERVER_ERROR":{let t=e.cause instanceof Error?e.cause:e;w.h.open({displayMessage:A.R.ALERT_ERRORS.SERVER_ERROR_APP_CONFIGURATION.displayMessage,debugMessage:A.R.ALERT_ERRORS.SERVER_ERROR_APP_CONFIGURATION.debugMessage(t.message)},"error")}}}}createCleanupHandler(e){return()=>{e.forEach(e=>{try{e()}catch{}})}}sendInitializeEvent(e){let{...t}=e;delete t.adapters,delete t.universalProvider,l.E.sendEvent({type:"track",event:"INITIALIZE",properties:{...t,networks:e.networks.map(e=>e.id),siweConfig:{options:e.siweConfig?.options||{}}}})}initControllers(e){this.initializeOptionsController(e),this.initializeChainController(e),this.initializeThemeController(e),this.initializeConnectionController(e),this.initializeConnectorController()}initAdapterController(){D.q.initialize(this.chainAdapters)}initializeThemeController(e){e.themeMode&&g.W.setThemeMode(e.themeMode),e.themeVariables&&g.W.setThemeVariables(e.themeVariables)}initializeChainController(e){if(!this.connectionControllerClient)throw Error("ConnectionControllerClient must be set");m.W.initialize(e.adapters??[],this.caipNetworks,{connectionControllerClient:this.connectionControllerClient});let t=this.getDefaultNetwork();t&&m.W.setActiveCaipNetwork(t)}initializeConnectionController(e){u.x.initialize(e.adapters??[]),u.x.setWcBasic(e.basic??!1)}initializeConnectorController(){o.a.initialize(this.chainNamespaces)}initializeProjectSettings(e){f.H.setProjectId(e.projectId),f.H.setSdkVersion(e.sdkVersion)}initializeOptionsController(e){f.H.setDebug(!1!==e.debug),f.H.setEnableWalletGuide(!1!==e.enableWalletGuide),f.H.setEnableWallets(!1!==e.enableWallets),f.H.setEIP6963Enabled(!1!==e.enableEIP6963),f.H.setEnableInjected(!1!==e.enableInjected),f.H.setEnableCoinbase(!1!==e.enableCoinbase),f.H.setEnableNetworkSwitch(!1!==e.enableNetworkSwitch),f.H.setEnableReconnect(!1!==e.enableReconnect),f.H.setEnableMobileFullScreen(!0===e.enableMobileFullScreen),f.H.setCoinbasePreference(e.coinbasePreference),f.H.setEnableAuthLogger(!1!==e.enableAuthLogger),f.H.setCustomRpcUrls(e.customRpcUrls),f.H.setEnableEmbedded(e.enableEmbedded),f.H.setAllWallets(e.allWallets),f.H.setIncludeWalletIds(e.includeWalletIds),f.H.setExcludeWalletIds(e.excludeWalletIds),f.H.setFeaturedWalletIds(e.featuredWalletIds),f.H.setTokens(e.tokens),f.H.setTermsConditionsUrl(e.termsConditionsUrl),f.H.setPrivacyPolicyUrl(e.privacyPolicyUrl),f.H.setCustomWallets(e.customWallets),f.H.setFeatures(e.features),f.H.setAllowUnsupportedChain(e.allowUnsupportedChain),f.H.setUniversalProviderConfigOverride(e.universalProviderConfigOverride),f.H.setPreferUniversalLinks(e.experimental_preferUniversalLinks),f.H.setDefaultAccountTypes(e.defaultAccountTypes);let t=this.getDefaultMetaData();if(!e.metadata&&t&&(e.metadata=t),f.H.setMetadata(e.metadata),f.H.setDisableAppend(e.disableAppend),f.H.setEnableEmbedded(e.enableEmbedded),f.H.setSIWX(e.siwx),this.features=f.H.state.features??{},!e.projectId)return void w.h.open(A.R.ALERT_ERRORS.PROJECT_ID_NOT_CONFIGURED,"error");
4939if(e.adapters?.find(e=>e.namespace===n.o.CHAIN.EVM)&&e.siweConfig){if(e.siwx)throw Error("Cannot set both `siweConfig` and `siwx` options");f.H.setSIWX(e.siweConfig.mapToSIWX())}}getDefaultMetaData(){return b.w.isClient()?{name:document.getElementsByTagName("title")?.[0]?.textContent||"",description:document.querySelector('meta[property="og:description"]')?.content||"",url:window.location.origin,icons:[document.querySelector('link[rel~="icon"]')?.href||""]}:null}setUnsupportedNetwork(e){let t=this.getActiveChainNamespace();if(t){let r=ee.R.getUnsupportedNetwork(`${t}:${e}`);m.W.setActiveCaipNetwork(r)}}getDefaultNetwork(){return ee.R.getCaipNetworkFromStorage(this.defaultCaipNetwork)}extendCaipNetwork(e,t){return ee.R.extendCaipNetwork(e,{customNetworkImageUrls:t.chainImages,projectId:t.projectId})}extendCaipNetworks(e){return ee.R.extendCaipNetworks(e.networks,{customNetworkImageUrls:e.chainImages,customRpcUrls:e.customRpcUrls,projectId:e.projectId})}extendDefaultCaipNetwork(e){let t=e.networks.find(t=>t.id===e.defaultNetwork?.id);return t?ee.R.extendCaipNetwork(t,{customNetworkImageUrls:e.chainImages,customRpcUrls:e.customRpcUrls,projectId:e.projectId}):void 0}async disconnectConnector(e,t){try{this.setLoading(!0,e);let r={connections:[]},n=this.getAdapter(e);return(m.W.state.chains.get(e)?.accountState?.caipAddress||!f.H.state.enableReconnect)&&n?.disconnect&&(r=await n.disconnect({id:t})),this.setLoading(!1,e),r}catch(t){throw this.setLoading(!1,e),Error(`Failed to disconnect chains: ${t.message}`)}}createClients(){this.connectionControllerClient={connectWalletConnect:async()=>{let e=m.W.state.activeChain,t=this.getAdapter(e),r=this.getCaipNetwork(e)?.id,n=u.x.getConnections(e),i=this.remoteFeatures.multiWallet,s=n.length>0;if(!t)throw Error("Adapter not found");let o=await t.connectWalletConnect(r);s&&i||this.close(),this.setClientId(o?.clientId||null),y.i.setConnectedNamespaces([...m.W.state.chains.keys()]),await this.syncWalletConnectAccount(),await a.U.initializeIfEnabled()},connectExternal:async e=>{let t=await this.onConnectExternal(e);return await this.connectInactiveNamespaces(e,t),t?{address:t.address}:void 0},reconnectExternal:async({id:e,info:t,type:r,provider:n})=>{let i=m.W.state.activeChain,a=this.getAdapter(i);if(!i)throw Error("reconnectExternal: namespace not found");if(!a)throw Error("reconnectExternal: adapter not found");a?.reconnect&&(await a?.reconnect({id:e,info:t,type:r,provider:n,chainId:this.getCaipNetwork()?.id}),y.i.addConnectedNamespace(i),this.syncConnectedWalletInfo(i))},disconnectConnector:async e=>{await this.disconnectConnector(e.namespace,e.id)},disconnect:async e=>{let{id:t,chainNamespace:r,initialDisconnect:i}=e||{},s=r||m.W.state.activeChain,c=o.a.getConnectorId(s),d=t===n.o.CONNECTOR_ID.AUTH||c===n.o.CONNECTOR_ID.AUTH,h=t===n.o.CONNECTOR_ID.WALLET_CONNECT||c===n.o.CONNECTOR_ID.WALLET_CONNECT;try{let e=Array.from(m.W.state.chains.keys()),n=r?[r]:e;(h||d)&&(n=e);let s=n.map(async e=>{let r=o.a.getConnectorId(e),n=await this.disconnectConnector(e,t||r);n&&(d&&y.i.deleteConnectedSocialProvider(),n.connections.forEach(t=>{y.i.addDisconnectedConnectorId(t.connectorId,e)})),i&&this.onDisconnectNamespace({chainNamespace:e,closeModal:!1})}),c=await Promise.allSettled(s);$.R.resetSend(),u.x.resetWcConnection(),a.U.getSIWX()?.signOutOnDisconnect&&await a.U.clearSessions(),o.a.setFilterByNamespace(void 0),u.x.syncStorageConnections();let p=c.filter(e=>"rejected"===e.status);if(p.length>0)throw Error(p.map(e=>e.reason.message).join(", "));l.E.sendEvent({type:"track",event:"DISCONNECT_SUCCESS",properties:{namespace:r||"all"}})}catch(e){throw Error(`Failed to disconnect chains: ${e.message}`)}},checkInstalled:e=>e?e.some(e=>!!window.ethereum?.[String(e)]):!!window.ethereum,signMessage:async e=>{let t=m.W.state.activeChain,r=this.getAdapter(m.W.state.activeChain);if(!t)throw Error("signMessage: namespace not found");if(!r)throw Error("signMessage: adapter not found");let n=this.getAddress(t);if(!n)throw Error("signMessage: address not found");let i=await r?.signMessage({message:e,address:n,provider:v.G.getProvider(t)});return i?.signature||""},sendTransaction:async e=>{let t=e.chainNamespace;if(!t)throw Error("sendTransaction: namespace not found");if(p.oU.SEND_SUPPORTED_NAMESPACES.includes(t)){let r=this.getAdapter(t);if(!r)throw Error("sendTransaction: adapter not found");let n=v.G.getProvider(t),i=await r?.sendTransaction({...e,caipNetwork:this.getCaipNetwork(),provider:n});return i?.hash||""}return""},estimateGas:async e=>{let t=e.chainNamespace;if(t===n.o.CHAIN.EVM){let r=this.getAdapter(t);if(!r)throw Error("estimateGas: adapter is required but got undefined");let n=v.G.getProvider(t),i=this.getCaipNetwork();if(!i)throw Error("estimateGas: caipNetwork is required but got undefined");let a=await r?.estimateGas({...e,provider:n,caipNetwork:i});return a?.gas||0n}return 0n},getEnsAvatar:async()=>{let e=m.W.state.activeChain;if(!e)throw Error("getEnsAvatar: namespace is required but got undefined");let t=this.getAddress(e);if(!t)throw Error("getEnsAvatar: address not found");await this.syncIdentity({address:t,chainId:Number(this.getCaipNetwork()?.id),chainNamespace:e});let r=m.W.getAccountData();return r?.profileImage||!1},getEnsAddress:async e=>await L.k.resolveReownName(e),writeContract:async e=>{let t=m.W.state.activeChain,r=this.getAdapter(t);if(!t)throw Error("writeContract: namespace is required but got undefined");if(!r)throw Error("writeContract: adapter is required but got undefined");let n=this.getCaipNetwork(),i=this.getCaipAddress(),a=v.G.getProvider(t);if(!n||!i)throw Error("writeContract: caipNetwork or caipAddress is required but got undefined");let s=await r?.writeContract({...e,caipNetwork:n,provider:a,caipAddress:i});return s?.hash},writeSolanaTransaction:async e=>{let t=m.W.state.activeChain,r=this.getAdapter(t);if(!t)throw Error("writeContract: namespace is required but got undefined");if(!r)throw Error("writeContract: adapter is required but got undefined");let n=this.getCaipNetwork(),i=this.getCaipAddress(),a=v.G.getProvider(t);if(!n||!i)throw Error("writeContract: caipNetwork or caipAddress is required but got undefined");let s=await r?.writeSolanaTransaction({...e,caipNetwork:n,provider:a,caipAddress:i});return s?.hash},parseUnits:(e,t)=>{let r=this.getAdapter(m.W.state.activeChain);if(!r)throw Error("parseUnits: adapter is required but got undefined");return r?.parseUnits({value:e,decimals:t})??0n},formatUnits:(e,t)=>{let r=this.getAdapter(m.W.state.activeChain);if(!r)throw Error("formatUnits: adapter is required but got undefined");return r?.formatUnits({value:e,decimals:t})??"0"},getCapabilities:async e=>{let t=this.getAdapter(m.W.state.activeChain);if(!t)throw Error("getCapabilities: adapter is required but got undefined");return await t?.getCapabilities(e)},grantPermissions:async e=>{let t=this.getAdapter(m.W.state.activeChain);if(!t)throw Error("grantPermissions: adapter is required but got undefined");return await t?.grantPermissions(e)},revokePermissions:async e=>{let t=this.getAdapter(m.W.state.activeChain);if(!t)throw Error("revokePermissions: adapter is required but got undefined");return t?.revokePermissions?await t.revokePermissions(e):"0x"},walletGetAssets:async e=>{let t=this.getAdapter(m.W.state.activeChain);if(!t)throw Error("walletGetAssets: adapter is required but got undefined");return await t?.walletGetAssets(e)??{}},updateBalance:e=>{let t=this.getAddress(e),r=this.getCaipNetwork(e);r&&t&&this.updateNativeBalance(t,r?.id,e)}},u.x.setClient(this.connectionControllerClient)}async onConnectExternal(e){let t=m.W.state.activeChain,r=e.chain||t,i=this.getAdapter(r),a=!0;if(e.type===C.o.CONNECTOR_TYPE_AUTH&&n.o.AUTH_CONNECTOR_SUPPORTED_CHAINS.some(e=>o.a.getConnectorId(e)===n.o.CONNECTOR_ID.AUTH)&&e.chain!==t&&(a=!1),e.chain&&e.chain!==t&&!e.caipNetwork){let t=this.getCaipNetworks().find(t=>t.chainNamespace===e.chain);t&&a&&this.setCaipNetwork(t)}if(!r)throw Error("connectExternal: namespace not found");if(!i)throw Error("connectExternal: adapter not found");let s=this.getCaipNetwork(r),l=e.caipNetwork||s,c=await i.connect({id:e.id,address:e.address,info:e.info,type:e.type,provider:e.provider,socialUri:e.socialUri,chainId:e.caipNetwork?.id||s?.id,rpcUrl:e.caipNetwork?.rpcUrls?.default?.http?.[0]||s?.rpcUrls?.default?.http?.[0]});if(c)return y.i.addConnectedNamespace(r),this.syncProvider({...c,chainNamespace:r}),this.setStatus("connected",r),this.syncConnectedWalletInfo(r),y.i.removeDisconnectedConnectorId(e.id,r),{address:c.address,connectedCaipNetwork:l}}async connectInactiveNamespaces(e,t){let r=e.type===C.o.CONNECTOR_TYPE_AUTH,n=E.y.getOtherAuthNamespaces(t?.connectedCaipNetwork?.chainNamespace),i=m.W.state.activeCaipNetwork,a=this.getAdapter(i?.chainNamespace);r&&(await Promise.all(n.map(async t=>{try{let r=v.G.getProvider(t),n=this.getCaipNetwork(t),i=this.getAdapter(t);await i?.connect({...e,provider:r,socialUri:void 0,chainId:n?.id,rpcUrl:n?.rpcUrls?.default?.http?.[0]})&&(y.i.addConnectedNamespace(t),y.i.removeDisconnectedConnectorId(e.id,t),this.setStatus("connected",t),this.syncConnectedWalletInfo(t))}catch(e){w.h.warn(A.R.ALERT_WARNINGS.INACTIVE_NAMESPACE_NOT_CONNECTED.displayMessage,A.R.ALERT_WARNINGS.INACTIVE_NAMESPACE_NOT_CONNECTED.debugMessage(t,e instanceof Error?e.message:void 0),A.R.ALERT_WARNINGS.INACTIVE_NAMESPACE_NOT_CONNECTED.code)}})),i&&await a?.switchNetwork({caipNetwork:i}))}getApprovedCaipNetworksData(){if(v.G.getProviderId(m.W.state.activeChain)===C.o.CONNECTOR_TYPE_WALLET_CONNECT){let e=this.universalProvider?.session?.namespaces;return{supportsAllNetworks:this.universalProvider?.session?.peer?.metadata.name==="MetaMask Wallet",approvedCaipNetworkIds:this.getChainsFromNamespaces(e)}}return{supportsAllNetworks:!0,approvedCaipNetworkIds:[]}}async switchCaipNetwork(e){let t=e.chainNamespace;if(this.getAddressByChainNamespace(e.chainNamespace)){let r=v.G.getProviderId(t);if(e.chainNamespace===m.W.state.activeChain){let r=this.getAdapter(t);await r?.switchNetwork({caipNetwork:e})}else if(this.setCaipNetwork(e),r===C.o.CONNECTOR_TYPE_WALLET_CONNECT)this.syncWalletConnectAccount();else{let r=this.getAddressByChainNamespace(t);r&&this.syncAccount({address:r,chainId:e.id,chainNamespace:t})}}else this.setCaipNetwork(e)}
4939getChainsFromNamespaces(e={}){return Object.values(e).flatMap(e=>Array.from(new Set([...e.chains||[],...e.accounts.map(e=>{let{chainId:t,chainNamespace:r}=O.C.parseCaipAddress(e);return`${r}:${t}`})])))}createAdapters(e){return this.createClients(),this.chainNamespaces.reduce((t,r)=>{let n=e?.find(e=>e.namespace===r);return n?(n.construct({namespace:r,projectId:this.options?.projectId,networks:this.caipNetworks?.filter(({chainNamespace:e})=>e===r)}),t[r]=n):t[r]=new el({namespace:r,networks:this.getCaipNetworks()}),t},{})}async initChainAdapter(e){this.onConnectors(e),this.listenAdapter(e);let t=this.getAdapter(e);if(!t)throw Error("adapter not found");await t.syncConnectors(),await this.createUniversalProviderForAdapter(e)}async initChainAdapters(){await Promise.all(this.chainNamespaces.map(async e=>{await this.initChainAdapter(e)})),this.initAdapterController()}onConnectors(e){let t=this.getAdapter(e);t?.on("connectors",this.setConnectors.bind(this))}listenAdapter(e){let t=this.getAdapter(e);if(!t)return;let r=y.i.getConnectionStatus();!1===f.H.state.enableReconnect?this.setStatus("disconnected",e):"connected"===r?this.setStatus("connecting",e):("disconnected"===r&&y.i.clearAddressCache(),this.setStatus(r,e)),t.on("switchNetwork",({address:t,chainId:r})=>{let n=this.getCaipNetworks().find(e=>e.id.toString()===r.toString()||e.caipNetworkId.toString()===r.toString()),i=m.W.state.activeChain===e,a=m.W.state.chains.get(e)?.accountState?.address;if(n){let r=i&&t?t:a;r&&this.syncAccount({address:r,chainId:n.id,chainNamespace:e})}else this.setUnsupportedNetwork(r)}),t.on("disconnect",()=>{let t=this.remoteFeatures.multiWallet,r=Array.from(u.x.state.connections.values()).flat();this.onDisconnectNamespace({chainNamespace:e,closeModal:!t||0===r.length})}),t.on("connections",t=>{this.setConnections(t,e)}),t.on("pendingTransactions",()=>{let t=this.getAddress(e),r=m.W.state.activeCaipNetwork;t&&r?.id&&this.updateNativeBalance(t,r.id,r.chainNamespace)}),t.on("accountChanged",({address:t,chainId:r,connector:n})=>{this.handlePreviousConnectorConnection(n);let i=m.W.state.activeChain===e;n?.provider&&(this.syncProvider({id:n.id,type:n.type,provider:n?.provider,chainNamespace:e}),this.syncConnectedWalletInfo(e));let a=m.W.getNetworkData(e)?.caipNetwork?.id,s=r||a;i&&s?this.syncAccount({address:t,chainId:s,chainNamespace:e}).catch(()=>null):!i&&s?(this.syncAccountInfo(t,s,e),this.syncBalance({address:t,chainId:s,chainNamespace:e}).catch(()=>null)):this.syncAccountInfo(t,r,e),y.i.addConnectedNamespace(e)})}async handlePreviousConnectorConnection(e){let t=e?.chain,r=e?.id,n=o.a.getConnectorId(t),i=f.H.state.remoteFeatures?.multiWallet,a=n!==r,s=t&&r&&n&&a&&!i;try{s&&await u.x.disconnect({id:n,namespace:t})}catch(e){console.warn("Error disconnecting previous connector",e)}}async createUniversalProviderForAdapter(e){await this.getUniversalProvider(),this.universalProvider&&await this.chainAdapters?.[e]?.setUniversalProvider?.(this.universalProvider)}async syncExistingConnection(){await Promise.allSettled(this.chainNamespaces.map(e=>this.syncNamespaceConnection(e)))}async unSyncExistingConnection(){try{await Promise.allSettled(this.chainNamespaces.map(e=>u.x.disconnect({namespace:e,initialDisconnect:!0})))}catch(e){console.error("Error disconnecting existing connections:",e)}}async reconnectWalletConnect(){await this.syncWalletConnectAccount();let e=this.getAddress();this.getCaipAddress()||y.i.deleteRecentWallet();let t=y.i.getRecentWallet();l.E.sendEvent({type:"track",event:"CONNECT_SUCCESS",address:e,properties:{method:b.w.isMobile()?"mobile":"qrcode",name:t?.name||"Unknown",reconnect:!0,view:c.I.state.view,walletRank:t?.order}})}async syncNamespaceConnection(e){try{e===n.o.CHAIN.EVM&&b.w.isSafeApp()&&o.a.setConnectorId(n.o.CONNECTOR_ID.SAFE,e);let t=o.a.getConnectorId(e);switch(this.setStatus("connecting",e),t){case n.o.CONNECTOR_ID.WALLET_CONNECT:await this.reconnectWalletConnect();break;case n.o.CONNECTOR_ID.AUTH:break;default:await this.syncAdapterConnection(e)}}catch(t){console.warn("AppKit couldn't sync existing connection",t),this.setStatus("disconnected",e)}}onDisconnectNamespace(e){let{chainNamespace:t,closeModal:r}=e||{};m.W.resetAccount(t),m.W.resetNetwork(t),y.i.removeConnectedNamespace(t);let n=Array.from(m.W.state.chains.keys());
4939(t?[t]:n).forEach(e=>y.i.addDisconnectedConnectorId(o.a.getConnectorId(e)||"",e)),o.a.removeConnectorId(t),v.G.resetChain(t),this.setUser(null,t),this.setStatus("disconnected",t),this.setConnectedWalletInfo(null,t),!1!==r&&U.W.close()}async syncAdapterConnections(){await Promise.allSettled(this.chainNamespaces.map(e=>{let t=this.getAdapter(e),r=this.getCaipAddress(e),n=this.getCaipNetwork(e);return t?.syncConnections({connectToFirstConnector:!r,caipNetwork:n})}))}async syncAdapterConnection(e){let t=this.getAdapter(e),r=this.getCaipNetwork(e),n=o.a.getConnectorId(e),i=o.a.getConnectors(e).find(e=>e.id===n);try{if(!t||!i)throw Error(`Adapter or connector not found for namespace ${e}`);if(!r?.id)throw Error("CaipNetwork not found");let n=await t?.syncConnection({namespace:e,id:i.id,chainId:r.id,rpcUrl:r?.rpcUrls?.default?.http?.[0]});n?(this.syncProvider({...n,chainNamespace:e}),await this.syncAccount({...n,chainNamespace:e}),this.setStatus("connected",e),l.E.sendEvent({type:"track",event:"CONNECT_SUCCESS",address:n.address,properties:{method:"browser",name:i.info?.name||i.name||"Unknown",reconnect:!0,view:c.I.state.view,walletRank:i?.explorerWallet?.order}})):this.setStatus("disconnected",e)}catch(t){this.onDisconnectNamespace({chainNamespace:e,closeModal:!1})}}async syncWalletConnectAccount(){let e=Object.keys(this.universalProvider?.session?.namespaces||{}),t=this.chainNamespaces.map(async t=>{let r=this.getAdapter(t);if(!r)return;let i=this.universalProvider?.session?.namespaces?.[t]?.accounts||[],a=m.W.state.activeCaipNetwork?.id,s=i.find(e=>{let{chainId:t}=O.C.parseCaipAddress(e);return t===a?.toString()})||i[0];if(s){let e=O.C.validateCaipAddress(s),{chainId:i,address:a}=O.C.parseCaipAddress(e);if(v.G.setProviderId(t,C.o.CONNECTOR_TYPE_WALLET_CONNECT),this.caipNetworks&&m.W.state.activeCaipNetwork&&r.namespace!==n.o.CHAIN.EVM){let e=r.getWalletConnectProvider({caipNetworks:this.getCaipNetworks(),provider:this.universalProvider,activeCaipNetwork:m.W.state.activeCaipNetwork});v.G.setProvider(t,e)}else v.G.setProvider(t,this.universalProvider);o.a.setConnectorId(n.o.CONNECTOR_ID.WALLET_CONNECT,t),y.i.addConnectedNamespace(t),await this.syncAccount({address:a,chainId:i,chainNamespace:t})}else e.includes(t)&&this.setStatus("disconnected",t);let l=this.getApprovedCaipNetworksData();this.syncConnectedWalletInfo(t),m.W.setApprovedCaipNetworksData(t,{approvedCaipNetworkIds:l.approvedCaipNetworkIds,supportsAllNetworks:l.supportsAllNetworks})});await Promise.all(t)}syncProvider({type:e,provider:t,id:r,chainNamespace:n}){v.G.setProviderId(n,e),v.G.setProvider(n,function(e){var t;let{connectorId:r,chainNamespace:n,provider:i}=e;return"eip155"===n&&"string"==typeof(t=r)&&t.toLowerCase().includes("coinbase")&&"object"==typeof i&&null!==i?function(e){if(!e||"function"!=typeof e.request||e[F])return e;let t=H.get(e);if(t)return t;async function r(t){try{return await e.request(t)}catch(r){if(!function e(t,r=0){return!!t&&"object"==typeof t&&!(r>5)&&(!!(4100===t.code||"string"==typeof t.message&&t.message.includes("eth_requestAccounts"))||!!t.cause&&t.cause!==t&&e(t.cause,r+1))}(r))throw r;return await e.request({method:"eth_requestAccounts"}),"eth_sendTransaction"===t.method&&await z(e),e.request(t)}}let n=new Proxy(e,{get(e,t){if(t===F)return!0;if("request"===t)return r;let n=Reflect.get(e,t,e);return"function"==typeof n?n.bind(e):n}});return H.set(e,n),n}(i):i}({connectorId:r,chainNamespace:n,provider:t})),o.a.setConnectorId(r,n)}async syncAccount(e){let t=e.chainNamespace===m.W.state.activeChain,r=m.W.getCaipNetworkByNamespace(e.chainNamespace,e.chainId),{address:i,chainId:a,chainNamespace:s}=e,{chainId:o}=y.i.getActiveNetworkProps(),l=r?.id||o,c=m.W.state.activeCaipNetwork?.name===n.o.UNSUPPORTED_NETWORK_NAME,u=m.W.getNetworkProp("supportsAllNetworks",s);if(this.setStatus("connected",s),(!c||u)&&l){let e=this.getCaipNetworks().find(e=>e.id.toString()===l.toString()),o=this.getCaipNetworks().find(e=>e.chainNamespace===s);if(!u&&!e&&!o){let t=this.getApprovedCaipNetworkIds()||[],r=t.find(e=>O.C.parseCaipNetworkId(e)?.chainId===l.toString()),n=t.find(e=>O.C.parseCaipNetworkId(e)?.chainNamespace===s);e=this.getCaipNetworks().find(e=>e.caipNetworkId===r),o=this.getCaipNetworks().find(e=>e.caipNetworkId===n||"deprecatedCaipNetworkId"in e&&e.deprecatedCaipNetworkId===n)}let c=e||o;c?.chainNamespace===m.W.state.activeChain?f.H.state.enableNetworkSwitch&&!f.H.state.allowUnsupportedChain&&m.W.state.activeCaipNetwork?.name===n.o.UNSUPPORTED_NETWORK_NAME?m.W.showUnsupportedChainUI():this.setCaipNetwork(c):!t&&r&&this.setCaipNetworkOfNamespace(r,s),this.syncConnectedWalletInfo(s);let d=this.getAddress(s);E.y.isLowerCaseMatch(i,d)||this.syncAccountInfo(i,c?.id,s),t?await this.syncBalance({address:i,chainId:c?.id,chainNamespace:s}):await this.syncBalance({address:i,chainId:r?.id,chainNamespace:s}),this.syncIdentity({address:i,chainId:a,chainNamespace:s}).catch(()=>null)}}async syncAccountInfo(e,t,r){let n=this.getCaipAddress(r),i=t||n?.split(":")[1];if(!i)return;let a=`${r}:${i}:${e}`;this.setCaipAddress(a,r,!0),await this.syncIdentity({address:e,chainId:i,chainNamespace:r})}async syncReownName(e,t){try{let r=await this.getReownName(e);
4939if(r[0]){let e=r[0];this.setProfileName(e.name,t)}else this.setProfileName(null,t)}catch{this.setProfileName(null,t)}}syncConnectedWalletInfo(e){let t=o.a.getConnectorId(e),r=v.G.getProviderId(e);if(r===C.o.CONNECTOR_TYPE_ANNOUNCED||r===C.o.CONNECTOR_TYPE_INJECTED){if(t){let r=this.getConnectors().find(e=>{let r=e.id===t,n=e.info?.rdns===t,i=e.connectors?.some(e=>e.id===t||e.info?.rdns===t);return r||n||!!i});if(r){let{info:t,name:n,imageUrl:i}=r,a=i||this.getConnectorImage(r);this.setConnectedWalletInfo({name:n,icon:a,...t},e)}}}else if(r===C.o.CONNECTOR_TYPE_WALLET_CONNECT){let t=v.G.getProvider(e);t?.session&&this.setConnectedWalletInfo({...t.session.peer.metadata,name:t.session.peer.metadata.name,icon:t.session.peer.metadata.icons?.[0]},e)}else if(t&&(t===n.o.CONNECTOR_ID.COINBASE_SDK||t===n.o.CONNECTOR_ID.COINBASE||t===n.o.CONNECTOR_ID.BASE_ACCOUNT)){let r=this.getConnectors().find(e=>e.id===t),i=t===n.o.CONNECTOR_ID.BASE_ACCOUNT?"Base Account":"Coinbase Wallet",a=r?.name||i,s=r?.imageUrl||this.getConnectorImage(r),o=r?.info;this.setConnectedWalletInfo({...o,name:a,icon:s},e)}}async syncBalance(e){_.L.getNetworksByNamespace(this.getCaipNetworks(),e.chainNamespace).find(t=>t.id.toString()===e.chainId?.toString())&&e.chainId&&await this.updateNativeBalance(e.address,e.chainId,e.chainNamespace)}async ready(){await this.readyPromise}async updateNativeBalance(e,t,r){let n=this.getAdapter(r),i=m.W.getCaipNetworkByNamespace(r,t);if(n){let a=await n.getBalance({address:e,chainId:t,caipNetwork:i,tokens:this.options.tokens});return this.setBalance(a.balance,a.symbol,r),a}}async initializeUniversalAdapter(){let e=er.createLogger((e,...t)=>{e&&this.handleAlertError(e),console.error(...t)}),t={projectId:this.options?.projectId,metadata:{name:this.options?.metadata?this.options?.metadata.name:"",description:this.options?.metadata?this.options?.metadata.description:"",url:this.options?.metadata?this.options?.metadata.url:"",icons:this.options?.metadata?this.options?.metadata.icons:[""]},logger:e};f.H.setManualWCControl(!!this.options?.manualWCControl),this.universalProvider=this.options.universalProvider??await P.A.init(t);let r=this.universalProvider.disconnect.bind(this.universalProvider);this.universalProvider.disconnect=async()=>{try{return await r()}catch(e){if(e instanceof Error&&e.message.includes("Missing or invalid. Record was recently deleted"))return;throw e}},!1===f.H.state.enableReconnect&&this.universalProvider.session&&await this.universalProvider.disconnect(),this.listenWalletConnect()}listenWalletConnect(){this.universalProvider&&this.chainNamespaces.forEach(e=>{L.k.listenWcProvider({universalProvider:this.universalProvider,namespace:e,onDisplayUri:e=>{u.x.setUri(e)},onConnect:e=>{let{address:t}=b.w.getAccount(e[0]);for(let e of this.chainNamespaces)y.i.removeDisconnectedConnectorId(n.o.CONNECTOR_ID.WALLET_CONNECT,e);u.x.finalizeWcConnection(t)},onDisconnect:()=>{m.W.state.noAdapters&&this.resetAccount(e),u.x.resetWcConnection()},onChainChanged:t=>{let r=m.W.state.activeChain,i=r&&o.a.state.activeConnectorIds[r]===n.o.CONNECTOR_ID.WALLET_CONNECT;if(r===e&&(m.W.state.noAdapters||i)){let e=this.getCaipNetworks().find(e=>e.id.toString()===t.toString()||e.caipNetworkId.toString()===t.toString()),r=this.getCaipNetwork();if(!e)return void this.setUnsupportedNetwork(t);r?.id.toString()!==e?.id.toString()&&r?.chainNamespace===e?.chainNamespace&&this.setCaipNetwork(e)}},onAccountsChanged:t=>{let r=m.W.state.activeChain,i=r&&o.a.state.activeConnectorIds[r]===n.o.CONNECTOR_ID.WALLET_CONNECT;if(r===e&&(m.W.state.noAdapters||i)){let e=t?.[0];e&&this.syncAccount({address:e.address,chainId:e.chainId,chainNamespace:e.chainNamespace})}}})})}createUniversalProvider(){return!this.universalProviderInitPromise&&b.w.isClient()&&this.options?.projectId&&(this.universalProviderInitPromise=this.initializeUniversalAdapter()),this.universalProviderInitPromise}
4939async getUniversalProvider(){if(!this.universalProvider)try{await this.createUniversalProvider()}catch(e){l.E.sendEvent({type:"error",event:"INTERNAL_SDK_ERROR",properties:{errorType:"UniversalProviderInitError",errorMessage:e instanceof Error?e.message:"Unknown",uncaught:!1}}),console.error("AppKit:getUniversalProvider - Cannot create provider",e)}return this.universalProvider}getDisabledCaipNetworks(){let e=m.W.getAllApprovedCaipNetworkIds(),t=m.W.getAllRequestedCaipNetworks();return b.w.sortRequestedNetworks(e,t).filter(e=>m.W.isCaipNetworkDisabled(e))}handleAlertError(e){let[t,r]=Object.entries(A.R.UniversalProviderErrors).find(([,{message:t}])=>e.message.includes(t))??[],{message:n,alertErrorKey:i}=r??{};if(t&&n&&!this.reportedAlertErrors[t]){let e=A.R.ALERT_ERRORS[i];e&&(w.h.open(e,"error"),this.reportedAlertErrors[t]=!0)}}getAdapter(e){if(e)return this.chainAdapters?.[e]}createAdapter(e){if(!e)return;let t=e.namespace;t&&(this.createClients(),e.namespace=t,e.construct({namespace:t,projectId:this.options?.projectId,networks:this.caipNetworks?.filter(({chainNamespace:e})=>e===t)}),this.chainNamespaces.includes(t)||this.chainNamespaces.push(t),this.chainAdapters&&(this.chainAdapters[t]=e))}async open(e){await this.injectModalUi(),e?.uri&&u.x.setUri(e.uri);let{isSwap:t,isSend:r}=this.toModalOptions();return t(e)?U.W.open({...e,data:{swap:e.arguments}}):r(e)&&e.arguments?this.openSend(e.arguments):U.W.open(e)}async close(){await this.injectModalUi(),U.W.close()}setLoading(e,t){U.W.setLoading(e,t)}async disconnect(e){await u.x.disconnect({namespace:e})}async fetchWallets(e){await Z.fetchWallets(e)}getWalletList(){return Z.getWalletList()}subscribeWalletList(e){return Z.subscribeWalletList(e)}async prefetchWalletConnectUri(e){await Z.prefetchWalletConnectUri(e)}getWalletConnectUri(){return Z.getWalletConnectUri()}subscribeWalletConnectUri(e){return Z.subscribeWalletConnectUri(e)}resetWalletConnectUri(){Z.resetWcUri()}resetConnectingWallet(){Z.resetConnectingWallet()}async connectWallet(e,t,r){await Z.connect(e,t,r)}getSIWX(){return f.H.state.siwx}getError(){return""}getChainId(){return m.W.state.activeCaipNetwork?.id}async switchNetwork(e,{throwOnFailure:t=!1}={}){let r=this.getCaipNetworks().find(t=>t.id===e.id);if(!r)return void w.h.open(A.R.ALERT_ERRORS.SWITCH_NETWORK_NOT_FOUND,"error");await m.W.switchActiveNetwork(r,{throwOnFailure:t})}getWalletProvider(){return m.W.state.activeChain?v.G.state.providers[m.W.state.activeChain]:null}getWalletProviderType(){return v.G.getProviderId(m.W.state.activeChain)}subscribeProviders(e){return v.G.subscribeProviders(e)}getThemeMode(){return g.W.state.themeMode}getThemeVariables(){return g.W.state.themeVariables}setThemeMode(e){g.W.setThemeMode(e),(0,Y.JX)(g.W.state.themeMode)}setTermsConditionsUrl(e){f.H.setTermsConditionsUrl(e)}setPrivacyPolicyUrl(e){f.H.setPrivacyPolicyUrl(e)}setThemeVariables(e){g.W.setThemeVariables(e),(0,Y.ds)(g.W.state.themeVariables)}subscribeTheme(e){return g.W.subscribe(e)}subscribeConnections(e){return this.remoteFeatures.multiWallet?u.x.subscribe(e):(w.h.open(n.o.REMOTE_FEATURES_ALERTS.MULTI_WALLET_NOT_ENABLED.DEFAULT,"info"),()=>void 0)}getWalletInfo(e){if(e)return m.W.state.chains.get(e)?.accountState?.connectedWalletInfo;let t=m.W.getAccountData();return t?.connectedWalletInfo}getAccount(e){let t=e||m.W.state.activeChain,r=o.a.getAuthConnector(t),i=m.W.getAccountData(t),a=y.i.getConnectedConnectorId(m.W.state.activeChain),l=u.x.getConnections(t);if(!t)throw Error("AppKit:getAccount - namespace is required");let c=m.W.getActiveCaipNetwork(t),d=l.flatMap(e=>{let t=e.caipNetwork??c;return t?e.accounts.map(({address:e,type:r,publicKey:n})=>b.w.createAccount({caipAddress:`${t.caipNetworkId}:${e}`,type:r||"eoa",publicKey:n})):[]});if(i)return{allAccounts:d,caipAddress:i.caipAddress,address:b.w.getPlainAddress(i.caipAddress),isConnected:!!i.caipAddress,status:i.status,embeddedWalletInfo:r&&a===n.o.CONNECTOR_ID.AUTH?{user:i.user?{...i.user,username:y.i.getConnectedSocialUsername()}:void 0,authProvider:i.socialProvider||"email",accountType:(0,s.lj)(t),isSmartAccountDeployed:!!i.smartAccountDeployed}:void 0}}subscribeAccount(e,t){let r=[],n=()=>{let r=this.getAccount(t);r&&e(r)};if(t){let e=m.W.subscribeChainProp("accountState",n,t);r.push(e)}else{let e=m.W.subscribe(n);
4939r.push(e)}let i=o.a.subscribe(n);return r.push(i),()=>{r.forEach(e=>e())}}subscribeNetwork(e){return m.W.subscribe(({activeCaipNetwork:t,activeChain:r,chains:n})=>{let i=r?n.get(r)?.networkState:void 0;e({caipNetwork:t,chainId:t?.id,caipNetworkId:t?.caipNetworkId,approvedCaipNetworkIds:i?.approvedCaipNetworkIds,supportsAllNetworks:i?.supportsAllNetworks??!0})})}subscribeWalletInfo(e,t){return t?m.W.subscribeChainProp("accountState",t=>e(t?.connectedWalletInfo),t):m.W.subscribeChainProp("accountState",t=>e(t?.connectedWalletInfo))}subscribeShouldUpdateToAddress(e){return m.W.subscribeChainProp("accountState",t=>e(t?.shouldUpdateToAddress))}subscribeCaipNetworkChange(e){return m.W.subscribeKey("activeCaipNetwork",e)}getState(){return d.z.state}getRemoteFeatures(){return f.H.state.remoteFeatures}subscribeState(e){return d.z.subscribe(e)}subscribeRemoteFeatures(e){return f.H.subscribeKey("remoteFeatures",e)}showErrorMessage(e){J.P.showError(e)}showSuccessMessage(e){J.P.showSuccess(e)}getEvent(){return{...l.E.state}}subscribeEvents(e){return l.E.subscribe(e)}replace(e){c.I.replace(e)}redirect(e){c.I.push(e)}popTransactionStack(e){c.I.popTransactionStack(e)}isOpen(){return U.W.state.open}isTransactionStackEmpty(){return 0===c.I.state.transactionStack.length}static getInstance(){return this.instance}updateFeatures(e){f.H.setFeatures(e)}updateRemoteFeatures(e){f.H.setRemoteFeatures(e)}updateOptions(e){let t={...f.H.state||{},...e};f.H.setOptions(t)}setConnectMethodsOrder(e){f.H.setConnectMethodsOrder(e)}setWalletFeaturesOrder(e){f.H.setWalletFeaturesOrder(e)}setCollapseWallets(e){f.H.setCollapseWallets(e)}setSocialsOrder(e){f.H.setSocialsOrder(e)}getConnectMethodsOrder(){return q.A.getConnectOrderMethod(f.H.state.features,o.a.getConnectors())}addNetwork(e,t){if(this.chainAdapters&&!this.chainAdapters[e])throw Error(`Adapter for namespace ${e} doesn't exist`);let r=this.extendCaipNetwork(t,this.options);this.getCaipNetworks().find(e=>e.id===r.id)||m.W.addNetwork(r)}removeNetwork(e,t){if(this.chainAdapters&&!this.chainAdapters[e])throw Error(`Adapter for namespace ${e} doesn't exist`);this.getCaipNetworks().find(e=>e.id===t)&&m.W.removeNetwork(e,t)}}let ep=!1;class ef extends eh{async onAuthProviderConnected(e){let t=E.y.userChainIdToChainNamespace(e?.chainId);if(e.message&&e.signature&&e.siwxMessage&&await a.U.addEmbeddedWalletSession({chainId:e.siwxMessage.chainId,accountAddress:e.address,notBefore:e.siwxMessage.notBefore,statement:e.siwxMessage.statement,resources:e.siwxMessage.resources,requestId:e.siwxMessage.requestId,issuedAt:e.siwxMessage.issuedAt,domain:e.siwxMessage.domain,uri:e.siwxMessage.uri,version:e.siwxMessage.version,nonce:e.siwxMessage.nonce},e.message,e.signature),!t)throw Error("AppKit:onAuthProviderConnected - namespace is required");let r=t===n.o.CHAIN.EVM?`eip155:${e.chainId}:${e.address}`:`${e.chainId}:${e.address}`,i=f.H.state.defaultAccountTypes[t],o=(0,s.lj)(t),l=e.preferredAccountType||o||i;this.setCaipAddress(r,t);let{signature:c,siwxMessage:u,message:d,...h}=e,p=m.W.getAccountData(t);this.setUser({...p?.user||{},...h},t),this.setSmartAccountDeployed(!!e.smartAccountDeployed,t),this.setPreferredAccountType(l,t),await Promise.all([this.syncAuthConnectorTheme(this.authProvider),this.syncAccount({address:e.address,chainId:e.chainId,chainNamespace:t})]),this.setLoading(!1,t)}setupAuthConnectorListeners(e){e.onRpcRequest(t=>{x.Q.checkIfRequestExists(t)?x.Q.checkIfRequestIsSafe(t)||this.handleUnsafeRPCRequest():(this.open(),console.error(I.Vl.RPC_METHOD_NOT_ALLOWED_MESSAGE,{method:t.method}),setTimeout(()=>{this.showErrorMessage(I.Vl.RPC_METHOD_NOT_ALLOWED_UI_MESSAGE)},300),e.rejectRpcRequests())}),e.onRpcError(()=>{this.isOpen()&&(this.isTransactionStackEmpty()?this.close():this.popTransactionStack("error"))}),e.onRpcSuccess((e,t)=>{let r=x.Q.checkIfRequestIsSafe(t),n=this.getAddress(),i=m.W.state.activeCaipNetwork;r||(n&&i?.id&&this.updateNativeBalance(n,i.id,i.chainNamespace),this.isTransactionStackEmpty()?this.close():this.popTransactionStack("success"))}),e.onNotConnected(()=>{let e=m.W.state.activeChain;if(!e)throw Error("AppKit:onNotConnected - namespace is required");o.a.getConnectorId(e)===n.o.CONNECTOR_ID.AUTH&&(this.setCaipAddress(null,e),this.setLoading(!1,e))}),e.onConnect(this.onAuthProviderConnected.bind(this)),e.onSocialConnected(this.onAuthProviderConnected.bind(this)),e.onSetPreferredAccount(({address:e,type:t})=>{let r=m.W.state.activeChain;if(!r)throw Error("AppKit:onSetPreferredAccount - namespace is required");e&&this.setPreferredAccountType(t,r)})}async syncAuthConnectorTheme(e){if(!e)return;let t=g.W.getSnapshot();await e.syncTheme({themeMode:t.themeMode,themeVariables:t.themeVariables,w3mThemeVariables:(0,i.o)(t.themeVariables,t.themeMode)})}async syncAuthConnector(e,t){let r=n.o.AUTH_CONNECTOR_SUPPORTED_CHAINS.includes(t),i=t===m.W.state.activeChain;if(!r)return;this.setLoading(!0,t);let a=e.getLoginEmailUsed();this.setLoading(a,t),a&&this.setStatus("connecting",t);let s=e.getEmail(),u=e.getUsername(),d=m.W.getAccountData(t)?.user||{};this.setUser({...d,username:u,email:s},t),this.setupAuthConnectorListeners(e);let{isConnected:h}=await e.isConnected();if(t&&r&&i)if(h&&this.connectionControllerClient?.connectExternal){await e.init(
4939),await this.syncAuthConnectorTheme(e),await this.connectionControllerClient?.connectExternal({id:n.o.CONNECTOR_ID.AUTH,info:{name:n.o.CONNECTOR_ID.AUTH},type:C.o.CONNECTOR_TYPE_AUTH,provider:e,chainId:m.W.getNetworkData(t)?.caipNetwork?.id,chain:t}),this.setStatus("connected",t);let r=y.i.getConnectedSocialProvider();r?l.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_SUCCESS",address:this.getAddress(),properties:{provider:r,reconnect:!0}}):l.E.sendEvent({type:"track",event:"CONNECT_SUCCESS",address:this.getAddress(),properties:{method:"email",name:this.universalProvider?.session?.peer?.metadata?.name||"Unknown",reconnect:!0,view:c.I.state.view,walletRank:void 0}})}else o.a.getConnectorId(t)===n.o.CONNECTOR_ID.AUTH&&(this.setStatus("disconnected",t),y.i.removeConnectedNamespace(t));this.setLoading(!1,t)}async checkExistingTelegramSocialConnection(e){try{if(!b.w.isTelegram())return;let t=y.i.getTelegramSocialProvider();if(!t||!b.w.isClient())return;let r=new URL(window.location.href).searchParams.get("result_uri");if(!r)return;t&&m.W.setAccountProp("socialProvider",t,e),await this.authProvider?.init();let n=o.a.getAuthConnector();t&&n&&(this.setLoading(!0,e),await u.x.connectExternal({id:n.id,type:n.type,socialUri:r},n.chain),y.i.setConnectedSocialProvider(t),y.i.removeTelegramSocialProvider(),l.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_SUCCESS",properties:{provider:t}}))}catch(t){this.setLoading(!1,e),console.error("checkExistingSTelegramocialConnection error",t)}try{let e=new URL(window.location.href);e.searchParams.delete("result_uri"),window.history.replaceState({},document.title,e.toString())}catch(e){console.error("tma social login failed",e)}}createAuthProvider(e){if(!n.o.AUTH_CONNECTOR_SUPPORTED_CHAINS.includes(e))return;let t=this.remoteFeatures?.email,r=Array.isArray(this.remoteFeatures?.socials)&&this.remoteFeatures.socials.length>0,i=E.y.getActiveNamespaceConnectedToAuth()||e;!this.authProvider&&this.options?.projectId&&(t||r)&&(this.authProvider=T.getInstance({projectId:this.options.projectId,enableLogger:this.options.enableAuthLogger,chainId:this.getCaipNetwork(i)?.caipNetworkId,abortController:A.R.EmbeddedWalletAbortController,onTimeout:e=>{"iframe_load_failed"===e?w.h.open(A.R.ALERT_ERRORS.IFRAME_LOAD_FAILED,"error"):"iframe_request_timeout"===e?w.h.open(A.R.ALERT_ERRORS.IFRAME_REQUEST_TIMEOUT,"error"):"unverified_domain"===e&&w.h.open(A.R.ALERT_ERRORS.UNVERIFIED_DOMAIN,"error")},getActiveCaipNetwork:e=>(0,s.kg)(e),getCaipNetworks:e=>m.W.getCaipNetworks(e)}),d.z.subscribeOpen(e=>{!e&&this.isTransactionStackEmpty()&&this.authProvider?.rejectRpcRequests()}));let a=e===m.W.state.activeChain&&f.H.state.enableReconnect;!1===f.H.state.enableReconnect?this.syncAuthConnectorTheme(this.authProvider):this.authProvider&&a&&(this.syncAuthConnector(this.authProvider,e),this.checkExistingTelegramSocialConnection(e))}createAuthProviderForAdapter(e){this.createAuthProvider(e),this.authProvider&&this.chainAdapters?.[e]?.setAuthProvider?.(this.authProvider)}initControllers(e){super.initControllers(e),this.options.excludeWalletIds&&h.N.initializeExcludedWallets({ids:this.options.excludeWalletIds})}async switchCaipNetwork(e){if(!e)return;let t=m.W.state.activeChain,r=e.chainNamespace,i=this.getAddressByChainNamespace(r);if(r===t&&m.W.getAccountData(r)?.caipAddress){let t=this.getAdapter(r);await t?.switchNetwork({caipNetwork:e}),this.setCaipNetwork(e)}else{let a=v.G.getProviderId(t)===C.o.CONNECTOR_TYPE_AUTH,s=v.G.getProviderId(r),o=s===C.o.CONNECTOR_TYPE_AUTH,l=n.o.AUTH_CONNECTOR_SUPPORTED_CHAINS.includes(r);if(!r)throw Error("AppKit:switchCaipNetwork - networkNamespace is required");if((a&&void 0===s||o)&&l)try{if(m.W.state.activeChain=e.chainNamespace,i){let t=this.getAdapter(r);await t?.switchNetwork({caipNetwork:e})}else await this.connectionControllerClient?.connectExternal?.({id:n.o.CONNECTOR_ID.AUTH,provider:this.authProvider,chain:r,chainId:e.id,type:C.o.CONNECTOR_TYPE_AUTH,caipNetwork:e});this.setCaipNetwork(e)}catch(n){let t=this.getAdapter(r);await t?.switchNetwork({caipNetwork:e})}else if(s===C.o.CONNECTOR_TYPE_WALLET_CONNECT){if(!m.W.state.noAdapters){let t=this.getAdapter(r);await t?.switchNetwork({caipNetwork:e})}this.setCaipNetwork(e),this.syncWalletConnectAccount()}else this.setCaipNetwork(e),i&&this.syncAccount({address:i,chainId:e.id,chainNamespace:r})}}async initialize(e){await super.initialize(e),this.chainNamespaces?.forEach(e
4939=>{this.createAuthProviderForAdapter(e)}),await this.injectModalUi(),d.z.set({initialized:!0})}async syncIdentity({address:e,chainId:t,chainNamespace:r}){if(r!==n.o.CHAIN.EVM)return;let i=`${r}:${t}`,a=this.caipNetworks?.find(e=>e.caipNetworkId===i);if(a?.testnet){this.setProfileName(null,r),this.setProfileImage(null,r);return}let s=o.a.getConnectorId(r)===n.o.CONNECTOR_ID.AUTH;try{let{name:t,avatar:n}=await this.fetchIdentity({address:e});!t&&s?await this.syncReownName(e,r):(this.setProfileName(t,r),this.setProfileImage(n,r))}catch{1!==t&&this.setProfileImage(null,r)}}syncConnectedWalletInfo(e){let t=v.G.getProviderId(e);if(t===C.o.CONNECTOR_TYPE_AUTH){let r=this.authProvider;if(r){let n=y.i.getConnectedSocialProvider()??"email",i=r.getEmail()??r.getUsername();this.setConnectedWalletInfo({name:t,identifier:i,social:n},e)}}else super.syncConnectedWalletInfo(e)}async injectModalUi(){if(!b.w.isClient())return;let e={...p.oU.DEFAULT_FEATURES,...this.options.features};if(!e.headless&&!ep)try{let t=this.remoteFeatures;if(await this.loadModalComponents(e,t),b.w.isClient()&&!document.querySelector("w3m-modal")){let e=document.createElement("w3m-modal");f.H.state.disableAppend||f.H.state.enableEmbedded||document.body.insertAdjacentElement("beforeend",e)}ep=!0}catch(e){console.error("Error injecting modal UI:",e)}}async loadModalComponents(e,t){if(!b.w.isClient())return;let n=[];(t.email||t.socials&&t.socials.length>0)&&n.push(r.e(874).then(r.bind(r,40874))),t.email&&n.push(r.e(850).then(r.bind(r,80850))),t.socials&&n.push(r.e(4320).then(r.bind(r,74320))),t.swaps&&t.swaps.length>0&&n.push(Promise.all([r.e(615),r.e(37)]).then(r.bind(r,22418))),e.send&&n.push(Promise.all([r.e(615),r.e(4762)]).then(r.bind(r,24762))),e.receive&&n.push(r.e(5852).then(r.bind(r,5852))),t.onramp&&t.onramp.length>0&&n.push(r.e(7897).then(r.bind(r,77897))),t.payWithExchange&&n.push(r.e(1840).then(r.bind(r,91840))),t.activity&&n.push(r.e(1861).then(r.bind(r,51861))),(e.pay||t.payments)&&n.push(r.e(9957).then(r.bind(r,9957))),t.emailCapture&&n.push(r.e(4678).then(r.bind(r,64678))),await Promise.all([...n,Promise.resolve().then(r.bind(r,12249)),Promise.all([r.e(615),r.e(9957),r.e(4598)]).then(r.bind(r,14598))])}}},31480:(e,t,r)=>{"use strict";r.d(t,{L:()=>i});var n=r(57873);let i={ConnectorExplorerIds:{[n.o.CONNECTOR_ID.COINBASE]:"d0ca99ff52b99abc48743dad0f7fc891e041be73574f7fac4afe5d4bb83845c8",[n.o.CONNECTOR_ID.COINBASE_SDK]:"d0ca99ff52b99abc48743dad0f7fc891e041be73574f7fac4afe5d4bb83845c8",[n.o.CONNECTOR_ID.BASE_ACCOUNT]:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",[n.o.CONNECTOR_ID.SAFE]:"225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f",[n.o.CONNECTOR_ID.LEDGER]:"19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927",[n.o.CONNECTOR_ID.OKX]:"971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709",[n.o.METMASK_CONNECTOR_NAME]:"c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96",[n.o.TRUST_CONNECTOR_NAME]:"4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0",[n.o.SOLFLARE_CONNECTOR_NAME]:"1ca0bdd4747578705b1939af023d120677c64fe6ca76add81fda36e350605e79",[n.o.PHANTOM_CONNECTOR_NAME]:"a797aa35c0fadbfc1a53e7f675162ed5226968b44a19ee3d24385c64d1d3c393",[n.o.COIN98_CONNECTOR_NAME]:"2a3c89040ac3b723a1972a33a125b1db11e258a6975d3a61252cd64e6ea5ea01",[n.o.MAGIC_EDEN_CONNECTOR_NAME]:"8b830a2b724a9c3fbab63af6f55ed29c9dfa8a55e732dc88c80a196a2ba136c6",[n.o.BACKPACK_CONNECTOR_NAME]:"2bd8c14e035c2d48f184aaa168559e86b0e3433228d3c4075900a221785019b0",[n.o.BITGET_CONNECTOR_NAME]:"38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662",[n.o.FRONTIER_CONNECTOR_NAME]:"85db431492aa2e8672e93f4ea7acf10c88b97b867b0d373107af63dc4880f041",[n.o.XVERSE_CONNECTOR_NAME]:"2a87d74ae02e10bdd1f51f7ce6c4e1cc53cd5f2c0b6b5ad0d7b3007d2b13de7b",[n.o.LEATHER_CONNECTOR_NAME]:"483afe1df1df63daf313109971ff3ef8356ddf1cc4e45877d205eee0b7893a13",[n.o.OKX_CONNECTOR_NAME]:"971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709",[n.o.BINANCE_CONNECTOR_NAME]:"2fafea35bb471d22889ccb49c08d99dd0a18a37982602c33f696a5723934ba25"},NetworkImageIds:{1:"ba0ba0cd-17c6-4806-ad93-f9d174f17900",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",5e3:"e86fae9b-b770-4eea-e520-150e12c81100",295:"6a97d510-cac8-4e58-c7ce-e8681b044c00",0xaa36a7:"e909ea0a-f92a-4512-c8fc-748044ea6800",84532:"a18a7ecd-e307-4360-4746-283182228e00",1301:"4eeea7ef-0014-4649-5d1d-07271a80f600",130:"2257980a-3463-48c6-cbac-a42d2a956e00",10143:"0a728e83-bacb-46db-7844-948f05434900",143:"0a728e83-bacb-46db-7844-948f05434900",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",0x4e454152:"3ff73439-a619-4894-9262-4470c773a100",2020:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00",2021:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00",80094:"e329c2c9-59b0-4a02-83e4-212ff3779900",2741:"fc2427d1-5af9-4a9c-8da5-6f94627cd900","5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":"a1b58899-f671-4276-6a5e-56ca5bd59700","4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z":"a1b58899-f671-4276-6a5e-56ca5bd59700",EtWTRABZaYq6iMfeYKouRu166VU2xqa1:"a1b58899-f671-4276-6a5e-56ca5bd59700","000000000019d6689c085ae165831e93":"0b4838db-0161-4ffe-022d-532bf03dba00","000000000933ea01ad0ee984209779ba":"39354064-d79b-420b-065d-f980c4b78200","00000008819873e925422c1ff0f99f7c":"b3406e4a-bbfc-44fb-e3a6-89673c78b700","-239":"20f673c0-095e-49b2-07cf-eb5049dcf600","-3":"20f673c0-095e-49b2-07cf-eb5049dcf600","0x2b6653dc":"3502bb86-cc4e-420f-a387-59ea63a28b00","0x94a9059e":"3502bb86-cc4e-420f-a387-59ea63a28b00","0xcd8690dc":"3502bb86-cc4e-420f-a387-59ea63a28b00"},ConnectorImageIds:{[n.o.CONNECTOR_ID.COINBASE]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[n.o.CONNECTOR_ID.COINBASE_SDK]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[n.o.CONNECTOR_ID.BASE_ACCOUNT]:"bba2c8be-7fd1-463e-42b1-796ecb0ad200",[n.o.CONNECTOR_ID.SAFE]:"461db637-8616-43ce-035a-d89b8a1d5800",[n.o.CONNECTOR_ID.LEDGER]:"54a1aa77-d202-4f8d-0fb2-5d2bb6db0300",[n.o.CONNECTOR_ID.WALLET_CONNECT]:"ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400",[n.o.CONNECTOR_ID.INJECTED]:"07ba87ed-43aa-4adf-454
49390-9e6a2b9cae00"},ConnectorNamesMap:{[n.o.CONNECTOR_ID.INJECTED]:"Browser Wallet",[n.o.CONNECTOR_ID.WALLET_CONNECT]:"WalletConnect",[n.o.CONNECTOR_ID.COINBASE]:"Coinbase",[n.o.CONNECTOR_ID.COINBASE_SDK]:"Coinbase",[n.o.CONNECTOR_ID.BASE_ACCOUNT]:"Base Account",[n.o.CONNECTOR_ID.LEDGER]:"Ledger",[n.o.CONNECTOR_ID.SAFE]:"Safe"},ConnectorTypesMap:{[n.o.CONNECTOR_ID.INJECTED]:"INJECTED",[n.o.CONNECTOR_ID.WALLET_CONNECT]:"WALLET_CONNECT",[n.o.CONNECTOR_ID.EIP6963]:"ANNOUNCED",[n.o.CONNECTOR_ID.AUTH]:"AUTH",[n.o.CONNECTOR_ID.COINBASE]:"EXTERNAL",[n.o.CONNECTOR_ID.COINBASE_SDK]:"EXTERNAL",[n.o.CONNECTOR_ID.BASE_ACCOUNT]:"EXTERNAL"},WalletConnectRpcChainIds:[1,5,0xaa36a7,10,420,42161,421613,137,80001,42220,0x4e454152,0x4e454153,56,97,43114,43113,100,8453,84531,7777777,999,324,280]}},31515:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBalance=l;let n=r(83562),i=r(91472),a=r(85926),s=r(527),o=r(55498);async function l(e,t){let{account:r=e.account,decimals:i,token:c,...u}=t;if(!r)throw new a.AccountNotFoundError;let d=(0,n.parseAccount)(r).address,[h,{decimals:p}]=await Promise.all([(0,s.readContract)(e,{...u,...l.call(e,{account:d,token:c})}),(0,o.resolveTokenWithDecimals)(e,{decimals:i,token:c})]);return(0,o.toAmount)(h,p)}(l||(t.getBalance=l={})).call=function(e,t){let r=t.account??e.account;if(!r)throw new a.AccountNotFoundError;let s=(0,n.parseAccount)(r).address;return(0,o.defineCall)({address:(0,o.resolveToken)(e,t).address,abi:i.erc20Abi,functionName:"balanceOf",args:[s]})}},31650:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseErc6492Signature=function(e){if(!(0,i.isErc6492Signature)(e))return{signature:e};let[t,r,a]=(0,n.decodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],e);return{address:t,data:r,signature:a}};let n=r(29060),i=r(12949)},31837:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeExceedsPaddingSizeError=t.SliceOffsetOutOfBoundsError=t.SizeOverflowError=t.InvalidBytesTypeError=t.InvalidBytesBooleanError=void 0,t.assert=d,t.concat=function(...e){let t=0;for(let r of e)t+=r.length;let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let i=e[t];r.set(i,n),n+=i.length}return r},t.from=function(e){return e instanceof Uint8Array?e:"string"==typeof e?p(e):h(e)},t.fromArray=h,t.fromBoolean=function(e,t={}){let{size:r}=t,n=new Uint8Array(1);return(n[0]=Number(e),"number"==typeof r)?(s.assertSize(n,r),f(n,r)):n},t.fromHex=p,t.fromNumber=function(e,t){return p(a.fromNumber(e,t))},t.fromString=function(e,t={}){let{size:r}=t,n=u.encode(e);return"number"==typeof r?(s.assertSize(n,r),m(n,r)):n},t.isEqual=function(e,t){return(0,n.equalBytes)(e,t)},t.padLeft=f,t.padRight=m,t.random=function(e){return crypto.getRandomValues(new Uint8Array(e))},t.size=function(e){return e.length},t.slice=function(e,t,r,n={}){let{strict:i}=n;s.assertStartOffset(e,t);let a=e.slice(t,r);return i&&s.assertEndOffset(a,t,r),a},t.toBigInt=function(e,t={}){let{size:r}=t;void 0!==r&&s.assertSize(e,r);let n=a.fromBytes(e,t);return a.toBigInt(n,t)},t.toBoolean=function(e,t={}){let{size:r}=t,n=e;if(void 0!==r&&(s.assertSize(n,r),n=g(n)),n.length>1||n[0]>1)throw new b(n);return!!n[0]},t.toHex=function(e,t={}){return a.fromBytes(e,t)},t.toNumber=function(e,t={}){let{size:r}=t;void 0!==r&&s.assertSize(e,r);let n=a.fromBytes(e,t);return a.toNumber(n,t)},t.toString=function(e,t={}){let{size:r}=t,n=e;return void 0!==r&&(s.assertSize(n,r),n=y(n)),c.decode(n)},t.trimLeft=g,t.trimRight=y,t.validate=function(e){try{return d(e),!0}catch{return!1}};let n=r(56196),i=r(53937),a=r(70259),s=r(52391),o=r(38693),l=r(71720),c=new TextDecoder,u=new TextEncoder;function d(e){if(!(e instanceof Uint8Array)&&(!e||"object"!=typeof e||!("BYTES_PER_ELEMENT"in e)||1!==e.BYTES_PER_ELEMENT||"Uint8Array"!==e.constructor.name))throw new w(e)}function h(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function p(e,t={}){let{size:r}=t,n=e;r&&(o.assertSize(e,r),n=a.padRight(e,r));let l=n.slice(2);l.length%2&&(l=`0${l}`);let c=l.length/2,u=new Uint8Array(c);for(let e=0,t=0;e<c;e++){let r=s.charCodeToBase16(l.charCodeAt(t++)),n=s.charCodeToBase16(l.charCodeAt(t++));if(void 0===r||void 0===n)throw new i.BaseError(`Invalid byte sequence ("${l[t-2]}${l[t-1]}" in "${l}").`);u[e]=r<<4|n}return u}function f(e,t){return s.pad(e,{dir:"left",size:t})}function m(e,t){return s.pad(e,{dir:"right",size:t})}function g(e){return s.trim(e,{dir:"left"})}function y(e){return s.trim(e,{dir:"right"})}class b extends i.BaseError{constructor(e){super(`Bytes value \`${e}\` is not a valid boolean.`,{metaMessages:["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:"Bytes.InvalidBytesBooleanError"})}}t.InvalidBytesBooleanError=b;class w extends i.BaseError{constructor(e){super(`Value \`${"object"==typeof e?l.stringify(e):e}\` of type \`${typeof e}
4939\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}t.InvalidBytesTypeError=w;class v extends i.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:"Bytes.SizeOverflowError"})}}t.SizeOverflowError=v;class E extends i.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:"Bytes.SliceOffsetOutOfBoundsError"})}}t.SliceOffsetOutOfBoundsError=E;class C extends i.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:"Bytes.SizeExceedsPaddingSizeError"})}}t.SizeExceedsPaddingSizeError=C},31941:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidStructTypeError=t.InvalidPrimaryTypeError=t.InvalidDomainError=void 0;let n=r(68508),i=r(45226);class a extends i.BaseError{constructor({domain:e}){super(`Invalid domain "${(0,n.stringify)(e)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}t.InvalidDomainError=a;class s extends i.BaseError{constructor({primaryType:e,types:t}){super(`Invalid primary type \`${e}\` must be one of \`${JSON.stringify(Object.keys(t))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}t.InvalidPrimaryTypeError=s;class o extends i.BaseError{constructor({type:e}){super(`Struct type "${e}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}t.InvalidStructTypeError=o},32036:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverAuthorizationAddress=a;let n=r(41636),i=r(63058);async function a(e){let{authorization:t,signature:r}=e;return(0,n.recoverAddress)({hash:(0,i.hashAuthorization)(t),signature:r??t})}},32115:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCompactSignature=function({r:e,yParityAndS:t}){return`0x${new n.secp256k1.Signature((0,i.hexToBigInt)(e),(0,i.hexToBigInt)(t)).toCompactHex()}`};let n=r(6792),i=r(14972)},32309:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.commitmentsToVersionedHashes=function(e){let{commitments:t,version:r}=e,i=e.to??("string"==typeof t[0]?"hex":"bytes"),a=[];for(let e of t)a.push((0,n.commitmentToVersionedHash)({commitment:e,to:i,version:r}));return a};let n=r(69546)},32508:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fallbackTransactionErrorMagicIdentifier=t.fallbackMagicIdentifier=void 0,t.sendCalls=h;let n=r(83562),i=r(45226),a=r(69902),s=r(25230),o=r(26504),l=r(14972),c=r(27083),u=r(5449),d=r(60149);async function h(e,r){let{account:h=e.account,chain:p=e.chain,experimental_fallback:f,experimental_fallbackDelay:m=32,forceAtomic:g=!1,id:y,version:b="2.0.0"}=r,w=h?(0,n.parseAccount)(h):null,v=r.capabilities;e.dataSuffix&&!r.capabilities?.dataSuffix&&(v="string"==typeof e.dataSuffix?{...r.capabilities,dataSuffix:{value:e.dataSuffix,optional:!0}}:{...r.capabilities,dataSuffix:{value:e.dataSuffix.value,...e.dataSuffix.required?{}:{optional:!0}}});let E=r.calls.map(e=>{let t=e.abi?(0,s.encodeFunctionData)({abi:e.abi,functionName:e.functionName,args:e.args}):e.data;return{data:e.dataSuffix&&t?(0,o.concat)([t,e.dataSuffix]):t,to:e.to,value:e.value?(0,c.numberToHex)(e.value):void 0}});try{let t=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:g,calls:E,capabilities:v,chainId:(0,c.numberToHex)(p.id),from:w?.address,id:y,version:b}]},{retryCount:0});if("string"==typeof t)return{id:t};return t}catch(n){if(f&&("MethodNotFoundRpcError"===n.name||"MethodNotSupportedRpcError"===n.name||"UnknownRpcError"===n.name||n.details.toLowerCase().includes("does not exist / is not available")||n.details.toLowerCase().includes("missing or invalid. request()")||n.details.toLowerCase().includes("did n
4939ot match any variant of untagged enum")||n.details.toLowerCase().includes("account upgraded to unsupported contract")||n.details.toLowerCase().includes("eip-7702 not supported")||n.details.toLowerCase().includes("unsupported wc_ method")||n.details.toLowerCase().includes("feature toggled misconfigured")||n.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(v&&Object.values(v).some(e=>!e.optional)){let e="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new a.UnsupportedNonOptionalCapabilityError(new i.BaseError(e,{details:e}))}if(g&&E.length>1){let e="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new a.AtomicityNotSupportedError(new i.BaseError(e,{details:e}))}let r=[];for(let t of E){try{let n=await (0,d.sendTransaction)(e,{account:w,chain:p,data:t.data,to:t.to,value:t.value?(0,l.hexToBigInt)(t.value):void 0});r.push({status:"fulfilled",value:n})}catch(e){r.push({reason:e,status:"rejected"})}m>0&&await new Promise(e=>setTimeout(e,m))}if(r.every(e=>"rejected"===e.status))throw r[0].reason;let n=r.map(e=>"fulfilled"===e.status?e.value:t.fallbackTransactionErrorMagicIdentifier);return{id:(0,o.concat)([...n,(0,c.numberToHex)(p.id,{size:32}),t.fallbackMagicIdentifier])}}throw(0,u.getTransactionError)(n,{...r,account:w,chain:r.chain})}}t.fallbackMagicIdentifier="0x5792579257925792579257925792579257925792579257925792579257925792",t.fallbackTransactionErrorMagicIdentifier=(0,c.numberToHex)(0,{size:32})},32511:(e,t,r)=>{let n=r(22584),i=[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],a=[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];t.getBlocksCount=function(e,t){switch(t){case n.L:return i[(e-1)*4+0];case n.M:return i[(e-1)*4+1];case n.Q:return i[(e-1)*4+2];case n.H:return i[(e-1)*4+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case n.L:return a[(e-1)*4+0];case n.M:return a[(e-1)*4+1];case n.Q:return a[(e-1)*4+2];case n.H:return a[(e-1)*4+3];default:return}}},32590:(e,t,r)=>{"use strict";r.d(t,{a:()=>A});var n=r(91004),i=r(36442),a=r(42846),s=r(57873),o=r(99817),l=r(47482),c=r(89188),u=r(30898),d=r(76916),h=r(29092),p=r(17052),f=r(79561),m=r(82376),g=r(53984),y=r(18627),b=r(26274),w=r(51636);let v=Object.fromEntries(a.P.map(e=>[e,void 0])),E=Object.fromEntries(a.P.map(e=>[e,!0])),C=(0,n.BX)({allConnectors:[],connectors:[],activeConnector:void 0,filterByNamespace:void 0,activeConnectorIds:v,filterByNamespaceMap:E}),A=(0,p.X)({state:C,subscribe:e=>(0,n.B1)(C,()=>{e(C)}),subscribeKey:(e,t)=>(0,i.u$)(C,e,t),initialize(e){e.forEach(e=>{let t=h.i.getConnectedConnectorId(e);t&&A.setConnectorId(t,e)})},setActiveConnector(e){e&&(C.activeConnector=(0,n.KR)(e))},setConnectors(e){e.filter(e=>!C.allConnectors.some(t=>t.id===e.id&&A.getConnectorName(t.name)===A.getConnectorName(e.name)&&t.chain===e.chain)).forEach(e=>{"MULTI_CHAIN"!==e.type&&C.allConnectors.push((0,n.KR)(e))});let t=A.getEnabledNamespaces(),r=A.getEnabledConnectors(t);C.connectors=A.mergeMultiChainConnectors(r)},filterByNamespaces(e){Object.keys(C.filterByNamespaceMap).forEach(e=>{C.filterByNamespaceMap[e]=!1}
4939),e.forEach(e=>{C.filterByNamespaceMap[e]=!0}),A.updateConnectorsForEnabledNamespaces()},filterByNamespace(e,t){C.filterByNamespaceMap[e]=t,A.updateConnectorsForEnabledNamespaces()},updateConnectorsForEnabledNamespaces(){let e=A.getEnabledNamespaces(),t=A.getEnabledConnectors(e),r=A.areAllNamespacesEnabled();C.connectors=A.mergeMultiChainConnectors(t),r?f.N.clearFilterByNamespaces():f.N.filterByNamespaces(e)},getEnabledNamespaces:()=>Object.entries(C.filterByNamespaceMap).filter(([e,t])=>t).map(([e])=>e),getEnabledConnectors:e=>C.allConnectors.filter(t=>e.includes(t.chain)),areAllNamespacesEnabled:()=>Object.values(C.filterByNamespaceMap).every(e=>e),mergeMultiChainConnectors(e){let t=A.generateConnectorMapByName(e),r=[];return t.forEach(e=>{let t=e[0],n=t?.id===s.o.CONNECTOR_ID.AUTH;e.length>1&&t?r.push({name:t.name,imageUrl:t.imageUrl,imageId:t.imageId,connectors:[...e],type:n?"AUTH":"MULTI_CHAIN",chain:"eip155",id:t?.id||""}):t&&r.push(t)}),r},generateConnectorMapByName(e){let t=new Map;return e.forEach(e=>{let{name:r}=e,n=A.getConnectorName(r);if(!n)return;let i=t.get(n)||[];
4939i.find(t=>t.chain===e.chain)||i.push(e),t.set(n,i)}),t},getConnectorName:e=>e&&({"Trust Wallet":"Trust"})[e]||e,getUniqueConnectorsByName(e){let t=[];return e.forEach(e=>{t.find(t=>t.chain===e.chain)||t.push(e)}),t},addConnector(e){if(e.id===s.o.CONNECTOR_ID.AUTH){let t=(0,n.P9)(y.H.state),r=w.W.getSnapshot().themeMode,i=w.W.getSnapshot().themeVariables;e?.provider?.syncDappData?.({metadata:t.metadata,sdkVersion:t.sdkVersion,projectId:t.projectId,sdkType:t.sdkType}),e?.provider?.syncTheme({themeMode:r,themeVariables:i,w3mThemeVariables:(0,o.o)(i,r)}),A.setConnectors([e])}else A.setConnectors([e])},getAuthConnector(e){let t=e||m.W.state.activeChain,r=C.connectors.find(e=>e.id===s.o.CONNECTOR_ID.AUTH);if(r)return r?.connectors?.length?r.connectors.find(e=>e.chain===t):r},getAnnouncedConnectorRdns:()=>C.connectors.filter(e=>"ANNOUNCED"===e.type).map(e=>e.info?.rdns),getConnectorById:e=>u.g.sortConnectorsByPriority(C.allConnectors).find(t=>t.id===e),getConnector({id:e,namespace:t}){let r=t||m.W.state.activeChain,n=C.allConnectors.filter(e=>e.chain===r);return u.g.sortConnectorsByPriority(n).find(t=>t.id===e||t.explorerId===e)},syncIfAuthConnector(e){if("AUTH"!==e.id)return;let t=(0,n.P9)(y.H.state),r=w.W.getSnapshot().themeMode,i=w.W.getSnapshot().themeVariables;e?.provider?.syncDappData?.({metadata:t.metadata,sdkVersion:t.sdkVersion,sdkType:t.sdkType,projectId:t.projectId}),e.provider.syncTheme({themeMode:r,themeVariables:i,w3mThemeVariables:(0,o.o)(i,r)})},getConnectorsByNamespace(e){let t=C.allConnectors.filter(t=>t.chain===e);return A.mergeMultiChainConnectors(t)},canSwitchToSmartAccount:e=>m.W.checkIfSmartAccountEnabled()&&(0,c.lj)(e)===l.Vl.ACCOUNT_TYPES.EOA,selectWalletConnector(e){let t=b.I.state.data?.redirectView,r=m.W.state.activeChain,n=r?A.getConnector({id:e.id,namespace:r}):void 0;d.W.handleMobileDeeplinkRedirect(n?.explorerId||e.id,m.W.state.activeChain,{isCoinbaseDisabled:!1===y.H.state.enableCoinbase}),n?b.I.push("ConnectingExternal",{connector:n,wallet:e,redirectView:t}):b.I.push("ConnectingWalletConnect",{wallet:e,redirectView:t})},getConnectors:e=>e?A.getConnectorsByNamespace(e):A.mergeMultiChainConnectors(C.allConnectors),setFilterByNamespace(e){C.filterByNamespace=e,C.connectors=A.getConnectors(e),f.N.setFilterByNamespace(e)},setConnectorId(e,t){e&&(C.activeConnectorIds={...C.activeConnectorIds,[t]:e},h.i.setConnectedConnectorId(t,e))},removeConnectorId(e){C.activeConnectorIds={...C.activeConnectorIds,[e]:void 0},h.i.deleteConnectedConnectorId(e)},getConnectorId(e){if(e)return C.activeConnectorIds[e]},isConnected:e=>e?!!C.activeConnectorIds[e]:Object.values(C.activeConnectorIds).some(e=>!!e),resetConnectorIds(){C.activeConnectorIds={...v}},extendConnectorsWithExplorerWallets(e){C.allConnectors.forEach(t=>{let r=e.find(e=>e.id===t.id||e.rdns&&e.rdns===t.info?.rdns);r&&(t.explorerWallet=r)});let t=A.getEnabledNamespaces(),r=A.getEnabledConnectors(t);C.connectors=A.mergeMultiChainConnectors(r)},async connect(e={}){let{namespace:t}=e;return A.setFilterByNamespace(t),b.I.push("Connect",{addWalletForNamespace:t}),new Promise((e,r)=>{if(t){let n=m.W.subscribeChainProp("accountState",t=>{t?.caipAddress&&(e({caipAddress:t?.caipAddress}),n())},t),i=g.W.subscribeKey("open",e=>{e||(r(Error("Modal closed")),i())})}else{let t=m.W.subscribeKey("activeCaipAddress",r=>{r&&(e({caipAddress:r}),t())}),n=g.W.subscribeKey("open",e=>{e||(r(Error("Modal closed")),n())})}})}})},33028:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(20801);let i=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()},a=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let o=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:a=24,strokeWidth:o=2,absoluteStrokeWidth:l,className:c="",children:u,iconNode:d,...h}=e;return(0,n.createElement)("svg",{ref:t,...s,width:a,height:a,stroke:r,strokeWidth:l?24*Number(o)/Number(a):o,className:i("lucide",c),...!u&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(h)&&{"aria-hidden":"true"},...h},[...d.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(u)?u:[u]])}),l=(e,t)=>
4939{let r=(0,n.forwardRef)((r,s)=>{let{className:l,...c}=r;return(0,n.createElement)(o,{ref:s,iconNode:t,className:i("lucide-".concat(a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),l),...c})});return r.displayName=a(e),r}},33074:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addChain=i;let n=r(27083);async function i(e,{chain:t}){let{id:r,name:i,nativeCurrency:a,rpcUrls:s,blockExplorers:o}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,n.numberToHex)(r),chainName:i,nativeCurrency:a,rpcUrls:s.default.http,blockExplorerUrls:o?Object.values(o).map(({url:e})=>e):void 0}]},{dedupe:!0,retryCount:0})}},33316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchEvent=function(e,{address:t,args:r,batch:y=!0,event:b,events:w,fromBlock:v,onError:E,onLogs:C,poll:A,pollingInterval:x=e.pollingInterval,strict:I}){let S,T,P=void 0!==A?A:"bigint"==typeof v||"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
4939onfig.type&&"ipc"!==e.transport.transports[0].config.type),O=I??!1;return P?(()=>{let n=(0,d.stringify)(["watchEvent",t,r,y,e.uid,b,x,v]);return(0,c.observe)(n,{onLogs:C,onError:E},n=>{let a,s;void 0!==v&&(a=v-1n);let o=!1,c=(0,u.poll)(async()=>{if(!o){try{s=await (0,l.getAction)(e,h.createEventFilter,"createEventFilter")({address:t,args:r,event:b,events:w,strict:O,fromBlock:v})}catch{}o=!0;return}try{let i;if(s)i=await (0,l.getAction)(e,f.getFilterChanges,"getFilterChanges")({filter:s});else{let n=await (0,l.getAction)(e,p.getBlockNumber,"getBlockNumber")({});i=a&&a!==n?await (0,l.getAction)(e,m.getLogs,"getLogs")({address:t,args:r,event:b,events:w,fromBlock:a+1n,toBlock:n}):[],a=n}if(0===i.length)return;if(y)n.onLogs(i);else for(let e of i)n.onLogs([e])}catch(e){s&&e instanceof i.InvalidInputRpcError&&(o=!1),n.onError?.(e)}},{emitOnBegin:!0,interval:x});return async()=>{s&&await (0,l.getAction)(e,g.uninstallFilter,"uninstallFilter")({filter:s}),c()}})})():(S=!0,T=()=>S=!1,(async()=>{try{let i=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),l=w??(b?[b]:void 0),c=[];l&&(c=[l.flatMap(e=>(0,s.encodeEventTopics)({abi:[e],eventName:e.name,args:r}))],b&&(c=c[0]));let{unsubscribe:u}=await i.subscribe({params:["logs",{address:t,topics:c}],onData(e){if(!S)return;let t=e.result;try{let{eventName:e,args:r}=(0,a.decodeEventLog)({abi:l??[],data:t.data,topics:t.topics,strict:O}),n=(0,o.formatLog)(t,{args:r,eventName:e});C([n])}catch(a){let e,r;if(a instanceof n.DecodeLogDataMismatch||a instanceof n.DecodeLogTopicsMismatch){if(I)return;e=a.abiItem.name,r=a.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let i=(0,o.formatLog)(t,{args:r?[]:{},eventName:e});C([i])}},onError(e){E?.(e)}});T=u,S||T()}catch(e){E?.(e)}})(),()=>T())};let n=r(82311),i=r(69902),a=r(44352),s=r(61794),o=r(10205),l=r(95847),c=r(84053),u=r(63342),d=r(68508),h=r(50517),p=r(27697),f=r(97514),m=r(6084),g=r(74815)},33364:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parameterCache=void 0,t.getParameterCacheKey=function(e,t,r){let n="";if(r)for(let e of Object.entries(r)){if(!e)continue;let t="";for(let r of e[1])t+=`[${r.type}${r.name?`:${r.name}`:""}]`;n+=`(${e[0]}{${t}})`}return t?`${t}:${e}${n}`:`${e}${n}`},t.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}]])},33373:(e,t)=>{let r="[0-9]+",n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",i="(?:(?![A-Z0-9 $%*+\\-./:]|"+(n=n.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";t.KANJI=RegExp(n,"g"),t.BYTE_KANJI=RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=RegExp(i,"g"),t.NUMERIC=RegExp(r,"g"),t.ALPHANUMERIC=RegExp("[A-Z $%*+\\-./:]+","g");let a=RegExp("^"+n+"$"),s=RegExp("^"+r+"$"),o=RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return a.test(e)},t.testNumeric=function(e){return s.test(e)},t.testAlphanumeric=function(e){return o.test(e)}},33384:(e,t,r)=>{"use strict";r.d(t,{y:()=>l});var n=r(57873),i=r(82376),a=r(32590),s=r(29092),o=r(41776);let l={getCaipTokens(e){if(!e)return;let t={};return Object.entries(e).forEach(([e,r])=>{t[`${o.o.EIP155}:${e}`]=r}),t},isLowerCaseMatch:(e,t)=>e?.toLowerCase()===t?.toLowerCase(),getActiveNamespaceConnectedToAuth(){let e=i.W.state.activeChain;return n.o.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(t=>a.a.getConnectorId(t)===n.o.CONNECTOR_ID.AUTH&&t===e)},withRetry({conditionFn:e,intervalMs:t,maxRetries:r}){let n=0;return new Promise(i=>{async function a(){return(n+=1,await e())?i(!0):n>=r?i(!1):(setTimeout(a,t),null)}a()})},userChainIdToChainNamespace(e){if("number"==typeof e)return n.o.CHAIN.EVM;let[t]=e.split(":");return t},getOtherAuthNamespaces:e=>e?n.o.AUTH_CONNECTOR_SUPPORTED_CHAINS.filter(t=>t!==e):[],getConnectorStorageInfo(e,t){let r=s.i.getConnections()[t]??[];return{hasDisconnected:s.i.isConnectorDisconnected(e,t),hasConnected:r.some(t=>l.isLowerCaseMatch(t.connectorId,e))}}}},33432:(e,t,r)=>{"use strict";r.d(t,{w:()=>o});var n=r(57873),i=r(52335),a=r(81920),s=r(29092);let o={getWindow(){if("undefined"!=typeof window)return window}
4939,isMobile(){return!!this.isClient()&&!!(window?.matchMedia&&"function"==typeof window.matchMedia&&window.matchMedia("(pointer:coarse)")?.matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent))},checkCaipNetwork:(e,t="")=>e?.caipNetworkId.toLocaleLowerCase().includes(t.toLowerCase()),isAndroid(){if(!this.isMobile())return!1;let e=window?.navigator.userAgent.toLowerCase();return o.isMobile()&&e.includes("android")},isIos(){if(!this.isMobile())return!1;let e=window?.navigator.userAgent.toLowerCase();return e.includes("iphone")||e.includes("ipad")},isSafari(){return!!this.isClient()&&(window?.navigator.userAgent.toLowerCase()).includes("safari")},isClient:()=>"undefined"!=typeof window,isPairingExpired:e=>!e||e-Date.now()<=a.oU.TEN_SEC_MS,isAllowedRetry:(e,t=a.oU.ONE_SEC_MS)=>Date.now()-e>=t,copyToClopboard(e){navigator.clipboard.writeText(e)},isIframe(){try{return window?.self!==window?.top}catch(e){return!1}},isSafeApp(){if(o.isClient()&&window.self!==window.top)try{let e=window?.location?.ancestorOrigins?.[0];if(e){let t=new URL(e),r=new URL("https://app.safe.global");return t.hostname===r.hostname}}catch{}return!1},getPairingExpiry:()=>Date.now()+a.oU.FOUR_MINUTES_MS,getNetworkId:e=>e?.split(":")[1],getPlainAddress:e=>e?.split(":")[2],wait:async e=>new Promise(t=>{setTimeout(t,e)}),debounce(e,t=500){let r;return(...n)=>{r&&clearTimeout(r),r=setTimeout(function(){e(...n)},t)}},isHttpUrl:e=>e.startsWith("http://")||e.startsWith("https://"),formatNativeUrl(e,t,r=null){if(o.isHttpUrl(e))return this.formatUniversalUrl(e,t);let n=e,i=r;n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),i&&!i?.endsWith("/")&&(i=`${i}/`),this.isTelegram()&&this.isAndroid()&&(t=encodeURIComponent(t));let a=encodeURIComponent(t);return{redirect:`${n}wc?uri=${a}`,redirectUniversalLink:i?`${i}wc?uri=${a}`:void 0,href:n,universalHref:i??void 0}},formatUniversalUrl(e,t){if(!o.isHttpUrl(e))return this.formatNativeUrl(e,t);let r=e;r.endsWith("/")||(r=`${r}/`);let n=encodeURIComponent(t);return{redirect:`${r}wc?uri=${n}`,href:r}},getOpenTargetForPlatform(e){return"popupWindow"===e?e:this.isTelegram()?s.i.getTelegramSocialProvider()?"_top":"_blank":e},openHref(e,t,r){window?.open(e,this.getOpenTargetForPlatform(t),r||"noreferrer noopener")},returnOpenHref(e,t,r){return window?.open(e,this.getOpenTargetForPlatform(t),r||"noreferrer noopener")},isTelegram:()=>"undefined"!=typeof window&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto),isPWA(){if("undefined"==typeof window)return!1;let e=!!window?.matchMedia&&"function"==typeof window.matchMedia&&window.matchMedia("(display-mode: standalone)")?.matches,t=window?.navigator?.standalone;return!!(e||t)},preloadImage:async e=>Promise.race([new Promise((t,r)=>{let n=new Image;n.onload=t,n.onerror=r,n.crossOrigin="anonymous",n.src=e}),o.wait(2e3)]),parseBalance(e,t){let r="0.000";if("string"==typeof e){let t=Number(e);if(!isNaN(t)){let e=(Math.floor(1e3*t)/1e3).toFixed(3);e&&(r=e)}}let[n,i]=r.split("."),a=n||"0",s=i||"000";return{formattedText:`${a}.${s}${t?` ${t}`:""}`,value:a,decimals:s,symbol:t}},getApiUrl:()=>n.o.W3M_API_URL,getBlockchainApiUrl:()=>n.o.BLOCKCHAIN_API_RPC_URL,getAnalyticsUrl:()=>n.o.PULSE_API_URL,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 n=r[e.id],i=r[t.id];return void 0!==n&&void 0!==i?n-i:void 0!==n?-1:1*(void 0!==i)})),t},calculateBalance(e){let t=0;for(let r of e)t+=r.value??0;return t},formatTokenBalance(e){let[t,r]=e.toFixed(2).split(".");return{dollars:t,pennies:r}},isAddress(e,t="eip155"){switch(t){case"eip155":if(/^(?:0x)?[0-9a-f]{40}$/iu.test(e)&&(/^(?:0x)?[0-9a-f]{40}$/iu.test(e)||/^(?:0x)?[0-9A-F]{40}$/iu.test(e)))return!0;return!1;case"solana":return/[1-9A-HJ-NP-Za-km-z]{32,44}$/iu.test(e);case"bip122":{let t=/^[1][a-km-zA-HJ-NP-Z1-9]{25,34}$/u.test(e),r=/^[3][a-km-zA-HJ-NP-Z1-9]{25,34}$/u.test(e),n=/^bc1[a-z0-9]{39,87}$/u.test(e),i=/^bc1p[a-z0-9]{58}$/u.test(e);return t||r||n||i}default:return!1}},uniqueBy(e,t){let r=new Set;return e.filter(e=>{let n=e[t];return!r.has(n)&&(r.add(n),!0)})},generateSdkVersion(e,t,r){let n=0===e.length?a.oU.ADAPTER_TYPES.UNIVERSAL:e.map(e=>e.adapterType).join(",");return`${t}-${n}-${r}`},createAccount(e){let{chainNamespace:t,chainId:r,address:n}=i.C.parseCaipAddress(e.caipAddress);return{namespace:t,address:n,chainId:r,caipAddress:e.caipAddress,type:e.type,publicKey:e.publicKey,path:e.path}},isCaipAddress(e){if("string"!=typeof e)return!1;let t=e.split(":"),r=t[0];return 3===t.filter(Boolean).length&&r in n.o.CHAIN_NAME_MAP},getAccount:e=>e?"string"==typeof e?{address:e,chainId:void 0}:{address:e.address,chainId:e.chainId}:{address:void 0,chainId:void 0},isMac(){let e=window?.navigator.userAgent.toLowerCase();return e.includes("macintosh")&&!e.includes("safari")},formatTelegramSocialLoginUrl(e){let t=`--${encodeURIComponent(window?.location.href)}`,r="state=";if("auth.magic.link"===new URL(e).host){let n="provider_authorization_url=",i=e.substring(e.indexOf(n)+n.length),a=this.injectIntoUrl(decodeURIComponent(i),r,t);return e.replace(i,encodeURIComponent(a))}return this.injectIntoUrl(e,r,t)},injectIntoUrl(e,t,r){let n=e.indexOf(t);if(-1===n)throw Error(`${t} parameter not found in the URL: ${e}`);let i=e.indexOf("&",n),a=t.length,s=-1!==i?i:e.length,o=e.substring(0,n+a),l=e.substring(n+a,s);return o+(l+r)+e.substring(i)},isNumber:e=>("number"==typeof e||"string"==typeof e)&&!isNaN(Number(e)),appendPayToUri:(e,t)=>t?`${e}&pay=${encodeURIComponent(t)}`:e}},33440:(e,t,r)=>{"use strict";
4939Object.defineProperty(t,"__esModule",{value:!0}),t.decodeData=function(...e){let[t,r]=(()=>{if(Array.isArray(e[0])){let[t,r,n]=e;return[o(t,r),n]}return e})(),{overloads:n}=t;if(4>s.size(r))throw new i.InvalidSelectorSizeError({data:r});if(t.inputs?.length===0)return;let l=n?o([t,...n],r):t;if(!(4>=s.size(r)))return a.decode(l.inputs,s.slice(r,4))},t.decodeResult=function(...e){let[t,r,n={}]=(()=>{if(Array.isArray(e[0])){let[t,r,n,i]=e;return[o(t,r),n,i]}return e})(),i=a.decode(t.outputs,r,n);if(!i||0!==Object.keys(i).length)return i&&1===Object.keys(i).length?Array.isArray(i)?i[0]:Object.values(i)[0]:i},t.encodeData=function(...e){let[t,r=[]]=(()=>{if(Array.isArray(e[0])){let[t,r,n]=e;return[o(t,r,{args:n}),n]}let[t,r]=e;return[t,r]})(),{overloads:n}=t,i=n?o([t,...n],t.name,{args:r}):t,c=l(i),u=r.length>0?a.encode(i.inputs,r):void 0;return u?s.concat(c,u):c},t.encodeResult=function(...e){let[t,r,n={}]=(()=>{if(Array.isArray(e[0])){let[t,r,n,i]=e;return[o(t,r),n,i]}return e})(),{as:i="Array"}=n,s=1===t.outputs.length?[r]:Array.isArray(r)?r:"Object"===i?Object.values(r):[r];return a.encode(t.outputs,s)},t.format=function(e){return n.formatAbiItem(e)},t.from=function(e,t={}){return i.from(e,t)},t.fromAbi=o,t.getSelector=l;let n=r(65222),i=r(91315),a=r(57300),s=r(70259);function o(e,t,r){let n=i.fromAbi(e,t,r);if("function"!==n.type)throw new i.NotFoundError({name:t,type:"function"});return n}function l(e){return i.getSelector(e)}},33811:(e,t,r)=>{"use strict";function n(e){let t=e.startsWith("0x")?e.slice(2):e,r=t.length%2==0?t:`0${t}`,n=r.match(/[0-9a-fA-F]{2}/g)?.map(e=>parseInt(e,16))??[];if(n.length!==r.length/2)throw Error(`Invalid hex string ${e}`);return Uint8Array.from(n)}function i(e){return e.reduce((e,t)=>e+t.toString(16).padStart(2,"0"),"")}r.d(t,{a:()=>n,n:()=>i})},34110:(e,t,r)=>{"use strict";r.d(t,{b:()=>a});var n=r(35261),i=r(15447);function a(e,{delay:t=100,retryCount:r=2,shouldRetry:s=()=>!0,signal:o}={}){return new Promise((a,l)=>{let c=async({count:u=0}={})=>{if(o?.aborted)return void l((0,n.TY)(o));let d=async({error:e})=>{let r="function"==typeof t?t({count:u,error:e}):t;if(r)try{await (0,i.u)(r,{signal:o})}catch(e){l(e);return}c({count:u+1})};try{let t=await e();a(t)}catch(e){if(o?.aborted)return void l((0,n.TY)(o));if((0,n.zf)(e))return void l(e);if(u<r&&await s({count:u,error:e}))return d({error:e});l(e)}};c()})}},34410:(e,t,r)=>{"use strict";r.d(t,{AP:()=>s,X:()=>d,fN:()=>p,mm:()=>function e(t){try{return function t(r){var i,a;return(!!s(r.address)||!!(0,n.O)(r.address))&&(i=r.module,!!o.test(i)&&(a=r.name,!!o.test(a))&&r.typeParams.every(r=>"string"==typeof r?function t(r){if(l.includes(r))return!0;let n=r.match(c);return n?t(n[1]):!!r.includes("::")&&e(r)}(r):t(r)))}(u(t))}catch{return!1}},t4:()=>h,wn:()=>a});var n=r(97914),i=r(81366);let a=32;function s(e){var t,r;return t=e,/^(0x|0X)?[a-fA-F0-9]+$/.test(t)&&t.length%2==0&&(r=e,(/^(0x|0X)/.test(r)?(r.length-2)/2:r.length/2)===a)}let o=/^[a-zA-Z][a-zA-Z0-9_]*$/,l=["bool","u8","u16","u32","u64","u128","u256","address","signer"],c=/^vector<(.+)>$/;function u(e){let t=e.split("::");if(t.length<3)throw Error(`Invalid struct tag: ${e}`);let[r,a]=t;if(!r||!a)throw Error(`Invalid struct tag: ${e}`);let s=(0,n.O)(r),o=e.slice(r.length+a.length+4),l=o.includes("<")?o.slice(0,o.indexOf("<")):o;if(!l||o.includes("<")&&!o.endsWith(">"))throw Error(`Invalid struct tag: ${e}`);let c=o.includes("<")?(0,i.sT)(o.slice(o.indexOf("<")+1,o.lastIndexOf(">"))).map(e=>(function e(t){if(t.startsWith("vector<")){if(!t.endsWith(">"))throw Error(`Invalid type tag: ${t}`);let r=t.slice(7,-1);if(!r)throw Error(`Invalid type tag: ${t}`);let n=e(r);return"string"==typeof n?`vector<${n}>`:`vector<${d(n)}>`}return t.includes("::")?u(t):t})(e.trim())):[];return{address:s?r:h(r),module:a,name:l,typeParams:c}}function d(e){if("string"==typeof e&&e.startsWith("vector<"))throw Error("normalizeStructTag does not support vector types. Use normalizeTypeTag instead.");let{address:t,module:r,name:n,typeParams:i}="string"==typeof e?u(e):e;return`${t}::${r}::${n}${i?.length>0?`<${i.map(e=>"string"==typeof e?e:d(e)).join(",")}>`:""}`}function h(e,t=!1){let r=e.toLowerCase();return!t&&r.startsWith("0x")&&(r=r.slice(2)),`0x${r.padStart(2*a,"0")}`}function p(e,t=!1){return h(e,t)}},34717:(e,t)=>{"use strict";
4939Object.defineProperty(t,"__esModule",{value:!0}),t.RPC_CALLS=void 0,t.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"}},34721:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},34844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidChainIdError=t.ClientChainNotConfiguredError=t.ChainNotFoundError=t.ChainMismatchError=t.ChainDoesNotSupportContract=void 0;let n=r(45226);class i extends n.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.`]],name:"ChainDoesNotSupportContract"})}}t.ChainDoesNotSupportContract=i;class a extends n.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}`],name:"ChainMismatchError"})}}t.ChainMismatchError=a;class s extends n.BaseError{constructor(){super("No chain was provided to the request.\nPlease provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.",{name:"ChainNotFoundError"})}}t.ChainNotFoundError=s;class o extends n.BaseError{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}t.ClientChainNotConfiguredError=o;class l extends n.BaseError{constructor({chainId:e}){super("number"==typeof e?`Chain ID "${e}
4939" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}t.InvalidChainIdError=l},34852:(e,t,r)=>{"use strict";r.d(t,{D:()=>u,ThemeProvider:()=>d});var n=r(20801),i=(e,t,r,n,i,a,s,o)=>{let l=document.documentElement,c=["light","dark"];function u(t){var r;(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,n=r&&a?i.map(e=>a[e]||e):i;r?(l.classList.remove(...n),l.classList.add(a&&a[t]?a[t]:t)):l.setAttribute(e,t)}),r=t,o&&c.includes(r)&&(l.style.colorScheme=r)}if(n)u(n);else try{let e=localStorage.getItem(t)||r,n=s&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;u(n)}catch(e){}},a=["light","dark"],s="(prefers-color-scheme: dark)",o="undefined"==typeof window,l=n.createContext(void 0),c={setTheme:e=>{},themes:[]},u=()=>{var e;return null!=(e=n.useContext(l))?e:c},d=e=>n.useContext(l)?n.createElement(n.Fragment,null,e.children):n.createElement(p,{...e}),h=["light","dark"],p=e=>{let{forcedTheme:t,disableTransitionOnChange:r=!1,enableSystem:i=!0,enableColorScheme:o=!0,storageKey:c="theme",themes:u=h,defaultTheme:d=i?"system":"light",attribute:p="data-theme",value:b,children:w,nonce:v,scriptProps:E}=e,[C,A]=n.useState(()=>m(c,d)),[x,I]=n.useState(()=>"system"===C?y():C),S=b?Object.values(b):u,T=n.useCallback(e=>{let t=e;if(!t)return;"system"===e&&i&&(t=y());let n=b?b[t]:t,s=r?g(v):null,l=document.documentElement,c=e=>{"class"===e?(l.classList.remove(...S),n&&l.classList.add(n)):e.startsWith("data-")&&(n?l.setAttribute(e,n):l.removeAttribute(e))};if(Array.isArray(p)?p.forEach(c):c(p),o){let e=a.includes(d)?d:null,r=a.includes(t)?t:e;l.style.colorScheme=r}null==s||s()},[v]),P=n.useCallback(e=>{let t="function"==typeof e?e(C):e;A(t);try{localStorage.setItem(c,t)}catch(e){}},[C]),O=n.useCallback(e=>{I(y(e)),"system"===C&&i&&!t&&T("system")},[C,t]);n.useEffect(()=>{let e=window.matchMedia(s);return e.addListener(O),O(e),()=>e.removeListener(O)},[O]),n.useEffect(()=>{let e=e=>{e.key===c&&(e.newValue?A(e.newValue):P(d))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[P]),n.useEffect(()=>{T(null!=t?t:C)},[t,C]);let _=n.useMemo(()=>({theme:C,setTheme:P,forcedTheme:t,resolvedTheme:"system"===C?x:C,themes:i?[...u,"system"]:u,systemTheme:i?x:void 0}),[C,P,t,x,i,u]);return n.createElement(l.Provider,{value:_},n.createElement(f,{forcedTheme:t,storageKey:c,attribute:p,enableSystem:i,enableColorScheme:o,defaultTheme:d,value:b,themes:u,nonce:v,scriptProps:E}),w)},f=n.memo(e=>{let{forcedTheme:t,storageKey:r,attribute:a,enableSystem:s,enableColorScheme:o,defaultTheme:l,value:c,themes:u,nonce:d,scriptProps:h}=e,p=JSON.stringify([a,r,l,t,u,c,s,o]).slice(1,-1);return n.createElement("script",{...h,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?d:"",dangerouslySetInnerHTML:{__html:"(".concat(i.toString(),")(").concat(p,")")}})}),m=(e,t)=>{let r;if(!o){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},g=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},y=e=>(e||(e=window.matchMedia(s)),e.matches?"dark":"light")},34942:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCode=i;let n=r(73506);async function i(e,{address:t,blockHash:r,blockNumber:i,blockTag:a="latest",requireCanonical:s}){let o=(0,n.formatBlockParameter)({blockHash:r,blockNumber:i,blockTag:a,requireCanonical:s}),l=await e.request({method:"eth_getCode",params:[t,o]},{dedupe:"bigint"==typeof i||void 0!==r});if("0x"!==l)return l}},35041:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsAvatar=s;let n=r(23503),i=r(95847),a=r(97099);async function s(e,{blockNumber:t,blockTag:r,assetGatewayUrls:s,name:o,gatewayUrls:l,strict:c,universalResolverAddress:u}){let d=await (0,i.getAction)(e,a.getEnsText,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:o,universalResolverAddress:u,gatewayUrls:l,strict:c});if(!d)return null;try{return await (0,n.parseAvatarRecord)(e,{record:d,gatewayUrls:s})}catch{return null}}},35159:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(46756),s=r(63412),o=r(91392);let l=(0,o.AH)` 4940 :host { 4941 display: block; 4942 width: 100px; 4943 height: 100px; 4944 } 4945 4946 svg { 4947 width: 100px; 4948 height: 100px; 4949 } 4950 4951 rect { 4952 fill: none; 4953 stroke: ${e=>e.colors.accent100}; 4954 stroke-width: 3px; 4955 stroke-linecap: round; 4956 animation: dash 1s linear infinite; 4957 } 4958 4959 @keyframes dash { 4960 to { 4961 stroke-dashoffset: 0px; 4962 } 4963 } 4964`;var c=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let u=class extends n.WF{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){let e=this.radius>50?50:this.radius,t=36-e;return(0,n.qy)` 4965 <svg viewBox="0 0 110 110" width="110" height="110"> 4966 <rect 4967 x="2" 4968 y="2" 4969 width="106" 4970 height="106" 4971 rx=${e} 4972 stroke-dasharray="${116+t} ${245+t}" 4973 stroke-dashoffset=${360+1.75*t} 4974 /> 4975 </svg> 4976 `}};u.styles=[a.W5,l],c([(0,i.MZ)({type:Number})],u.prototype,"radius",void 0),u=c([(0,s.E)("wui-loading-thumbnail")],u)},35261:(e,t,r)=>{"use strict";r.d(t,{ID:()=>s,RZ:()=>n,TY:()=>i,zf:()=>a});let n=e=>e;function i(e){if(e?.reason)return e.reason;if("function"==typeof DOMException)return new DOMException("This operation was aborted","AbortError");let t=Error("This operation was aborted");return t.name="AbortError",t}function a(e){return"object"==typeof e&&null!==e&&"name"in e&&"AbortError"===e.name}let s=e=>{try{let t=new URL(e);if(!t.username&&!t.password)return e;return t.username="",t.password="",t.toString()}catch{return e}}},35305:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767);r(39909);var a=r(46756),s=r(55405),o=r(63412),l=r(91392);let c=(0,l.AH)` 4977 :host { 4978 display: block; 4979 width: var(--local-width); 4980 height: var(--local-height); 4981 border-radius: ${({borderRadius:e})=>e[16]}; 4982 overflow: hidden; 4983 position: relative; 4984 } 4985 4986 :host([data-variant='generated']) { 4987 --mixed-local-color-1: var(--local-color-1); 4988 --mixed-local-color-2: var(--local-color-2); 4989 --mixed-local-color-3: var(--local-color-3); 4990 --mixed-local-color-4: var(--local-color-4); 4991 --mixed-local-color-5: var(--local-color-5); 4992 } 4993 4994 :host([data-variant='generated']) { 4995 background: radial-gradient( 4996 var(--local-radial-circle), 4997 #fff 0.52%, 4998 var(--mixed-local-color-5) 31.25%, 4999 var(--mixed-local-color-3) 51.56%, 5000 var(--mixed-local-color-2) 65.63%, 5001 var(--mixed-local-color-1) 82.29%, 5002 var(--mixed-local-color-4) 100% 5003 ); 5004 } 5005 5006 :host([data-variant='default']) { 5007 background: radial-gradient( 5008 75.29% 75.29% at 64.96% 24.36%, 5009 #fff 0.52%, 5010 #f5ccfc 31.25%, 5011 #dba4f5 51.56%, 5012 #9a8ee8 65.63%, 5013 #6493da 82.29%, 5014 #6ebdea 100% 5015 ); 5016 } 5017`;var u=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let d=class extends n.WF{constructor(){super(...arguments),this.imageSrc=void 0,this.alt=void 0,this.address=void 0,this.size="xl"}
5017render(){let e={inherit:"inherit",xxs:"3",xs:"5",sm:"6",md:"8",mdl:"8",lg:"10",xl:"16",xxl:"20"};return this.style.cssText=` 5018 --local-width: var(--apkt-spacing-${e[this.size??"xl"]}); 5019 --local-height: var(--apkt-spacing-${e[this.size??"xl"]}); 5020 `,(0,n.qy)`${this.visualTemplate()}`}visualTemplate(){if(this.imageSrc)return this.dataset.variant="image",(0,n.qy)`<wui-image src=${this.imageSrc} alt=${this.alt??"avatar"}></wui-image>`;if(this.address){this.dataset.variant="generated";let e=s.Z.generateAvatarColors(this.address);return this.style.cssText+=` 5021 ${e}`,null}return this.dataset.variant="default",null}};d.styles=[a.W5,c],u([(0,i.MZ)()],d.prototype,"imageSrc",void 0),u([(0,i.MZ)()],d.prototype,"alt",void 0),u([(0,i.MZ)()],d.prototype,"address",void 0),u([(0,i.MZ)()],d.prototype,"size",void 0),d=u([(0,o.E)("wui-avatar")],d)},35449:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRawTransaction=i;let n=r(44789);async function i(e,{hash:t}){let r=await e.request({method:"eth_getRawTransactionByHash",params:[t]},{dedupe:!0});if(!r)throw new n.TransactionNotFoundError({hash:t});return r}},35532:e=>{e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},35545:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiParameter=function e(t){let r=t.type;if(i.test(t.type)&&"components"in t){r="(";let a=t.components.length;for(let n=0;n<a;n++)r+=e(t.components[n]),n<a-1&&(r+=", ");let s=(0,n.execTyped)(i,t.type);return r+=`)${s?.array||""}`,e({...t,type:r})}return("indexed"in t&&t.indexed&&(r=`${r}
5021 indexed`),t.name)?`${r} ${t.name}`:r};let n=r(62561),i=/^tuple(?<array>(\[(\d*)\])*)$/},35723:(e,t,r)=>{"use strict";var n=r(31157).Buffer;e.exports=function(e){if(e.length>=255)throw TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var i=0;i<e.length;i++){var a=e.charAt(i),s=a.charCodeAt(0);if(255!==t[s])throw TypeError(a+" is ambiguous");t[s]=i}var o=e.length,l=e.charAt(0),c=Math.log(o)/Math.log(256),u=Math.log(256)/Math.log(o);function d(e){if("string"!=typeof e)throw TypeError("Expected String");if(0===e.length)return n.alloc(0);for(var r=0,i=0,a=0;e[r]===l;)i++,r++;for(var s=(e.length-r)*c+1>>>0,u=new Uint8Array(s);r<e.length;){var d=e.charCodeAt(r);if(d>255)return;var h=t[d];if(255===h)return;for(var p=0,f=s-1;(0!==h||p<a)&&-1!==f;f--,p++)h+=o*u[f]>>>0,u[f]=h%256>>>0,h=h/256>>>0;if(0!==h)throw Error("Non-zero carry");a=p,r++}for(var m=s-a;m!==s&&0===u[m];)m++;var g=n.allocUnsafe(i+(s-m));g.fill(0,0,i);for(var y=i;m!==s;)g[y++]=u[m++];return g}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=n.from(t)),!n.isBuffer(t))throw TypeError("Expected Buffer");if(0===t.length)return"";for(var r=0,i=0,a=0,s=t.length;a!==s&&0===t[a];)a++,r++;for(var c=(s-a)*u+1>>>0,d=new Uint8Array(c);a!==s;){for(var h=t[a],p=0,f=c-1;(0!==h||p<i)&&-1!==f;f--,p++)h+=256*d[f]>>>0,d[f]=h%o>>>0,h=h/o>>>0;if(0!==h)throw Error("Non-zero carry");i=p,a++}for(var m=c-i;m!==c&&0===d[m];)m++;for(var g=l.repeat(r);m<c;++m)g+=e.charAt(d[m]);return g},decodeUnsafe:d,decode:function(e){var t=d(e);if(t)return t;throw Error("Non-base"+o+" character")}}}},35763:(e,t,r)=>{"use strict";r.d(t,{D:()=>s});var n=r(18627),i=r(81920),a=r(33432);let s={getFeatureValue(e,t){let r=t?.[e];return void 0===r?i.oU.DEFAULT_FEATURES[e]:r},filterSocialsByPlatform(e){if(!e||!e.length)return e;let t=e;return a.w.isTelegram()&&(a.w.isIos()&&(t=t.filter(e=>"google"!==e)),a.w.isMac()&&(t=t.filter(e=>"x"!==e)),a.w.isAndroid()&&(t=t.filter(e=>!["facebook","x"].includes(e)))),a.w.isMobile()&&(t=t.filter(e=>"facebook"!==e)),t},isSocialsEnabled:()=>Array.isArray(n.H.state.features?.socials)&&n.H.state.features?.socials.length>0||Array.isArray(n.H.state.remoteFeatures?.socials)&&n.H.state.remoteFeatures?.socials.length>0,isEmailEnabled:()=>!!(n.H.state.features?.email||n.H.state.remoteFeatures?.email)}},35848:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTransactionAddress=o;let n=r(4319),i=r(77951),a=r(24584),s=r(41636);async function o(e){let{serializedTransaction:t,signature:r}=e,o=(0,i.parseTransaction)(t),l=r??{r:o.r,s:o.s,v:o.v,yParity:o.yParity},c=(0,a.serializeTransaction)({...o,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await (0,s.recoverAddress)({hash:(0,n.keccak256)(c),signature:l})}},36071:(e,t,r)=>{"use strict";let n;r.d(t,{x:()=>C});var i=r(91004),a=r(36442),s=r(57873),o=r(52335),l=r(89188),c=r(6875),u=r(13434),d=r(33432),h=r(29092),p=r(17052),f=r(82376),m=r(32590),g=r(42242),y=r(53984),b=r(95987),w=r(26274),v=r(61438);let E=(0,i.BX)({connections:new Map,recentConnections:new Map,isSwitchingConnection:!1,wcError:!1,wcFetchingUri:!1,buffering:!1,status:"disconnected"}),C=(0,p.X)({state:E,subscribe:e=>(0,i.B1)(E,()=>e(E)),subscribeKey:(e,t)=>(0,a.u$)(E,e,t),_getClient:()=>E._client,setClient(e){E._client=(0,i.KR)(e)},initialize(e){let t=e.filter(e=>!!e.namespace).map(e=>e.namespace);C.syncStorageConnections(t)},syncStorageConnections(e){let t=h.i.getConnections();for(let r of e??Array.from(f.W.state.chains.keys())){let e=t[r]??[],n=new Map(E.recentConnections);n.set(r,e),E.recentConnections=n}},getConnections:e=>e?E.connections.get(e)??[]:[],hasAnyConnection:e=>Array.from(C.state.connections.values()).flatMap(e=>e).some(({connectorId:t})=>t===e),async connectWalletConnect({cache:e="auto"}={}){E.wcFetchingUri=!0;let t=d.w.isTelegram()||d.w.isSafari()&&d.w.isIos();try{if("always"===e||"auto"===e&&t){if(n){await n,n=void 0;return}if(!d.w.isPairingExpired(E?.wcPairingExpiry)){let e=E.wcUri;E.wcUri=e;return}n=C._getClient()?.connectWalletConnect?.(),C.state.status="connecting",await n,n=void 0,E.wcPairingExpiry=void 0,C.state.status="connected"}else await C._getClient()?.connectWalletConnect?.()}catch(e){throw E.wcError=!0,E.wcFetchingUri=!1,E.status="disconnected",n=void 0,e}},async connectExternal(e,t,r=!0){let n=await C._getClient()?.connectExternal?.(e);r&&f.W.setActiveNamespace(t);let i=m.a.state.allConnectors.find(t=>
5021t.id===e?.id),a="AUTH"===e.type?"email":"browser";return g.E.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:a,name:i?.name||"Unknown",view:w.I.state.view,walletRank:i?.explorerWallet?.order}}),n},async reconnectExternal(e){await C._getClient()?.reconnectExternal?.(e);let t=e.chain||f.W.state.activeChain;t&&m.a.setConnectorId(e.id,t)},async setPreferredAccountType(e,t){if(!t)return;y.W.setLoading(!0,f.W.state.activeChain);let r=m.a.getAuthConnector();r&&(f.W.setAccountProp("preferredAccountType",e,t),await r.provider.setPreferredAccount(e),h.i.setPreferredAccountTypes(Object.entries(f.W.state.chains).reduce((e,[t,r])=>{let n=(0,l.lj)(t);return void 0!==n&&(e[t]=n),e},{})),await C.reconnectExternal(r),y.W.setLoading(!1,f.W.state.activeChain),g.E.sendEvent({type:"track",event:"SET_PREFERRED_ACCOUNT_TYPE",properties:{accountType:e,network:f.W.state.activeCaipNetwork?.caipNetworkId||""}}))},signMessage:async e=>C._getClient()?.signMessage(e),parseUnits:(e,t)=>C._getClient()?.parseUnits(e,t),formatUnits:(e,t)=>C._getClient()?.formatUnits(e,t),updateBalance:e=>C._getClient()?.updateBalance(e),sendTransaction:async e=>C._getClient()?.sendTransaction(e),getCapabilities:async e=>C._getClient()?.getCapabilities(e),grantPermissions:async e=>C._getClient()?.grantPermissions(e),walletGetAssets:async e=>C._getClient()?.walletGetAssets(e)??{},estimateGas:async e=>C._getClient()?.estimateGas(e),writeContract:async e=>C._getClient()?.writeContract(e),writeSolanaTransaction:async e=>C._getClient()?.writeSolanaTransaction(e),getEnsAddress:async e=>C._getClient()?.getEnsAddress(e),getEnsAvatar:async e=>C._getClient()?.getEnsAvatar(e),checkInstalled:e=>C._getClient()?.checkInstalled?.(e)||!1,resetWcConnection(){E.wcUri=void 0,E.wcPairingExpiry=void 0,E.wcLinking=void 0,E.recentWallet=void 0,E.wcFetchingUri=!1,E.status="disconnected",v.W.resetTransactions(),h.i.deleteWalletConnectDeepLink(),h.i.deleteRecentWallet(),b.z.set({connectingWallet:void 0})},resetUri(){E.wcUri=void 0,E.wcPairingExpiry=void 0,n=void 0,E.wcFetchingUri=!1,b.z.set({connectingWallet:void 0})},finalizeWcConnection(e){let{wcLinking:t,recentWallet:r}=C.state;t&&h.i.setWalletConnectDeepLink(t),r&&h.i.setAppKitRecent(r),e&&g.E.sendEvent({type:"track",event:"CONNECT_SUCCESS",address:e,properties:{method:t?"mobile":"qrcode",name:w.I.state.data?.wallet?.name||"Unknown",view:w.I.state.view,walletRank:r?.order}})},setWcBasic(e){E.wcBasic=e},setUri(e){E.wcUri=e,E.wcFetchingUri=!1,E.wcPairingExpiry=d.w.getPairingExpiry()},setWcLinking(e){E.wcLinking=e},setWcError(e){E.wcError=e,E.wcFetchingUri=!1,E.buffering=!1},setRecentWallet(e){E.recentWallet=e},setBuffering(e){E.buffering=e},setStatus(e){E.status=e},setIsSwitchingConnection(e){E.isSwitchingConnection=e},async disconnect({id:e,namespace:t,initialDisconnect:r}={}){try{await C._getClient()?.disconnect({id:e,chainNamespace:t,initialDisconnect:r})}catch(e){throw new p.A("Failed to disconnect","INTERNAL_SDK_ERROR",e)}},async disconnectConnector({id:e,namespace:t}){try{await C._getClient()?.disconnectConnector({id:e,namespace:t})}catch(e){throw new p.A("Failed to disconnect connector","INTERNAL_SDK_ERROR",e)}},setConnections(e,t){let r=new Map(E.connections);r.set(t,e),E.connections=r},async handleAuthAccountSwitch({address:e,namespace:t}){let r=f.W.getAccountData(t),n=r?.user?.accounts?.find(e=>"smartAccount"===e.type),i=n&&n.address.toLowerCase()===e.toLowerCase()&&u.g.canSwitchToSmartAccount(t)?"smartAccount":"eoa";await C.setPreferredAccountType(i,t)},async handleActiveConnection({connection:e,namespace:t,address:r}){let n=m.a.getConnectorById(e.connectorId),i=e.connectorId===s.o.CONNECTOR_ID.AUTH;if(!n)throw Error(`No connector found for connection: ${e.connectorId}`);if(i)r&&await C.handleAuthAccountSwitch({address:r,namespace:t});else{let e=await C.connectExternal({id:n.id,type:n.type,provider:n.provider,address:r,chain:t},t);return e?.address}return r},async handleDisconnectedConnection({connection:e,namespace:t,address:r,closeModalOnConnect:n}){let i,a=m.a.getConnectorById(e.connectorId),o=e.auth?.name?.toLowerCase(),l=e.connectorId===s.o.CONNECTOR_ID.AUTH,c=e.connectorId===s.o.CONNECTOR_ID.WALLET_CONNECT;if(!a)throw Error(`No connector found for connection: ${e.connectorId}`);
5021if(l)if(o&&u.g.isSocialProvider(o)){let{address:e}=await u.g.connectSocial({social:o,closeModalOnConnect:n,onOpenFarcaster(){y.W.open({view:"ConnectingFarcaster"})},onConnect(){w.I.replace("ProfileWallets")}});i=e}else{let{address:e}=await u.g.connectEmail({closeModalOnConnect:n,onOpen(){y.W.open({view:"EmailLogin"})},onConnect(){w.I.replace("ProfileWallets")}});i=e}else if(c){let{address:e}=await u.g.connectWalletConnect({walletConnect:!0,connector:a,closeModalOnConnect:n,onOpen(e){let t=e?"AllWallets":"ConnectingWalletConnect";y.W.state.open?w.I.push(t):y.W.open({view:t})},onConnect(){w.I.replace("ProfileWallets")}});i=e}else{let e=await C.connectExternal({id:a.id,type:a.type,provider:a.provider,chain:t},t);e&&(i=e.address)}return l&&r&&await C.handleAuthAccountSwitch({address:r,namespace:t}),i},async switchConnection({connection:e,address:t,namespace:r,closeModalOnConnect:n,onChange:i}){let a,s=f.W.getAccountData(r)?.caipAddress;if(s){let{address:e}=o.C.parseCaipAddress(s);a=e}let l=c.b.getConnectionStatus(e,r);switch(l){case"connected":case"active":{let n=await C.handleActiveConnection({connection:e,namespace:r,address:t});if(a&&n){let e=n.toLowerCase()!==a.toLowerCase();i?.({address:n,namespace:r,hasSwitchedAccount:e,hasSwitchedWallet:"active"===l})}break}case"disconnected":{let a=await C.handleDisconnectedConnection({connection:e,namespace:r,address:t,closeModalOnConnect:n});a&&i?.({address:a,namespace:r,hasSwitchedAccount:!0,hasSwitchedWallet:!0});break}default:throw Error(`Invalid connection status: ${l}`)}}})},36414:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(12658),i=r(88746),a=(e,t)=>t.some(t=>t.parentCapability===e);t.default=()=>(e,t,r)=>{let s=r.value;return r.value=async function(){let e=new n.Wallet(this.communicator),r=await e.getPermissions();if(a(t,r)||(r=await e.requestPermissions([{[t]:{}}])),!a(t,r))throw new i.PermissionsError("Permissions rejected",i.PERMISSIONS_REQUEST_REJECTED);return s.apply(this)},r}},36442:(e,t,r)=>{"use strict";r.d(t,{u$:()=>i,zC:()=>l});var n=r(91004);function i(e,t,r,i){let a=e[t];return(0,n.B1)(e,()=>{let n=e[t];Object.is(a,n)||r(a=n)},i)}Symbol();let{proxyStateMap:a,snapCache:s}=(0,n.h2)(),o=e=>a.has(e);function l(e){let t=[],r=0,i=new Map,a=new WeakMap,l=e=>a.get(e)||i;if(e){if("function"!=typeof e[Symbol.iterator])throw TypeError("proxyMap:\n initial state must be iterable\n tip: structure should be [[key, value]]");for(let[n,a]of e)i.set(n,r),t[r++]=a}let c={data:t,index:r,epoch:0,get size(){return o(this)||(()=>{let e=s.get(c),t=null==e?void 0:e[1];if(t&&!a.has(t)){let e=new Map(i);a.set(t,e)}})(),l(this).size},get(e){let t=l(this).get(e);return void 0===t?void this.epoch:this.data[t]},has(e){let t=l(this);return this.epoch,t.has(e)},set(e,t){if(!o(this))throw Error("Cannot perform mutations on a snapshot");let r=i.get(e);return void 0===r?(i.set(e,this.index),this.data[this.index++]=t):this.data[r]=t,this.epoch++,this},delete(e){if(!o(this))throw Error("Cannot perform mutations on a snapshot");let t=i.get(e);return void 0!==t&&(delete this.data[t],i.delete(e),this.epoch++,!0)},clear(){if(!o(this))throw Error("Cannot perform mutations on a snapshot");this.data.length=0,this.index=0,this.epoch++,i.clear()},forEach(e){this.epoch,l(this).forEach((t,r)=>{e(this.data[t],r,this)})},*entries(){for(let[e,t]of(this.epoch,l(this)))yield[e,this.data[t]]},*keys(){for(let e of(this.epoch,l(this).keys()))yield e},*values(){for(let e of(this.epoch,l(this).values()))yield this.data[e]},[Symbol.iterator](){return this.entries()},get[Symbol.toStringTag](){return"Map"},toJSON(){return new Map(this.entries())}},u=(0,n.BX)(c);return Object.defineProperties(u,{size:{enumerable:!1},index:{enumerable:!1},epoch:{enumerable:!1},data:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(u),u}let{proxyStateMap:c,snapCache:u}=(0,n.h2)()},36469:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(2438),i=r(85589),a=r(3733),s=r(9616);function o(e){return a.u in e.features&&s.j in e.features&&(n.R in e.features||i.q in e.features)}},36504:(e,t,r)=>{"use strict";
5021Object.defineProperty(t,"__esModule",{value:!0}),t.toRlp=o,t.bytesToRlp=function(e,t="bytes"){return o(e,t)},t.hexToRlp=function(e,t="hex"){return o(e,t)};let n=r(45226),i=r(60469),a=r(60037),s=r(27083);function o(e,t="hex"){let r=function e(t){return Array.isArray(t)?function(e){let t=e.reduce((e,t)=>e+t.length,0),r=l(t);return{length:t<=55?1+t:1+r+t,encode(n){for(let{encode:i}of(t<=55?n.pushByte(192+t):(n.pushByte(247+r),1===r?n.pushUint8(t):2===r?n.pushUint16(t):3===r?n.pushUint24(t):n.pushUint32(t)),e))i(n)}}}(t.map(t=>e(t))):function(e){let t="string"==typeof e?(0,a.hexToBytes)(e):e,r=l(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||(t.length<=55?e.pushByte(128+t.length):(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)}}}(t)}(e),n=(0,i.createCursor)(new Uint8Array(r.length));return(r.encode(n),"hex"===t)?(0,s.bytesToHex)(n.bytes):n.bytes}function l(e){if(e<256)return 1;if(e<65536)return 2;if(e<0x1000000)return 3;if(e<0x100000000)return 4;throw new n.BaseError("Length is too large.")}},36603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromRlp=function(e,t="hex"){let r=(()=>{if("string"==typeof e){if(e.length>3&&e.length%2!=0)throw new i.InvalidHexValueError(e);return(0,s.hexToBytes)(e)}return e})(),n=(0,a.createCursor)(r,{recursiveReadLimit:1/0}),c=function e(t,r="hex",n=0){if(n>=1024)throw new i.RlpDepthLimitExceededError({limit:1024});if(0===t.bytes.length)return"hex"===r?(0,o.bytesToHex)(t.bytes):t.bytes;let a=t.readByte();if(a<128&&t.decrementPosition(1),a<192){let e=l(t,a,128),n=t.readBytes(e);return"hex"===r?(0,o.bytesToHex)(n):n}let s=l(t,a,192);var c=t,u=s,d=r,h=n+1;let p=c.position,f=[];for(;c.position-p<u;)f.push(e(c,d,h));if(c.position-p!==u)throw new i.RlpListBoundaryExceededError({consumed:c.position-p,declared:u});return f}(n,t);if(n.position<n.bytes.length)throw new i.RlpTrailingBytesError({count:n.bytes.length-n.position});return c};let n=r(45226),i=r(51674),a=r(60469),s=r(60037),o=r(27083);function l(e,t,r){if(128===r&&t<128)return 1;if(t<=r+55)return t-r;if(t===r+55+1)return e.readUint8();if(t===r+55+2)return e.readUint16();if(t===r+55+3)return e.readUint24();if(t===r+55+4)return e.readUint32();throw new n.BaseError("Invalid RLP prefix")}},36737:(e,t)=>{"use strict";async function r(e,{blockNumber:t,jsonRpcUrl:n}={}){await e.request({method:`${e.mode}_reset`,params:[{forking:{blockNumber:Number(t),jsonRpcUrl:n}}]})}Object.defineProperty(t,"__esModule",{value:!0}),t.reset=r},37037:(e,t,r)=>{"use strict";r.d(t,{E1:()=>n.E,wE:()=>i.w}),r(31320);var n=r(27470),i=r(33432)},37171:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseSignature=function(e){let{r:t,s:r}=n.secp256k1.Signature.fromCompact(e.slice(2,130)),a=Number(`0x${e.slice(130)}`),[s,o]=(()=>{if(0===a||1===a)return[void 0,a];if(27===a)return[BigInt(a),0];if(28===a)return[BigInt(a),1];throw Error("Invalid yParityOrV value")})();return void 0!==s?{r:(0,i.numberToHex)(t,{size:32}),s:(0,i.numberToHex)(r,{size:32}),v:s,yParity:o}:{r:(0,i.numberToHex)(t,{size:32}),s:(0,i.numberToHex)(r,{size:32}),yParity:o}};let n=r(6792),i=r(27083)},37331:(e,t)=>{"use strict";var r,n,i;Object.defineProperty(t,"__esModule",{value:!0}
5021),t.SafeAppSocialPlatforms=t.SafeAppFeatures=t.SafeAppAccessPolicyTypes=void 0,function(e){e.NoRestrictions="NO_RESTRICTIONS",e.DomainAllowlist="DOMAIN_ALLOWLIST"}(r||(t.SafeAppAccessPolicyTypes=r={})),(n||(t.SafeAppFeatures=n={})).BATCHED_TRANSACTIONS="BATCHED_TRANSACTIONS",function(e){e.TWITTER="TWITTER",e.GITHUB="GITHUB",e.DISCORD="DISCORD",e.TELEGRAM="TELEGRAM"}(i||(t.SafeAppSocialPlatforms=i={}))},37357:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nonceManager=void 0,t.createNonceManager=a,t.jsonRpc=s;let n=r(4200),i=r(6724);function a(e){let{source:t}=e,r=new Map,n=new i.LruMap(8192),a=new Map,s=({address:e,chainId:t})=>`${e}.${t}`,o=e=>{r.delete(e),a.delete(e)};return{async consume({address:e,chainId:r,client:i}){let a=s({address:e,chainId:r}),o=this.get({address:e,chainId:r,client:i});this.increment({address:e,chainId:r});let l=await o;return await t.set({address:e,chainId:r},l),n.set(a,l),l},async increment({address:e,chainId:t}){let n=s({address:e,chainId:t}),i=r.get(n)??0;r.set(n,i+1)},async get({address:e,chainId:i,client:l}){let c=s({address:e,chainId:i}),u=a.get(c);return u||(u=(async()=>{try{let r=await t.get({address:e,chainId:i,client:l}),a=n.get(c)??0;if(a>0&&r<=a)return a+1;return n.delete(c),r}finally{o(c)}})(),a.set(c,u)),(r.get(c)??0)+await u},reset({address:e,chainId:t}){let r=s({address:e,chainId:t});n.delete(r),o(r)}}}function s(){return{async get(e){let{address:t,client:r}=e;return(0,n.getTransactionCount)(r,{address:t,blockTag:"pending"})},set(){}}}t.nonceManager=a({source:s()})},37412:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateAssignmentConflictError=t.AccountStateConflictError=void 0,t.prettyStateMapping=s,t.prettyStateOverride=function(e){return e.reduce((e,{address:t,...r})=>{let n=`${e} ${t}: 5022`;return r.nonce&&(n+=` nonce: ${r.nonce} 5023`),r.balance&&(n+=` balance: ${r.balance} 5024`),r.code&&(n+=` code: ${r.code} 5025`),r.state&&(n+=" state:\n",n+=s(r.state)),r.stateDiff&&(n+=" stateDiff:\n",n+=s(r.stateDiff)),n}," State Override:\n").slice(0,-1)};let n=r(45226);class i extends n.BaseError{constructor({address:e}){super(`State for account "${e}" is set multiple times.`,{name:"AccountStateConflictError"})}}t.AccountStateConflictError=i;class a extends n.BaseError{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function s(e){return e.reduce((e,{slot:t,value:r})=>`${e} ${t}: ${r} 5026`,"")}t.StateAssignmentConflictError=a},37417:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767);r(79909),r(39909),r(6077);var a=r(64598);function s(e,t,r){return e!==t&&(e-t<0?t-e:e-t)<=r+.1}let o={generate({uri:e,size:t,logoSize:r,padding:i=8,dotColor:o="var(--apkt-colors-black)"}){let l=[],c=function(e,t){let r=Array.prototype.slice.call(a.create(e,{errorCorrectionLevel:"Q"}).modules.data,0),n=Math.sqrt(r.length);return r.reduce((e,t,r)=>(r%n==0?e.push([t]):e[e.length-1].push(t))&&e,[])}(e,0),u=(t-2*i)/c.length,d=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];d.forEach(({x:e,y:t})=>{let r=(c.length-7)*u*e+i,a=(c.length-7)*u*t+i;for(let e=0;e<d.length;e+=1){let t=u*(7-2*e);l.push((0,n.JW)` 5027 <rect 5028 fill=${2===e?"var(--apkt-colors-black)":"var(--apkt-colors-white)"} 5029 width=${0===e?t-10:t} 5030 rx= ${0===e?(t-10)*.45:.45*t} 5031 ry= ${0===e?(t-10)*.45:.45*t} 5032 stroke=${o} 5033 stroke-width=${10*(0===e)} 5034 height=${0===e?t-10:t} 5035 x= ${0===e?a+u*e+5:a+u*e} 5036 y= ${0===e?r+u*e+5:r+u*e} 5037 /> 5038 `)}});let h=Math.floor((r+25)/u),p=c.length/2-h/2,f=c.length/2+h/2-1,m=[];c.forEach((e,t)=>{e.forEach((e,r)=>{!c[t][r]||t<7&&r<7||t>c.length-8&&r<7||t<7&&r>c.length-8||t>p&&t<f&&r>p&&r<f||m.push([t*u+u/2+i,r*u+u/2+i])})});let g={};return m.forEach(([e,t])=>{g[e]?g[e]?.push(t):g[e]=[t]}),Object.entries(g).map(([e,t])=>{let r=t.filter(e=>t.every(t=>!s(e,t,u)));return[Number(e),r]}).forEach(([e,t])=>{t.forEach(t=>{l.push((0,n.JW)`<circle cx=${e} cy=${t} fill=${o} r=${u/2.5} />`)})}),Object.entries(g).filter(([e,t])=>t.length>1).map(([e,t])=>{let r=t.filter(e=>t.some(t=>s(e,t,u)));return[Number(e),r]}).map(([e,t])=>{t.sort((e,t)=>
5038e<t?-1:1);let r=[];for(let e of t){let t=r.find(t=>t.some(t=>s(e,t,u)));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])=>{l.push((0,n.JW)` 5039 <line 5040 x1=${e} 5041 x2=${e} 5042 y1=${t} 5043 y2=${r} 5044 stroke=${o} 5045 stroke-width=${u/1.25} 5046 stroke-linecap="round" 5047 /> 5048 `)})}),l}};var l=r(46756),c=r(63412),u=r(91392);let d=(0,u.AH)` 5049 :host { 5050 position: relative; 5051 user-select: none; 5052 display: block; 5053 overflow: hidden; 5054 aspect-ratio: 1 / 1; 5055 width: 100%; 5056 height: 100%; 5057 background-color: ${({colors:e})=>e.white}; 5058 border: 1px solid ${({tokens:e})=>e.theme.borderPrimary}; 5059 } 5060 5061 :host { 5062 border-radius: ${({borderRadius:e})=>e[4]}; 5063 display: flex; 5064 align-items: center; 5065 justify-content: center; 5066 } 5067 5068 :host([data-clear='true']) > wui-icon { 5069 display: none; 5070 } 5071 5072 svg:first-child, 5073 wui-image, 5074 wui-icon { 5075 position: absolute; 5076 top: 50%; 5077 left: 50%; 5078 transform: translateY(-50%) translateX(-50%); 5079 background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; 5080 box-shadow: inset 0 0 0 4px ${({tokens:e})=>e.theme.backgroundPrimary}; 5081 border-radius: ${({borderRadius:e})=>e[6]}; 5082 } 5083 5084 wui-image { 5085 width: 25%; 5086 height: 25%; 5087 border-radius: ${({borderRadius:e})=>e[2]}; 5088 } 5089 5090 wui-icon { 5091 width: 100%; 5092 height: 100%; 5093 color: #3396ff !important; 5094 transform: translateY(-50%) translateX(-50%) scale(0.25); 5095 } 5096 5097 wui-icon > svg { 5098 width: inherit; 5099 height: inherit; 5100 } 5101`;var h=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let p=class extends n.WF{constructor(){super(...arguments),this.uri="",this.size=500,this.theme="dark",this.imageSrc=void 0,this.alt=void 0,this.arenaClear=void 0,this.farcaster=void 0}render(){return this.dataset.theme=this.theme,this.dataset.clear=String(this.arenaClear),(0,n.qy)`<wui-flex 5102 alignItems="center" 5103 justifyContent="center" 5104 class="wui-qr-code" 5105 direction="column" 5106 gap="4" 5107 width="100%" 5108 style="height: 100%" 5109 > 5110 ${this.templateVisual()} ${this.templateSvg()} 5111 </wui-flex>`}templateSvg(){return(0,n.JW)` 5112 <svg viewBox="0 0 ${this.size} ${this.size}" width="100%" height="100%"> 5113 ${o.generate({uri:this.uri,size:this.size,logoSize:this.arenaClear?0:this.size/4})} 5114 </svg> 5115 `}templateVisual(){return this.imageSrc?(0,n.qy)`<wui-image src=${this.imageSrc} alt=${this.alt??"logo"}></wui-image>`:this.farcaster?(0,n.qy)`<wui-icon 5116 class="farcaster" 5117 size="inherit" 5118 color="inherit" 5119 name="farcaster" 5120 ></wui-icon>`:(0,n.qy)`<wui-icon size="inherit" color="inherit" name="walletConnect"></wui-icon>`}};p.styles=[l.W5,d],h([(0,i.MZ)()],p.prototype,"uri",void 0),h([(0,i.MZ)({type:Number})],p.prototype,"size",void 0),h([(0,i.MZ)()],p.prototype,"theme",void 0),h([(0,i.MZ)()],p.prototype,"imageSrc",void 0),h([(0,i.MZ)()],p.prototype,"alt",void 0),h([(0,i.MZ)({type:Boolean})],p.prototype,"arenaClear",void 0),h([(0,i.MZ)({type:Boolean})],p.prototype,"farcaster",void 0),p=h([(0,c.E)("wui-qr-code")],p)}
5120,37453:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expand_message_xmd=l,t.expand_message_xof=c,t.hash_to_field=u,t.isogenyMap=function(e,t){let r=t.map(e=>Array.from(e).reverse());return(t,i)=>{let[a,s,o,l]=r.map(r=>r.reduce((r,n)=>e.add(e.mul(r,t),n))),[c,u]=(0,n.FpInvertBatch)(e,[s,l],!0);return t=e.mul(a,c),i=e.mul(i,e.mul(o,u)),{x:t,y:i}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw Error("mapToCurve() must be defined");function n(r){return e.fromAffine(t(r))}function i(t){let r=t.clearCofactor();return r.equals(e.ZERO)?e.ZERO:(r.assertValidity(),r)}return{defaults:r,hashToCurve(e,t){let a=u(e,2,{...r,DST:r.DST,...t}),s=n(a[0]),o=n(a[1]);return i(s.add(o))},encodeToCurve:(e,t)=>i(n(u(e,1,{...r,DST:r.encodeDST,...t})[0])),mapToCurve(e){if(!Array.isArray(e))throw Error("expected array of bigints");for(let t of e)if("bigint"!=typeof t)throw Error("expected array of bigints");return i(n(e))}}};let n=r(83935),i=r(56196),a=i.bytesToNumberBE;function s(e,t){if(o(e),o(t),e<0||e>=1<<8*t)throw Error("invalid I2OSP input: "+e);let r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function o(e){if(!Number.isSafeInteger(e))throw Error("number expected")}function l(e,t,r,n){(0,i.abytes)(e),(0,i.abytes)(t),o(r),t.length>255&&(t=n((0,i.concatBytes)((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));let{outputLen:a,blockLen:l}=n,c=Math.ceil(r/a);if(r>65535||c>255)throw Error("expand_message_xmd: invalid lenInBytes");let u=(0,i.concatBytes)(t,s(t.length,1)),d=s(0,l),h=s(r,2),p=Array(c),f=n((0,i.concatBytes)(d,e,h,s(0,1),u));p[0]=n((0,i.concatBytes)(f,s(1,1),u));for(let e=1;e<=c;e++){let t=[function(e,t){let r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e[n]^t[n];return r}(f,p[e-1]),s(e+1,1),u];p[e]=n((0,i.concatBytes)(...t))}return(0,i.concatBytes)(...p).slice(0,r)}function c(e,t,r,n,a){if((0,i.abytes)(e),(0,i.abytes)(t),o(r),t.length>255){let e=Math.ceil(2*n/8);t=a.create({dkLen:e}).update((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw Error("expand_message_xof: invalid lenInBytes");return a.create({dkLen:r}).update(e).update(s(r,2)).update(t).update(s(t.length,1)).digest()}function u(e,t,r){let s;(0,i.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});let{p:u,k:d,m:h,hash:p,expand:f,DST:m}=r;(0,i.abytes)(e),o(t);let g="string"==typeof m?(0,i.utf8ToBytes)(m):m,y=Math.ceil((u.toString(2).length+d)/8),b=t*h*y;if("xmd"===f)s=l(e,g,b,p);else if("xof"===f)s=c(e,g,b,d,p);else if("_internal_pass"===f)s=e;else throw Error('expand must be "xmd" or "xof"');let w=Array(t);for(let e=0;e<t;e++){let t=Array(h);for(let r=0;r<h;r++){let i=y*(r+e*h),o=s.subarray(i,i+y);t[r]=(0,n.mod)(a(o),u)}w[e]=t}return w}},37454:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});var n=r(26333),i=r(79561),a=r(36071),s=r(32590),o=r(18627),l=r(30898),c=r(81920),u=r(33432),d=r(29092);let h={filterOutDuplicatesByRDNS(e){let t=s.a.state.connectors,r=d.i.getRecentWallets(),n=t.map(e=>e.info?.rdns).filter(Boolean),i=r.map(e=>e.rdns).filter(Boolean),a=n.concat(i);if(a.includes("io.metamask.mobile")&&u.w.isMobile()){let e=a.indexOf("io.metamask.mobile");a[e]="io.metamask"}return e.filter(e=>!(e?.rdns&&a.includes(String(e.rdns))||!e?.rdns&&t.some(t=>t.name===e.name))&&!0)},filterOutDuplicatesByIds(e){let t=s.a.state.connectors.filter(e=>"ANNOUNCED"===e.type||"INJECTED"===e.type||"MULTI_CHAIN"===e.type),r=d.i.getRecentWallets(),n=t.map(e=>e.explorerId||e.explorerWallet?.id||e.id),i=r.map(e=>e.id),a=n.concat(i);return e.filter(e=>!a.includes(e?.id))},filterOutDuplicateWallets(e){let t=this.filterOutDuplicatesByRDNS(e);return this.filterOutDuplicatesByIds(t)},markWalletsAsInstalled(e){let{connectors:t}=s.a.state,{featuredWalletIds:r}=o.H.state,n=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&&!!n[e.rdns??""]})).sort((e,t)=>{let n=Number(t.installed)-Number(e.installed);if(0!==n)return n;if(r?.length){let n=r.indexOf(e.id),i=r.indexOf(t.id);if(-1!==n&&-1!==i)return n-i;if(-1!==n)return -1;if(-1!==i)return 1}return 0})},getConnectOrderMethod(e,t){let r=e?.connectMethodsOrder||o.H.state.features?.connectMethodsOrder,n=t||s.a.state.connectors;if(r)return r;let{injected:a,announced:u}=l.g.getConnectorsByType(n,i.N.state.recommended,i.N.state.featured),d=a.filter(l.g.showConnector),h=u.filter(l.g.showConnector);return d.length||h.length?["wallet","email","social"]:c.oU.DEFAULT_CONNECT_METHOD_ORDER},isExcluded(e){let t=!!e.rdns&&i.N.state.excludedWallets.some(t=>t.rdns===e.rdns),r=!!e.name&&i.N.state.excludedWallets.some(t=>n.y.isLowerCaseMatch(t.name,e.name));return t||r},markWalletsWithDisplayIndex:e=>e.map((e,t)=>({...e,display_index:t})),filterWalletsByWcSupport:e=>a.x.state.wcBasic?e.filter(e=>e.supports_wc):u.w.isMobile()?e.filter(e=>e.supports_wc||c.oU.MANDATORY_WALLET_IDS_ON_MOBILE.includes(e.id)):e,getWalletConnectWallets(e){let t=[...i.N.state.featured,...i.N.state.recommended];i.N.state.filteredWallets?.length>0?t.push(...i.N.state.filteredWallets):t.push(...e);let r=u.w.uniqueBy(t,"id"),n=h.markWalletsAsInstalled(r),a=h.filterWalletsByWcSupport(n);return h.markWalletsWithDisplayIndex(a)}}},37662:(e,t,r)=>{"use strict";r.d(t,{g:()=>y});var n=r(91004),i=r(36442),a=r(12050),s=r(89188),o=r(81920),l=r(33432),c=r(93346),u=r(45283),d=r(82376),h=r(42242),p=r(18627),f=r(82875);let m={paymentAsset:null,amount:null,tokenAmount:0,priceLoading:!1,error:null,exchanges:[],isLoading:!1,currentPayment:void 0,isPaymentInProgress:!1,paymentId:"",assets:[]},g=(0,n.BX)(m),y={state:g,subscribe:e=>(0,n.B1)(g,()=>e(g)),subscribeKey:(e,t)=>(0,i.u$)(g,e,t),resetState(){Object.assign(g,{...m})},async getAssetsForNetwork(e){let t=(0,c.nj)(e),r=await y.getAssetsImageAndPrice(t),n=t.map(e=>{let t="native"===e.asset?(0,s.K1)():`${e.network}:${e.asset}`,n=r.find(e=>e.fungibles?.[0]?.address?.toLowerCase()===t.toLowerCase());return{...e,price:n?.fungibles?.[0]?.price||1,metadata:{...e.metadata,iconUrl:n?.fungibles?.[0]?.iconUrl}}});return g.assets=n,n},async getAssetsImageAndPrice(e){let t=e.map(e=>"native"===e.asset?(0,s.K1)():`${e.network}:${e.asset}`);return await Promise.all(t.map(e=>u.T.fetchTokenPrice({addresses:[e]})))},getTokenAmount(){if(!g?.paymentAsset?.price)throw Error("Cannot get token price");let e=a.S.bigNumber(g.amount??0).round(8),t=a.S.bigNumber(g.paymentAsset.price).round(8);return e.div(t).round(8).toNumber()},setAmount(e){g.amount=e,g.paymentAsset?.price&&(g.tokenAmount=y.getTokenAmount())},setPaymentAsset(e){g.paymentAsset=e},isPayWithExchangeEnabled:()=>p.H.state.remoteFeatures?.payWithExchange,isPayWithExchangeSupported:()=>y.isPayWithExchangeEnabled()&&d.W.state.activeCaipNetwork&&o.oU.PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES.includes(d.W.state.activeCaipNetwork.chainNamespace),async fetchExchanges(){try{let e=y.isPayWithExchangeSupported();if(!g.paymentAsset||!e){g.exchanges=[],g.isLoading=!1;return}g.isLoading=!0;let t=await (0,c.ro)({page:0,asset:(0,c.lZ)(g.paymentAsset.network,g.paymentAsset.asset),amount:g.amount?.toString()??"0"});g.exchanges=t.exchanges.slice(0,2)}catch(e){throw f.P.showError("Unable to get exchanges"),Error("Unable to get exchanges")}
5120finally{g.isLoading=!1}},async getPayUrl(e,t){try{let r=Number(t.amount),n=await (0,c.cz)({exchangeId:e,asset:(0,c.lZ)(t.network,t.asset),amount:r.toString(),recipient:`${t.network}:${t.recipient}`});return h.E.sendEvent({type:"track",event:"PAY_EXCHANGE_SELECTED",properties:{exchange:{id:e},configuration:{network:t.network,asset:t.asset,recipient:t.recipient,amount:r},currentPayment:{type:"exchange",exchangeId:e},source:"fund-from-exchange",headless:!1}}),n}catch(e){if(e instanceof Error&&e.message.includes("is not supported"))throw Error("Asset not supported");throw Error(e.message)}},async handlePayWithExchange(e){try{let t=d.W.getAccountData()?.address;if(!t)throw Error("No account connected");if(!g.paymentAsset)throw Error("No payment asset selected");let r=l.w.returnOpenHref("","popupWindow","scrollbar=yes,width=480,height=720");if(!r)throw Error("Could not create popup window");g.isPaymentInProgress=!0,g.paymentId=crypto.randomUUID(),g.currentPayment={type:"exchange",exchangeId:e};let{network:n,asset:i}=g.paymentAsset,a={network:n,asset:i,amount:g.tokenAmount,recipient:t},s=await y.getPayUrl(e,a);if(!s){try{r.close()}catch(e){console.error("Unable to close popup window",e)}throw Error("Unable to initiate payment")}g.currentPayment.sessionId=s.sessionId,g.currentPayment.status="IN_PROGRESS",g.currentPayment.exchangeId=e,r.location.href=s.url}catch(e){g.error="Unable to initiate payment",f.P.showError(g.error)}},async waitUntilComplete({exchangeId:e,sessionId:t,paymentId:r,retries:n=20}){let i=await y.getBuyStatus(e,t,r);if("SUCCESS"===i.status||"FAILED"===i.status)return i;if(0===n)throw Error("Unable to get deposit status");return await new Promise(e=>{setTimeout(e,5e3)}),y.waitUntilComplete({exchangeId:e,sessionId:t,paymentId:r,retries:n-1})},async getBuyStatus(e,t,r){try{if(!g.currentPayment)throw Error("No current payment");let n=await (0,c.V1)({sessionId:t,exchangeId:e});if(g.currentPayment.status=n.status,"SUCCESS"===n.status||"FAILED"===n.status){let e=d.W.getAccountData()?.address;g.currentPayment.result=n.txHash,g.isPaymentInProgress=!1,h.E.sendEvent({type:"track",event:"SUCCESS"===n.status?"PAY_SUCCESS":"PAY_ERROR",properties:{message:"FAILED"===n.status?l.w.parseError(g.error):void 0,source:"fund-from-exchange",paymentId:r,configuration:{network:g.paymentAsset?.network||"",asset:g.paymentAsset?.asset||"",recipient:e||"",amount:g.amount??0},currentPayment:{type:"exchange",exchangeId:g.currentPayment?.exchangeId,sessionId:g.currentPayment?.sessionId,result:n.txHash}}})}return n}catch(e){return{status:"UNKNOWN",txHash:""}}},reset(){g.currentPayment=void 0,g.isPaymentInProgress=!1,g.paymentId="",g.paymentAsset=null,g.amount=0,g.tokenAmount=0,g.priceLoading=!1,g.error=null,g.exchanges=[],g.isLoading=!1}}},37707:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(11150),s=r(2076);r(6647),r(48029),r(66803);let o=(0,s.AH)` 5121 :host { 5122 pointer-events: none; 5123 } 5124 5125 :host > wui-flex { 5126 display: var(--w3m-tooltip-display); 5127 opacity: var(--w3m-tooltip-opacity); 5128 padding: 9px ${({spacing:e})=>e["3"]} 10px ${({spacing:e})=>e["3"]}; 5129 border-radius: ${({borderRadius:e})=>e["3"]}; 5130 color: ${({tokens:e})=>e.theme.backgroundPrimary}; 5131 position: absolute; 5132 top: var(--w3m-tooltip-top); 5133 left: var(--w3m-tooltip-left); 5134 transform: translate(calc(-50% + var(--w3m-tooltip-parent-width)), calc(-100% - 8px)); 5135 max-width: calc(var(--apkt-modal-width) - ${({spacing:e})=>e["5"]}); 5136 transition: opacity ${({durations:e})=>e.lg} 5137 ${({easings:e})=>e["ease-out-power-2"]}; 5138 will-change: opacity; 5139 opacity: 0; 5140 animation-duration: ${({durations:e})=>e.xl}; 5141 animation-timing-function: ${({easings:e})=>e["ease-out-power-2"]}; 5142 animation-name: fade-in; 5143 animation-fill-mode: forwards; 5144 } 5145 5146 :host([data-variant='shade']) > wui-flex { 5147 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 5148 } 5149 5150 :host([data-variant='shade']) > wui-flex > wui-text { 5151 color: ${({tokens:e})=>e.theme.textSecondary}; 5152 } 5153 5154 :host([data-variant='fill']) > wui-flex { 5155 background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; 5156 border: 1px solid ${({tokens:e})=>e.theme.borderPrimary}; 5157 } 5158 5159 wui-icon { 5160 position: absolute; 5161 width: 12px !important; 5162 height: 4px !important; 5163 color: ${({tokens:e})=>e.theme.foregroundPrimary}; 5164 } 5165 5166 wui-icon[data-placement='top'] { 5167 bottom: 0px; 5168 left: 50%; 5169 transform: translate(-50%, 95%); 5170 } 5171 5172 wui-icon[data-placement='bottom'] { 5173 top: 0; 5174 left: 50%; 5175 transform: translate(-50%, -95%) rotate(180deg); 5176 } 5177 5178 wui-icon[data-placement='right'] { 5179 top: 50%; 5180 left: 0; 5181 transform: translate(-65%, -50%) rotate(90deg); 5182 } 5183 5184 wui-icon[data-placement='left'] { 5185 top: 50%; 5186 right: 0%; 5187 transform: translate(65%, -50%) rotate(270deg); 5188 } 5189 5190 @keyframes fade-in { 5191 from { 5192 opacity: 0; 5193 } 5194 to { 5195 opacity: 1; 5196 } 5197 } 5198`;var l=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let c=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.open=a.I.state.open,this.message=a.I.state.message,this.triggerRect=a.I.state.triggerRect,this.variant=a.I.state.variant,this.unsubscribe.push(a.I.subscribe(e=>{this.open=e.open,this.message=e.message,this.triggerRect=e.triggerRect,this.variant=e.variant}))}
5198disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){this.dataset.variant=this.variant;let e=this.triggerRect.top,t=this.triggerRect.left;return this.style.cssText=` 5199 --w3m-tooltip-top: ${e}px; 5200 --w3m-tooltip-left: ${t}px; 5201 --w3m-tooltip-parent-width: ${this.triggerRect.width/2}px; 5202 --w3m-tooltip-display: ${this.open?"flex":"none"}; 5203 --w3m-tooltip-opacity: ${+!!this.open}; 5204 `,(0,n.qy)`<wui-flex> 5205 <wui-icon data-placement="top" size="inherit" name="cursor"></wui-icon> 5206 <wui-text color="primary" variant="sm-regular">${this.message}</wui-text> 5207 </wui-flex>`}};c.styles=[o],l([(0,i.wk)()],c.prototype,"open",void 0),l([(0,i.wk)()],c.prototype,"message",void 0),l([(0,i.wk)()],c.prototype,"triggerRect",void 0),l([(0,i.wk)()],c.prototype,"variant",void 0),c=l([(0,s.EM)("w3m-tooltip")],c)},37833:(e,t)=>{"use strict";async function r(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}Object.defineProperty(t,"__esModule",{value:!0}),t.sendRawTransaction=r},38149:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransaction=s;let n=r(44789),i=r(27083),a=r(93771);async function s(e,{blockHash:t,blockNumber:r,blockTag:s,hash:o,index:l,sender:c,nonce:u}){let d=s||"latest",h=void 0!==r?(0,i.numberToHex)(r):void 0,p=null;if(o?p=await e.request({method:"eth_getTransactionByHash",params:[o]},{dedupe:!0}):t?p=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,i.numberToHex)(l)]},{dedupe:!0}):(h||d)&&"number"==typeof l?p=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[h||d,(0,i.numberToHex)(l)]},{dedupe:!!h}):c&&"number"==typeof u&&(p=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[c,(0,i.numberToHex)(u)]},{dedupe:!0})),!p)throw new n.TransactionNotFoundError({blockHash:t,blockNumber:r,blockTag:d,hash:o,index:l});return(e.chain?.formatters?.transaction?.format||a.formatTransaction)(p,"getTransaction")}},38297:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContractError=function(e,{abi:t,address:r,args:l,docsPath:c,functionName:u,sender:d}){let h=e instanceof a.RawContractError?e:e instanceof i.BaseError?e.walk(e=>"data"in e)||e.walk():{},{code:p,data:f,details:m,message:g,shortMessage:y}=h,b=e instanceof n.AbiDecodingZeroDataError?new a.ContractFunctionZeroDataError({functionName:u,cause:e}):[3,o.InternalRpcError.code].includes(p)&&(f||m||g||y)||p===o.InvalidInputRpcError.code&&"execution reverted"===m&&f?new a.ContractFunctionRevertedError({abi:t,data:"object"==typeof f?f.data:f,functionName:u,message:h instanceof s.RpcRequestError?m:y??g,cause:e}):e;return new a.ContractFunctionExecutionError(b,{abi:t,args:l,contractAddress:r,docsPath:c,functionName:u,sender:d})};let n=r(82311),i=r(45226),a=r(81701),s=r(17208),o=r(69902)},38693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertSize=function(e,t){if(n.size(e)>t)throw new n.SizeOverflowError({givenSize:n.size(e),maxSize:t})},t.assertStartOffset=function(e,t){if("number"==typeof t&&t>0&&t>n.size(e)-1)throw new n.SliceOffsetOutOfBoundsError({offset:t,position:"start",size:n.size(e)})},t.assertEndOffset=function(e,t,r){if("number"==typeof t&&"number"==typeof r&&n.size(e)!==r-t)throw new n.SliceOffsetOutOfBoundsError({offset:r,position:"end",size:n.size(e)})},t.pad=function(e,t={}){let{dir:r,size:i=32}=t;if(0===i)return e;let a=e.replace("0x","");if(a.length>2*i)throw new n.SizeExceedsPaddingSizeError({size:Math.ceil(a.length/2),targetSize:i,type:"Hex"});return`0x${a["right"===r?"padEnd":"padStart"](2*i,"0")}`},t.trim=function(e,t={}){let{dir:r="left"}=t,n=e.replace("0x",""),i=0;for(let e=0;e<n.length-1;e++)if("0"===n["left"===r?e:n.length-e-1].toString())i++;else break;return"0"===(n="left"===r?n.slice(i):n.slice(0,n.length-i))?"0x":"right"===r&&n.length%2==1?`0x${n}0`:`0x${n}`};let n=r(70259)},39081:(e,t)=>{"use strict";async function r(e){return await e.request({method:"txpool_content"})}Object.defineProperty(t,"__esModule",{value:!0}),t.getTxpoolContent=r},39091:(e,t,r)=>{"use strict";
5207Object.defineProperty(t,"__esModule",{value:!0}),t.hashMessage=function(e,t){return(0,n.keccak256)((0,i.toPrefixedMessage)(e),t)};let n=r(4319),i=r(21799)},39306:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidSerializedSizeError=t.InvalidUncompressedPrefixError=t.InvalidCompressedPrefixError=t.InvalidPrefixError=t.InvalidError=void 0,t.assert=o,t.compress=function(e){let{x:t,y:r}=e;return{prefix:r%2n===0n?2:3,x:t}},t.from=function(e){let t=(()=>{if(a.validate(e))return c(e);if(n.validate(e))return l(e);let{prefix:t,x:r,y:i}=e;return"bigint"==typeof r&&"bigint"==typeof i?{prefix:t??4,x:r,y:i}:{prefix:t,x:r}})();return o(t),t},t.fromBytes=l,t.fromHex=c,t.toBytes=function(e,t={}){return n.fromHex(u(e,t))},t.toHex=u,t.validate=function(e,t={}){try{return o(e,t),!0}catch(e){return!1}};let n=r(31837),i=r(53937),a=r(70259),s=r(71720);function o(e,t={}){let{compressed:r}=t,{prefix:n,x:i,y:a}=e;if(!1===r||"bigint"==typeof i&&"bigint"==typeof a){if(4!==n)throw new h({prefix:n,cause:new f});return}if(!0===r||"bigint"==typeof i&&void 0===a){if(3!==n&&2!==n)throw new h({prefix:n,cause:new p});return}throw new d({publicKey:e})}function l(e){return c(a.fromBytes(e))}function c(e){if(132!==e.length&&130!==e.length&&68!==e.length)throw new m({publicKey:e});if(130===e.length)return{prefix:4,x:BigInt(a.slice(e,0,32)),y:BigInt(a.slice(e,32,64))};if(132===e.length){let t=Number(a.slice(e,0,1));return{prefix:t,x:BigInt(a.slice(e,1,33)),y:BigInt(a.slice(e,33,65))}}return{prefix:Number(a.slice(e,0,1)),x:BigInt(a.slice(e,1,33))}}function u(e,t={}){o(e);let{prefix:r,x:n,y:i}=e,{includePrefix:s=!0}=t;return a.concat(s?a.fromNumber(r,{size:1}):"0x",a.fromNumber(n,{size:32}),"bigint"==typeof i?a.fromNumber(i,{size:32}):"0x")}class d extends i.BaseError{constructor({publicKey:e}){super(`Value \`${s.stringify(e)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}t.InvalidError=d;class h extends i.BaseError{constructor({prefix:e,cause:t}){super(`Prefix "${e}" is invalid.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}t.InvalidPrefixError=h;class p extends i.BaseError{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}t.InvalidCompressedPrefixError=p;class f extends i.BaseError{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}t.InvalidUncompressedPrefixError=f;class m extends i.BaseError{constructor({publicKey:e}){super(`Value \`${e}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${a.size(a.from(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}}t.InvalidSerializedSizeError=m},39365:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},39379:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeeHistory=a;let n=r(27083),i=r(24773);async function a(e,{blockCount:t,blockNumber:r,blockTag:a="latest",rewardPercentiles:s}){let o="bigint"==typeof r?(0,n.numberToHex)(r):void 0,l=await e.request({method:"eth_feeHistory",params:[(0,n.numberToHex)(t),o||a,s]},{dedupe:!!o});return(0,i.formatFeeHistory)(l)}},39696:(e,t,r)=>{"use strict";r.d(t,{eL:()=>n,sz:()=>i});let n={gwei:9,wei:18},i={ether:-9,wei:9}},39909:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(55284),s=r(46756),o=r(63412),l=r(91392);let c=(0,l.AH)` 5208 :host { 5209 display: block; 5210 width: var(--local-width); 5211 height: var(--local-height); 5212 } 5213 5214 img { 5215 display: block; 5216 width: 100%; 5217 height: 100%; 5218 object-fit: cover; 5219 object-position: center center; 5220 border-radius: inherit; 5221 user-select: none;
5222 user-drag: none; 5223 -webkit-user-drag: none; 5224 -khtml-user-drag: none; 5225 -moz-user-drag: none; 5226 -o-user-drag: none; 5227 } 5228 5229 :host([data-boxed='true']) { 5230 width: 40px; 5231 height: 40px; 5232 display: flex; 5233 align-items: center; 5234 justify-content: center; 5235 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 5236 border-radius: ${({borderRadius:e})=>e[2]}; 5237 } 5238 5239 :host([data-boxed='true']) img { 5240 width: 20px; 5241 height: 20px; 5242 border-radius: ${({borderRadius:e})=>e[16]}; 5243 } 5244 5245 :host([data-full='true']) img { 5246 width: 100%; 5247 height: 100%; 5248 } 5249 5250 :host([data-boxed='true']) wui-icon { 5251 width: 20px; 5252 height: 20px; 5253 } 5254 5255 :host([data-icon='error']) { 5256 background-color: ${({tokens:e})=>e.core.backgroundError}; 5257 } 5258 5259 :host([data-rounded='true']) { 5260 border-radius: ${({borderRadius:e})=>e[16]}; 5261 } 5262`;var u=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let d=class extends n.WF{constructor(){super(...arguments),this.src="./path/to/image.jpg",this.alt="Image",this.size=void 0,this.boxed=!1,this.rounded=!1,this.fullSize=!1}render(){let e={inherit:"inherit",xxs:"2",xs:"3",sm:"4",md:"4",mdl:"5",lg:"5",xl:"6",xxl:"7","3xl":"8","4xl":"9","5xl":"10"};return(this.style.cssText=` 5263 --local-width: ${this.size?`var(--apkt-spacing-${e[this.size]});`:"100%"}; 5264 --local-height: ${this.size?`var(--apkt-spacing-${e[this.size]});`:"100%"}; 5265 `,this.dataset.boxed=this.boxed?"true":"false",this.dataset.rounded=this.rounded?"true":"false",this.dataset.full=this.fullSize?"true":"false",this.dataset.icon=this.iconColor||"inherit",this.icon)?(0,n.qy)`<wui-icon 5266 color=${this.iconColor||"inherit"} 5267 name=${this.icon} 5268 size="lg" 5269 ></wui-icon> `:this.logo?(0,n.qy)`<wui-icon size="lg" color="inherit" name=${this.logo}></wui-icon> `:(0,n.qy)`<img src=${(0,a.J)(this.src)} alt=${this.alt} @error=${this.handleImageError} />`}handleImageError(){this.dispatchEvent(new CustomEvent("onLoadError",{bubbles:!0,composed:!0}))}};d.styles=[s.W5,c],u([(0,i.MZ)()],d.prototype,"src",void 0),u([(0,i.MZ)()],d.prototype,"logo",void 0),u([(0,i.MZ)()],d.prototype,"icon",void 0),u([(0,i.MZ)()],d.prototype,"iconColor",void 0),u([(0,i.MZ)()],d.prototype,"alt",void 0),u([(0,i.MZ)()],d.prototype,"size",void 0),u([(0,i.MZ)({type:Boolean})],d.prototype,"boxed",void 0),u([(0,i.MZ)({type:Boolean})],d.prototype,"rounded",void 0),u([(0,i.MZ)({type:Boolean})],d.prototype,"fullSize",void 0),d=u([(0,o.E)("wui-image")],d)},39922:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifySiweMessage=o;let n=r(39091),i=r(97262),a=r(49821),s=r(83712);async function o(e,t){let{address:r,domain:o,message:l,nonce:c,scheme:u,signature:d,time:h=new Date,...p}=t,f=(0,i.parseSiweMessage)(l);if(!f.address||!(0,a.validateSiweMessage)({address:r,domain:o,message:f,nonce:c,scheme:u,time:h}))return!1;let m=(0,n.hashMessage)(l);return(0,s.verifyHash)(e,{address:f.address,hash:m,signature:d,...p})}},39945:(e,t,r)=>{"use strict";r.d(t,{v4:()=>c});var n,i=new Uint8Array(16);let a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var s=[],o=0;o<256;++o)s.push((o+256).toString(16).substr(1));let l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase();if(!("string"==typeof r&&a.test(r)))throw TypeError("Stringified UUID is invalid");return r},c=function(e,t,r){var a=(e=e||{}).random||(e.rng||function(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(i)})();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){r=r||0;for(var s=0;s<16;++s)t[r+s]=a[s];return t}return l(a)}},39978:(e,t,r)=>{"use strict";
5269Object.defineProperty(t,"__esModule",{value:!0}),t.requestAddresses=i;let n=r(24998);async function i(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(e=>(0,n.getAddress)(e))}},40216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureErc6492=void 0,t.SignatureErc6492=r(1607)},40268:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(33028).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},40537:(e,t,r)=>{"use strict";r.d(t,{DS:()=>C,OG:()=>v,Ph:()=>u,SJ:()=>A,aK:()=>b,d6:()=>s,dJ:()=>w,eV:()=>o,ex:()=>m,fg:()=>E,lX:()=>d,lq:()=>h,nC:()=>g,qj:()=>f,x:()=>x,z:()=>p,zW:()=>l});var n=r(26531);let i=BigInt(0),a=BigInt(1);function s(e,t=""){if("boolean"!=typeof e)throw Error((t&&`"${t}"`)+"expected boolean, got type="+typeof e);return e}function o(e,t,r=""){let i=(0,n.aY)(e),a=e?.length,s=void 0!==t;if(!i||s&&a!==t)throw Error((r&&`"${r}" `)+"expected Uint8Array"+(s?` of length ${t}`:"")+", got "+(i?`length=${a}`:`type=${typeof e}`));return e}function l(e){let t=e.toString(16);return 1&t.length?"0"+t:t}function c(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return""===e?i:BigInt("0x"+e)}function u(e){return c((0,n.My)(e))}function d(e){return(0,n.DO)(e),c((0,n.My)(Uint8Array.from(e).reverse()))}function h(e,t){return(0,n.aT)(e.toString(16).padStart(2*t,"0"))}function p(e,t){return h(e,t).reverse()}function f(e,t,r){let i;if("string"==typeof t)try{i=(0,n.aT)(t)}catch(t){throw Error(e+" must be hex string or Uint8Array, cause: "+t)}else if((0,n.aY)(t))i=Uint8Array.from(t);else throw Error(e+" must be hex string or Uint8Array");let a=i.length;if("number"==typeof r&&a!==r)throw Error(e+" of length "+r+" expected, got "+a);return i}function m(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r}function g(e){return Uint8Array.from(e)}let y=e=>"bigint"==typeof e&&i<=e;function b(e,t,r,n){if(!(y(t)&&y(r)&&y(n))||!(r<=t)||!(t<n))throw Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)}function w(e){let t;for(t=0;e>i;e>>=a,t+=1);return t}let v=e=>(a<<BigInt(e))-a;function E(e,t,r){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let i=e=>new Uint8Array(e),a=e=>Uint8Array.of(e),s=i(e),o=i(e),l=0,c=()=>{s.fill(1),o.fill(0),l=0},u=(...e)=>r(o,s,...e),d=(e=i(0))=>{o=u(a(0),e),s=u(),0!==e.length&&(o=u(a(1),e),s=u())},h=()=>{if(l++>=1e3)throw Error("drbg: tried 1000 values");let e=0,r=[];for(;e<t;){let t=(s=u()).slice();r.push(t),e+=s.length}return(0,n.Id)(...r)};return(e,t)=>{let r;for(c(),d(e);!(r=t(h()));)d();return c(),r}}function C(e,t,r={}){if(!e||"object"!=typeof e)throw Error("expected valid options object");function n(t,r,n){let i=e[t];if(n&&void 0===i)return;let a=typeof i;if(a!==r||null===i)throw Error(`param "${t}" is invalid: expected ${r}, got ${a}`)}Object.entries(t).forEach(([e,t])=>n(e,t,!1)),Object.entries(r).forEach(([e,t])=>n(e,t,!0))}let A=()=>{throw Error("not implemented")};function x(e){let t=new WeakMap;return(r,...n)=>{let i=t.get(r);if(void 0!==i)return i;let a=e(r,...n);return t.set(r,a),a}}},40549:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeDeployData=function(e){let{abi:t,bytecode:r,data:s}=e;if(s===r)return{bytecode:r};let o=t.find(e=>"type"in e&&"constructor"===e.type);if(!o)throw new n.AbiConstructorNotFoundError({docsPath:a});if(!("inputs"in o)||!o.inputs||0===o.inputs.length)throw new n.AbiConstructorParamsNotFoundError({docsPath:a});return{args:(0,i.decodeAbiParameters)(o.inputs,`0x${s.replace(r,"")}`),bytecode:r}};let n=r(82311),i=r(29060),a="/docs/contract/decodeDeployData"},40678:(e,t,r)=>{"use strict";r.d(t,{Q:()=>a});var n=r(39696),i=r(95613);function a(e,t="wei"){return(0,i.J)(e,n.sz[t])}},40690:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noble=void 0,t.createKeyPair=function(e={}){let{as:t="Hex"}=e,r=u({as:t}),n=c({privateKey:r});return{privateKey:r,publicKey:n}},t.getPublicKey=c,t.getSharedSecret=function(e){let{as:t="Hex",privateKey:r,publicKey:i}=e,a=n.secp256k1.ProjectivePoint.fromHex(l.toHex(i).slice(2)).multiply(n.secp256k1.utils.normPrivateKeyToScalar(s.from(r).slice(2))).toRawBytes(!0);return"Hex"===t?s.fromBytes(a):a},t.randomPrivateKey=u,t.recoverAddress=d,t.recoverPublicKey=h,t.sign=function(e){let{extraEntropy:t=o.extraEntropy,hash:r,payload:i,privateKey:l}=e,{r:c,s:u,recovery:d}=n.secp256k1.sign(a.from(i),a.from(l),{extraEntropy:"boolean"==typeof t?t:s.from(t).slice(2),lowS:!0,...r?{prehash:!0}:{}});return{r:c,s:u,yParity:d}},t.verify=function(e){let{hash:t,payload:r}=e;return e.address?i.isEqual(e.address,d({payload:r,signature:e.signature})):n.secp256k1.verify(e.signature,a.from(r),l.toBytes(e.publicKey),...t?[{prehash:!0,lowS:!0}]:[])};let n=r(6792),i=r(92898),a=r(31837),s=r(70259),o=r(65253),l=r(39306);function c(e){let{privateKey:t}=e,r=n.secp256k1.ProjectivePoint.fromPrivateKey(s.from(t).slice(2));return l.from(r)}function u(e={}){let{as:t="Hex"}=e,r=n.secp256k1.utils.randomPrivateKey();return"Hex"===t?s.fromBytes(r):r}function d(e){return i.fromPublicKey(h(e))}function h(e){let{payload:t,signature:r}
5269=e,{r:i,s:a,yParity:o}=r,c=new n.secp256k1.Signature(BigInt(i),BigInt(a)).addRecoveryBit(o).recoverPublicKey(s.from(t).substring(2));return l.from(c)}t.noble=n.secp256k1},40699:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUrl=function(e){return e},t.getVersion=function(){return n.version},t.prettyPrint=function(e){if(!e)return"";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")};let n=r(83038)},40771:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatEther=function(e,t="wei"){return(0,i.formatUnits)(e,n.etherUnits[t])};let n=r(9949),i=r(88344)},40797:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.setBaseUrl=void 0,t.relayTransaction=function(e,t){return(0,a.postEndpoint)(o,"/v1/chains/{chainId}/relay",{path:{chainId:e},body:t})},t.getRelayCount=function(e,t){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}/relay/{address}",{path:{chainId:e,address:t}})},t.getSafeInfo=function(e,t){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:e,address:t}})},t.getIncomingTransfers=function(e,t,r,n){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/incoming-transfers/",{path:{chainId:e,address:t},query:r},n)},t.getModuleTransactions=function(e,t,r,n){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/module-transactions/",{path:{chainId:e,address:t},query:r},n)},t.getMultisigTransactions=function(e,t,r,n){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/multisig-transactions/",{path:{chainId:e,address:t},query:r},n)},t.getBalances=function(e,t,r="usd",n={}){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:e,address:t,currency:r},query:n})},t.getFiatCurrencies=function(){return(0,a.getEndpoint)(o,"/v1/balances/supported-fiat-codes")},t.getOwnedSafes=function(e,t){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:e,address:t}})},t.getAllOwnedSafes=function(e){return(0,a.getEndpoint)(o,"/v1/owners/{address}/safes",{path:{address:e}})},t.getCollectibles=function(e,t,r={}){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:e,address:t},query:r})},t.getCollectiblesPage=function(e,t,r={},n){return(0,a.getEndpoint)(o,"/v2/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:e,address:t},query:r},n)},t.getTransactionHistory=function(e,t,r={},n){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:e,safe_address:t},query:r},n)},t.getTransactionQueue=function(e,t,r={},n){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:e,safe_address:t},query:r},n)},t.getTransactionDetails=function(e,t){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:e,transactionId:t}})},t.deleteTransaction=function(e,t,r){return(0,a.deleteEndpoint)(o,"/v1/chains/{chainId}/transactions/{safeTxHash}",{path:{chainId:e,safeTxHash:t},body:{signature:r}})},t.postSafeGasEstimation=function(e,t,r){return(0,a.postEndpoint)(o,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:e,safe_address:t},body:r})},t.getNonces=function(e,t){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/nonces",{path:{chainId:e,safe_address:t}})},t.proposeTransaction=function(e,t,r){return(0,a.postEndpoint)(o,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:e,safe_address:t},body:r})},t.getConfirmationView=function(e,t,r,n,i,s){return(0,a.postEndpoint)(o,"/v1/c
5269hains/{chainId}/safes/{safe_address}/views/transaction-confirmation",{path:{chainId:e,safe_address:t},body:{operation:r,data:n,to:i,value:s}})},t.getTxPreview=function(e,t,r,n,i,s){return(0,a.postEndpoint)(o,"/v1/chains/{chainId}/transactions/{safe_address}/preview",{path:{chainId:e,safe_address:t},body:{operation:r,data:n,to:i,value:s}})},t.getChainsConfig=function(e){return(0,a.getEndpoint)(o,"/v1/chains",{query:e})},t.getChainConfig=function(e){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}",{path:{chainId:e}})},t.getSafeApps=function(e,t={}){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}/safe-apps",{path:{chainId:e},query:t})},t.getMasterCopies=function(e){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:e}})},t.getDecodedData=function(e,t,r,n){return(0,a.postEndpoint)(o,"/v1/chains/{chainId}/data-decoder",{path:{chainId:e},body:{operation:t,data:r,to:n}})},t.getSafeMessages=function(e,t,r){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:e,safe_address:t},query:{}},r)},t.getSafeMessage=function(e,t){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}/messages/{message_hash}",{path:{chainId:e,message_hash:t}})},t.proposeSafeMessage=function(e,t,r){return(0,a.postEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:e,safe_address:t},body:r})},t.confirmSafeMessage=function(e,t,r){return(0,a.postEndpoint)(o,"/v1/chains/{chainId}/messages/{message_hash}/signatures",{path:{chainId:e,message_hash:t},body:r})},t.getDelegates=function(e,t={}){return(0,a.getEndpoint)(o,"/v2/chains/{chainId}/delegates",{path:{chainId:e},query:t})},t.registerDevice=function(e){return(0,a.postEndpoint)(o,"/v1/register/notifications",{body:e})},t.unregisterSafe=function(e,t,r){return(0,a.deleteEndpoint)(o,"/v1/chains/{chainId}/notifications/devices/{uuid}/safes/{safe_address}",{path:{chainId:e,safe_address:t,uuid:r}})},t.unregisterDevice=function(e,t){return(0,a.deleteEndpoint)(o,"/v1/chains/{chainId}/notifications/devices/{uuid}",{path:{chainId:e,uuid:t}})},t.registerEmail=function(e,t,r,n){return(0,a.postEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/emails",{path:{chainId:e,safe_address:t},body:r,headers:n})},t.changeEmail=function(e,t,r,n,i){return(0,a.putEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:e,safe_address:t,signer:r},body:n,headers:i})},t.resendEmailVerificationCode=function(e,t,r){return(0,a.postEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}/verify-resend",{path:{chainId:e,safe_address:t,signer:r},body:""})},t.verifyEmail=function(e,t,r,n){return(0,a.putEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}/verify",{path:{chainId:e,safe_address:t,signer:r},body:n})},t.getRegisteredEmail=function(e,t,r,n){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:e,safe_address:t,signer:r},headers:n})},t.deleteRegisteredEmail=function(e,t,r,n){return(0,a.deleteEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:e,safe_address:t,signer:r},headers:n})},t.registerRecoveryModule=function(e,t,r){return(0,a.postEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/recovery",{path:{chainId:e,safe_address:t},body:r})},t.unsubscribeSingle=function(e){return(0,a.deleteEndpoint)(o,"/v1/subscriptions",{query:e})},t.unsubscribeAll=function(e){return(0,a.deleteEndpoint)(o,"/v1/subscriptions/all",{query:e})},t.getSafeOverviews=function(e,t){return(0,a.getEndpoint)(o,"/v1/safes",{query:Object.assign(Object.assign({},t),{safes:e.join(",")})})},t.getContract=function(e,t){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}/contracts/{contractAddress}",{path:{chainId:e,contractAddress:t}})},t.getAuthNonce=function(){return(0,a.getEndpoint)(o,"/v1/auth/nonce",{credentials:"include"})},t.verifyAuth=function(e){return(0,a.postEndpoint)(o,"/v1/auth/verify",{body:e,credentials:"include"})},t.createAccount=function(e){return(0,a.postEndpoint)(o,"/v1/accounts",{body:e,credentials:"include"})},t.getAccount=function(e){return(0,a.getEndpoint)(o,"/v1/accounts/{address}",{path:{address:e}
5269,credentials:"include"})},t.deleteAccount=function(e){return(0,a.deleteEndpoint)(o,"/v1/accounts/{address}",{path:{address:e},credentials:"include"})},t.getAccountDataTypes=function(){return(0,a.getEndpoint)(o,"/v1/accounts/data-types")},t.getAccountDataSettings=function(e){return(0,a.getEndpoint)(o,"/v1/accounts/{address}/data-settings",{path:{address:e},credentials:"include"})},t.putAccountDataSettings=function(e,t){return(0,a.putEndpoint)(o,"/v1/accounts/{address}/data-settings",{path:{address:e},body:t,credentials:"include"})},t.getIndexingStatus=function(e){return(0,a.getEndpoint)(o,"/v1/chains/{chainId}/about/indexing",{path:{chainId:e}})};let a=r(60654),s=r(54545);i(r(88579),t),i(r(37331),t),i(r(53324),t),i(r(25891),t),i(r(41868),t),i(r(80783),t),i(r(69940),t),i(r(99323),t),i(r(90295),t),i(r(27806),t);let o=s.DEFAULT_BASE_URL;t.setBaseUrl=e=>{o=e}},40913:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpc=function(e){return{...e,amount:BigInt(e.amount),index:Number(e.index),validatorIndex:Number(e.validatorIndex)}},t.toRpc=function(e){return{address:e.address,amount:n.fromNumber(e.amount),index:n.fromNumber(e.index),validatorIndex:n.fromNumber(e.validatorIndex)}};let n=r(70259)},40925:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBalance=c;let n=r(91472),i=r(72431),a=r(25230),s=r(73506),o=r(95847),l=r(10989);async function c(e,{address:t,blockHash:r,blockNumber:c,blockTag:u=e.experimental_blockTag??"latest",requireCanonical:d}){let h=(0,s.formatBlockParameter)({blockHash:r,blockNumber:c,blockTag:u,requireCanonical:d});if(e.batch?.multicall&&e.chain?.contracts?.multicall3){let s=e.chain.contracts.multicall3.address,h=(0,a.encodeFunctionData)({abi:n.multicall3Abi,functionName:"getEthBalance",args:[t]}),{data:p}=await (0,o.getAction)(e,l.call,"call")({to:s,data:h,blockHash:r,blockNumber:c,blockTag:u,requireCanonical:d});return(0,i.decodeFunctionResult)({abi:n.multicall3Abi,functionName:"getEthBalance",args:[t],data:p||"0x"})}return BigInt(await e.request({method:"eth_getBalance",params:[t,h]}))}},41240:(e,t,r)=>{"use strict";r.d(t,{db:()=>a,eV:()=>i});var n=r(19748);function i(e,{dir:t,size:r=32}={}){return"string"==typeof e?a(e,{dir:t,size:r}):function(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new n.Fl({size:e.length,targetSize:r,type:"bytes"});let i=new Uint8Array(r);for(let n=0;n<r;n++){let a="right"===t;i[a?n:r-n-1]=e[a?n:e.length-n-1]}return i}(e,{dir:t,size:r})}function a(e,{dir:t,size:r=32}={}){if(null===r)return e;let i=e.replace("0x","");if(i.length>2*r)throw new n.Fl({size:Math.ceil(i.length/2),targetSize:r,type:"hex"});return`0x${i["right"===t?"padEnd":"padStart"](2*r,"0")}`}},41445:(e,t,r)=>{"use strict";r.d(t,{Zr:()=>i});let n=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>n(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>n(t)(e)}}},i=(e,t)=>(r,i,a)=>{let s,o={storage:function(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var t;let n=e=>null===e?null:JSON.parse(e,void 0),i=null!=(t=r.getItem(e))?t:null;return i instanceof Promise?i.then(n):n(i)},setItem:(e,t)=>r.setItem(e,JSON.stringify(t,void 0)),removeItem:e=>r.removeItem(e)}}(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},l=!1,c=new Set,u=new Set,d=o.storage;if(!d)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...e)},i,a);let h=()=>{let e=o.partialize({...i()});return d.setItem(o.name,{state:e,version:o.version})},p=a.setState;a.setState=(e,t)=>(p(e,t),h());let f=e((...e)=>(r(...e),h()),i,a);a.getInitialState=()=>f;let m=()=>{var e,t;if(!d)return;l=!1,c.forEach(e=>{var t;return e(null!=(t=i())?t:f)});let a=(null==(t=o.onRehydrateStorage)?void 0:t.call(o,null!=(e=i())?e:f))||void 0;return n(d.getItem.bind(d))(o.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===o.version)return[!1,e.state];else{if(o.migrate){let t=o.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;let[n,a]=e;if(r(s=o.merge(a,null!=(t=i())?t:f),!0),n)return h()}).then(()=>
5269{null==a||a(s,void 0),s=i(),l=!0,u.forEach(e=>e(s))}).catch(e=>{null==a||a(void 0,e)})};return a.persist={setOptions:e=>{o={...o,...e},e.storage&&(d=e.storage)},clearStorage:()=>{null==d||d.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>l,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},o.skipHydration||m(),s||f}},41636:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverAddress=a;let n=r(79535),i=r(19068);async function a({hash:e,signature:t}){return(0,n.publicKeyToAddress)(await (0,i.recoverPublicKey)({hash:e,signature:t}))}},41776:(e,t,r)=>{"use strict";r.d(t,{o:()=>n});let n={METMASK_CONNECTOR_NAME:"MetaMask",TRUST_CONNECTOR_NAME:"Trust Wallet",SOLFLARE_CONNECTOR_NAME:"Solflare",PHANTOM_CONNECTOR_NAME:"Phantom",COIN98_CONNECTOR_NAME:"Coin98",MAGIC_EDEN_CONNECTOR_NAME:"Magic Eden",BACKPACK_CONNECTOR_NAME:"Backpack",BITGET_CONNECTOR_NAME:"Bitget Wallet",FRONTIER_CONNECTOR_NAME:"Frontier",XVERSE_CONNECTOR_NAME:"Xverse Wallet",LEATHER_CONNECTOR_NAME:"Leather",OKX_CONNECTOR_NAME:"OKX Wallet",BINANCE_CONNECTOR_NAME:"Binance Wallet",EIP155:r(57873).o.CHAIN.EVM,ADD_CHAIN_METHOD:"wallet_addEthereumChain",EIP6963_ANNOUNCE_EVENT:"eip6963:announceProvider",EIP6963_REQUEST_EVENT:"eip6963:requestProvider",CONNECTOR_RDNS_MAP:{coinbaseWallet:"com.coinbase.wallet",coinbaseWalletSDK:"com.coinbase.wallet"},CONNECTOR_TYPE_EXTERNAL:"EXTERNAL",CONNECTOR_TYPE_WALLET_CONNECT:"WALLET_CONNECT",CONNECTOR_TYPE_INJECTED:"INJECTED",CONNECTOR_TYPE_ANNOUNCED:"ANNOUNCED",CONNECTOR_TYPE_AUTH:"AUTH",CONNECTOR_TYPE_MULTI_CHAIN:"MULTI_CHAIN",CONNECTOR_TYPE_W3M_AUTH:"AUTH",getSDKVersionWarningMessage:(e,t)=>` 5270 @@@@@@@ @@@@@@@@@@@@@@@@@@ 5271 @@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ 5272 @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@ 5273 @@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ 5274 @@@@@@@@@@@@@@@ @@@@@@@@@@@@@@ @@@@@@@@@@@ 5275 @@@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@ 5276 @@@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@ 5277 @@@@@@@@@@@@@@@ @@@@@@@@@@@@ @@@@@@@@@@@@@ 5278 @@@@@@ @@@@@@ @@@@@@@@@@@ @@@@@@@@@@@@@@ 5279 @@@@@@ @@@@@@ @@@@@@@@@@@ @@@@@@@@@@@@@@@ 5280 @@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@@@@@@@@@@ 5281 @@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ 5282 @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@ 5283 @@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ 5284 @@@@@ @@@@@@@@@@@@@@@@@@ 5285 5286AppKit SDK version ${e} is outdated. Latest version is ${t}. Please update to the latest version for bug fixes and new features. 5287 5288Changelog: https://github.com/reown-com/appkit/releases 5289NPM Registry: https://www.npmjs.com/package/@reown/appkit`}},41805:(e,t)=>{"use strict";async function r(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}Object.defineProperty(t,"__esModule",{value:!0}),t.getPermissions=r},41868:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.TokenType=void 0,function(e){e.ERC20="ERC20",e.ERC721="ERC721",e.NATIVE_TOKEN="NATIVE_TOKEN",e.UNKNOWN="UNKNOWN"}(r||(t.TokenType=r={}))},41906:(e,t,r)=>{"use strict";r.d(t,{t:()=>b});let n="0x0000000000000000000000000000000000000000000000000000000000000000";var i=r(98668),a=r(56595),s=r(44582);let o=BigInt(0),l=BigInt(1),c=BigInt(2),u=BigInt(27),d=BigInt(28),h=BigInt(35),p=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),f=p/c,m=Symbol.for("nodejs.util.inspect.custom"),g={};function y(e){return(0,i.nx)((0,a.c4)(e),32)}class b{#eY;#eQ;#eX;#e0;get r(){return this.#eY}set r(e){(0,s.MR)(32===(0,i.pO)(e),"invalid r","value",e),this.#eY=(0,i.c$)(e)}get s(){return(0,s.MR)(8>parseInt(this.#eQ.substring(0,3)),"non-canonical s; use ._s","s",this.#eQ),this.#eQ}set s(e){(0,s.MR)(32===(0,i.pO)(e),"invalid s","value",e),this.#eQ=(0,i.c$)(e)}get _s(){return this.#eQ}isValid(){return BigInt(this.#eQ)<=f}get v(){return this.#eX}set v(e){let t=(0,a.WZ)(e,"value");(0,s.MR)(27===t||28===t,"invalid v","v",e),this.#eX=t}get networkV(){return this.#e0}get legacyChainId(){let e=this.networkV;return null==e?null:b.getChainId(e)}get yParity(){return+(27!==this.v)}get yParityAndS(){let e=(0,i.q5)(this.s);return this.yParity&&(e[0]|=128),(0,i.c$)(e)}get compactSerialized(){return(0,i.xW)([this.r,this.yParityAndS])}get serialized(){return(0,i.xW)([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(e,t,r,n){(0,s.gk)(e,g,"Signature"),this.#eY=t,this.#eQ=r,this.#eX=n,this.#e0=null}
5289getCanonical(){if(this.isValid())return this;let e=p-BigInt(this._s),t=55-this.v,r=new b(g,this.r,y(e),t);return this.networkV&&(r.#e0=this.networkV),r}clone(){let e=new b(g,this.r,this._s,this.v);return this.networkV&&(e.#e0=this.networkV),e}toJSON(){let e=this.networkV;return{_type:"signature",networkV:null!=e?e.toString():null,r:this.r,s:this._s,v:this.v}}[m](){return this.toString()}toString(){return this.isValid()?`Signature { r: ${this.r}, s: ${this._s}, v: ${this.v} }`:`Signature { r: ${this.r}, s: ${this._s}, v: ${this.v}, valid: false }`}static getChainId(e){let t=(0,a.Ab)(e,"v");return t==u||t==d?o:((0,s.MR)(t>=h,"invalid EIP-155 v","v",e),(t-h)/c)}static getChainIdV(e,t){return(0,a.Ab)(e)*c+BigInt(35+t-27)}static getNormalizedV(e){let t=(0,a.Ab)(e);return t===o||t===u?27:t===l||t===d?28:((0,s.MR)(t>=h,"invalid v","v",e),t&l?27:28)}static from(e){function t(t,r){(0,s.MR)(t,r,"signature",e)}if(null==e)return new b(g,n,n,27);if("string"==typeof e){let r=(0,i.q5)(e,"signature");if(64===r.length){let e=(0,i.c$)(r.slice(0,32)),t=r.slice(32,64),n=128&t[0]?28:27;return t[0]&=127,new b(g,e,(0,i.c$)(t),n)}if(65===r.length){let e=(0,i.c$)(r.slice(0,32)),t=(0,i.c$)(r.slice(32,64)),n=b.getNormalizedV(r[64]);return new b(g,e,t,n)}t(!1,"invalid raw signature length")}if(e instanceof b)return e.clone();let r=e.r;t(null!=r,"missing r");let o=y(r),l=function(e,r){if(null!=e)return y(e);if(null!=r){t((0,i.Lo)(r,32),"invalid yParityAndS");let e=(0,i.q5)(r);return e[0]&=127,(0,i.c$)(e)}t(!1,"missing s")}(e.s,e.yParityAndS),{networkV:c,v:u}=function(e,r,n){if(null!=e){let t=(0,a.Ab)(e);return{networkV:t>=h?t:void 0,v:b.getNormalizedV(t)}}if(null!=r)return t((0,i.Lo)(r,32),"invalid yParityAndS"),{v:128&(0,i.q5)(r)[0]?28:27};if(null!=n){switch((0,a.WZ)(n,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),d=new b(g,o,l,u);return c&&(d.#e0=c),t(null==e.yParity||(0,a.WZ)(e.yParity,"sig.yParity")===d.yParity,"yParity mismatch"),t(null==e.yParityAndS||e.yParityAndS===d.yParityAndS,"yParityAndS mismatch"),d}}},42182:(e,t,r)=>{"use strict";r.d(t,{$P:()=>l,My:()=>c,cK:()=>u,i3:()=>h,nj:()=>o});var n=r(91161),i=r(41240),a=r(98213);let s=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function o(e,t={}){return"number"==typeof e||"bigint"==typeof e?u(e,t):"string"==typeof e?h(e,t):"boolean"==typeof e?l(e,t):c(e,t)}function l(e,t={}){let r=`0x${Number(e)}`;return"number"==typeof t.size?((0,a.Sl)(r,{size:t.size}),(0,i.eV)(r,{size:t.size})):r}function c(e,t={}){let r="";for(let t=0;t<e.length;t++)r+=s[e[t]];let n=`0x${r}`;return"number"==typeof t.size?((0,a.Sl)(n,{size:t.size}),(0,i.eV)(n,{dir:"right",size:t.size})):n}function u(e,t={}){let r,{signed:a,size:s}=t,o=BigInt(e);s?r=a?(1n<<8n*BigInt(s)-1n)-1n:2n**(8n*BigInt(s))-1n:"number"==typeof e&&(r=BigInt(Number.MAX_SAFE_INTEGER));let l="bigint"==typeof r&&a?-r-1n:0;if(r&&o>r||o<l){let t="bigint"==typeof e?"n":"";throw new n.Ty({max:r?`${r}${t}`:void 0,min:`${l}${t}`,signed:a,size:s,value:`${e}${t}`})}let c=`0x${(a&&o<0?(1n<<BigInt(8*s))+BigInt(o):o).toString(16)}`;return s?(0,i.eV)(c,{size:s}):c}let d=new TextEncoder;function h(e,t={}){return c(d.encode(e),t)}},42242:(e,t,r)=>{"use strict";r.d(t,{E:()=>h});var n=r(91004),i=r(33432),a=r(77909),s=r(82376),o=r(18627);let l=i.w.getAnalyticsUrl(),c=new a.Z({baseUrl:l,clientId:null}),u=["MODAL_CREATED"],d=(0,n.BX)({timestamp:Date.now(),lastFlush:Date.now(),reportedErrors:{},data:{type:"track",event:"MODAL_CREATED"},pendingEvents:[],subscribedToVisibilityChange:!1,walletImpressions:[]}),h={state:d,subscribe:e=>(0,n.B1)(d,()=>e(d)),getSdkProperties(){let{projectId:e,sdkType:t,sdkVersion:r}=o.H.state;return{projectId:e,st:t,sv:r||"html-wagmi-4.2.2"}},shouldFlushEvents(){let e=JSON.stringify(d.pendingEvents).length/1024>45,t=d.lastFlush+1e4<Date.now();return e||t},_setPendingEvent(e){try{let t=s.W.getAccountData()?.address;if("address"in e.data&&e.data.address&&(t=e.data.address),u.includes(e.data.event)||"undefined"==typeof window)return;let r=s.W.getActiveCaipNetwork()?.caipNetworkId;this.state.pendingEvents.push({eventId:i.w.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:e.timestamp,props:{...e.data,address:t,properties:{..."properties"in e.data?e.data.properties:{},caipNetworkId:r}}}),d.reportedErrors.FORBIDDEN=!1,h.shouldFlushEvents()&&h._submitPendingEvents()}catch(e){console.warn("_setPendingEvent",e)}},sendEvent(e){d.timestamp=Date.now(),d.data=e,(o.H.state.features?.anal
5289ytics||["INITIALIZE","CONNECT_SUCCESS","SOCIAL_LOGIN_SUCCESS"].includes(e.event))&&h._setPendingEvent(d),this.subscribeToFlushTriggers()},sendWalletImpressionEvent(e){d.walletImpressions.push(e)},_transformPendingEventsForBatch(e){try{return e.filter(e=>{let t=e.props.event;return"WALLET_IMPRESSION_V2"!==t})}catch{return e}},_submitPendingEvents(){if(d.lastFlush=Date.now(),0!==d.pendingEvents.length||0!==d.walletImpressions.length)try{let e=h._transformPendingEventsForBatch(d.pendingEvents);d.walletImpressions.length&&e.push({eventId:i.w.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:Date.now(),props:{type:"track",event:"WALLET_IMPRESSION_V2",items:[...d.walletImpressions]}}),c.sendBeacon({path:"/batch",params:h.getSdkProperties(),body:e}),d.reportedErrors.FORBIDDEN=!1,d.pendingEvents=[],d.walletImpressions=[]}catch(e){d.reportedErrors.FORBIDDEN=!0}},subscribeToFlushTriggers(){d.subscribedToVisibilityChange||"undefined"!=typeof document&&(d.subscribedToVisibilityChange=!0,document?.addEventListener?.("visibilitychange",()=>{"hidden"===document.visibilityState&&h._submitPendingEvents()}),document?.addEventListener?.("freeze",()=>{h._submitPendingEvents()}),window?.addEventListener?.("pagehide",()=>{h._submitPendingEvents()}),setInterval(()=>{h._submitPendingEvents()},1e4))}}},42288:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidVError=t.InvalidYParityError=t.InvalidSError=t.InvalidRError=t.MissingPropertiesError=t.InvalidSerializedSizeError=void 0,t.assert=c,t.fromBytes=u,t.fromHex=d,t.extract=function(e){if(void 0!==e.r&&void 0!==e.s)return h(e)},t.from=h,t.fromDerBytes=function(e){return p(s.fromBytes(e))},t.fromDerHex=p,t.fromLegacy=f,t.fromRpc=m,t.fromTuple=function(e){let[t,r,n]=e;return h({r:"0x"===r?0n:BigInt(r),s:"0x"===n?0n:BigInt(n),yParity:"0x"===t?0:Number(t)})},t.toBytes=function(e){return i.fromHex(g(e))},t.toHex=g,t.toDerBytes=function(e){return new n.secp256k1.Signature(e.r,e.s).toDERRawBytes()},t.toDerHex=function(e){let t=new n.secp256k1.Signature(e.r,e.s);return`0x${t.toDERHex()}`},t.toLegacy=function(e){return{r:e.r,s:e.s,v:b(e.yParity)}},t.toRpc=function(e){let{r:t,s:r,yParity:n}=e;return{r:s.fromNumber(t,{size:32}),s:s.fromNumber(r,{size:32}),yParity:0===n?"0x0":"0x1"}},t.toTuple=function(e){let{r:t,s:r,yParity:n}=e;return[n?"0x01":"0x",0n===t?"0x":s.trimLeft(s.fromNumber(t)),0n===r?"0x":s.trimLeft(s.fromNumber(r))]},t.validate=function(e,t={}){try{return c(e,t),!0}catch{return!1}},t.vToYParity=y,t.yParityToV=b;let n=r(6792),i=r(31837),a=r(53937),s=r(70259),o=r(71720),l=r(3063);function c(e,t={}){let{recovered:r}=t;if(void 0===e.r||void 0===e.s||r&&void 0===e.yParity)throw new v({signature:e});if(e.r<0n||e.r>l.maxUint256)throw new E({value:e.r});if(e.s<0n||e.s>l.maxUint256)throw new C({value:e.s});if("number"==typeof e.yParity&&0!==e.yParity&&1!==e.yParity)throw new A({value:e.yParity})}function u(e){return d(s.fromBytes(e))}function d(e){if(130!==e.length&&132!==e.length)throw new w({signature:e});let t=BigInt(s.slice(e,0,32)),r=BigInt(s.slice(e,32,64)),n=(()=>{let t=Number(`0x${e.slice(130)}`);if(!Number.isNaN(t))try{return y(t)}catch{throw new A({value:t})}})();return void 0===n?{r:t,s:r}:{r:t,s:r,yParity:n}}function h(e){let t="string"==typeof e?d(e):e instanceof Uint8Array?u(e):"string"==typeof e.r?m(e):e.v?f(e):{r:e.r,s:e.s,...void 0!==e.yParity?{yParity:e.yParity}:{}};return c(t),t}function p(e){let{r:t,s:r}=n.secp256k1.Signature.fromDER(s.from(e).slice(2));return{r:t,s:r}}function f(e){return{r:e.r,s:e.s,yParity:y(e.v)}}function m(e){let t=(()=>{let t=e.v?Number(e.v):void 0,r=e.yParity?Number(e.yParity):void 0;if("number"==typeof t&&"number"!=typeof r&&(r=y(t)),"number"!=typeof r)throw new A({value:e.yParity});return r})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function g(e){c(e);let t=e.r,r=e.s;return s.concat(s.fromNumber(t,{size:32}),s.fromNumber(r,{size:32}),"number"==typeof e.yParity?s.fromNumber(b(e.yParity),{size:1}):"0x")}function y(e){if(0===e||27===e)return 0;if(1===e||28===e)return 1;if(e>=35)return+(e%2==0);throw new x({value:e})}function b(e){if(0===e)return 27;if(1===e)return 28;throw new A({value:e})}class w extends a.BaseError{constructor({signature:e}){super(`Value \`${e}
5289\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${s.size(s.from(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}t.InvalidSerializedSizeError=w;class v extends a.BaseError{constructor({signature:e}){super(`Signature \`${o.stringify(e)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}t.MissingPropertiesError=v;class E extends a.BaseError{constructor({value:e}){super(`Value \`${e}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}t.InvalidRError=E;class C extends a.BaseError{constructor({value:e}){super(`Value \`${e}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}t.InvalidSError=C;class A extends a.BaseError{constructor({value:e}){super(`Value \`${e}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}t.InvalidYParityError=A;class x extends a.BaseError{constructor({value:e}){super(`Value \`${e}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}t.InvalidVError=x},42350:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.writeContract=c;let n=r(83562),i=r(85926),a=r(25230),s=r(38297),o=r(95847),l=r(60149);async function c(e,t){return c.internal(e,l.sendTransaction,"sendTransaction",t)}(c||(t.writeContract=c={})).internal=async function(e,t,r,l){let{abi:c,account:u=e.account,address:d,args:h,functionName:p,...f}=l;if(void 0===u)throw new i.AccountNotFoundError({docsPath:"/docs/contract/writeContract"});let m=u?(0,n.parseAccount)(u):null,g=(0,a.encodeFunctionData)({abi:c,args:h,functionName:p});try{return await (0,o.getAction)(e,t,r)({data:g,to:d,account:m,...f})}catch(e){throw(0,s.getContractError)(e,{abi:c,address:d,args:h,docsPath:"/docs/contract/writeContract",functionName:p,sender:m?.address})}}},42585:function(e){e.exports=function(){"use strict";var e="millisecond",t="second",r="minute",n="hour",i="week",a="month",s="quarter",o="year",l="date",c="Invalid Date",u=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|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,h=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},p="en",f={};f[p]={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])+"]"}};var m="$isDayjsObject",g=function(e){return e instanceof v||!(!e||!e[m])},y=function e(t,r,n){var i;if(!t)return p;if("string"==typeof t){var a=t.toLowerCase();f[a]&&(i=a),r&&(f[a]=r,i=a);var s=t.split("-");if(!i&&s.length>1)return e(s[0])}else{var o=t.name;f[o]=t,i=o}return!n&&i&&(p=i),i||!n&&p},b=function(e,t){if(g(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new v(r)},w={s:h,z:function(e){var t=-e.utcOffset(),r=Math.abs(t);return(t<=0?"+":"-")+h(Math.floor(r/60),2,"0")+":"+h(r%60,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),i=t.clone().add(n,a),s=r-i<0,o=t.clone().add(n+(s?-1:1),a);return+(-(n+(r-i)/(s?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(c){return({M:a,y:o,w:i,d:"day",D:l,h:n,m:r,s:t,ms:e,Q:s})[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}};w.l=y,w.i=g,w.w=function(e,t){return b(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var v=function(){function h(e){this.$L=y(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[m]=!0}var p=h.prototype;return p.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(w.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(u);if(n){var i=n[2]-1||0,a=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)}}return new Date(t)}(e),this.init()},p.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()},p.$utils=function(){return w},p.isValid=function(){return this.$d.toString()!==c},p.isSame=function(e,t){var r=b(e);return this.startOf(t)<=r&&r<=this.endOf(t)},p.isAfter=function(e,t){return b(e)<this.startOf(t)},p.isBefore=function(e,t){return this.endOf(t)<b(e)},p.$g=function(e,t,r){return w.u(e)?this[t]:this.set(r,e)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(e,s){var c=this,u=!!w.u(s)||s,d=w.p(e),h=function(e,t){var r=w.w(c.$u?Date.UTC(c.$y,t,e):new Date(c.$y,t,e),c);return u?r:r.endOf("day")},p=function(e,t){return w.w(c.toDate()[e].apply(c.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(t)),c
5289)},f=this.$W,m=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(d){case o:return u?h(1,0):h(31,11);case a:return u?h(1,m):h(0,m+1);case i:var b=this.$locale().weekStart||0,v=(f<b?f+7:f)-b;return h(u?g-v:g+(6-v),m);case"day":case l:return p(y+"Hours",0);case n:return p(y+"Minutes",1);case r:return p(y+"Seconds",2);case t:return p(y+"Milliseconds",3);default:return this.clone()}},p.endOf=function(e){return this.startOf(e,!1)},p.$set=function(i,s){var c,u=w.p(i),d="set"+(this.$u?"UTC":""),h=((c={}).day=d+"Date",c[l]=d+"Date",c[a]=d+"Month",c[o]=d+"FullYear",c[n]=d+"Hours",c[r]=d+"Minutes",c[t]=d+"Seconds",c[e]=d+"Milliseconds",c)[u],p="day"===u?this.$D+(s-this.$W):s;if(u===a||u===o){var f=this.clone().set(l,1);f.$d[h](p),f.init(),this.$d=f.set(l,Math.min(this.$D,f.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},p.set=function(e,t){return this.clone().$set(e,t)},p.get=function(e){return this[w.p(e)]()},p.add=function(e,s){var l,c=this;e=Number(e);var u=w.p(s),d=function(t){var r=b(c);return w.w(r.date(r.date()+Math.round(t*e)),c)};if(u===a)return this.set(a,this.$M+e);if(u===o)return this.set(o,this.$y+e);if("day"===u)return d(1);if(u===i)return d(7);var h=((l={})[r]=6e4,l[n]=36e5,l[t]=1e3,l)[u]||1,p=this.$d.getTime()+e*h;return w.w(p,this)},p.subtract=function(e,t){return this.add(-1*e,t)},p.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||c;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=w.z(this),a=this.$H,s=this.$m,o=this.$M,l=r.weekdays,u=r.months,h=r.meridiem,p=function(e,r,i,a){return e&&(e[r]||e(t,n))||i[r].slice(0,a)},f=function(e){return w.s(a%12||12,e,"0")},m=h||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(d,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return w.s(t.$y,4,"0");case"M":return o+1;case"MM":return w.s(o+1,2,"0");case"MMM":return p(r.monthsShort,o,u,3);case"MMMM":return p(u,o);case"D":return t.$D;case"DD":return w.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return p(r.weekdaysMin,t.$W,l,2);case"ddd":return p(r.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(a);case"HH":return w.s(a,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return m(a,s,!0);case"A":return m(a,s,!1);case"m":return String(s);case"mm":return w.s(s,2,"0");case"s":return String(t.$s);case"ss":return w.s(t.$s,2,"0");case"SSS":return w.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")})},p.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},p.diff=function(e,l,c){var u,d=this,h=w.p(l),p=b(e),f=(p.utcOffset()-this.utcOffset())*6e4,m=this-p,g=function(){return w.m(d,p)};switch(h){case o:u=g()/12;break;case a:u=g();break;case s:u=g()/3;break;case i:u=(m-f)/6048e5;break;case"day":u=(m-f)/864e5;break;case n:u=m/36e5;break;case r:u=m/6e4;break;case t:u=m/1e3;break;default:u=m}return c?u:w.a(u)},p.daysInMonth=function(){return this.endOf(a).$D},p.$locale=function(){return f[this.$L]},p.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=y(e,t,!0);return n&&(r.$L=n),r},p.clone=function(){return w.w(this.$d,this)},p.toDate=function(){return new Date(this.valueOf())},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},h}(),E=v.prototype;return b.prototype=E,[["$ms",e],["$s",t],["$m",r],["$H",n],["$W","day"],["$M",a],["$y",o],["$D",l]].forEach(function(e){E[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),b.extend=function(e,t){return e.$i||(e(t,v,b),e.$i=!0),b},b.locale=y,b.isDayjs=g,b.unix=function(e){return b(1e3*e)},b.en=f[p],b.Ls=f,b.p={},b}()},42678:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WaitForCallsStatusTimeoutError=void 0,t.waitForCallsStatus=h;let n=r(45226),i=r(62332),a=r(95847),s=r(84053),o=r(63342),l=r(89560),c=r(15573),u=r(68508),d=r(12026);async function h(e,t){let r,{id:n,pollingInterval:h=e.pollingInterval,status:f=({statusCode:e})=>200===e||e>=300,retryCount:m=4,retryDelay:g=({count:e})=>200*~~(1<<e),timeout:y=6e4,throwOnFailure:b=!1}=t,w=(0,u.stringify)(["waitForCallsStatus",e.uid,n]),{promise:v,resolve:E,reject:C}=(0,l.withResolvers)(),A=(0,s.observe)(w,{resolve:E,reject:C},t=>{let s=(0,o.poll)(async()=>{let o=e=>{clearTimeout(r),s(),e(),A()};try{let r=await (0,c.withRetry)(async()=>{let t=await (0,a.getAction)(e,d.getCallsStatus,"getCallsStatus")({id:n});if(b&&"failure"===t.status)throw new i.BundleFailedError(t);return t},{retryCount:m,delay:g});if(!f(r))return;o(()=>t.resolve(r))}catch(e){o(()=>t.reject(e))}},{interval:h,emitOnBegin:!0});return s});return r=y?setTimeout(()=>{A(),clearTimeout(r),C(new p({id:n}))},y):void 0,await v}class p extends n.BaseError{constructor({id:e}){super(`Timed out while waiting for call bundle with id "${e}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}t.WaitForCallsStatusTimeoutError=p},42808:(e,t,r)=>{"use strict";r(77914)},42846:(e,t,r)=>{"use strict";r.d(t,{L:()=>i,P:()=>a});var n=r(57873);let i={caipNetworkIdToNumber:e=>e?Number(e.split(":")[1]):void 0,parseEvmChainId(e){return"string"==typeof e?this.caipNetworkIdToNumber(e):e},getNetworksByNamespace:(e,t)=>e?.filter(e=>e.chainNamespace===t)||[],getFirstNetworkByNamespace(e,t){return this.getNetworksByNamespace(e,t)[0]},getNetworkNameByCaipNetworkId(e,t){if(!t)return;let r=e.find(e=>e.caipNetworkId===t);if(r)return r.name;let[i]=t.split(":");return n.o.CHAIN_NAME_MAP?.[i]||void 0}},a=["eip155","solana","polkadot","bip122","cosmos","sui","stacks"]},42978:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(55284);r(48054),r(83627);var s=r(46756),o=r(63412),l=r(91392);let c=(0,l.AH)` 5290 :host { 5291 width: 100%; 5292 } 5293 5294 :host([data-type='primary']) > button { 5295 background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; 5296 } 5297 5298 :host([data-type='secondary']) > button { 5299 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 5300 } 5301 5302 button { 5303 display: flex; 5304 align-items: center; 5305 justify-content: space-between; 5306 padding: ${({spacing:e})=>e[3]}; 5307 width: 100%; 5308 border-radius: ${({borderRadius:e})=>e[4]}; 5309 transition: 5310 background-color ${({durations:e})=>e.lg} 5311 ${({easings:e})=>e["ease-out-power-2"]}, 5312 scale ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}; 5313 will-change: background-color, scale; 5314 } 5315 5316 wui-text { 5317 text-transform: capitalize; 5318 } 5319 5320 wui-image { 5321 color: ${({tokens:e})=>e.theme.textPrimary}; 5322 } 5323 5324 @media (hover: hover) { 5325 :host([data-type='primary']) > button:hover:enabled { 5326 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 5327 } 5328 5329 :host([data-type='secondary']) > button:hover:enabled { 5330 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 5331 } 5332 } 5333 5334 button:disabled { 5335 opacity: 0.5;
5336 cursor: not-allowed; 5337 } 5338`;var u=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let d=class extends n.WF{constructor(){super(...arguments),this.type="primary",this.imageSrc="google",this.imageSize=void 0,this.loading=!1,this.boxColor="foregroundPrimary",this.disabled=!1,this.rightIcon=!0,this.boxed=!0,this.rounded=!1,this.fullSize=!1}render(){return this.dataset.rounded=this.rounded?"true":"false",this.dataset.type=this.type,(0,n.qy)` 5339 <button 5340 ?disabled=${!!this.loading||!!this.disabled} 5341 data-loading=${this.loading} 5342 tabindex=${(0,a.J)(this.tabIdx)} 5343 > 5344 <wui-flex gap="2" alignItems="center"> 5345 ${this.templateLeftIcon()} 5346 <wui-flex gap="1"> 5347 <slot></slot> 5348 </wui-flex> 5349 </wui-flex> 5350 ${this.templateRightIcon()} 5351 </button> 5352 `}templateLeftIcon(){return this.icon?(0,n.qy)`<wui-image 5353 icon=${this.icon} 5354 iconColor=${(0,a.J)(this.iconColor)} 5355 ?boxed=${this.boxed} 5356 ?rounded=${this.rounded} 5357 boxColor=${this.boxColor} 5358 ></wui-image>`:(0,n.qy)`<wui-image 5359 ?boxed=${this.boxed} 5360 ?rounded=${this.rounded} 5361 ?fullSize=${this.fullSize} 5362 size=${(0,a.J)(this.imageSize)} 5363 src=${this.imageSrc} 5364 boxColor=${this.boxColor} 5365 ></wui-image>`}templateRightIcon(){return this.rightIcon?this.loading?(0,n.qy)`<wui-loading-spinner size="md" color="accent-primary"></wui-loading-spinner>`:(0,n.qy)`<wui-icon name="chevronRight" size="lg" color="default"></wui-icon>`:null}};d.styles=[s.W5,s.fD,c],u([(0,i.MZ)()],d.prototype,"type",void 0),u([(0,i.MZ)()],d.prototype,"imageSrc",void 0),u([(0,i.MZ)()],d.prototype,"imageSize",void 0),u([(0,i.MZ)()],d.prototype,"icon",void 0),u([(0,i.MZ)()],d.prototype,"iconColor",void 0),u([(0,i.MZ)({type:Boolean})],d.prototype,"loading",void 0),u([(0,i.MZ)()],d.prototype,"tabIdx",void 0),u([(0,i.MZ)()],d.prototype,"boxColor",void 0),u([(0,i.MZ)({type:Boolean})],d.prototype,"disabled",void 0),u([(0,i.MZ)({type:Boolean})],d.prototype,"rightIcon",void 0),u([(0,i.MZ)({type:Boolean})],d.prototype,"boxed",void 0),u([(0,i.MZ)({type:Boolean})],d.prototype,"rounded",void 0),u([(0,i.MZ)({type:Boolean})],d.prototype,"fullSize",void 0),d=u([(0,o.E)("wui-list-item")],d)},43805:(e,t,r)=>{"use strict";r.d(t,{D5:()=>K,U5:()=>G,iP:()=>q,oI:()=>V});var n={exports:{}};function i(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}let a=function(e,t,r){var n=r&&r.stringify||i;if("object"==typeof e&&null!==e){var a=t.length+1;if(1===a)return e;var s=Array(a);s[0]=n(e);for(var o=1;o<a;o++)s[o]=n(t[o]);return s.join(" ")}if("string"!=typeof e)return e;var l=t.length;if(0===l)return e;for(var c="",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>=l||null==t[u])break;d<p&&(c+=e.slice(d,p)),c+=Number(t[u]),d=p+2,p++;break;case 105:if(u>=l||null==t[u])break;d<p&&(c+=e.slice(d,p)),c+=Math.floor(Number(t[u])),d=p+2,p++;break;case 79:case 111:case 106:if(u>=l||void 0===t[u])break;d<p&&(c+=e.slice(d,p));var f=typeof t[u];if("string"===f){c+="'"+t[u]+"'",d=p+2,p++;break}if("function"===f){c+=t[u].name||"<anonymous>",d=p+2,p++;break}c+=n(t[u]),d=p+2,p++;break;case 115:if(u>=l)break;d<p&&(c+=e.slice(d,p)),c+=String(t[u]),d=p+2,p++;break;case 37:d<p&&(c+=e.slice(d,p)),c+="%",d=p+2,p++,u--}++u}++p}return -1===d?e:(d<h&&(c+=e.slice(d)),c)};n.exports=h;let s=function(){function e(e){return"u">typeof e&&e}try{return"u">typeof globalThis||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||{};function o(e,t){return"silent"===e?1/0:t.levels.values[e]}let l=Symbol("pino.logFuncs"),c=Symbol("pino.hierarchy"),u={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function d(e,t){let r={logger:t,parent:e[c]};t[c]=r}function h(e){var t,r;(e=e||{}).browser=e.browser||{};let n=e.browser.transmit;if(n&&"function"!=typeof n.send)throw Error("pino: transmit option must have a send function");let i=e.browser.write||s;e.browser.write&&(e.browser.asObject=!0);let a=e.serializers||{},c=(t=e.browser.serialize,Array.isArray(t)?t.filter(function(e){return"!stdSerializers.err"!==e}):!0===t&&Object.keys(a)),g=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(g=!1);let y=Object.keys(e.customLevels||{}),b=["error","fatal","warn","info","debug","trace"].concat(y);"function"==typeof i&&b.forEach(function(e){i[e]=i}),(!1===e.enabled||e.browser.disabled)&&(e.level="silent");let C=e.level||"info",A=Object.create(i);A.log||(A.log=w),function(e,t,r){let n={};
5365t.forEach(e=>{n[e]=r[e]?r[e]:s[e]||s[u[e]||"log"]||w}),e[l]=n}(A,b,i),d({},A),Object.defineProperty(A,"levelVal",{get:function(){return o(this.level,this)}}),Object.defineProperty(A,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,p(this,x,A,"error"),p(this,x,A,"fatal"),p(this,x,A,"warn"),p(this,x,A,"info"),p(this,x,A,"debug"),p(this,x,A,"trace"),y.forEach(e=>{p(this,x,A,e)})}});let x={transmit:n,serialize:c,asObject:e.browser.asObject,asObjectBindingsOnly:e.browser.asObjectBindingsOnly,formatters:e.browser.formatters,levels:b,timestamp:"function"==typeof(r=e).timestamp?r.timestamp:!1===r.timestamp?v:E,messageKey:e.messageKey||"msg",onChild:e.onChild||w};function I(t,r,i){if(!r)throw Error("missing bindings for child Pino");i=i||{},c&&r.serializers&&(i.serializers=r.serializers);let s=i.serializers;if(c&&s){var o=Object.assign({},a,s),l=!0===e.browser.serialize?Object.keys(o):c;delete r.serializers,f([r],l,o,this._stdErrSerialize)}function u(e){this._childLevel=(0|e._childLevel)+1,this.bindings=r,o&&(this.serializers=o,this._serialize=l),n&&(this._logEvent=m([].concat(e._logEvent.bindings,r)))}u.prototype=this;let h=new u(this);return d(this,h),h.child=function(...e){return I.call(this,t,...e)},h.level=i.level||this.level,t.onChild(h),h}return A.levels=function(e){let t=e.customLevels||{};return{values:Object.assign({},h.levels.values,t),labels:Object.assign({},h.levels.labels,function(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}(t))}}(e),A.level=C,A.isLevelEnabled=function(e){return!!this.levels.values[e]&&this.levels.values[e]>=this.levels.values[this.level]},A.setMaxListeners=A.getMaxListeners=A.emit=A.addListener=A.on=A.prependListener=A.once=A.prependOnceListener=A.removeListener=A.removeAllListeners=A.listeners=A.listenerCount=A.eventNames=A.write=A.flush=w,A.serializers=a,A._serialize=c,A._stdErrSerialize=g,A.child=function(...e){return I.call(this,x,...e)},n&&(A._logEvent=m()),A}function p(e,t,r,n){var i,u,d,h,p,g,y;if(Object.defineProperty(e,n,{value:o(e.level,r)>o(n,r)?w:r[l][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===w){if(!t.transmit)return;let i=o(t.transmit.level||e.level,r);if(o(n,r)<i)return}e[n]=(i=e,u=t,d=r,h=n,p=i[l][h],function(){let e=u.timestamp(),t=Array(arguments.length),r=Object.getPrototypeOf&&Object.getPrototypeOf(this)===s?s:this;for(var n=0;n<t.length;n++)t[n]=arguments[n];var l=!1;if(u.serialize&&(f(t,this._serialize,this.serializers,this._stdErrSerialize),l=!0),u.asObject||u.formatters?p.call(r,...function(e,t,r,n,i){let{level:s,log:o=e=>e}=i.formatters||{},l=r.slice(),c=l[0],u={},d=(0|e._childLevel)+1;if((d<1&&(d=1),n&&(u.time=n),s)?Object.assign(u,s(t,e.levels.values[t])):u.level=e.levels.values[t],i.asObjectBindingsOnly){if(null!==c&&"object"==typeof c)for(;d--&&"object"==typeof l[0];)Object.assign(u,l.shift());return[o(u),...l]}if(null!==c&&"object"==typeof c){for(;d--&&"object"==typeof l[0];)Object.assign(u,l.shift());c=l.length?a(l.shift(),l):void 0}else"string"==typeof c&&(c=a(l.shift(),l));return void 0!==c&&(u[i.messageKey]=c),[o(u)]}(this,h,t,e,u)):p.apply(r,t),u.transmit){let r=u.transmit.level||i._level,n=o(r,d),a=o(h,d);if(a<n)return;!function(e,t,r,n=!1){let i=t.send,a=t.ts,s=t.methodLevel,o=t.methodValue,l=t.val,c=e._logEvent.bindings;n||f(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=a,e._logEvent.messages=r.filter(function(e){return -1===c.indexOf(e)}),e._logEvent.level.label=s,e._logEvent.level.value=o,i(s,e._logEvent,l),e._logEvent=m(c)}(this,{ts:e,methodLevel:h,methodValue:a,transmitLevel:r,transmitValue:d.levels.values[u.transmit.level||i._level],send:u.transmit.send,val:o(i._level,d)},t,l)}});let b=function(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[c];for(;r.parent;)(r=r.parent).logger.bindings&&t.push(r.logger.bindings);return t.reverse()}(e);0!==b.length&&(e[n]=(g=b,y=e[n],function(){return y.apply(this,[...g,...arguments])}))}function f(e,t,r,n){for(let i in e)if(n&&e[i]instanceof Error)e[i]=h.stdSerializers.err(e[i]);else if("object"==typeof e[i]&&!Array.isArray(e[i])&&t)for(let n in e[i])t.indexOf(n)>-1&&n in r&&(e[i][n]=r[n](e[i][n]))}function m(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function g(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 y(){return{}}function b(e){return e}function w(){}function v(){return!1}function E(){return Date.now()}h.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"}},h.stdSerializers={mapHttpRequest:y,mapHttpResponse:y,wrapRequestSerializer:b,wrapResponseSerializer:b,wrapErrorSerializer:b,req:y,res:y,err:g,errWithCause:g},h.stdTimeFunctions=Object.assign({},{nullTime:v,epochTime:E,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),n.exports.default=h,n.exports.pino=h;let C={level:"info"},A="custom_context";var x=Object.defineProperty,I=(e,t,r)=>((e,t,r)=>t in e?x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class S{constructor(e){I(this,"nodeValue"),I(this,"sizeInBytes"),I(this,"next"),this.nodeValue=e,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}}class T{constructor(e){I(this,"lengthInNodes"),I(this,"sizeInBytes"),I(this,"head"),I(this,"tail"),I(this,"maxSizeInBytes"),this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=e,this.sizeInBytes=0}append(e){let t=new S(e);if(t.size>this.maxSizeInBytes)throw Error(`[LinkedList] Value too big to insert into list: ${e} with size ${t.size}`);for(;this.size+t.size>this.maxSizeInBytes;)this.shift();this.head?this.tail&&(this.tail.next=t):this.head=t,this.tail=t,this.lengthInNodes++,this.sizeInBytes+=t.size}shift(){if(!this.head)return;let e=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=e.size}toArray(){let e=[],t=this.head;for(;null!==t;)e.push(t.value),t=t.next;return e}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let e=this.head;return{next:()=>{if(!e)return{done:!0,value:null};let t=e.value;return e=e.next,{done:!1,value:t}}}}}function P(e){return"string"==typeof e?e:JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString()+"n":t)||""}var O=Object.defineProperty,_=(e,t,r)=>((e,t,r)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class N{constructor(e,t=1024e3){_(this,"logs"),_(this,"level"),_(this,"levelValue"),_(this,"MAX_LOG_SIZE_IN_BYTES"),this.level=e??"error",this.levelValue=n.exports.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=t,this.logs=new T(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(e,t){t===n.exports.levels.values.error?console.error(e):t===n.exports.levels.values.warn?console.warn(e):t===n.exports.levels.values.debug?console.debug(e):t===n.exports.levels.values.trace?console.trace(e):console.log(e)}appendToLogs(e){this.logs.append(P({timestamp:new Date().toISOString(),log:e}));let t="string"==typeof e?JSON.parse(e).level:e.level;t>=this.levelValue&&this.forwardToConsole(e,t)}getLogs(){return this.logs}clearLogs(){this.logs=new T(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(e){let t=this.getLogArray();return t.push(P({extraMetadata:e})),new Blob(t,{type:"application/json"})}}var k=Object.defineProperty;class R{constructor(e,t=1024e3){((e,t,r)=>((e,t,r)=>t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r))(this,"baseChunkLogger"),this.baseChunkLogger=new N(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}downloadLogsBlobInBrowser(e){let t=URL.createObjectURL(this.logsToBlob(e)),r=document.createElement("a");r.href=t,r.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(t)}}var M=Object.defineProperty;class B{constructor(e,t=1024e3){((e,t,r)=>((e,t,r)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r))(this,"baseChunkLogger"),this.baseChunkLogger=new N(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}}var j=Object.defineProperty,U=Object.defineProperties,$=Object.getOwnPropertyDescriptors,L=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,H=(e,t,r)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,z=(e,t)=>{for(var r in t||(t={}))D.call(t,r)&&H(e,r,t[r]);if(L)for(var r of L(t))F.call(t,r)&&H(e,r,t[r]);return e},W=(e,t)=>U(e,$(t));function q(e){return W(z({},e),{level:e?.level||C.level})}function V(e,t=A){return e[t]||""}function G(e,t,r=A){let n=function(e,t,r=A){let n=V(e,r);return n.trim()?`${n}/${t}`:t}(e,t,r);return function(e,t,r=A){return e[r]=t,e}(e.child({context:n}),n,r)}function K(e){var t;if("u">typeof e.loggerOverride&&"string"!=typeof e.loggerOverride)return{logger:e.loggerOverride,chunkLoggerController:null};let r=W(z({},e.opts),{level:"string"==typeof e.loggerOverride?e.loggerOverride:null==(t=e.opts)?void 0:t.level});return"u">typeof window?function(e){var t,r;let i=new R(null==(t=e.opts)?void 0:t.level,e.maxSizeInBytes);return{logger:n.exports(W(z({},e.opts),{level:"trace",browser:W(z({},null==(r=e.opts)?void 0:r.browser),{write:e=>i.write(e)})})),chunkLoggerController:i}}(W(z({},e),{opts:r})):function(e){var t,r;let i=new B(null==(t=e.opts)?void 0:t.level,e.maxSizeInBytes);return{logger:n.exports(W(z({},e.opts),{level:"trace",browser:W(z({},null==(r=e.opts)?void 0:r.browser),{write:e=>i.write(e)})}),i),chunkLoggerController:i}}(W(z({},e),{opts:r}))}},43850:(e,t,r)=>{"use strict";r.d(t,{RQ:()=>n,T7:()=>s,vx:()=>a});let n={RPC_ERROR_CODE:{USER_REJECTED_REQUEST:4001,USER_REJECTED_METHODS:5002,USER_REJECTED:5e3,SEND_TRANSACTION_ERROR:5001},PROVIDER_RPC_ERROR_NAME:{PROVIDER_RPC:"ProviderRpcError",USER_REJECTED_REQUEST:"UserRejectedRequestError",SEND_TRANSACTION_ERROR:"SendTransactionError"},isRpcProviderError(e){try{if("object"==typeof e&&null!==e){let t="string"==typeof e.message,r="number"==typeof e.code;return t&&r}return!1}catch{return!1}},isUserRejectedMessage:e=>e.toLowerCase().includes("user rejected")||e.toLowerCase().includes("user cancelled")||e.toLowerCase().includes("user canceled"),isUserRejectedRequestError(e){if(n.isRpcProviderError(e)){let t=e.code===n.RPC_ERROR_CODE.USER_REJECTED_REQUEST,r=e.code===n.RPC_ERROR_CODE.USER_REJECTED_METHODS;return t||r||n.isUserRejectedMessage(e.message)}return e instanceof Error&&n.isUserRejectedMessage(e.message)}};
5365class i extends Error{constructor(e,t){super(t.message,{cause:e}),this.name=n.PROVIDER_RPC_ERROR_NAME.PROVIDER_RPC,this.code=t.code}}class a extends i{constructor(e){super(e,{code:n.RPC_ERROR_CODE.USER_REJECTED_REQUEST,message:"User rejected the request"}),this.name=n.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST}}class s extends i{constructor(e){super(void 0,{code:n.RPC_ERROR_CODE.SEND_TRANSACTION_ERROR,message:e}),this.name=n.PROVIDER_RPC_ERROR_NAME.SEND_TRANSACTION_ERROR}}},43988:(e,t,r)=>{let n=r(17129);function i(e){this.mode=n.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;for(t=0;t+3<=this.data.length;t+=3)r=parseInt(this.data.substr(t,3),10),e.put(r,10);let n=this.data.length-t;n>0&&(r=parseInt(this.data.substr(t),10),e.put(r,3*n+1))},e.exports=i},44066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.webSocket=function(e,t={}){let{keepAlive:r,key:l="webSocket",methods:c,name:u="WebSocket JSON-RPC",reconnect:d,retryDelay:h}=t;return({chain:p,retryCount:f,timeout:m})=>{let g=t.retryCount??f,y=m??t.timeout??1e4,b=e||p?.rpcUrls.default.webSocket?.[0],w={keepAlive:r,reconnect:d};if(!b)throw new i.UrlRequiredError;return(0,o.createTransport)({key:l,methods:c,name:u,async request({method:e,params:t}){let r={method:e,params:t},i=await (0,s.getWebSocketRpcClient)(b,w),{error:a,result:o}=await i.requestAsync({body:r,timeout:y});if(a)throw new n.RpcRequestError({body:r,error:a,url:b});return o},retryCount:g,retryDelay:h,timeout:y,type:"webSocket"},{getSocket:()=>(0,a.getSocket)(b),getRpcClient:()=>(0,s.getWebSocketRpcClient)(b,w),async subscribe({params:e,onData:t,onError:r}){let n=await (0,s.getWebSocketRpcClient)(b,w),{result:i}=await new Promise((i,a)=>n.request({body:{method:"eth_subscribe",params:e},onError(e){a(e),r?.(e)},onResponse(e){if(e.error){a(e.error),r?.(e.error);return}if("number"==typeof e.id)return void i(e);"eth_subscription"===e.method&&t(e.params)}}));return{subscriptionId:i,unsubscribe:async()=>new Promise(e=>n.request({body:{method:"eth_unsubscribe",params:[i]},onResponse:e}))}}})}};let n=r(17208),i=r(50280),a=r(64321),s=r(45274),o=r(3603)},44141:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767);r(83627);var a=r(46756),s=r(63412),o=r(91392);let l=(0,o.AH)` 5366 :host { 5367 position: relative; 5368 display: flex; 5369 width: 100%; 5370 height: 1px; 5371 background-color: ${({tokens:e})=>e.theme.borderPrimary}; 5372 justify-content: center; 5373 align-items: center; 5374 } 5375 5376 :host > wui-text { 5377 position: absolute; 5378 padding: 0px 8px; 5379 transition: background-color ${({durations:e})=>e.lg} 5380 ${({easings:e})=>e["ease-out-power-2"]}; 5381 will-change: background-color; 5382 } 5383 5384 :host([data-bg-color='primary']) > wui-text { 5385 background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; 5386 } 5387 5388 :host([data-bg-color='secondary']) > wui-text { 5389 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 5390 } 5391`;var c=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let u=class extends n.WF{constructor(){super(...arguments),this.text="",this.bgColor="primary"}render(){return this.dataset.bgColor=this.bgColor,(0,n.qy)`${this.template()}`}template(){return this.text?(0,n.qy)`<wui-text variant="md-regular" color="secondary">${this.text}</wui-text>`:null}};u.styles=[a.W5,l],c([(0,i.MZ)()],u.prototype,"text",void 0),c([(0,i.MZ)()],u.prototype,"bgColor",void 0),u=c([(0,s.E)("wui-separator")],u)},44311:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FilterTypeNotSupportedError=void 0;let n=r(45226);class i extends n.BaseError{constructor(e){super(`Filter type "${e}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}t.FilterTypeNotSupportedError=i},44352:(e,t,r)=>{"use strict";
5391Object.defineProperty(t,"__esModule",{value:!0}),t.decodeEventLog=function(e){let{abi:t,data:r,strict:u,topics:d}=e,h=u??!0,[p,...f]=d;if(!p)throw new n.AbiEventSignatureEmptyTopicsError({docsPath:c});let m=t.find(e=>"event"===e.type&&p===(0,s.toEventSelector)((0,l.formatAbiItem)(e)));if(!(m&&"name"in m)||"event"!==m.type)throw new n.AbiEventSignatureNotFoundError(p,{docsPath:c});let{name:g,inputs:y}=m,b=y?.some(e=>!("name"in e&&e.name)),w=b?[]:{},v=y.map((e,t)=>[e,t]).filter(([e])=>"indexed"in e&&e.indexed),E=[];for(let e=0;e<v.length;e++){let[t,r]=v[e],i=f[e];if(!i){if(h)throw new n.DecodeLogTopicsMismatch({abiItem:m,param:t});E.push([t,r]);continue}w[b?r:t.name||r]=function({param:e,value:t}){return"string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/)?t:((0,o.decodeAbiParameters)([e],t)||[])[0]}({param:t,value:i})}let C=y.filter(e=>!("indexed"in e&&e.indexed)),A=h?C:[...E.map(([e])=>e),...C];if(A.length>0){if(r&&"0x"!==r)try{let e=(0,o.decodeAbiParameters)(A,r);if(e){let t=0;if(!h)for(let[r,n]of E)w[b?n:r.name||n]=e[t++];if(b)for(let r=0;r<y.length;r++)void 0===w[r]&&t<e.length&&(w[r]=e[t++]);else for(let r=0;r<C.length;r++)w[C[r].name]=e[t++]}}catch(e){if(h){if(e instanceof n.AbiDecodingDataSizeTooSmallError||e instanceof i.PositionOutOfBoundsError)throw new n.DecodeLogDataMismatch({abiItem:m,data:r,params:A,size:(0,a.size)(r)});throw e}}else if(h)throw new n.DecodeLogDataMismatch({abiItem:m,data:"0x",params:A,size:0})}return{eventName:g,args:Object.values(w).length>0?w:void 0}};let n=r(82311),i=r(71545),a=r(29813),s=r(55954),o=r(29060),l=r(71680),c="/docs/contract/decodeEventLog"},44533:(e,t,r)=>{"use strict";r.d(t,{l:()=>_});var n=r(20801),i=r(7105),a=r(73329),s=r(97013),o=r(11001),l=r(18181),c=r(27942),u=r(76195);function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}var h=n.memo(n.forwardRef(function(e,t){var r=u.z.getPTI(e);return n.createElement("svg",d({ref:t,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.
5391674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z",fill:"currentColor"}))}));function p(){return(p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}h.displayName="WindowMaximizeIcon";var f=n.memo(n.forwardRef(function(e,t){var r=u.z.getPTI(e);return n.createElement("svg",p({ref:t,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z",fill:"currentColor"}))}));f.displayName="WindowMinimizeIcon";var m=r(72391),g=r(1231);function y(){return(y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){if(e){if("string"==typeof e)return w(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}function E(e,t,r){var n;return(n=function(e,t){if("object"!=b(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=b(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==b(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(e){c=!0,i=e}
5391finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}(e,t)||v(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var A=a.x.extend({defaultProps:{__TYPE:"FocusTrap",children:void 0},css:{styles:""},getProps:function(e){return l.BF.getMergedProps(e,A.defaultProps)},getOtherProps:function(e){return l.BF.getDiffProps(e,A.defaultProps)}});function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var I=n.memo(n.forwardRef(function(e,t){var r,a,s,c,u,d=n.useRef(null),h=n.useRef(null),p=n.useRef(null),f=n.useContext(i.UM),m=A.getProps(e,f);(0,o.X3)(A.css.styles,{name:"focustrap"}),A.setMetaData(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach(function(t){E(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},{props:m})).ptm,n.useImperativeHandle(t,function(){return{props:m,getInk:function(){return h.current},getTarget:function(){return d.current}}}),(0,o.uU)(function(){m.disabled||(d.current=g(),y(d.current))});var g=function(){return h.current&&h.current.parentElement},y=function(e){var t=m||{},r=t.autoFocusSelector,n=t.firstFocusableSelector,i=t.autoFocus,a="".concat(b(void 0===r?"":r)),s="[autofocus]".concat(a,", [data-pc-autofocus='true']").concat(a),o=l.DV.getFirstFocusableElement(e,s);void 0!==i&&i&&!o&&(o=l.DV.getFirstFocusableElement(e,b(void 0===n?"":n))),l.DV.focus(o)},b=function(e){return':not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])'.concat(null!=e?e:"")};return a=void 0===(r=(m||{}).tabIndex)?0:r,c=(s=function(e,t,r){return n.createElement("span",{ref:e,className:"p-hidden-accessible p-hidden-focusable",tabIndex:a,role:"presentation","aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:t,"data-pc-section":r})})(h,function(e){var t,r=e.currentTarget,n=e.relatedTarget,i=n!==r.$_pfocustrap_lasthiddenfocusableelement&&null!=(t=d.current)&&t.contains(n)?r.$_pfocustrap_lasthiddenfocusableelement:l.DV.getFirstFocusableElement(r.parentElement,b(r.$_pfocustrap_focusableselector));l.DV.focus(i)},"firstfocusableelement"),u=s(p,function(e){var t,r=e.currentTarget,n=e.relatedTarget,i=n!==r.$_pfocustrap_firsthiddenfocusableelement&&null!=(t=d.current)&&t.contains(n)?r.$_pfocustrap_firsthiddenfocusableelement:l.DV.getLastFocusableElement(r.parentElement,b(r.$_pfocustrap_focusableselector));l.DV.focus(i)},"lastfocusableelement"),h.current&&p.current&&(h.current.$_pfocustrap_lasthiddenfocusableelement=p.current,p.current.$_pfocustrap_firsthiddenfocusableelement=h.current),n.createElement(n.Fragment,null,c,m.children,u)}));function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var T=a.x.extend({defaultProps:{__TYPE:"Dialog",__parentMetadata:null,appendTo:null,ariaCloseIconLabel:null,baseZIndex:0,blockScroll:!1,breakpoints:null,className:null,closable:!0,closeIcon:null,closeOnEscape:!0,content:null,contentClassName:null,contentStyle:null,dismissableMask:!1,draggable:!0,focusOnShow:!0,footer:null,footerClassName:null,header:null,headerClassName:null,headerStyle:null,icons:null,id:null,keepInViewport:!0,maskClassName:null,maskStyle:null,maximizable:!1,maximizeIcon:null,maximized:!1,minX:0,minY:0,minimizeIcon:null,modal:!0,onClick:null,onDrag:null,onDragEnd:null,onDragStart:null,onHide:null,onMaskClick:null,onMaximize:null,onResize:null,onResizeEnd:null,onResizeStart:null,onShow:null,position:"center",resizable:!0,rtl:!1,showHeader:!0,showCloseIcon:!0,style:null,transitionOptions:null,visible:!1,
5391children:void 0},css:{classes:{closeButtonIcon:"p-dialog-header-close-icon",closeButton:"p-dialog-header-icon p-dialog-header-close p-link",maximizableIcon:"p-dialog-header-maximize-icon",maximizableButton:"p-dialog-header-icon p-dialog-header-maximize p-link",header:function(e){var t=e.props;return(0,l.xW)("p-dialog-header",t.headerClassName)},headerTitle:"p-dialog-title",headerIcons:"p-dialog-header-icons",content:function(e){var t=e.props;return(0,l.xW)("p-dialog-content",t.contentClassName)},footer:function(e){var t=e.props;return(0,l.xW)("p-dialog-footer",t.footerClassName)},mask:function(e){var t=e.props,r=e.maskVisibleState,n=["center","left","right","top","top-left","top-right","bottom","bottom-left","bottom-right"].find(function(e){return e===t.position||e.replace("-","")===t.position});return(0,l.xW)("p-dialog-mask",n?"p-dialog-".concat(n):"",{"p-component-overlay p-component-overlay-enter":t.modal,"p-dialog-visible":r,"p-dialog-draggable":t.draggable,"p-dialog-resizable":t.resizable},t.maskClassName)},root:function(e){var t=e.props,r=e.maximized,n=e.context;return(0,l.xW)("p-dialog p-component",{"p-dialog-rtl":t.rtl,"p-dialog-maximized":r,"p-dialog-default":!r,"p-input-filled":n&&"filled"===n.inputStyle||"filled"===i.Ay.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===i.Ay.ripple})},transition:"p-dialog"},styles:"\n@layer primereact {\n .p-dialog-mask {\n background-color: transparent;\n transition-property: background-color;\n }\n\n .p-dialog-visible {\n display: flex;\n }\n\n .p-dialog-mask.p-component-overlay {\n pointer-events: auto;\n }\n\n .p-dialog {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n max-height: 90%;\n transform: scale(1);\n position: relative;\n }\n\n .p-dialog-content {\n overflow-y: auto;\n flex-grow: 1;\n }\n\n .p-dialog-header {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n\n .p-dialog-footer {\n flex-shrink: 0;\n }\n\n .p-dialog .p-dialog-header-icons {\n display: flex;\n align-items: center;\n align-self: flex-start;\n flex-shrink: 0;\n }\n\n .p-dialog .p-dialog-header-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n\n .p-dialog .p-dialog-title {\n flex-grow: 1;\n }\n\n /* Fluid */\n .p-fluid .p-dialog-footer .p-button {\n width: auto;\n }\n\n /* Animation */\n /* Center */\n .p-dialog-enter {\n opacity: 0;\n transform: scale(0.7);\n }\n\n .p-dialog-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n }\n\n .p-dialog-enter-done {\n transform: none;\n }\n\n .p-dialog-exit-active {\n opacity: 0;\n transform: scale(0.7);\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n /* Top, Bottom, Left, Right, Top* and Bottom* */\n .p-dialog-top .p-dialog,\n .p-dialog-bottom .p-dialog,\n .p-dialog-left .p-dialog,\n .p-dialog-right .p-dialog,\n .p-dialog-top-left .p-dialog,\n .p-dialog-top-right .p-dialog,\n .p-dialog-bottom-left .p-dialog,\n .p-dialog-bottom-right .p-dialog {\n margin: 0.75em;\n }\n\n .p-dialog-top .p-dialog-enter,\n .p-dialog-top .p-dialog-exit-active {\n transform: translate3d(0px, -100%, 0px);\n }\n\n .p-dialog-bottom .p-dialog-enter,\n .p-dialog-bottom .p-dialog-exit-active {\n transform: translate3d(0px, 100%, 0px);\n }\n\n .p-dialog-left .p-dialog-enter,\n .p-dialog-left .p-dialog-exit-active,\n .p-dialog-top-left .p-dialog-enter,\n .p-dialog-top-left .p-dialog-exit-active,\n .p-dialog-bottom-left .p-dialog-enter,\n .p-dialog-bottom-left .p-dialog-exit-active {\n transform: translate3d(-100%, 0px, 0px);\n }\n\n .p-dialog-right .p-dialog-enter,\n .p-dialog-right .p-dialog-exit-active,\n .p-dialog-top-right .p-dialog-enter,\n .p-dialog-top-right .p-dialog-exit-active,\n .p-dialog-bottom-right .p-dialog-enter,\n .p-dialog-bottom-right .p-dialog-exit-active {\n transform: translate3d(100%, 0px, 0px);\n }\n\n .p-dialog-top .p-dialog-enter-active,\n .p-dialog-bottom .p-dialog-enter-active,\n .p-dialog-left .p-dialog-enter-active,\n .p-dialog-top-left .p-dialog-enter-active,\n .p-dialog-bottom-left .p-dialog-enter-active,\n .p-dialog-right .p-dialog-enter-active,\n .p-dialog-top-right .p-dialog-enter-active,\n .p-dialog-bottom-right .p-dialog-enter-active {\n transform: translate3d(0px, 0px, 0px);\n transition: all 0.3s ease-out;\n }\n\n .p-dialog-top .p-dialog-exit-active,\n .p-dialog-bottom .p-dialog-exit-active,\n .p-dialog-left .p-dialog-exit-active,\n .p-dialog-top-left .p-dialog-exit-active,\n .p-dialog-bottom-left .p-dialog-exit-active,\n .p-dialog-right .p-dialog-exit-active,\n .p-dialog-top-right .p-dialog-exit-active,\n .p-dialog-bottom-right .p-dialog-exit-active {\n transition: all 0.3s ease-out;\n }\n\n /* Maximize */\n .p-dialog-maximized {\n transition: none;\n transform: none;\n margin: 0;\n width: 100vw !important;\n height: 100vh !important;\n max-height: 100%;\n top: 0px !important;\n left: 0px !important;\n }\n\n .p-dialog-maximized .p-dialog-content {\n flex-grow: 1;\n }\n\n .p-confirm-dialog .p-dialog-content {\n display: flex;\n align-items: center;\n }\n\n /* Resizable */\n .p-dialog .p-resizable-handle {\n position: absolute;\n font-size: 0.1px;\n display: block;\n cursor: se-resize;\n width: 12px;\n height: 12px;\n right: 1px;\n bottom: 1px;\n }\n\n .p-dialog-draggable .p-dialog-header {\n cursor: move;\n }\n}\n",inlineStyles:{mask:function(e){var t=e.props;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
5391t%2?S(Object(r),!0).forEach(function(t){E(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===t.position||"top-left"===t.position||"bottom-left"===t.position?"flex-start":"right"===t.position||"top-right"===t.position||"bottom-right"===t.position?"flex-end":"center",alignItems:"top"===t.position||"top-left"===t.position||"top-right"===t.position?"flex-start":"bottom"===t.position||"bottom-left"===t.position||"bottom-right"===t.position?"flex-end":"center",pointerEvents:!t.modal&&"none"},t.maskStyle)}}}});function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach(function(t){E(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var _=n.forwardRef(function(e,t){var r,u,d,p,b,E,A,x,S,P,_,N,k,R,M=(0,o.qV)(),B=n.useContext(i.UM),j=T.getProps(e,B),U=j.id?j.id:(0,l._Y)(),$=C(n.useState(U),2),L=$[0];$[1];var D=C(n.useState(!1),2),F=D[0],H=D[1],z=C(n.useState(!1),2),W=z[0],q=z[1],V=C(n.useState(j.maximized),2),G=V[0],K=V[1],Z=n.useRef(null),J=n.useRef(null),Y=n.useRef(null),Q=n.useRef(null),X=n.useRef(null),ee=n.useRef(null),et=n.useRef(null),er=n.useRef(!1),en=n.useRef(!1),ei=n.useRef(null),ea=n.useRef(null),es=n.useRef(null),eo=n.useRef(U),el=n.useRef(null),ec=j.onMaximize?j.maximized:G,eu=W&&(j.blockScroll||j.maximizable&&ec),ed=j.closable&&j.closeOnEscape&&W,eh=(0,o.qb)("dialog",ed),ep=T.setMetaData(O(O({props:j},j.__parentMetadata),{},{state:{id:L,maximized:ec,containerVisible:F}})),ef=ep.ptm,em=ep.cx,eg=ep.sx,ey=ep.isUnstyled;(0,a.j)(T.css.styles,ey,{name:"dialog"}),(0,o.ai)({callback:function(e){e_(e)},when:ed&&eh,priority:[o.$i.DIALOG,eh]});var eb=C((0,o.ML)({type:"mousemove",target:function(){return window.document},listener:function(e){return e$(e)}}),2),ew=eb[0],ev=eb[1],eE=C((0,o.ML)({type:"mouseup",target:function(){return window.document},listener:function(e){return eL(e)}}),2),eC=eE[0],eA=eE[1],ex=C((0,o.ML)({type:"mousemove",target:function(){return window.document},listener:function(e){return eM(e)}}),2),eI=ex[0],eS=ex[1],eT=C((0,o.ML)({type:"mouseup",target:function(){return window.document},listener:function(e){return eB(e)}}),2),eP=eT[0],eO=eT[1],e_=function(e){j.onHide(e),e.preventDefault()},eN=function(){var e=document.activeElement;!(e&&Z.current&&Z.current.contains(e))&&j.closable&&j.showCloseIcon&&j.showHeader&&et.current&&et.current.focus()},ek=function(e){j.onMaximize?j.onMaximize({originalEvent:e,maximized:!ec}):K(function(e){return!e}),e.preventDefault()},eR=function(e){!(l.DV.hasClass(e.target,"p-dialog-header-icon")||l.DV.hasClass(e.target.parentElement,"p-dialog-header-icon"))&&j.draggable&&(er.current=!0,ei.current=e.pageX,ea.current=e.pageY,l.DV.addClass(document.body,"p-unselectable-text"),j.onDragStart&&j.onDragStart(e))},eM=function(e){if(er.current){var t=l.DV.getOuterWidth(Z.current),r=l.DV.getOuterHeight(Z.current),n=e.pageX-ei.current,i=e.pageY-ea.current,a=Z.current.getBoundingClientRect(),s=a.left+n,o=a.top+i,c=l.DV.getViewport(),u=getComputedStyle(Z.current),d=parseFloat(u.marginLeft),h=parseFloat(u.marginTop);Z.current.style.position="fixed",j.keepInViewport?(s>=j.minX&&s+t<c.width&&(ei.current=e.pageX,Z.current.style.left=s-d+"px"),o>=j.minY&&(i<0||o+r<c.height)&&(ea.current=e.pageY,Z.current.style.top=o-h+"px")):(ei.current=e.pageX,Z.current.style.left=s-d+"px",ea.current=e.pageY,Z.current.style.top=o-h+"px"),j.onDrag&&j.onDrag(e)}},eB=function(e){er.current&&(er.current=!1,l.DV.removeClass(document.body,"p-unselectable-text"),j.onDragEnd&&j.onDragEnd(e))},ej=function(e){j.resizable&&(en.current=!0,ei.current=e.pageX,ea.current=e.pageY,l.DV.addClass(document.body,"p-unselectable-text"),j.onResizeStart&&j.onResizeStart(e))},eU=function(e,t,r){r||(r=l.DV.getViewport());var n=parseInt(e);return/^(\d+|(\.\d+))(\.\d+)?%$/.test(e)?n*(r[t]/100):n},e$=function(e){if(en.current){var t=e.pageX-ei.current,r=e.pageY-ea.current,n=l.DV.getOuterWidth(Z.current),i=l.DV.getOuterHeight(Z.current),a=Z.current.getBoundingClientRect(),s=l.DV.getViewport(),o=!parseInt(Z.current.style.top)||!parseInt(Z.current.style.left),c=eU(Z.current.style.minWidth,"width",s),u=eU(Z.current.style.minHeight,"height",s),d=n+t,h=i+r;o&&(d+=t,h+=r),(!c||d>c)&&(t<0||a.left+d<s.width)&&(Z.current.style.width=d+"px"),(!u||h>u)&&(r<0||a.top+h<s.height)&&(Z.current.style.height=h+"px"),ei.current=e.pageX,ea.current=e.pageY,j.onResize&&j.onResize(e)}},eL=function(e){en.current&&(en.current=!1,l.DV.removeClass(document.body,"p-unselectable-text"),j.onResizeEnd&&j.onResizeEnd(e))},eD=function(){Z.current.style.position="",Z.current.style.left="",Z.current.style.top="",Z.current.style.margin=""},eF=function(){eq()},eH=function(){eV()},ez=function(){document.primeDialogParams&&document.primeDialogParams.some(function(e){return e.hasBlockScroll})?l.DV.blockBodyScroll():l.DV.unblockBodyScroll()},eW=function(e){if(e&&W){var t,r={id:L,hasBlockScroll:eu};document.primeDialogParams||(document.primeDialogParams=[]);var n=document.primeDialogParams.findIndex(function(e){return e.id===L});-1===n?document.primeDialogParams=[].concat(function(e){if(Array.isArray(e))return w(e)}(t=document.primeDialogParams)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||v(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[r]):document.primeDialogParams=document.primeDialogParams.toSpliced(n,1,r)}else document.primeDialogParams=document.primeDialogParams&&document.primeDialogParams.filter(function(e){return e.id!==L});ez()},eq=function(){j.draggable&&(eI(),eP()),j.resizable&&(ew(),eC())},eV=function(){eS(),eO(),ev(),eA()},eG=function(){es.current=l.DV.createInlineStyle(B&&B.nonce||i.Ay.nonce,B&&B.styleContainer);var e="";for(var t in j.breakpoints)e+="\n @media screen and (max-width: ".concat(t,') {\n [data-pc-name="dialog"][').concat(eo.current,"] {\n width: ").concat(j.breakpoints[t]," !important;\n }\n }\n ");es.current.innerHTML=e},eK=function(){es.current=l.DV.removeInlineStyle(es.current)};(0,o.uU)(function(){eW(!0),j.visible&&H(!0)}),n.useEffect(function(){return j.breakpoints&&eG(),function(){eK()}},[j.breakpoints]),(0,o.w5)(function(){j.visible&&!F&&H(!0),j.visible!==W&&F&&q(j.visible),j.visible&&(el.current=document.activeElement)},[j.visible,F]),(0,o.w5)(function(){F&&(l.Q$.set("modal",J.current,B&&B.autoZIndex||i.Ay.autoZIndex,j.baseZIndex||B&&B.zIndex.modal||i.Ay.zIndex.modal),q(!0))},[F]),(0,o.w5)(function(){eW(!0)},[eu,W]),(0,o.l0)(function(){eH(),eW(!1),l.DV.removeInlineStyle(es.current),l.Q$.clear(J.current)}),n.useImperativeHandle(t,function(){return{props:j,resetPosition:eD,getElement:function(){return Z.current},getMask:function(){return J.current},getContent:function(){return Q.current},getHeader:function(){return X.current},getFooter:function(){return ee.current},getCloseButton:function(){return et.current}}});var eZ=function(){if(j.closable&&j.showCloseIcon){var e=j.ariaCloseIconLabel||(0,i.Y4)("close"),t=M({className:em("closeButtonIcon"),"aria-hidden":!0},ef("closeButtonIcon")),r=j.closeIcon||n.createElement(c.A,t),a=l.Hj.getJSXIcon(r,O({},t),{props:j}),s=M({ref:et,type:"button",className:em("closeButton"),"aria-label":e,onClick:e_,onKeyDown:function(e){"Escape"!==e.key&&e.stopPropagation()}},ef("closeButton"));return n.createElement("button",s,a,n.createElement(g.n,null))}return null},eJ=function(){var e,t=M({className:em("maximizableIcon")},ef("maximizableIcon"));e=ec?j.minimizeIcon||n.createElement(f,t):j.maximizeIcon||n.createElement(h,t);var r=l.Hj.getJSXIcon(e,t,{props:j});if(j.maximizable){var i=M({type:"button",className:em("maximizableButton"),onClick:ek},ef("maximizableButton"));return n.createElement("button",i,r,n.createElement(g.n,null))}return null},eY=function(){if(j.showHeader){var e=eZ(),t=eJ(),r=l.BF.getJSXElement(j.icons,j),i=l.BF.getJSXElement(j.header,j),a=L+"_header",s=M({ref:X,style:j.headerStyle,className:em("header"),onMouseDown:eR},ef("header")),o=M({id:a,className:em("headerTitle")},ef("headerTitle")),c=M({className:em("headerIcons")},ef("headerIcons"));return n.createElement("div",s,n.createElement("div",o,i),n.createElement("div",c,r,t,e))}return null},eQ=function(){var e=M({id:L+"_content",ref:Q,style:j.contentStyle,className:em("content")},ef("content"));return n.createElement("div",e,j.children)},eX=function(){var e=l.BF.getJSXElement(j.footer,j),t=M({ref:ee,className:em("footer")},ef("footer"));return e&&n.createElement("div",t,e)};return F&&(A=L+"_header",x=L+"_content",S={enter:"center"===j.position?150:300,exit:"center"===j.position?150:300},P=M({ref:J,style:eg("mask"),className:em("mask"),onPointerUp:function(e){j.dismissableMask&&j.modal&&J.current===e.target&&!Y.current&&e_(e),j.onMaskClick&&j.onMaskClick(e),Y.current=null}},ef("mask")),_=M({ref:Z,id:L,className:(0,l.xW)(j.className,em("root",{props:j,maximized:ec,context:B})),style:j.style,onClick:j.onClick,role:"dialog","aria-labelledby":A,"aria-describedby":x,"aria-modal":j.modal,onPointerDown:function(e){Y.current=e.target,j.onPointerDown&&j.onPointerDown(e)}},T.getOtherProps(j),ef("root")),N=M({classNames:em("transition"),timeout:S,in:W,options:j.transitionOptions,unmountOnExit:!0,onEnter:function(){Z.current.setAttribute(eo.current,"")},onEntered:function(){j.onShow&&j.onShow(),j.focusOnShow&&eN(),eF()},onExiting:function(){j.modal&&(ey()||l.DV.addClass(J.current,"p-component-overlay-leave"))},onExited:function(){er.current=!1,l.Q$.clear(J.current),H(!1),eH(),l.DV.focus(el.current),el.current=null}},ef("transition")),k=null,k=null!=e&&e.content?(u={header:j.header,content:j.message,message:null==j||null==(r=j.children)||null==(r=r[1])||null==(r=r.props)?void 0:r.children},l.BF.getJSXElement(e.content,{headerRef:X,contentRef:Q,footerRef:ee,closeRef:et,hide:e_,message:u})):(d=eY(),p=eQ(),b=eX(),E=j.resizable?n.createElement("span",{className:"p-resizable-handle",style:{zIndex:90},onMouseDown:ej}):null,n.createElement(n.Fragment,null,d,p,b,E)),R=n.createElement("div",P,n.createElement(s.B,y({nodeRef:Z},N),n.createElement("div",_,n.createElement(I,{autoFocus:j.focusOnShow},k)))),n.createElement(m.Z,{element:R,appendTo:j.appendTo,visible:!0}))});_.displayName="Dialog"},44582:(e,t,r)=>{"use strict";r.d(t,{vA:()=>l,MR:()=>c,dd:()=>u,SP:()=>h,gk:()=>p,E:()=>s,bJ:()=>a,xz:()=>
5391o});var n=r(10693);function i(e,t){if(null==e)return"null";if(null==t&&(t=new Set),"object"==typeof e){if(t.has(e))return"[Circular]";t.add(e)}if(Array.isArray(e))return"[ "+e.map(e=>i(e,t)).join(", ")+" ]";if(e instanceof Uint8Array){let t="0123456789abcdef",r="0x";for(let n=0;n<e.length;n++)r+=t[e[n]>>4],r+=t[15&e[n]];return r}if("object"==typeof e&&"function"==typeof e.toJSON)return i(e.toJSON(),t);switch(typeof e){case"boolean":case"number":case"symbol":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{let r=Object.keys(e);return r.sort(),"{ "+r.map(r=>`${i(r,t)}: ${i(e[r],t)}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function a(e,t){return e&&e.code===t}function s(e){return a(e,"CALL_EXCEPTION")}function o(e,t,r){let a,s=e;{let n=[];if(r){if("message"in r||"code"in r||"name"in r)throw Error(`value will overwrite populated values: ${i(r)}`);for(let e in r){if("shortMessage"===e)continue;let t=r[e];n.push(e+"="+i(t))}}n.push(`code=${t}`),n.push("version=6.17.0"),n.length&&(e+=" ("+n.join(", ")+")")}switch(t){case"INVALID_ARGUMENT":a=TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":a=RangeError(e);break;default:a=Error(e)}return(0,n.n)(a,{code:t}),r&&Object.assign(a,r),null==a.shortMessage&&(0,n.n)(a,{shortMessage:s}),a}function l(e,t,r,n){if(!e)throw o(t,r,n)}function c(e,t,r,n){l(e,t,"INVALID_ARGUMENT",{argument:r,value:n})}function u(e,t,r){null==r&&(r=""),r&&(r=": "+r),l(e>=t,"missing argument"+r,"MISSING_ARGUMENT",{count:e,expectedCount:t}),l(e<=t,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:e,expectedCount:t})}let d=["NFD","NFC","NFKD","NFKC"].reduce((e,t)=>{try{if("test"!=="test".normalize(t))throw Error("bad");if("NFD"===t){let e=String.fromCharCode(233).normalize("NFD"),t=String.fromCharCode(101,769);if(e!==t)throw Error("broken")}e.push(t)}catch(e){}return e},[]);function h(e){l(d.indexOf(e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:e}})}function p(e,t,r){if(null==r&&(r=""),e!==t){let e=r,t="new";r&&(e+=".",t+=" "+r),l(!1,`private constructor; use ${e}from* methods`,"UNSUPPORTED_OPERATION",{operation:t})}}},44671:(e,t,r)=>{"use strict";let n,i;r.d(t,{sX:()=>E,G8:()=>m,HV:()=>C,AX:()=>f,KN:()=>b,uP:()=>g});var a=r(33432),s=r(20801),o=r(85460),l=r(57873),c=r(82376),u=r(36071),d=r(32590),h=r(79482),p=r(29092);function f(e){let{providers:t,providerIds:r}=(0,o.s)(h.G.state);return{walletProvider:t[e],walletProviderType:r[e]}}function m(e){let t=(0,o.s)(c.W.state),{activeConnectorIds:r}=(0,o.s)(d.a.state),{connections:n}=(0,o.s)(u.x.state),i=e?.namespace||t.activeChain;if(!i)return{allAccounts:[],address:void 0,caipAddress:void 0,status:void 0,isConnected:!1,embeddedWalletInfo:void 0};let s=t.chains.get(i)?.accountState,h=d.a.getAuthConnector(i),f=r[i];return{allAccounts:(n.get(i)??[]).flatMap(e=>{let{caipNetwork:t}=e;return t?e.accounts.map(({address:e,type:r,publicKey:n})=>a.w.createAccount({caipAddress:`${t.caipNetworkId}:${e}`,type:r||"eoa",publicKey:n})):[]}),caipAddress:s?.caipAddress,address:a.w.getPlainAddress(s?.caipAddress),isConnected:!!s?.caipAddress,status:s?.status,embeddedWalletInfo:h&&f===l.o.CONNECTOR_ID.AUTH?{user:s?.user?{...s.user,username:p.i.getConnectedSocialUsername()}:void 0,authProvider:s?.socialProvider||"email",accountType:s?.preferredAccountType,isSmartAccountDeployed:!!s?.smartAccountDeployed}:void 0}}function g(){return{disconnect:async function(e){await u.x.disconnect(e)}}}var y=r(31320);function b(){if(!n)throw Error('Please call "createAppKit" before using "useAppKitState" hook');let[e,t]=(0,s.useState)({...n.getState(),initialized:!1}),[r,i]=(0,s.useState)(n.getRemoteFeatures());return(0,s.useEffect)(()=>{if(n){t({...n.getState()}),i(n.getRemoteFeatures());let e=n?.subscribeState(e=>{t({...e})}),r=n?.subscribeRemoteFeatures(e=>{i(e)});return()=>{e?.(),r?.()}}return()=>null},[]),{...e,...r??{}}}r(27470);var w=r(4767),v=r(12249);function E(e){!i&&(n=i=new y._({...e,sdkVersion:a.w.generateSdkVersion(e.adapters??[],"react","1.8.23")}));return i}function C(){let{caipNetwork:e,caipNetworkId:t,chainId:r,approvedCaipNetworkIds:n,supportsAllNetworks:a}=function(){let{activeCaipNetwork:e,activeChain:t,chains:r}=(0,o.s)(c.W.state),n=t?r.get(t)?.networkState:void 0;return{caipNetwork:e,chainId:e?.id,caipNetworkId:e?.caipNetworkId,approvedCaipNetworkIds:n?.approvedCaipNetworkIds,supportsAllNetworks:n?.supportsAllNetworks??!0}}();return{caipNetwork:e,caipNetworkId:t,chainId:r,approvedCaipNetworkIds:n,supportsAllNetworks:a,switchNetwork:async function(e){await i?.switchNetwork(e)}}}(0,w.a)({tagName:"appkit-button",elementClass:v.AppKitButton,react:s}),(0,w.a)({tagName:"appkit-network-button",elementClass:v.AppKitNetworkButton,react:s}),(0,w.a)({tagName:"appkit-connect-button",elementClass:v.AppKitConnectButton,react:s}),(0,w.a)({tagName:"appkit-account-button",elementClass:v.AppKitAccountButton,react:s})}
5391,44759:(e,t)=>{"use strict";async function r(e,{address:t}){await e.request({method:`${e.mode}_stopImpersonatingAccount`,params:[t]})}Object.defineProperty(t,"__esModule",{value:!0}),t.stopImpersonatingAccount=r},44789:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WaitForTransactionReceiptTimeoutError=t.TransactionReceiptRevertedError=t.TransactionReceiptNotFoundError=t.TransactionNotFoundError=t.TransactionExecutionError=t.InvalidStorageKeySizeError=t.InvalidSerializedTransactionError=t.InvalidSerializedTransactionTypeError=t.InvalidSerializableTransactionError=t.InvalidYParityError=t.InvalidLegacyVError=t.FeeConflictError=void 0,t.prettyPrint=s;let n=r(40771),i=r(81005),a=r(45226);function s(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")}class o extends a.BaseError{constructor(){super("Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.\nUse `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others.",{name:"FeeConflictError"})}}t.FeeConflictError=o;class l extends a.BaseError{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}t.InvalidLegacyVError=l;class c extends a.BaseError{constructor({yParity:e}){super(`Invalid \`yParity\` value "${e}". Expected 0 or 1.`,{name:"InvalidYParityError"})}}t.InvalidYParityError=c;class u extends a.BaseError{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",s(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","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}t.InvalidSerializableTransactionError=u;class d extends a.BaseError{constructor({serializedType:e}){super(`Serialized transaction type "${e}" is invalid.`,{name:"InvalidSerializedTransactionType"}),Object.defineProperty(this,"serializedType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedType=e}}t.InvalidSerializedTransactionTypeError=d;class h extends a.BaseError{constructor({attributes:e,serializedTransaction:t,type:r}){let n=Object.entries(e).map(([e,t])=>void 0===t?e:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${r}" was provided.`,{metaMessages:[`Serialized Transaction: "${t}"`,n.length>0?`Missing Attributes: ${n.join(", ")}`:""].filter(Boolean),name:"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}}t.InvalidSerializedTransactionError=h;class p extends a.BaseError{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}t.InvalidStorageKeySizeError=p;class f extends a.BaseError{constructor(e,{account:t,docsPath:r,chain:a,data:o,gas:l,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:d,nonce:h,to:p,value:f}){super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",s({chain:a&&`${a?.name} (id: ${a?.id})`,from:t?.address,to:p,value:void 0!==f&&`${(0,n.formatEther)(f)} ${a?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:l,gasPrice:void 0!==c&&`${(0,i.formatGwei)(c)} gwei`,maxFeePerGas:void 0!==u&&`${(0,i.formatGwei)(u)} gwei`,maxPriorityFeePerGas:void 0!==d&&`${(0,i.formatGwei)(d)} gwei`,nonce:h})].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}t.TransactionExecutionError=f;class m extends a.BaseError{constructor({blockHash:e,blockNumber:t,blockTag:r,hash:n,index:i}){let a="Transaction";r&&void 0!==i&&(a=`Transaction at block time "${r}" at index "${i}"`),e&&void 0!==i&&(a=`Transaction at block hash "${e}" at index "${i}"`),t&&void 0!==i&&(a=`Transaction at block number "${t}" at index "${i}"`),n&&(a=`Transaction with hash "${n}"`),super(`${a} could not be found.`,{name:"TransactionNotFoundError"})}}t.TransactionNotFoundError=m;class g extends a.BaseError{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}t.TransactionReceiptNotFoundError=g;class y extends a.BaseError{constructor({receipt:e}){super(`Transaction with hash "${e.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=e}}t.TransactionReceiptRevertedError=y;class b extends a.BaseError{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}t.WaitForTransactionReceiptTimeoutError=b},44915:(e,t)=>{"use strict";
5391Object.defineProperty(t,"__esModule",{value:!0}),t.presignMessagePrefix=void 0,t.presignMessagePrefix="\x19Ethereum Signed Message:\n"},45226:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseError=void 0,t.setErrorConfig=function(e){i=e};let n=r(13609),i={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${n.version}`};class a extends Error{constructor(e,t={}){let r=t.cause instanceof a?t.cause.details:t.cause?.message?t.cause.message:t.details,s=t.cause instanceof a&&t.cause.docsPath||t.docsPath,o=i.getDocsUrl?.({...t,docsPath:s});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...o?[`Docs: ${o}`]:[],...r?[`Details: ${r}`]:[],...i.version?[`Version: ${i.version}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),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,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=s,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=n.version}walk(e){return function e(t,r){return r?.(t)?t:t&&"object"==typeof t&&"cause"in t&&void 0!==t.cause?e(t.cause,r):r?null:t}(this,e)}}t.BaseError=a},45250:(e,t,r)=>{let n=r(21823),i=r(32511),a=r(22584),s=r(17129),o=r(1399),l=n.getBCHDigit(7973);function c(e,t){return s.getCharCountIndicator(e,t)+4}t.from=function(e,t){return o.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,r){if(!o.isValid(e))throw Error("Invalid QR Code version");void 0===r&&(r=s.BYTE);let a=(n.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t))*8;if(r===s.MIXED)return a;let l=a-c(r,e);switch(r){case s.NUMERIC:return Math.floor(l/10*3);case s.ALPHANUMERIC:return Math.floor(l/11*2);case s.KANJI:return Math.floor(l/13);case s.BYTE:default:return Math.floor(l/8)}},t.getBestVersionForData=function(e,r){let n,i=a.from(r,a.M);if(Array.isArray(e)){if(e.length>1){for(let r=1;r<=40;r++)if(function(e,t){let r=0;return e.forEach(function(e){let n=c(e.mode,t);r+=n+e.getBitsLength()}),r}(e,r)<=t.getCapacity(r,i,s.MIXED))return r;return}if(0===e.length)return 1;n=e[0]}else n=e;return function(e,r,n){for(let i=1;i<=40;i++)if(r<=t.getCapacity(i,n,e))return i}(n.mode,n.getLength(),i)},t.getEncodedBits=function(e){if(!o.isValid(e)||e<7)throw Error("Invalid QR Code version");let t=e<<12;for(;n.getBCHDigit(t)-l>=0;)t^=7973<<n.getBCHDigit(t)-l;return e<<12|t}},45274:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWebSocketRpcClient=a;let n=r(17208),i=r(92918);async function a(e,t={}){let{keepAlive:s,reconnect:o}=t;return(0,i.getSocketRpcClient)({async getSocket({onClose:t,onError:i,onOpen:a,onResponse:s}){let o=await Promise.resolve().then(()=>r(3532)).then(e=>e.WebSocket),l=new o(e);function c(){l.removeEventListener("close",c),l.removeEventListener("message",u),l.removeEventListener("error",i),l.removeEventListener("open",a),t()}function u({data:e}){if("string"!=typeof e||0!==e.trim().length)try{let t=JSON.parse(e);s(t)}catch(e){i(e)}}l.addEventListener("close",c),l.addEventListener("message",u),l.addEventListener("error",i),l.addEventListener("open",a),l.readyState===o.CONNECTING&&await new Promise((e,t)=>{l&&(l.onopen=e,l.onerror=t)});let{close:d}=l;return Object.assign(l,{close(){d.bind(l)(),c()},ping(){try{if(l.readyState===l.CLOSED||l.readyState===l.CLOSING)throw new n.WebSocketRequestError({url:l.url,cause:new n.SocketClosedError({url:l.url})});l.send(JSON.stringify({jsonrpc:"2.0",id:null,method:"net_version",params:[]}))}catch(e){i(e)}},request({body:e}){if(l.readyState===l.CLOSED||l.readyState===l.CLOSING)throw new n.WebSocketRequestError({body:e,url:l.url,cause:new n.SocketClosedError({url:l.url})});return l.send(JSON.stringify(e))}})}
5391,keepAlive:s,reconnect:o,url:e})}},45283:(e,t,r)=>{"use strict";r.d(t,{T:()=>f});var n=r(91004),i=r(81920),a=r(33432),s=r(77909),o=r(29092),l=r(82376),c=r(18627),u=r(82875);let d={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"}]}]},h=a.w.getBlockchainApiUrl(),p=(0,n.BX)({clientId:null,api:new s.Z({baseUrl:h,clientId:null}),supportedChains:{http:[],ws:[]}}),f={state:p,async get(e){let{st:t,sv:r}=f.getSdkProperties(),n=c.H.state.projectId,i={...e.params||{},st:t,sv:r,projectId:n};return p.api.get({...e,params:i})},getSdkProperties(){let{sdkType:e,sdkVersion:t}=c.H.state;return{st:e||"unknown",sv:t||"unknown"}},async isNetworkSupported(e){if(!e)return!1;try{p.supportedChains.http.length||await f.getSupportedNetworks()}catch(e){return!1}return p.supportedChains.http.includes(e)},async getSupportedNetworks(){try{let e=await f.get({path:"v1/supported-chains"});return p.supportedChains=e,e}catch{return p.supportedChains}},async fetchIdentity({address:e}){let t=o.i.getIdentityFromCacheForAddress(e);if(t)return t;let r=await f.get({path:`/v1/identity/${e}`,params:{sender:l.W.state.activeCaipAddress?a.w.getPlainAddress(l.W.state.activeCaipAddress):void 0}});return o.i.updateIdentityCache({address:e,identity:r,timestamp:Date.now()}),r},async fetchTransactions({account:e,cursor:t,signal:r,cache:n,chainId:i}){if(!await f.isNetworkSupported(l.W.state.activeCaipNetwork?.caipNetworkId))return{data:[],next:void 0};let a=o.i.getTransactionsCacheForAddress({address:e,chainId:i});if(a)return a;let s=await f.get({path:`/v1/account/${e}/history`,params:{cursor:t,chainId:i},signal:r,cache:n});return o.i.updateTransactionsCache({address:e,chainId:i,timestamp:Date.now(),transactions:s}),s},fetchSwapQuote:async({amount:e,userAddress:t,from:r,to:n,gasPrice:i})=>await f.isNetworkSupported(l.W.state.activeCaipNetwork?.caipNetworkId)?f.get({path:"/v1/convert/quotes",headers:{"Content-Type":"application/json"},params:{amount:e,userAddress:t,from:r,to:n,gasPrice:i}}):{quotes:[]},fetchSwapTokens:async({chainId:e})=>await f.isNetworkSupported(l.W.state.activeCaipNetwork?.caipNetworkId)?f.get({path:"/v1/convert/tokens",params:{chainId:e}}):{tokens:[]},getAddressBalance:async({caipNetworkId:e,address:t,method:r="getAddressBalance",params:n})=>p.api.post({path:`/v1?chainId=${e}&projectId=${c.H.state.projectId}`,body:{id:"1",jsonrpc:"2.0",method:r,params:n??{address:t}}}).then(e=>e.result),async fetchTokenPrice({addresses:e,caipNetworkId:t=l.W.state.activeCaipNetwork?.caipNetworkId}){if(!await f.isNetworkSupported(t))return{fungibles:[]};let r=o.i.getTokenPriceCacheForAddresses(e);if(r)return r;let n=await p.api.post({path:"/v1/fungible/price",body:{currency:"usd",addresses:e,projectId:c.H.state.projectId},headers:{"Content-Type":"application/json"}});return o.i.updateTokenPriceCache({addresses:e,timestamp:Date.now(),tokenPrice:n}),n},fetchSwapAllowance:async({tokenAddress:e,userAddress:t})=>await f.isNetworkSupported(l.W.state.activeCaipNetwork?.caipNetworkId)?f.get({path:"/v1/convert/allowance",params:{tokenAddress:e,userAddress:t},headers:{"Content-Type":"application/json"}}):{allowance:"0"},async fetchGasPrice({chainId:e}){let{st:t,sv:r}=f.getSdkProperties();if(!await f.isNetworkSupported(l.W.state.activeCaipNetwork?.caipNetworkId))throw Error("Network not supported for Gas Price");return f.get({path:"/v1/convert/gas-price",headers:{"Content-Type":"application/json"},params:{chainId:e,st:t,sv:r}})},async generateSwapCalldata({amount:e,from:t,to:r,userAddress:n,disableEstimate:a}){if(!await f.isNetworkSupported(l.W.state.activeCaipNetwork?.caipNetworkId))throw Error("Network not supported for Swaps");return p.api.post({path:"/v1/convert/build-transaction",headers:{"Content-Type":"application/json"},body:{amount:e,eip155:{slippage:i.oU.CONVERT_SLIPPAGE_TOLERANCE},projectId:c.H.state.projectId,from:t,to:r,userAddress:n,disableEstimate:a}})},async generateApproveCalldata({from:e,to:t,userAddress:r}){let{st:n,sv:i}=f.getSdkProperties();if(!await f.isNetworkSupported(l.W.state.activeCaipNetwork?.caipNetworkId))throw Error("Network not supported for Swaps");return f.get({path:"/v1/convert/build-approve",headers:{"Content-Type":"application/json"}
5391,params:{userAddress:r,from:e,to:t,st:n,sv:i}})},async getBalance(e,t,r){let{st:n,sv:i}=f.getSdkProperties();if(!await f.isNetworkSupported(l.W.state.activeCaipNetwork?.caipNetworkId))return u.P.showError("Token Balance Unavailable"),{balances:[]};let a=`${t}:${e}`,s=o.i.getBalanceCacheForCaipAddress(a);if(s)return s;let c=await f.get({path:`/v1/account/${e}/balance`,params:{currency:"usd",chainId:t,forceUpdate:r,st:n,sv:i}});return o.i.updateBalanceCache({caipAddress:a,balance:c,timestamp:Date.now()}),c},lookupEnsName:async e=>await f.isNetworkSupported(l.W.state.activeCaipNetwork?.caipNetworkId)?f.get({path:`/v1/profile/account/${e}`,params:{apiVersion:"2"}}):{addresses:{},attributes:[]},async reverseLookupEnsName({address:e}){if(!await f.isNetworkSupported(l.W.state.activeCaipNetwork?.caipNetworkId))return[];let t=l.W.getAccountData()?.address;return f.get({path:`/v1/profile/reverse/${e}`,params:{sender:t,apiVersion:"2"}})},getEnsNameSuggestions:async e=>await f.isNetworkSupported(l.W.state.activeCaipNetwork?.caipNetworkId)?f.get({path:`/v1/profile/suggestions/${e}`,params:{zone:"reown.id"}}):{suggestions:[]},registerEnsName:async({coinType:e,address:t,message:r,signature:n})=>await f.isNetworkSupported(l.W.state.activeCaipNetwork?.caipNetworkId)?p.api.post({path:"/v1/profile/account",body:{coin_type:e,address:t,message:r,signature:n},headers:{"Content-Type":"application/json"}}):{success:!1},generateOnRampURL:async({destinationWallets:e,partnerUserId:t,defaultNetwork:r,purchaseAmount:n,paymentAmount:i})=>await f.isNetworkSupported(l.W.state.activeCaipNetwork?.caipNetworkId)?(await p.api.post({path:"/v1/generators/onrampurl",params:{projectId:c.H.state.projectId},body:{destinationWallets:e,defaultNetwork:r,partnerUserId:t,defaultExperience:"buy",presetCryptoAmount:n,presetFiatAmount:i}})).url:"",async getOnrampOptions(){if(!await f.isNetworkSupported(l.W.state.activeCaipNetwork?.caipNetworkId))return{paymentCurrencies:[],purchaseCurrencies:[]};try{return await f.get({path:"/v1/onramp/options"})}catch(e){return d}},async getOnrampQuote({purchaseCurrency:e,paymentCurrency:t,amount:r,network:n}){try{if(!await f.isNetworkSupported(l.W.state.activeCaipNetwork?.caipNetworkId))return null;return await p.api.post({path:"/v1/onramp/quote",params:{projectId:c.H.state.projectId},body:{purchaseCurrency:e,paymentCurrency:t,amount:r,network:n}})}catch(e){return{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"}}},getSmartSessions:async e=>await f.isNetworkSupported(l.W.state.activeCaipNetwork?.caipNetworkId)?f.get({path:`/v1/sessions/${e}`}):[],revokeSmartSession:async(e,t,r)=>await f.isNetworkSupported(l.W.state.activeCaipNetwork?.caipNetworkId)?p.api.post({path:`/v1/sessions/${e}/revoke`,params:{projectId:c.H.state.projectId},body:{pci:t,signature:r}}):{success:!1},setClientId(e){p.clientId=e,p.api=new s.Z({baseUrl:h,clientId:e})}}},45400:(e,t,r)=>{"use strict";r.d(t,{A7:()=>a,BG:()=>s,Fo:()=>p,K0:()=>l,Oh:()=>c,RM:()=>g,jj:()=>o,k5:()=>d,lN:()=>m,lY:()=>h,uC:()=>f,vW:()=>u});var n=r(40678),i=r(81742);class a extends i.C{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,name:"ExecutionRevertedError"})}}Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class s extends i.C{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.Q)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class o extends i.C{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.Q)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}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/});class l extends i.C{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class c extends i.C{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.
5392Try increasing the nonce or find the latest nonce with \`getTransactionCount\`.`,{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class u extends i.C{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class d extends i.C{constructor({cause:e}={}){super("The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.",{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."],name:"InsufficientFundsError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class h extends i.C{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,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class p extends i.C{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class f extends i.C{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends i.C{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super(`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,n.Q)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${(0,n.Q)(r)} gwei`:""}).`,{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class g extends i.C{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}},45810:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=function(e,t={}){let{as:r="string"==typeof e?"Hex":"Bytes"}=t,n=(0,a.keccak_256)(o.from(e));return"Bytes"===r?n:l.fromBytes(n)},t.hmac256=function(e,t,r={}){let{as:i="string"==typeof t?"Hex":"Bytes"}=r,a=(0,n.hmac)(s.sha256,o.from(e),o.from(t));return"Bytes"===i?a:l.fromBytes(a)},t.ripemd160=function(e,t={}){let{as:r="string"==typeof e?"Hex":"Bytes"}=t,n=(0,i.ripemd160)(o.from(e));return"Bytes"===r?n:l.fromBytes(n)},t.sha256=function(e,t={}){let{as:r="string"==typeof e?"Hex":"Bytes"}=t,n=(0,s.sha256)(o.from(e));return"Bytes"===r?n:l.fromBytes(n)},t.validate=function(e){return l.validate(e)&&32===l.size(e)};let n=r(27315),i=r(90228),a=r(83899),s=r(97527),o=r(31837),l=r(70259)},45907:(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,r){var i;return(i=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==n(i)?i:i+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
5392t%2?a(Object(r),!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){if(e){if("string"==typeof e)return o(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function c(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}(e,t)||l(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}r.d(t,{A:()=>K});var d=r(87129),h=r.n(d),p=r(20801);function f(e){var t=p.useRef();return t.current=e,p.useCallback(function(){for(var e,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return null==(e=t.current)?void 0:e.call.apply(e,[t].concat(n))},[])}var m="undefined"!=typeof window&&window.document&&window.document.createElement?p.useLayoutEffect:p.useEffect,g=function(e,t){var r=p.useRef(!0);m(function(){return e(r.current)},t),m(function(){return r.current=!1,function(){r.current=!0}},[])},y=function(e,t){g(function(t){if(!t)return e()},t)};function b(e){var t=p.useRef(!1),r=u(p.useState(e),2),n=r[0],i=r[1];return p.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]),[n,function(e,r){r&&t.current||i(e)}]}function w(e){return void 0!==e}var v={},E=[];function C(e,t){}function A(e,t){}function x(e,t,r){t||v[r]||(e(!1,r),v[r]=!0)}function I(e,t){x(C,e,t)}I.preMessage=function(e){E.push(e)},I.resetWarned=function(){v={}},I.noteOnce=function(e,t){x(A,e,t)};let S=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new Set;return function e(t,a){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=i.has(t);if(I(!o,"Warning: There may be circular references"),o)return!1;if(t===a)return!0;if(r&&s>1)return!1;i.add(t);var l=s+1;if(Array.isArray(t)){if(!Array.isArray(a)||t.length!==a.length)return!1;for(var c=0;c<t.length;c++)if(!e(t[c],a[c],l))return!1;return!0}if(t&&a&&"object"===n(t)&&"object"===n(a)){var u=Object.keys(t);return u.length===Object.keys(a).length&&u.every(function(r){return e(t[r],a[r],l)})}return!1}(e,t)};var T=r(91049),P=r(7626);function O(e,t){if(null==e)return{};var r,n,i=(0,P.A)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var _=r(68);function N(e,t,r,n){var i=(t-r)/(n-r),a={};switch(e){case"rtl":a.right="".concat(100*i,"%"),a.transform="translateX(50%)";break;case"btt":a.bottom="".concat(100*i,"%"),a.transform="translateY(50%)";break;case"ttb":a.top="".concat(100*i,"%"),a.transform="translateY(-50%)";break;default:a.left="".concat(100*i,"%"),a.transform="translateX(-50%)"}return a}function k(e,t){return Array.isArray(e)?e[t]:e}var R={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_
5392SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=R.F1&&t<=R.F12)return!1;switch(t){case R.ALT:case R.CAPS_LOCK:case R.CONTEXT_MENU:case R.CTRL:case R.DOWN:case R.END:case R.ESC:case R.HOME:case R.INSERT:case R.LEFT:case R.MAC_FF_META:case R.META:case R.NUMLOCK:case R.NUM_CENTER:case R.PAGE_DOWN:case R.PAGE_UP:case R.PAUSE:case R.PRINT_SCREEN:case R.RIGHT:case R.SHIFT:case R.UP:case R.WIN_KEY:case R.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=R.ZERO&&e<=R.NINE||e>=R.NUM_ZERO&&e<=R.NUM_MULTIPLY||e>=R.A&&e<=R.Z||-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case R.SPACE:case R.QUESTION_MARK:case R.NUM_PLUS:case R.NUM_MINUS:case R.NUM_PERIOD:case R.NUM_DIVISION:case R.SEMICOLON:case R.DASH:case R.EQUALS:case R.COMMA:case R.PERIOD:case R.SLASH:case R.APOSTROPHE:case R.SINGLE_QUOTE:case R.OPEN_SQUARE_BRACKET:case R.BACKSLASH:case R.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},M=p.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),B=p.createContext({}),j=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],U=p.forwardRef(function(e,t){var r,n=e.prefixCls,a=e.value,o=e.valueIndex,l=e.onStartMove,c=e.onDelete,u=e.style,d=e.render,f=e.dragging,m=e.draggingDelete,g=e.onOffsetChange,y=e.onChangeComplete,b=e.onFocus,w=e.onMouseEnter,v=O(e,j),E=p.useContext(M),C=E.min,A=E.max,x=E.direction,I=E.disabled,S=E.keyboard,P=E.range,_=E.tabIndex,B=E.ariaLabelForHandle,U=E.ariaLabelledByForHandle,$=E.ariaRequired,L=E.ariaValueTextFormatterForHandle,D=E.styles,F=E.classNames,H="".concat(n,"-handle"),z=function(e){I||l(e,o)},W=N(x,a,C,A),q={};null!==o&&(q={tabIndex:I?null:k(_,o),role:"slider","aria-valuemin":C,"aria-valuemax":A,"aria-valuenow":a,"aria-disabled":I,"aria-label":k(B,o),"aria-labelledby":k(U,o),"aria-required":k($,o),"aria-valuetext":null==(r=k(L,o))?void 0:r(a),"aria-orientation":"ltr"===x||"rtl"===x?"horizontal":"vertical",onMouseDown:z,onTouchStart:z,onFocus:function(e){null==b||b(e,o)},onMouseEnter:function(e){w(e,o)},onKeyDown:function(e){if(!I&&S){var t=null;switch(e.which||e.keyCode){case R.LEFT:t="ltr"===x||"btt"===x?-1:1;break;case R.RIGHT:t="ltr"===x||"btt"===x?1:-1;break;case R.UP:t="ttb"!==x?1:-1;break;case R.DOWN:t="ttb"!==x?-1:1;break;case R.HOME:t="min";break;case R.END:t="max";break;case R.PAGE_UP:t=2;break;case R.PAGE_DOWN:t=-2;break;case R.BACKSPACE:case R.DELETE:null==c||c(o)}null!==t&&(e.preventDefault(),g(t,o))}},onKeyUp:function(e){switch(e.which||e.keyCode){case R.LEFT:case R.RIGHT:case R.UP:case R.DOWN:case R.HOME:case R.END:case R.PAGE_UP:case R.PAGE_DOWN:null==y||y()}}});var V=p.createElement("div",(0,T.A)({ref:t,className:h()(H,i(i(i({},"".concat(H,"-").concat(o+1),null!==o&&P),"".concat(H,"-dragging"),f),"".concat(H,"-dragging-delete"),m),F.handle),style:s(s(s({},W),u),D.handle)},q,v));return d&&(V=d(V,{index:o,prefixCls:n,value:a,dragging:f,draggingDelete:m})),V}),$=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onF
5392ocus"],L=p.forwardRef(function(e,t){var r=e.prefixCls,n=e.style,i=e.onStartMove,a=e.onOffsetChange,o=e.values,l=e.handleRender,c=e.activeHandleRender,d=e.draggingIndex,h=e.draggingDelete,f=e.onFocus,m=O(e,$),g=p.useRef({}),y=u(p.useState(!1),2),b=y[0],w=y[1],v=u(p.useState(-1),2),E=v[0],C=v[1],A=function(e){C(e),w(!0)};p.useImperativeHandle(t,function(){return{focus:function(e){var t;null==(t=g.current[e])||t.focus()},hideHelp:function(){(0,_.flushSync)(function(){w(!1)})}}});var x=s({prefixCls:r,onStartMove:i,onOffsetChange:a,render:l,onFocus:function(e,t){A(t),null==f||f(e)},onMouseEnter:function(e,t){A(t)}},m);return p.createElement(p.Fragment,null,o.map(function(e,t){var r=d===t;return p.createElement(U,(0,T.A)({ref:function(e){e?g.current[t]=e:delete g.current[t]},dragging:r,draggingDelete:r&&h,style:k(n,t),key:t,value:e,valueIndex:t},x))}),c&&b&&p.createElement(U,(0,T.A)({key:"a11y"},x,{value:o[E],valueIndex:null,dragging:-1!==d,draggingDelete:h,render:c,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))});let D=function(e){var t=e.prefixCls,r=e.style,n=e.children,a=e.value,o=e.onClick,l=p.useContext(M),c=l.min,u=l.max,d=l.direction,f=l.includedStart,m=l.includedEnd,g=l.included,y="".concat(t,"-text"),b=N(d,a,c,u);return p.createElement("span",{className:h()(y,i({},"".concat(y,"-active"),g&&f<=a&&a<=m)),style:s(s({},b),r),onMouseDown:function(e){e.stopPropagation()},onClick:function(){o(a)}},n)},F=function(e){var t=e.prefixCls,r=e.marks,n=e.onClick,i="".concat(t,"-mark");return r.length?p.createElement("div",{className:i},r.map(function(e){var t=e.value,r=e.style,a=e.label;return p.createElement(D,{key:t,prefixCls:i,style:r,value:t,onClick:n},a)})):null},H=function(e){var t=e.prefixCls,r=e.value,n=e.style,a=e.activeStyle,o=p.useContext(M),l=o.min,c=o.max,u=o.direction,d=o.included,f=o.includedStart,m=o.includedEnd,g="".concat(t,"-dot"),y=d&&f<=r&&r<=m,b=s(s({},N(u,r,l,c)),"function"==typeof n?n(r):n);return y&&(b=s(s({},b),"function"==typeof a?a(r):a)),p.createElement("span",{className:h()(g,i({},"".concat(g,"-active"),y)),style:b})},z=function(e){var t=e.prefixCls,r=e.marks,n=e.dots,i=e.style,a=e.activeStyle,s=p.useContext(M),o=s.min,l=s.max,c=s.step,u=p.useMemo(function(){var e=new Set;if(r.forEach(function(t){e.add(t.value)}),n&&null!==c)for(var t=o;t<=l;)e.add(t),t+=c;return Array.from(e)},[o,l,c,n,r]);return p.createElement("div",{className:"".concat(t,"-step")},u.map(function(e){return p.createElement(H,{prefixCls:t,key:e,value:e,style:i,activeStyle:a})}))},W=function(e){var t=e.prefixCls,r=e.style,n=e.start,a=e.end,o=e.index,l=e.onStartMove,c=e.replaceCls,u=p.useContext(M),d=u.direction,f=u.min,m=u.max,g=u.disabled,y=u.range,b=u.classNames,w="".concat(t,"-track"),v=(n-f)/(m-f),E=(a-f)/(m-f),C=function(e){!g&&l&&l(e,-1)},A={};switch(d){case"rtl":A.right="".concat(100*v,"%"),A.width="".concat(100*E-100*v,"%");break;case"btt":A.bottom="".concat(100*v,"%"),A.height="".concat(100*E-100*v,"%");break;case"ttb":A.top="".concat(100*v,"%"),A.height="".concat(100*E-100*v,"%");break;default:A.left="".concat(100*v,"%"),A.width="".concat(100*E-100*v,"%")}var x=c||h()(w,i(i({},"".concat(w,"-").concat(o+1),null!==o&&y),"".concat(t,"-track-draggable"),l),b.track);return p.createElement("div",{className:x,style:s(s({},A),r),onMouseDown:C,onTouchStart:C})},q=function(e){var t=e.prefixCls,r=e.style,n=e.values,i=e.startPoint,a=e.onStartMove,o=
5392p.useContext(M),l=o.included,c=o.range,u=o.min,d=o.styles,f=o.classNames,m=p.useMemo(function(){if(!c){if(0===n.length)return[];var e=null!=i?i:u,t=n[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}for(var r=[],a=0;a<n.length-1;a+=1)r.push({start:n[a],end:n[a+1]});return r},[n,c,i,u]);if(!l)return null;var g=null!=m&&m.length&&(f.tracks||d.tracks)?p.createElement(W,{index:null,prefixCls:t,start:m[0].start,end:m[m.length-1].end,replaceCls:h()(f.tracks,"".concat(t,"-tracks")),style:d.tracks}):null;return p.createElement(p.Fragment,null,g,m.map(function(e,n){var i=e.start,o=e.end;return p.createElement(W,{index:n,prefixCls:t,style:s(s({},k(r,n)),d.track),start:i,end:o,key:n,onStartMove:a})}))};function V(e){var t="targetTouches"in e?e.targetTouches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}let G=function(e,t,r,n,i,a,s,o,l,d,h){var m=u(p.useState(null),2),y=m[0],b=m[1],w=u(p.useState(-1),2),v=w[0],E=w[1],C=u(p.useState(!1),2),A=C[0],x=C[1],I=u(p.useState(r),2),S=I[0],T=I[1],P=u(p.useState(r),2),O=P[0],_=P[1],N=p.useRef(null),k=p.useRef(null),R=p.useRef(null),M=p.useContext(B),j=M.onDragStart,U=M.onDragChange;g(function(){-1===v&&T(r)},[r,v]),p.useEffect(function(){return function(){document.removeEventListener("mousemove",N.current),document.removeEventListener("mouseup",k.current),R.current&&(R.current.removeEventListener("touchmove",N.current),R.current.removeEventListener("touchend",k.current))}},[]);var $=function(e,t,r){void 0!==t&&b(t),T(e);var n=e;r&&(n=e.filter(function(e,t){return t!==v})),s(n),U&&U({rawValues:e,deleteIndex:r?v:-1,draggingIndex:v,draggingValue:t})},L=f(function(e,t,r){if(-1===e){var s=O[0],o=O[O.length-1],u=t*(i-n);u=Math.min(u=Math.max(u,n-s),i-o),u=a(s+u)-s,$(O.map(function(e){return e+u}))}else{var d=c(S);d[e]=O[e];var h=l(d,(i-n)*t,e,"dist");$(h.values,h.value,r)}});return[v,y,A,p.useMemo(function(){var e=c(r).sort(function(e,t){return e-t}),t=c(S).sort(function(e,t){return e-t}),n={};t.forEach(function(e){n[e]=(n[e]||0)+1}),e.forEach(function(e){n[e]=(n[e]||0)-1});var i=+!!d;return Object.values(n).reduce(function(e,t){return e+Math.abs(t)},0)<=i?S:r},[r,S,d]),function(n,i,a){n.stopPropagation();var s=a||r,l=s[i];E(i),b(l),_(s),T(s),x(!1);var c=V(n),u=c.pageX,p=c.pageY,f=!1;j&&j({rawValues:s,draggingIndex:i,draggingValue:l});var m=function(r){r.preventDefault();var n,a,s=V(r),o=s.pageX,l=s.pageY,c=o-u,m=l-p,g=e.current.getBoundingClientRect(),y=g.width,b=g.height;switch(t){case"btt":n=-m/b,a=c;break;case"ttb":n=m/b,a=c;break;case"rtl":n=-c/y,a=m;break;default:n=c/y,a=m}x(f=!!d&&Math.abs(a)>130&&h<S.length),L(i,n,f)},g=function e(t){t.preventDefault(),document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",m),R.current&&(R.current.removeEventListener("touchmove",N.current),R.current.removeEventListener("touchend",k.current)),N.current=null,k.current=null,R.current=null,o(f),E(-1),x(!1)};document.addEventListener("mouseup",g),document.addEventListener("mousemove",m),n.currentTarget.addEventListener("touchend",g),n.currentTarget.addEventListener("touchmove",m),N.current=m,k.current=g,R.current=n.currentTarget}]},K=p.forwardRef(function(e,t){var r,a,o,l,d,m,g,v,E,C,A,x,T,P,O,_,N,k,R,B,j,U=e.prefixCls,$=void 0===U?"rc-slider":U,D=e.className,H=e.style,W=e.classNames,V=e.styles,K=e.id,Z=e.disabled,J=void 0!==Z&&Z,Y=e.keyboard,Q=void 0===Y||Y,X=e.autoFocus,ee=e.onFocus,et=e.onBlur,er=e.min,en=void 0===er?0:er,ei=e.max,ea=void 0===ei?100:ei,es=e.step,eo=void 0===es?1:es,el=e.value,ec=e.defaultValue,eu=e.range,ed=e.count,eh=e.onChange,ep=e.onBeforeChange,ef=e.onAfterChange,em=e.onChangeComplete,eg=e.allowCross,ey=e.pushable,eb=void 0!==ey&&ey,ew=e.reverse,ev=e.vertical,eE=e.included,eC=void 0===eE||eE,eA=e.startPoint,ex=e.trackStyle,eI=e.handleStyle,eS=e.railStyle,eT=e.dotStyle,eP=e.activeDotStyle,eO=e.marks,e_=e.dots,eN=e.handleRender,ek=e.activeHandleRender,eR=e.track,eM=e.tabIndex,eB=void 0===eM?0:eM,ej=e.ariaLabelForHandle,eU=e.ariaLabelledByForHandle,e$=e.ariaRequired,eL=e.ariaValueTextFormatterForHandle,eD=p.useRef(null),eF=p.useRef(null),eH=p.useMemo(function(){return ev?ew?"ttb":"btt":ew?"rtl":"ltr"},[ew,ev]),ez=u((0,p.useMemo)(function(){if(!0===eu||!eu)return[!!eu,!1,!1,0];var e=eu.editable,t=eu.draggableTrack;return[!0,e,!e&&t,eu.minCount||0,eu.maxCount]},[eu]),5),eW=ez[0],eq=ez[1],eV=ez[2],eG=ez[3],eK=ez[4],eZ=p.useMemo(function(){return isFinite(en)?en:0}
5392,[en]),eJ=p.useMemo(function(){return isFinite(ea)?ea:100},[ea]),eY=p.useMemo(function(){return null!==eo&&eo<=0?1:eo},[eo]),eQ=p.useMemo(function(){return"boolean"==typeof eb?!!eb&&eY:eb>=0&&eb},[eb,eY]),eX=p.useMemo(function(){return Object.keys(eO||{}).map(function(e){var t=eO[e],r={value:Number(e)};return t&&"object"===n(t)&&!p.isValidElement(t)&&("label"in t||"style"in t)?(r.style=t.style,r.label=t.label):r.label=t,r}).filter(function(e){var t=e.label;return t||"number"==typeof t}).sort(function(e,t){return e.value-t.value})},[eO]),e0=u((r=void 0===eg||eg,a=p.useCallback(function(e){return Math.max(eZ,Math.min(eJ,e))},[eZ,eJ]),o=p.useCallback(function(e){if(null!==eY){var t=eZ+Math.round((a(e)-eZ)/eY)*eY,r=function(e){return(String(e).split(".")[1]||"").length},n=Math.max(r(eY),r(eJ),r(eZ)),i=Number(t.toFixed(n));return eZ<=i&&i<=eJ?i:null}return null},[eY,eZ,eJ,a]),l=p.useCallback(function(e){var t=a(e),r=eX.map(function(e){return e.value});null!==eY&&r.push(o(e)),r.push(eZ,eJ);var n=r[0],i=eJ-eZ;return r.forEach(function(e){var r=Math.abs(t-e);r<=i&&(n=e,i=r)}),n},[eZ,eJ,eX,eY,a,o]),d=function e(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit";if("number"==typeof r){var a,s=t[n],l=s+r,u=[];eX.forEach(function(e){u.push(e.value)}),u.push(eZ,eJ),u.push(o(s));var d=r>0?1:-1;"unit"===i?u.push(o(s+d*eY)):u.push(o(l)),u=u.filter(function(e){return null!==e}).filter(function(e){return r<0?e<=s:e>=s}),"unit"===i&&(u=u.filter(function(e){return e!==s}));var h="unit"===i?s:l,p=Math.abs((a=u[0])-h);if(u.forEach(function(e){var t=Math.abs(e-h);t<p&&(a=e,p=t)}),void 0===a)return r<0?eZ:eJ;if("dist"===i)return a;if(Math.abs(r)>1){var f=c(t);return f[n]=a,e(f,r-d,n,i)}return a}return"min"===r?eZ:"max"===r?eJ:void 0},m=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",i=e[r],a=d(e,t,r,n);return{value:a,changed:a!==i}},g=function(e){return null===eQ&&0===e||"number"==typeof eQ&&e<eQ},[l,function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",a=e.map(l),s=a[n],o=d(a,t,n,i);if(a[n]=o,!1===r){var c=eQ||0;n>0&&a[n-1]!==s&&(a[n]=Math.max(a[n],a[n-1]+c)),n<a.length-1&&a[n+1]!==s&&(a[n]=Math.min(a[n],a[n+1]-c))}else if("number"==typeof eQ||null===eQ){for(var u=n+1;u<a.length;u+=1)for(var h=!0;g(a[u]-a[u-1])&&h;){var p=m(a,1,u);a[u]=p.value,h=p.changed}for(var f=n;f>0;f-=1)for(var y=!0;g(a[f]-a[f-1])&&y;){var b=m(a,-1,f-1);a[f-1]=b.value,y=b.changed}for(var w=a.length-1;w>0;w-=1)for(var v=!0;g(a[w]-a[w-1])&&v;){var E=m(a,-1,w-1);a[w-1]=E.value,v=E.changed}for(var C=0;C<a.length-1;C+=1)for(var A=!0;g(a[C+1]-a[C])&&A;){var x=m(a,1,C+1);a[C+1]=x.value,A=x.changed}}return{value:a[n],values:a}}]),2),e1=e0[0],e2=e0[1],e5=(E=(v={value:el}).defaultValue,C=v.value,A=v.onChange,x=v.postState,P=(T=u(b(function(){return w(C)?C:w(E)?"function"==typeof E?E():E:"function"==typeof ec?ec():ec}),2))[0],O=T[1],_=void 0!==C?C:P,N=x?x(_):_,k=f(A),B=(R=u(b([_]),2))[0],j=R[1],y(function(){var e=B[0];P!==e&&k(P,e)},[B]),y(function(){w(C)||O(C)},[C]),[N,f(function(e,t){O(e,t),j([_],t)})]),e6=u(e5,2),e3=e6[0],e4=e6[1],e8=p.useMemo(function(){var e=null==e3?[]:Array.isArray(e3)?e3:[e3],t=u(e,1)[0],r=void 0===t?eZ:t,n=null===e3?[]:[r];if(eW){if(n=c(e),ed||void 0===e3){var i,a=ed>=0?ed+1:2;for(n=n.slice(0,a);n.length<a;)n.push(null!=(i=n[n.length-1])?i:eZ)}n.sort(function(e,t){return e-t})}return n.forEach(function(e,t){n[t]=e1(e)}),n},[e3,eW,eZ,ed,e1]),e9=function(e){return eW?e:e[0]},e7=f(function(e){var t=c(e).sort(function(e,t){return e-t});eh&&!S(t,e8,!0)&&eh(e9(t)),e4(t)}),te=f(function(e){e&&eD.current.hideHelp();var t=e9(e8);null==ef||ef(t),I(!ef,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),null==em||em(t)}),tt=u(G(eF,eH,e8,eZ,eJ,e1,e7,te,e2,eq,eG),5),tr=tt[0],tn=tt[1],ti=tt[2],ta=tt[3],ts=tt[4],to=function(e,t){if(!J){var r,n,i=c(e8),a=0,s=0,o=eJ-eZ;e8.forEach(function(t,r){var n=Math.abs(e-t);n<=o&&(o=n,a=r),t<e&&(s=r)});var l=a;eq&&0!==o&&(!eK||e8.length<eK)?(i.splice(s+1,0,e),l=s+1):i[a]=e,eW&&!e8.length&&void 0===ed&&i.push(e);var u=e9(i);null==ep||ep(u),e7(i),t?(null==(r=document.activeElement)||null==(n=r.blur)||n.call(r),eD.current.focus(l),ts(t,l,i)):(null==ef||ef(u),I(!ef,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),null==em||em(u))}},tl=u(p.useState(null),2),tc=tl[0],tu=tl[1];p.useEffect(function(){if(null!==tc){var e=e8.indexOf(tc);e>=0&&eD.current.focus(e)}tu(null)},[tc]);var td=p.useMemo(function(){return(!eV||null!==eY)&&eV}
5392,[eV,eY]),th=f(function(e,t){ts(e,t),null==ep||ep(e9(e8))}),tp=-1!==tr;p.useEffect(function(){if(!tp){var e=e8.lastIndexOf(tn);eD.current.focus(e)}},[tp]);var tf=p.useMemo(function(){return c(ta).sort(function(e,t){return e-t})},[ta]),tm=u(p.useMemo(function(){return eW?[tf[0],tf[tf.length-1]]:[eZ,tf[0]]},[tf,eW,eZ]),2),tg=tm[0],ty=tm[1];p.useImperativeHandle(t,function(){return{focus:function(){eD.current.focus(0)},blur:function(){var e,t=document.activeElement;null!=(e=eF.current)&&e.contains(t)&&(null==t||t.blur())}}}),p.useEffect(function(){X&&eD.current.focus(0)},[]);var tb=p.useMemo(function(){return{min:eZ,max:eJ,direction:eH,disabled:J,keyboard:Q,step:eY,included:eC,includedStart:tg,includedEnd:ty,range:eW,tabIndex:eB,ariaLabelForHandle:ej,ariaLabelledByForHandle:eU,ariaRequired:e$,ariaValueTextFormatterForHandle:eL,styles:V||{},classNames:W||{}}},[eZ,eJ,eH,J,Q,eY,eC,tg,ty,eW,eB,ej,eU,e$,eL,V,W]);return p.createElement(M.Provider,{value:tb},p.createElement("div",{ref:eF,className:h()($,D,i(i(i(i({},"".concat($,"-disabled"),J),"".concat($,"-vertical"),ev),"".concat($,"-horizontal"),!ev),"".concat($,"-with-marks"),eX.length)),style:H,onMouseDown:function(e){e.preventDefault();var t,r=eF.current.getBoundingClientRect(),n=r.width,i=r.height,a=r.left,s=r.top,o=r.bottom,l=r.right,c=e.clientX,u=e.clientY;switch(eH){case"btt":t=(o-u)/i;break;case"ttb":t=(u-s)/i;break;case"rtl":t=(l-c)/n;break;default:t=(c-a)/n}to(e1(eZ+t*(eJ-eZ)),e)},id:K},p.createElement("div",{className:h()("".concat($,"-rail"),null==W?void 0:W.rail),style:s(s({},eS),null==V?void 0:V.rail)}),!1!==eR&&p.createElement(q,{prefixCls:$,style:ex,values:e8,startPoint:eA,onStartMove:td?th:void 0}),p.createElement(z,{prefixCls:$,marks:eX,dots:e_,style:eT,activeStyle:eP}),p.createElement(L,{ref:eD,prefixCls:$,style:eI,values:ta,draggingIndex:tr,draggingDelete:ti,onStartMove:th,onOffsetChange:function(e,t){if(!J){var r=e2(e8,e,t);null==ep||ep(e9(e8)),e7(r.values),tu(r.value)}},onFocus:ee,onBlur:et,handleRender:eN,activeHandleRender:ek,onChangeComplete:te,onDelete:eq?function(e){if(!J&&eq&&!(e8.length<=eG)){var t=c(e8);t.splice(e,1),null==ep||ep(e9(t)),e7(t);var r=Math.max(0,e-1);eD.current.hideHelp(),eD.current.focus(r)}}:void 0}),p.createElement(F,{prefixCls:$,marks:eX,onClick:to})))})},46076:(e,t)=>{"use strict";function r(e,t,r){return t<=e&&e<=r}function n(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function i(e){this.tokens=[].slice.call(e)}function a(e,t){if(e)throw TypeError("Decoder error");return t||65533}i.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(e){if(Array.isArray(e))for(;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(;e.length;)this.tokens.push(e.shift());else this.tokens.push(e)}};var s="utf-8";function o(e,t){if(!(this instanceof o))return new o(e,t);
5392if((e=void 0!==e?String(e).toLowerCase():s)!==s)throw Error("Encoding not supported. Only utf-8 is supported");t=n(t),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!t.fatal,this._ignoreBOM=!!t.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function l(e,t){if(!(this instanceof l))return new l(e,t);if((e=void 0!==e?String(e).toLowerCase():s)!==s)throw Error("Encoding not supported. Only utf-8 is supported");t=n(t),this._streaming=!1,this._encoder=null,this._options={fatal:!!t.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}function c(e){var t=e.fatal,n=0,i=0,s=0,o=128,l=191;this.handler=function(e,c){if(-1===c&&0!==s)return s=0,a(t);if(-1===c)return -1;if(0===s){if(r(c,0,127))return c;if(r(c,194,223))s=1,n=c-192;else if(r(c,224,239))224===c&&(o=160),237===c&&(l=159),s=2,n=c-224;else{if(!r(c,240,244))return a(t);240===c&&(o=144),244===c&&(l=143),s=3,n=c-240}return n<<=6*s,null}if(!r(c,o,l))return n=s=i=0,o=128,l=191,e.prepend(c),a(t);if(o=128,l=191,i+=1,n+=c-128<<6*(s-i),i!==s)return null;var u=n;return n=s=i=0,u}}function u(e){e.fatal,this.handler=function(e,t){if(-1===t)return -1;if(r(t,0,127))return t;r(t,128,2047)?(n=1,i=192):r(t,2048,65535)?(n=2,i=224):r(t,65536,1114111)&&(n=3,i=240);for(var n,i,a=[(t>>6*n)+i];n>0;){var s=t>>6*(n-1);a.push(128|63&s),n-=1}return a}}o.prototype={decode:function(e,t){r="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=n(t),this._streaming||(this._decoder=new c({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!t.stream;for(var r,a,s=new i(r),o=[];!s.endOfStream()&&-1!==(a=this._decoder.handler(s,s.read()));)null!==a&&(Array.isArray(a)?o.push.apply(o,a):o.push(a));if(!this._streaming){do{if(-1===(a=this._decoder.handler(s,s.read())))break;if(null===a)continue;Array.isArray(a)?o.push.apply(o,a):o.push(a)}while(!s.endOfStream());this._decoder=null}!o.length||-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===o[0]?(this._BOMseen=!0,o.shift()):this._BOMseen=!0);for(var l="",u=0;u<o.length;++u){var d=o[u];d<=65535?l+=String.fromCharCode(d):(d-=65536,l+=String.fromCharCode((d>>10)+55296,(1023&d)+56320))}return l}},l.prototype={encode:function(e,t){e=e?String(e):"",t=n(t),this._streaming||(this._encoder=new u(this._options)),this._streaming=!!t.stream;for(var r,a=[],s=new i(function(e){for(var t=String(e),r=t.length,n=0,i=[];n<r;){var a=t.charCodeAt(n);if(a<55296||a>57343)i.push(a);else if(56320<=a&&a<=57343)i.push(65533);else if(55296<=a&&a<=56319)if(n===r-1)i.push(65533);else{var s=e.charCodeAt(n+1);if(56320<=s&&s<=57343){var o=1023&a,l=1023&s;i.push(65536+(o<<10)+l),n+=1}else i.push(65533)}n+=1}return i}(e));!s.endOfStream()&&-1!==(r=this._encoder.handler(s,s.read()));)Array.isArray(r)?a.push.apply(a,r):a.push(r);if(!this._streaming){for(;-1!==(r=this._encoder.handler(s,s.read()));)Array.isArray(r)?a.push.apply(a,r):a.push(r);this._encoder=null}return new Uint8Array(a)}},t.TextEncoder=l,t.TextDecoder=o},46183:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(55284);r(79909),r(39909),r(83627),r(6077);var s=r(46756),o=r(55405),l=r(63412),c=r(91392);let u=(0,c.AH)` 5393 button { 5394 display: flex; 5395 align-items: center; 5396 height: 40px; 5397 padding: ${({spacing:e})=>e[2]}; 5398 border-radius: ${({borderRadius:e})=>e[4]}; 5399 column-gap: ${({spacing:e})=>e[1]}; 5400 background-color: transparent; 5401 transition: background-color ${({durations:e})=>e.lg} 5402 ${({easings:e})=>e["ease-out-power-2"]}; 5403 will-change: background-color; 5404 } 5405 5406 wui-image, 5407 .icon-box { 5408 width: ${({spacing:e})=>e[6]}; 5409 height: ${({spacing:e})=>e[6]}; 5410 border-radius: ${({borderRadius:e})=>e[4]}; 5411 } 5412 5413 wui-text { 5414 flex: 1; 5415 } 5416 5417 .icon-box { 5418 position: relative; 5419 } 5420 5421 .icon-box[data-active='true'] { 5422 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 5423 } 5424 5425 .circle { 5426 position: absolute; 5427 left: 16px; 5428 top: 15px; 5429 width: 8px; 5430 height: 8px; 5431 background-color: ${({tokens:e})=>e.core.textSuccess}; 5432 box-shadow: 0 0 0 2px ${({tokens:e})=>e.theme.foregroundPrimary}; 5433 border-radius: 50%; 5434 } 5435 5436 /* -- Hover & Active states ----------------------------------------------------------- */ 5437 @media (hover: hover) { 5438 button:hover:enabled, 5439 button:active:enabled { 5440 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 5441 } 5442 } 5443`;var d=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let h=class extends n.WF{constructor(){super(...arguments),this.address="",this.profileName="",this.alt="",this.imageSrc="",this.icon=void 0,this.iconSize="md",this.enableGreenCircle=!0,this.loading=!1,this.charsStart=4,this.charsEnd=6}render(){return(0,n.qy)` 5444 <button> 5445 ${this.leftImageTemplate()} ${this.textTemplate()} ${this.rightImageTemplate()} 5446 </button> 5447 `}leftImageTemplate(){let e=this.icon?(0,n.qy)`<wui-icon 5448 size=${(0,a.J)(this.iconSize)} 5449 color="default" 5450 name=${this.icon} 5451 class="icon" 5452 ></wui-icon>`:(0,n.qy)`<wui-image src=${this.imageSrc} alt=${this.alt}></wui-image>`;return(0,n.qy)` 5453 <wui-flex 5454 alignItems="center" 5455 justifyContent="center" 5456 class="icon-box" 5457 data-active=${!!this.icon} 5458 > 5459 ${e} 5460 ${this.enableGreenCircle?(0,n.qy)`<wui-flex class="circle"></wui-flex>`:null} 5461 </wui-flex> 5462 `}textTemplate(){return(0,n.qy)` 5463 <wui-text variant="lg-regular" color="primary"> 5464 ${o.Z.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?16:this.charsStart,charsEnd:this.profileName?0:this.charsEnd,truncate:this.profileName?"end":"middle"})} 5465 </wui-text> 5466 `}rightImageTemplate(){return(0,n.qy)`<wui-icon name="chevronBottom" size="sm" color="default"></wui-icon>`}};h.styles=[s.W5,s.fD,u],d([(0,i.MZ)()],h.prototype,"address",void 0),d([(0,i.MZ)()],h.prototype,"profileName",void 0),d([(0,i.MZ)()],h.prototype,"alt",void 0),d([(0,i.MZ)()],h.prototype,"imageSrc",void 0),d([(0,i.MZ)()],h.prototype,"icon",void 0),d([(0,i.MZ)()],h.prototype,"iconSize",void 0),d([(0,i.MZ)({type:Boolean})],h.prototype,"enableGreenCircle",void 0),d([(0,i.MZ)({type:Boolean})],h.prototype,"loading",void 0),d([(0,i.MZ)({type:Number})],h.prototype,"charsStart",void 0),d([(0,i.MZ)({type:Number})],h.prototype,"charsEnd",void 0),h=d([(0,l.E)("wui-wallet-switch")],h)},46243:(e,t,r)=>{"use strict";
5466Object.defineProperty(t,"__esModule",{value:!0}),t.setBlockGasLimit=i;let n=r(27083);async function i(e,{gasLimit:t}){await e.request({method:"evm_setBlockGasLimit",params:[(0,n.numberToHex)(t)]})}},46398:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.integerRegex=t.bytesRegex=t.arrayRegex=void 0,t.arrayRegex=/^(.*)\[([0-9]*)\]$/,t.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,t.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)?$/},46469:(e,t,r)=>{"use strict";r.d(t,{Up:()=>f});var n=r(91004),i=r(57873),a=r(82376),s=r(32590),o=r(42242),l=r(26274),c=r(82875),u=r(33432),d=r(29092);async function h(){l.I.push("ConnectingFarcaster");let e=s.a.getAuthConnector();if(e){let t=a.W.getAccountData();if(!t?.farcasterUrl)try{let{url:t}=await e.provider.getFarcasterUri();a.W.setAccountProp("farcasterUrl",t,a.W.state.activeChain)}catch(e){l.I.goBack(),c.P.showError(e)}}}async function p(e){l.I.push("ConnectingSocial");let t=s.a.getAuthConnector(),r=null;try{let s=setTimeout(()=>{throw Error("Social login timed out. Please try again.")},45e3);if(t&&e){if(u.w.isTelegram()||(r=function(){try{return u.w.returnOpenHref(`${i.o.SECURE_SITE_SDK_ORIGIN}/loading`,"popupWindow","width=600,height=800,scrollbars=yes")}catch(e){throw Error("Could not open social popup")}}()),r)a.W.setAccountProp("socialWindow",(0,n.KR)(r),a.W.state.activeChain);else if(!u.w.isTelegram())throw Error("Could not create social popup");let{uri:o}=await t.provider.getSocialRedirectUri({provider:e});if(!o)throw r?.close(),Error("Could not fetch the social redirect uri");if(r&&(r.location.href=o),u.w.isTelegram()){d.i.setTelegramSocialProvider(e);let t=u.w.formatTelegramSocialLoginUrl(o);u.w.openHref(t,"_top")}clearTimeout(s)}}catch(n){r?.close();let t=u.w.parseError(n);c.P.showError(t),o.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:e,message:t}})}}async function f(e){a.W.setAccountProp("socialProvider",e,a.W.state.activeChain),o.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_STARTED",properties:{provider:e}}),"farcaster"===e?await h():await p(e)}},46720:(e,t,r)=>{let n=r(17129),i=r(43988),a=r(63416),s=r(8215),o=r(60020),l=r(33373),c=r(21823),u=r(74029);function d(e){return unescape(encodeURIComponent(e)).length}function h(e,t,r){let n,i=[];for(;null!==(n=e.exec(r));)i.push({data:n[0],index:n.index,mode:t,length:n[0].length});return i}function p(e){let t,r,i=h(l.NUMERIC,n.NUMERIC,e),a=h(l.ALPHANUMERIC,n.ALPHANUMERIC,e);return c.isKanjiModeEnabled()?(t=h(l.BYTE,n.BYTE,e),r=h(l.KANJI,n.KANJI,e)):(t=h(l.BYTE_KANJI,n.BYTE,e),r=[]),i.concat(a,t,r).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,t){switch(t){case n.NUMERIC:return i.getBitsLength(e);case n.ALPHANUMERIC:return a.getBitsLength(e);case n.KANJI:return o.getBitsLength(e);case n.BYTE:return s.getBitsLength(e)}}function m(e,t){let r,l=n.getBestModeForData(e);if((r=n.from(t,l))!==n.BYTE&&r.bit<l.bit)throw Error('"'+e+'" cannot be encoded with mode '+n.toString(r)+".\n Suggested mode is: "+n.toString(l));switch(r===n.KANJI&&!c.isKanjiModeEnabled()&&(r=n.BYTE),r){case n.NUMERIC:return new i(e);case n.ALPHANUMERIC:return new a(e);case n.KANJI:return new o(e);case n.BYTE:return new s(e)}}t.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e},[])},t.fromString=function(e,r){let i=function(e,t){let r={},i={start:{}},a=["start"];for(let s=0;s<e.length;s++){let o=e[s],l=[];for(let e=0;e<o.length;e++){let c=o[e],u=""+s+e;l.push(u),r[u]={node:c,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){let s=a[e];r[s]&&r[s].node.mode===c.mode?(i[s][u]=f(r[s].lastCount+c.length,c.mode)-f(r[s].lastCount,c.mode),r[s].lastCount+=c.length):(r[s]&&(r[s].lastCount=c.length),i[s][u]=f(c.length,c.mode)+4+n.getCharCountIndicator(c.mode,t))}}a=l}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}(function(e){let t=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case n.NUMERIC:t.push([i,{data:i.data,mode:n.ALPHANUMERIC,length:i.length},{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.ALPHANUMERIC:t.push([i,{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.KANJI:t.push([i,{data:i.data,mode:n.BYTE,length:d(i.data)}]);break;case n.BYTE:t.push([{data:i.data,mode:n.BYTE,length:d(i.data)}])}}return t}(p(e,c.isKanjiModeEnabled())),r),a=u.find_path(i.map,"start","end"),s=[];for(let e=1;e<a.length-1;e++)s.push(i.table[a[e]].node);return t.fromArray(s.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.push(t),e},[]))},t.rawSplit=function(e){return t.fromArray(p(e,c.isKanjiModeEnabled()))}},46756:(e,t,r)=>{"use strict";let n,i,a,s,o;r.d(t,{JX:()=>p,RF:()=>h,W5:()=>g,ds:()=>f,fD:()=>y});
5466var l=r(56059),c=r(91392);let u={"KHTeka-500-woff2":"https://fonts.reown.com/KHTeka-Medium.woff2","KHTeka-400-woff2":"https://fonts.reown.com/KHTeka-Regular.woff2","KHTeka-300-woff2":"https://fonts.reown.com/KHTeka-Light.woff2","KHTekaMono-400-woff2":"https://fonts.reown.com/KHTekaMono-Regular.woff2","KHTeka-500-woff":"https://fonts.reown.com/KHTeka-Light.woff","KHTeka-400-woff":"https://fonts.reown.com/KHTeka-Regular.woff","KHTeka-300-woff":"https://fonts.reown.com/KHTeka-Light.woff","KHTekaMono-400-woff":"https://fonts.reown.com/KHTekaMono-Regular.woff"};function d(e,t="dark"){n&&document.head.removeChild(n),(n=document.createElement("style")).textContent=c.CV.createRootStyles(t,e),document.head.appendChild(n)}function h(e,t="dark"){if(o=e,i=document.createElement("style"),a=document.createElement("style"),s=document.createElement("style"),i.textContent=m(e).core.cssText,a.textContent=m(e).dark.cssText,s.textContent=m(e).light.cssText,document.head.appendChild(i),document.head.appendChild(a),document.head.appendChild(s),d(e,t),p(t),!(e?.["--apkt-font-family"]||e?.["--w3m-font-family"]))for(let[e,t]of Object.entries(u)){let r=document.createElement("link");r.rel="preload",r.href=t,r.as="font",r.type=e.includes("woff2")?"font/woff2":"font/woff",r.crossOrigin="anonymous",document.head.appendChild(r)}p(t)}function p(e="dark"){a&&s&&n&&("light"===e?(d(o,e),a.removeAttribute("media"),s.media="enabled"):(d(o,e),s.removeAttribute("media"),a.media="enabled"))}function f(e){if(o=e,i&&a&&s){i.textContent=m(e).core.cssText,a.textContent=m(e).dark.cssText,s.textContent=m(e).light.cssText;let t=e?.["--apkt-font-family"]||e?.["--w3m-font-family"];t&&(i.textContent=i.textContent?.replace("font-family: KHTeka",`font-family: ${t}`),a.textContent=a.textContent?.replace("font-family: KHTeka",`font-family: ${t}`),s.textContent=s.textContent?.replace("font-family: KHTeka",`font-family: ${t}`))}n&&d(e,s?.media==="enabled"?"light":"dark")}function m(e){let t=!!(e?.["--apkt-font-family"]||e?.["--w3m-font-family"]);return{core:(0,l.AH)` 5467 ${t?(0,l.AH)``:(0,l.AH)` 5468 @font-face { 5469 font-family: 'KHTeka'; 5470 src: 5471 url(${(0,l.iz)(u["KHTeka-400-woff2"])}) format('woff2'), 5472 url(${(0,l.iz)(u["KHTeka-400-woff"])}) format('woff'); 5473 font-weight: 400; 5474 font-style: normal; 5475 font-display: swap; 5476 } 5477 5478 @font-face { 5479 font-family: 'KHTeka'; 5480 src: 5481 url(${(0,l.iz)(u["KHTeka-300-woff2"])}) format('woff2'), 5482 url(${(0,l.iz)(u["KHTeka-300-woff"])}) format('woff'); 5483 font-weight: 300; 5484 font-style: normal; 5485 } 5486 5487 @font-face { 5488 font-family: 'KHTekaMono'; 5489 src: 5490 url(${(0,l.iz)(u["KHTekaMono-400-woff2"])}) format('woff2'), 5491 url(${(0,l.iz)(u["KHTekaMono-400-woff"])}) format('woff'); 5492 font-weight: 400; 5493 font-style: normal; 5494 } 5495 5496 @font-face { 5497 font-family: 'KHTeka'; 5498 src: 5499 url(${(0,l.iz)(u["KHTeka-400-woff2"])}) format('woff2'), 5500 url(${(0,l.iz)(u["KHTeka-400-woff"])}) format('woff'); 5501 font-weight: 400; 5502 font-style: normal; 5503 } 5504 `} 5505 5506 @keyframes w3m-shake { 5507 0% { 5508 transform: scale(1) rotate(0deg); 5509 } 5510 20% { 5511 transform: scale(1) rotate(-1deg); 5512 } 5513 40% { 5514 transform: scale(1) rotate(1.5deg); 5515 } 5516 60% { 5517 transform: scale(1) rotate(-1.5deg); 5518 } 5519 80% { 5520 transform: scale(1) rotate(1deg); 5521 } 5522 100% { 5523 transform: scale(1) rotate(0deg); 5524 } 5525 } 5526 @keyframes w3m-iframe-fade-out { 5527 0% { 5528 opacity: 1; 5529 } 5530 100% { 5531 opacity: 0; 5532 } 5533 } 5534 @keyframes w3m-iframe-zoom-in { 5535 0% { 5536 transform: translateY(50px); 5537 opacity: 0; 5538 } 5539 100% { 5540 transform: translateY(0px); 5541 opacity: 1; 5542 } 5543 } 5544 @keyframes w3m-iframe-zoom-in-mobile { 5545 0% { 5546 transform: scale(0.95); 5547 opacity: 0; 5548 } 5549 100% { 5550 transform: scale(1); 5551 opacity: 1; 5552 } 5553 } 5554 :root { 5555 --apkt-modal-width: 370px; 5556 5557 --apkt-visual-size-inherit: inherit; 5558 --apkt-visual-size-sm: 40px; 5559 --apkt-visual-size-md: 55px; 5560 --apkt-visual-size-lg: 80px; 5561 5562 --apkt-path-network-sm: path( 5563 '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.
556361 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' 5564 ); 5565 5566 --apkt-path-network-md: path( 5567 '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' 5568 ); 5569 5570 --apkt-path-network-lg: path( 5571 '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' 5572 ); 5573 5574 --apkt-width-network-sm: 36px; 5575 --apkt-width-network-md: 48px; 5576 --apkt-width-network-lg: 86px; 5577 5578 --apkt-duration-dynamic: 0ms; 5579 --apkt-height-network-sm: 40px; 5580 --apkt-height-network-md: 54px; 5581 --apkt-height-network-lg: 96px; 5582 } 5583 `,dark:(0,l.AH)` 5584 :root { 5585 } 5586 `,light:(0,l.AH)` 5587 :root { 5588 } 5589 `}}let g=(0,l.AH)` 5590 div, 5591 span, 5592 iframe, 5593 a, 5594 img, 5595 form, 5596 button, 5597 label, 5598 *::after, 5599 *::before { 5600 margin: 0; 5601 padding: 0; 5602 box-sizing: border-box; 5603 font-style: normal; 5604 text-rendering: optimizeSpeed; 5605 -webkit-font-smoothing: antialiased; 5606 -moz-osx-font-smoothing: grayscale; 5607 -webkit-tap-highlight-color: transparent; 5608 backface-visibility: hidden; 5609 } 5610 5611 :host { 5612 font-family: var(--apkt-fontFamily-regular); 5613 } 5614`,y=(0,l.AH)` 5615 button, 5616 a { 5617 cursor: pointer; 5618 display: flex; 5619 justify-content: center; 5620 align-items: center; 5621 position: relative; 5622 5623 will-change: background-color, color, border, box-shadow, width, height, transform, opacity; 5624 outline: none; 5625 border: none; 5626 text-decoration: none; 5627 transition: 5628 background-color var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2), 5629 color var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2), 5630 border var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2), 5631 box-shadow var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2), 5632 width var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2), 5633 height var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2), 5634 transform var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2), 5635 opacity var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2), 5636 scale var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2), 5637 border-radius var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2); 5638 will-change: 5639 background-color, color, border, box-shadow, width, height, transform, opacity, scale, 5640 border-radius; 5641 } 5642 5643 a:active:not([disabled]), 5644 button:active:not([disabled]) { 5645 scale: 0.975; 5646 transform-origin: center; 5647 } 5648 5649 button:disabled { 5650 cursor: default; 5651 } 5652 5653 input { 5654 border: none; 5655 outline: none; 5656 appearance: none; 5657 } 5658`},46836:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidAbiTypeParameterError=t.InvalidFunctionModifierError=t.InvalidModifierError=t.SolidityProtectedKeywordError=t.InvalidParameterError=t.InvalidAbiParametersError=t.InvalidAbiParameterError=void 0;let n=r(86737);class i extends n.BaseError{constructor({param:e}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}}t.InvalidAbiParameterError=i;class a extends n.BaseError{constructor({params:e}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}t.InvalidAbiParametersError=a;class s extends n.BaseError{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}t.InvalidParameterError=s;class o extends n.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"})}}t.SolidityProtectedKeywordError=o;class l extends n.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"})}}t.InvalidModifierError=l;class c extends n.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"})}}t.InvalidFunctionModifierError=c;class u extends n.BaseError{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invali
5658d."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}t.InvalidAbiTypeParameterError=u},47148:(e,t,r)=>{"use strict";r.d(t,{J9:()=>d,VS:()=>h,eB:()=>p,tG:()=>f,uI:()=>g,z5:()=>m});var n=r(10693),i=r(98668),a=r(56595),s=r(44582),o=r(85885);let l=BigInt(0);function c(e){return null==e?null:e}function u(e){return null==e?null:e.toString()}class d{gasPrice;maxFeePerGas;maxPriorityFeePerGas;constructor(e,t,r){(0,n.n)(this,{gasPrice:c(e),maxFeePerGas:c(t),maxPriorityFeePerGas:c(r)})}toJSON(){let{gasPrice:e,maxFeePerGas:t,maxPriorityFeePerGas:r}=this;return{_type:"FeeData",gasPrice:u(e),maxFeePerGas:u(t),maxPriorityFeePerGas:u(r)}}}function h(e){let t={};for(let r of(e.to&&(t.to=e.to),e.from&&(t.from=e.from),e.data&&(t.data=(0,i.c$)(e.data)),"chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/)))r in e&&null!=e[r]&&(t[r]=(0,a.Ab)(e[r],`request.${r}`));for(let r of"type,nonce".split(/,/))r in e&&null!=e[r]&&(t[r]=(0,a.WZ)(e[r],`request.${r}`));return e.accessList&&(t.accessList=(0,o.$)(e.accessList)),e.authorizationList&&(t.authorizationList=e.authorizationList.slice()),"blockTag"in e&&(t.blockTag=e.blockTag),"enableCcipRead"in e&&(t.enableCcipRead=!!e.enableCcipRead),"customData"in e&&(t.customData=e.customData),"blobVersionedHashes"in e&&e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.slice()),"kzg"in e&&(t.kzg=e.kzg),"blobWrapperVersion"in e&&(t.blobWrapperVersion=e.blobWrapperVersion),"blobs"in e&&e.blobs&&(t.blobs=e.blobs.map(e=>(0,i.f)(e)?(0,i.c$)(e):Object.assign({},e))),t}class p{provider;number;hash;timestamp;parentHash;parentBeaconBlockRoot;nonce;difficulty;gasLimit;gasUsed;stateRoot;receiptsRoot;transactionsRoot;blobGasUsed;excessBlobGas;miner;prevRandao;extraData;baseFeePerGas;#e1;constructor(e,t){this.#e1=e.transactions.map(e=>"string"!=typeof e?new g(e,t):e),(0,n.n)(this,{provider:t,hash:c(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:c(e.prevRandao),extraData:e.extraData,baseFeePerGas:c(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot,transactionsRoot:e.transactionsRoot})}get transactions(){return this.#e1.map(e=>"string"==typeof e?e:e.hash)}get prefetchedTransactions(){let e=this.#e1.slice();return 0===e.length?[]:((0,s.vA)("object"==typeof e[0],"transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){let{baseFeePerGas:e,difficulty:t,extraData:r,gasLimit:n,gasUsed:i,hash:a,miner:s,prevRandao:o,nonce:l,number:c,parentHash:d,parentBeaconBlockRoot:h,stateRoot:p,receiptsRoot:f,transactionsRoot:m,timestamp:g,transactions:y}=this;return{_type:"Block",baseFeePerGas:u(e),difficulty:u(t),extraData:r,gasLimit:u(n),gasUsed:u(i),blobGasUsed:u(this.blobGasUsed),excessBlobGas:u(this.excessBlobGas),hash:a,miner:s,prevRandao:o,nonce:l,number:c,parentHash:d,timestamp:g,parentBeaconBlockRoot:h,stateRoot:p,receiptsRoot:f,transactionsRoot:m,transactions:y}}[Symbol.iterator](){let e=0,t=this.transactions;return{next:()=>e<this.length?{value:t[e++],done:!1}:{value:void 0,done:!0}}}get length(){return this.#e1.length}get date(){return null==this.timestamp?null:new Date(1e3*this.timestamp)}async getTransaction(e){let t;if("number"==typeof e)t=this.#e1[e];else{let r=e.toLowerCase();for(let e of this.#e1)if("string"==typeof e){if(e!==r)continue;t=e;break}else{if(e.hash!==r)continue;t=e;break}}if(null==t)throw Error("no such tx");return"string"==typeof t?await this.provider.getTransaction(t):t}getPrefetchedTransaction(e){let t=this.prefetchedTransactions;if("number"==typeof e)return t[e];for(let r of(e=e.toLowerCase(),t))if(r.hash===e)return r;(0,s.MR)(!1,"no matching transaction","indexOrHash",e)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){var e;if(!this.isMined())throw Error("");return e=this,{orphan:"drop-block",hash:e.hash,number:e.number}}}class f{provider;transactionHash;blockHash;blockNumber;removed;address;data;topics;index;transactionIndex;constructor(e,t){this.provider=t;let r=Object.freeze(e.topics.slice());(0,n.n)(this,{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,removed:e.removed,address:e.address,data:e.data,topics:r,index:e.index,transactionIndex:e.transactionIndex})}toJSON(){let{address:e,blockHash:t,blockNumber:r,data:n,index:i,removed:a,topics:s,transactionHash:o,transactionIndex:l}=this;return{_type:"log",address:e,blockHash:t,blockNumber:r,data:n,index:i,removed:a,topics:s,transactionHash:o,transactionIndex:l}}async getBlock(){let e=await this.provider.getBlock(this.blockHash);return(0,s.vA)(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransaction(){let e=await this.provider.getTransaction(this.transactionHash);return(0,s.vA)(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransactionReceipt(){let e=await this.provider.getTransactionReceipt(this.transactionHash);return(0,s.vA)(!!e,"failed to find transaction receipt","UNKNOWN_ERROR",{}),e}removedEvent(){var e;return e=this,{orphan:"drop-log",log:{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,address:e.address,data:e.data,topics:Object.freeze(e.topics.slice()),index:e.index}}}}class m{provider;to;from;contractAddress;hash;index;blockHash;blockNumber;logsBloom;gasUsed;blobGasUsed;cumulativeGasUsed;gasPrice;blobGasPrice;type;status;root;#e2;constructor(e,t){this.#e2=Object.freeze(e.logs.map(e=>new f(e,t)));let r=l;null!=e.effectiveGasPrice?r=e.effectiveGasPrice:null!=e.gasPrice&&(r=e.gasPrice),(0,n.n)(this,{provider:t,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:r,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return this.#e2}toJSON(){let{to:e,from:t,contractAddress:r,hash:n,index:i,blockHash:a,blockNumber:s,logs
5658Bloom:o,logs:l,status:c,root:d}=this;return{_type:"TransactionReceipt",blockHash:a,blockNumber:s,contractAddress:r,cumulativeGasUsed:u(this.cumulativeGasUsed),from:t,gasPrice:u(this.gasPrice),blobGasUsed:u(this.blobGasUsed),blobGasPrice:u(this.blobGasPrice),gasUsed:u(this.gasUsed),hash:n,index:i,logs:l,logsBloom:o,root:d,status:c,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e<this.length?{value:this.logs[e++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){let e=await this.provider.getBlock(this.blockHash);if(null==e)throw Error("TODO");return e}async getTransaction(){let e=await this.provider.getTransaction(this.hash);if(null==e)throw Error("TODO");return e}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return b(this)}reorderedEvent(e){return(0,s.vA)(!e||e.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),y(this,e)}}class g{provider;blockNumber;blockHash;index;hash;type;to;from;nonce;gasLimit;gasPrice;maxPriorityFeePerGas;maxFeePerGas;maxFeePerBlobGas;data;value;chainId;signature;accessList;blobVersionedHashes;authorizationList;#e5;constructor(e,t){this.provider=t,this.blockNumber=null!=e.blockNumber?e.blockNumber:null,this.blockHash=null!=e.blockHash?e.blockHash:null,this.hash=e.hash,this.index=e.index,this.type=e.type,this.from=e.from,this.to=e.to||null,this.gasLimit=e.gasLimit,this.nonce=e.nonce,this.data=e.data,this.value=e.value,this.gasPrice=e.gasPrice,this.maxPriorityFeePerGas=null!=e.maxPriorityFeePerGas?e.maxPriorityFeePerGas:null,this.maxFeePerGas=null!=e.maxFeePerGas?e.maxFeePerGas:null,this.maxFeePerBlobGas=null!=e.maxFeePerBlobGas?e.maxFeePerBlobGas:null,this.chainId=e.chainId,this.signature=e.signature,this.accessList=null!=e.accessList?e.accessList:null,this.blobVersionedHashes=null!=e.blobVersionedHashes?e.blobVersionedHashes:null,this.authorizationList=null!=e.authorizationList?e.authorizationList:null,this.#e5=-1}toJSON(){let{blockNumber:e,blockHash:t,index:r,hash:n,type:i,to:a,from:s,nonce:o,data:l,signature:c,accessList:d,blobVersionedHashes:h}=this;return{_type:"TransactionResponse",accessList:d,blockNumber:e,blockHash:t,blobVersionedHashes:h,chainId:u(this.chainId),data:l,from:s,gasLimit:u(this.gasLimit),gasPrice:u(this.gasPrice),hash:n,maxFeePerGas:u(this.maxFeePerGas),maxPriorityFeePerGas:u(this.maxPriorityFeePerGas),maxFeePerBlobGas:u(this.maxFeePerBlobGas),nonce:o,signature:c,to:a,index:r,type:i,value:u(this.value)}}async getBlock(){let e=this.blockNumber;if(null==e){let t=await this.getTransaction();t&&(e=t.blockNumber)}if(null==e)return null;let t=this.provider.getBlock(e);if(null==t)throw Error("TODO");return t}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(null==this.blockNumber){let{tx:e,blockNumber:t}=await (0,n.k)({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return null==e||null==e.blockNumber?0:t-e.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(e,t){let r=null==e?1:e,i=null==t?0:t,a=this.#e5,o=-1,c=-1===a,u=async()=>{if(c)return null;let{blockNumber:e,nonce:t}=await (0,n.k)({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(t<this.nonce){a=e;return}if(c)return null;let i=await this.getTransaction();if(!i||null==i.blockNumber)for(-1===o&&(o=a-3)<this.#e5&&(o=this.#e5);o<=e;){if(c)return null;let t=await this.provider.getBlock(o,!0);if(null==t)break;for(let e of t)if(e===this.hash)return;for(let n=0;n<t.length;n++){let i=await t.getTransaction(n);if(i.from===this.from&&i.nonce===this.nonce){if(c)return null;let t=await this.provider.getTransactionReceipt(i.hash);if(null==t||e-t.blockNumber+1<r)return;let n="replaced";i.data===this.data&&i.to===this.to&&i.value===this.value?n="repriced":"0x"===i.data&&i.from===i.to&&i.value===l&&(n="cancelled"),(0,s.vA)(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:"replaced"===n||"cancelled"===n,reason:n,replacement:i.replaceableTransaction(a),hash:i.hash,receipt:t})}}o++}},d=e=>{if(null==e||0!==e.status)return e;(0,s.vA)(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:e.to,from:e.from,data:""},receipt:e})},h=await this.provider.getTransactionReceipt(this.hash);if(0===r)return d(h);if(h){if(1===r||await h.confirmations()>=r)return d(h)}else if(await u(),0===r)return null;let p=new Promise((e,t)=>
5658{let n=[],o=()=>{n.forEach(e=>e())};if(n.push(()=>{c=!0}),i>0){let e=setTimeout(()=>{o(),t((0,s.xz)("wait for transaction timeout","TIMEOUT"))},i);n.push(()=>{clearTimeout(e)})}let l=async n=>{if(await n.confirmations()>=r){o();try{e(d(n))}catch(e){t(e)}}};if(n.push(()=>{this.provider.off(this.hash,l)}),this.provider.on(this.hash,l),a>=0){let e=async()=>{try{await u()}catch(e){if((0,s.bJ)(e,"TRANSACTION_REPLACED")){o(),t(e);return}}c||this.provider.once("block",e)};n.push(()=>{this.provider.off("block",e)}),this.provider.once("block",e)}});return await p}isMined(){return null!=this.blockHash}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}removedEvent(){return(0,s.vA)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),b(this)}reorderedEvent(e){return(0,s.vA)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),(0,s.vA)(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),y(this,e)}replaceableTransaction(e){(0,s.MR)(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);let t=new g(this,this.provider);return t.#e5=e,t}}function y(e,t){return{orphan:"reorder-transaction",tx:e,other:t}}function b(e){return{orphan:"drop-transaction",tx:e}}},47482:(e,t,r)=>{"use strict";r.d(t,{OH:()=>a,Vl:()=>l,gS:()=>s,hy:()=>i,s1:()=>o});var n=r(55036);let i=(void 0!==n&&void 0!==n.env?n.env.NEXT_PUBLIC_SECURE_SITE_SDK_URL:void 0)||"https://secure.walletconnect.org/sdk",a=(void 0!==n&&void 0!==n.env?n.env.NEXT_PUBLIC_DEFAULT_LOG_LEVEL:void 0)||"error",s=(void 0!==n&&void 0!==n.env?n.env.NEXT_PUBLIC_SECURE_SITE_SDK_VERSION:void 0)||"4",o={APP_EVENT_KEY:"@w3m-app/",FRAME_EVENT_KEY:"@w3m-frame/",RPC_METHOD_KEY:"RPC_",STORAGE_KEY:"@appkit-wallet/",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",SOCIAL_USERNAME:"SOCIAL_USERNAME",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_CONNECT_SOCIAL:"@w3m-app/CONNECT_SOCIAL",APP_GET_SOCIAL_REDIRECT_URI:"@w3m-app/GET_SOCIAL_REDIRECT_URI",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",APP_CONNECT_FARCASTER:"@w3m-app/CONNECT_FARCASTER",APP_GET_FARCASTER_URI:"@w3m-app/GET_FARCASTER_URI",APP_RELOAD:"@w3m-app/RELOAD",APP_RPC_ABORT:"@w3m-app/RPC_ABORT",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_CONNECT_SOCIAL_SUCCESS:"@w3m-frame/CONNECT_SOCIAL_SUCCESS",FRAME_CONNECT_SOCIAL_ERROR:"@w3m-frame/CONNECT_SOCIAL_ERROR",FRAME_CONNECT_FARCASTER_SUCCESS:"@w3m-frame/CONNECT_FARCASTER_SUCCESS",FRAME_CONNECT_FARCASTER_ERROR:"@w3m-frame/CONNECT_FARCASTER_ERROR",FRAME_GET_FARCASTER_URI_SUCCESS:"@w3m-frame/GET_FARCASTER_URI_SUCCESS",FRAME_GET_FARCASTER_URI_ERROR:"@w3m-frame/GET_FARCASTER_URI_ERROR",FRAME_GET_SOCIAL_REDIRECT_URI_SUCCESS:"@w3m-frame/GET_SOCIAL_REDIRECT_URI_SUCCESS",FRAME_GET_SOCIAL_REDIRECT_URI_ERROR:"@w3m-frame/GET_SOCIAL_REDIRECT_URI_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",FRAME_READY:"@w3m-frame/READY",FRAME_RELOAD_SUCCESS:"@w3m-frame/RELOAD_SUCCESS",FRAME_RELOAD_ERROR:"@w3m-frame/RELOAD_ERROR",FRAME_RPC_ABORT_SUCCESS:"@w3m-frame/RPC_ABORT_SUCCESS",FRAME_RPC_ABORT_ERROR:"@w3m-frame/RPC_ABORT_ERROR",RPC_RESPONSE_TYPE_ER
5658ROR:"RPC_RESPONSE_ERROR",RPC_RESPONSE_TYPE_TX:"RPC_RESPONSE_TRANSACTION_HASH",RPC_RESPONSE_TYPE_OBJECT:"RPC_RESPONSE_OBJECT"},l={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","wallet_getCapabilities","wallet_getCallsStatus","eth_getUserOperationReceipt","eth_estimateUserOperationGas","eth_getUserOperationByHash","eth_supportedEntryPoints","wallet_getAssets"],NOT_SAFE_RPC_METHODS:["personal_sign","eth_signTypedData_v4","eth_sendTransaction","solana_signMessage","solana_signTransaction","solana_signAllTransactions","solana_signAndSendTransaction","wallet_sendCalls","wallet_grantPermissions","wallet_revokePermissions","eth_sendUserOperation"],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"}}},47890:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeLabelhash=function(e){return`[${e.slice(2)}]`}},48029:(e,t,r)=>{"use strict";r(79909)},48054:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(91392),s=r(46756),o=r(63412);let l=(0,n.AH)` 5659 :host { 5660 display: flex; 5661 } 5662 5663 :host([data-size='sm']) > svg { 5664 width: 12px; 5665 height: 12px; 5666 } 5667 5668 :host([data-size='md']) > svg { 5669 width: 16px; 5670 height: 16px; 5671 } 5672 5673 :host([data-size='lg']) > svg { 5674 width: 24px; 5675 height: 24px; 5676 } 5677 5678 :host([data-size='xl']) > svg { 5679 width: 32px; 5680 height: 32px; 5681 } 5682 5683 svg { 5684 animation: rotate 1.4s linear infinite; 5685 color: var(--local-color); 5686 } 5687 5688 :host([data-size='md']) > svg > circle { 5689 stroke-width: 6px; 5690 } 5691 5692 :host([data-size='sm']) > svg > circle { 5693 stroke-width: 8px; 5694 } 5695 5696 @keyframes rotate { 5697 100% { 5698 transform: rotate(360deg); 5699 } 5700 } 5701`;var c=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let u=class extends n.WF{constructor(){super(...arguments),this.color="primary",this.size="lg"}render(){let e={primary:a.f.tokens.theme.textPrimary,secondary:a.f.tokens.theme.textSecondary,tertiary:a.f.tokens.theme.textTertiary,invert:a.f.tokens.theme.textInvert,error:a.f.tokens.core.textError,warning:a.f.tokens.core.textWarning,"accent-primary":a.f.tokens.core.textAccentPrimary};return this.style.cssText=` 5702 --local-color: ${"inherit"===this.color?"inherit":e[this.color]}; 5703 `,this.dataset.size=this.size,(0,n.qy)`<svg viewBox="0 0 16 17" fill="none"> 5704 <path 5705 d="M8.75 2.65625V4.65625C8.75 4.85516 8.67098 5.04593 8.53033 5.18658C8.38968 5.32723 8.19891 5.40625 8 5.40625C7.80109 5.40625 7.61032 5.32723 7.46967 5.18658C7.32902 5.04593 7.25 4.85516 7.25 4.65625V2.65625C7.25 2.45734 7.32902 2.26657 7.46967 2.12592C7.61032 1.98527 7.80109 1.90625 8 1.90625C8.19891 1.90625 8.38968 1.98527 8.53033 2.12592C8.67098 2.26657 8.75 2.45734 8.75 2.65625ZM14 7.90625H12C11.8011 7.90625 11.6103 7.98527 11.4697 8.12592C11.329 8.26657 11.25 8.45734 11.25 8.65625C11.25 8.85516 11.329 9.04593 11.4697 9.18658C11.6103 9.32723 11.8011 9.40625 12 9.40625H14C14.1989 9.40625 14.3897 9.32723 14.5303 9.18658C14.671 9.04593 14.75 8.85516 14.75 8.65625C14.75 8.45734 14.671 8.26657 14.5303 8.12592C14.3897 7.98527 14.1989 7.90625 14 7.90625ZM11.3588 10.9544C11.289 10.8846 11.2062 10.8293 11.115 10.7915C11.0239 10.7538 10.9262 10.7343 10.8275 10.7343C10.7288 10.7343 10.6311 10.7538 10.54 10.7915C10.4488 10.8293 10.366 10.8846 10.2963 10.9544C10.2265 11.0241 10.1711 11.107 10.1334 11.1981C10.0956 11.2893 10.0762 11.387 10.0762 11.4856C10.0762 11.5843 10.0956 11.682 10.1334 11.7731C10.1711 11.8643 10.2265 11.9471 10.2963 12.0169L11.7106 13.4312C11.8515 13.5721 12.0426 13.6513 12.2419 13.6513C12.4411 13.6513 12.6322 13.5721 12.7731 13.4312C12.914 13.2904 12.9932 13.0993 12.9932 12.9C12.9932 12.7007 12.914 12.5096 12.7731 12.3687L11.3588 10.9544ZM8 11.9062C7.80109 11.9062 7.61032 11.9853 7.46967 12.1259C7.32902 12.2666 7.25 12.4573 7.25 12.6562V14.6562C7.25 14.8552 7.32902 15.0459 7.46967 15.1866C7.61032 15.3272 7.80109 15.4062 8 15.4062C8.19891 15.4062 8.38968 15.3272 8.53033 15.1866C8.67098 15.0459 8.75 14.8552 8.75 14.6562V12.6562C8.75 12.4573 8.67098 12.2666 8.53033 12.1259C8.38968 11.9853 8.19891 11.9062 8 11.9062ZM4.64125 10.9544L3.22688 12.3687C3.08598 12.5096 3.00682 12.7007 3.00682 12.9C3.00682 13.0993 3.08598 13.2904 3.22688 13.4312C3.36777 13.5721 3.55887 13.6513 3.75813 13.6513C3.95738 13.6513 4.14848 13.5721 4.28937 13.4312L5.70375 12.0169C5.84465 11.876 5.9238 11.6849 5.9238 11.4856C5.9238 11.2864 5.84465 11.0953 5.70375 10.9544C5.56285 10.8135 5.37176 10.7343 5.1725 10.7343C4.97324 10.7343 4.78215 10.8135 4.64125 10.9544ZM4.75 8.65625C4.75 8.45734 4.67098 8.26657 4.53033 8.12592C4.38968 7.98527 4.19891 7.90625 4 7.90625H2C1.80109 7.90625 1.61032 7.98527 1.46967 8.12592C1.32902 8.26657 1.25 8.45734 1.25 8.65625C1.25 8.85516 1.32902 9.04593 1.46967 9.18658C1.61032 9.32723 1.80109 9.40625 2 9.40625H4C4.19891 9.40625 4.38968 9.32723 4.53033 9.18658C4.67098 9.04593 4.75 8.85516 4.75 8.65625ZM4.2875 3.88313C4.1466 3.74223 3.95551 3.66307 3.75625 3.66307C3.55699 3.66307 3.3659 3.74223 3.225 3.88313C3.0841 4.02402 3.00495 4.21512 3.00495 4.41438C3.00495 4.61363 3.0841 4.80473 3.225 4.94562L4.64125 6.35813C4.78215 6.49902 4.97324 6.57818 5.1725 6.57818C5.37176 6.57818 5.56285 6.49902 5.70375 6.35813C5.84465 6.21723 5.9238 6.02613 5.9238 5.82688C5.9238 5.62762 5.84465 5.43652 5.70375 5.29563L4.2875 3.88313Z" 5706 fill="currentColor" 5707 /> 5708 </svg>`}};
5708u.styles=[s.W5,l],c([(0,i.MZ)()],u.prototype,"color",void 0),c([(0,i.MZ)()],u.prototype,"size",void 0),u=c([(0,o.E)("wui-loading-spinner")],u)},48065:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidStructSignatureError=t.UnknownSignatureError=t.InvalidSignatureError=void 0;let n=r(86737);class i extends n.BaseError{constructor({signature:e,type:t}){super(`Invalid ${t} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}t.InvalidSignatureError=i;class a extends n.BaseError{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}t.UnknownSignatureError=a;class s extends n.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"})}}t.InvalidStructSignatureError=s},48674:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extract=function(e,{format:t}){if(!t)return{};let r={};return!function t(n){for(let i of Object.keys(n))i in e&&(r[i]=e[i]),n[i]&&"object"==typeof n[i]&&!Array.isArray(n[i])&&t(n[i])}(t(e||{})),r}},48770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchContractEvent=function(e,t){let{abi:r,address:y,args:b,batch:w=!0,eventName:v,fromBlock:E,onError:C,onLogs:A,poll:x,pollingInterval:I=e.pollingInterval,strict:S}=t;return(void 0!==x?x:"bigint"==typeof E||"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
5708onfig.type&&"ipc"!==e.transport.transports[0].config.type))?(()=>{let t=S??!1,n=(0,d.stringify)(["watchContractEvent",y,b,w,e.uid,v,I,t,E]);return(0,c.observe)(n,{onLogs:A,onError:C},n=>{let a,s;void 0!==E&&(a=E-1n);let o=!1,c=(0,u.poll)(async()=>{if(!o){try{s=await (0,l.getAction)(e,h.createContractEventFilter,"createContractEventFilter")({abi:r,address:y,args:b,eventName:v,strict:t,fromBlock:E})}catch{}o=!0;return}try{let i;if(s)i=await (0,l.getAction)(e,m.getFilterChanges,"getFilterChanges")({filter:s});else{let n=await (0,l.getAction)(e,p.getBlockNumber,"getBlockNumber")({});i=a&&a<n?await (0,l.getAction)(e,f.getContractEvents,"getContractEvents")({abi:r,address:y,args:b,eventName:v,fromBlock:a+1n,toBlock:n,strict:t}):[],a=n}if(0===i.length)return;if(w)n.onLogs(i);else for(let e of i)n.onLogs([e])}catch(e){s&&e instanceof i.InvalidInputRpcError&&(o=!1),n.onError?.(e)}},{emitOnBegin:!0,interval:I});return async()=>{s&&await (0,l.getAction)(e,g.uninstallFilter,"uninstallFilter")({filter:s}),c()}})})():(()=>{let t=(0,d.stringify)(["watchContractEvent",y,b,w,e.uid,v,I,S??!1]),i=!0,l=()=>i=!1;return(0,c.observe)(t,{onLogs:A,onError:C},t=>((async()=>{try{let c=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),u=v?(0,s.encodeEventTopics)({abi:r,eventName:v,args:b}):[],{unsubscribe:d}=await c.subscribe({params:["logs",{address:y,topics:u}],onData(e){if(!i)return;let s=e.result;try{let{eventName:e,args:n}=(0,a.decodeEventLog)({abi:r,data:s.data,topics:s.topics,strict:S}),i=(0,o.formatLog)(s,{args:n,eventName:e});t.onLogs([i])}catch(a){let e,r;if(a instanceof n.DecodeLogDataMismatch||a instanceof n.DecodeLogTopicsMismatch){if(S)return;e=a.abiItem.name,r=a.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let i=(0,o.formatLog)(s,{args:r?[]:{},eventName:e});t.onLogs([i])}},onError(e){t.onError?.(e)}});l=d,i||l()}catch(e){C?.(e)}})(),()=>l()))})()};let n=r(82311),i=r(69902),a=r(44352),s=r(61794),o=r(10205),l=r(95847),c=r(84053),u=r(63342),d=r(68508),h=r(90535),p=r(27697),f=r(24052),m=r(97514),g=r(74815)},48789:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(55284);r(79909),r(83627);var s=r(46756),o=r(63412);r(96574);let l=(0,n.AH)` 5709 :host { 5710 position: relative; 5711 display: inline-block; 5712 width: 100%; 5713 } 5714`;var c=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let u=class extends n.WF{constructor(){super(...arguments),this.disabled=!1}render(){return(0,n.qy)` 5715 <wui-input-text 5716 type="email" 5717 placeholder="Email" 5718 icon="mail" 5719 size="lg" 5720 .disabled=${this.disabled} 5721 .value=${this.value} 5722 data-testid="wui-email-input" 5723 tabIdx=${(0,a.J)(this.tabIdx)} 5724 ></wui-input-text> 5725 ${this.templateError()} 5726 `}templateError(){return this.errorMessage?(0,n.qy)`<wui-text variant="sm-regular" color="error">${this.errorMessage}</wui-text>`:null}};u.styles=[s.W5,l],c([(0,i.MZ)()],u.prototype,"errorMessage",void 0),c([(0,i.MZ)({type:Boolean})],u.prototype,"disabled",void 0),c([(0,i.MZ)()],u.prototype,"value",void 0),c([(0,i.MZ)()],u.prototype,"tabIdx",void 0),u=c([(0,o.E)("wui-email-input")],u)},49135:(e,t,r)=>{"use strict";let n;r.d(t,{A:()=>uN});var i=r(35632),a=r.n(i),s=r(33683),o=r(78320),l=r(43805),c=r(51205),u=Object.defineProperty,d=(e,t,r)=>((e,t,r)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class h extends c.H{constructor(e){super(),this.opts=e,d(this,"protocol","wc"),d(this,"version",2)}}var p=Object.defineProperty;class f extends c.H{constructor(e,t){super(),this.core=e,this.logger=t,((e,t,r)=>((e,t,r)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r))(this,"records",new Map)}}class m{constructor(e,t){this.logger=e,this.core=t}}class g extends c.H{constructor(e,t){super(),this.relayer=e,this.logger=t}}class y extends c.H{constructor(e){super()}}class b{constructor(e,t,r,n){this.core=e,this.logger=t,this.name=r}}class w extends c.H{constructor(e,t){super(),this.relayer=e,this.logger=t}}class v extends c.H{constructor(e,t){super(),this.core=e,this.logger=t}}class E{constructor(e,t,r){this.core=e,this.logger=t,this.store=r}}class C{constructor(e,t){this.projectId=e,this.logger=t}}class A{constructor(e,t,r){this.core=e,this.logger=t,this.telemetryEnabled=r}}var x=Object.defineProperty,I=(e,t,r)=>((e,t,r)=>t in e?x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);a();class S{constructor(e){this.opts=e,I(this,"protocol","wc"),I(this,"version",2)}}i.EventEmitter;class T{constructor(e){this.client=e}}var P=r(39588),O=r(11065),_=r(96708),N=r(53768),k=r(81109),R=r(97051),M=r(95263),B=r(37844);function j(e){return`${e<0?"-":""}0x${Math.abs(e).toString(16).padStart(2,"0")}`}class U{type;data;constructor(e,t){this.type=e,this.data=t}}
5726class $ extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Object.create($.prototype)),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:$.name})}}function L(e,t,r){let n=Math.floor(r/0x100000000);e.setUint32(t,n),e.setUint32(t+4,r)}function D(e,t){return 0x100000000*e.getInt32(t)+e.getUint32(t+4)}let F={type:-1,encode:function(e){return e instanceof Date?function({sec:e,nsec:t}){if(e>=0&&t>=0&&e<=0x3ffffffff)if(0===t&&e<=0xffffffff){let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e),t}else{let r=e/0x100000000,n=new Uint8Array(8),i=new DataView(n.buffer);return i.setUint32(0,t<<2|3&r),i.setUint32(4,0|e),n}{let r=new Uint8Array(12),n=new DataView(r.buffer);return n.setUint32(0,t),L(n,4,e),r}}(function(e){let t=e.getTime(),r=Math.floor(t/1e3),n=(t-1e3*r)*1e6,i=Math.floor(n/1e9);return{sec:r+i,nsec:n-1e9*i}}(e)):null},decode:function(e){let t=function(e){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:{let e=t.getUint32(0);return{sec:(3&e)*0x100000000+t.getUint32(4),nsec:e>>>2}}case 12:return{sec:D(t,4),nsec:t.getUint32(0)};default:throw new $(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${e.length}`)}}(e);return new Date(1e3*t.sec+t.nsec/1e6)}};class H{static defaultCodec=new H;__brand;builtInEncoders=[];builtInDecoders=[];encoders=[];decoders=[];constructor(){this.register(F)}register({type:e,encode:t,decode:r}){if(e>=0)this.encoders[e]=t,this.decoders[e]=r;else{let n=-1-e;this.builtInEncoders[n]=t,this.builtInDecoders[n]=r}}tryToEncode(e,t){for(let r=0;r<this.builtInEncoders.length;r++){let n=this.builtInEncoders[r];if(null!=n){let i=n(e,t);if(null!=i)return new U(-1-r,i)}}for(let r=0;r<this.encoders.length;r++){let n=this.encoders[r];if(null!=n){let i=n(e,t);if(null!=i)return new U(r,i)}}return e instanceof U?e:null}decode(e,t,r){let n=t<0?this.builtInDecoders[-1-t]:this.decoders[t];return n?n(e,t,r):new U(t,e)}}let z=new TextEncoder;function W(e,t,r){let n=t,i=n+r,a=[],s="";for(;n<i;){let t=e[n++];if((128&t)==0)a.push(t);else if((224&t)==192){let r=63&e[n++];a.push((31&t)<<6|r)}else if((240&t)==224){let r=63&e[n++],i=63&e[n++];a.push((31&t)<<12|r<<6|i)}else if((248&t)==240){let r=63&e[n++],i=(7&t)<<18|r<<12|(63&e[n++])<<6|63&e[n++];i>65535&&(i-=65536,a.push(i>>>10&1023|55296),i=56320|1023&i),a.push(i)}else a.push(t);a.length>=4096&&(s+=String.fromCharCode(...a),a.length=0)}return a.length>0&&(s+=String.fromCharCode(...a)),s}let q=new TextDecoder;function V(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer?new Uint8Array(e):Uint8Array.from(e)}class G{hit=0;miss=0;caches;maxKeyLength;maxLengthPerKey;constructor(e=16,t=16){this.maxKeyLength=e,this.maxLengthPerKey=t,this.caches=[];for(let e=0;e<this.maxKeyLength;e++)this.caches.push([])}canBeCached(e){return e>0&&e<=this.maxKeyLength}find(e,t,r){let n=this.caches[r-1];e:for(let i of n){let n=i.bytes;for(let i=0;i<r;i++)if(n[i]!==e[t+i])continue e;return i.str}return null}store(e,t){let r=this.caches[e.length-1],n={bytes:e,str:t};r.length>=this.maxLengthPerKey?r[Math.random()*r.length|0]=n:r.push(n)}decode(e,t,r){let n=this.find(e,t,r);if(null!=n)return this.hit++,n;this.miss++;let i=W(e,t,r),a=Uint8Array.prototype.slice.call(e,t,t+r);return this.store(a,i),i}}let K="array",Z="map_key",J="map_value",Y=e=>{if("string"==typeof e||"number"==typeof e)return e;throw new $("The type of key must be string or number but "+typeof e)};class Q{stack=[];stackHeadPosition=-1;get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){let t=this.getUninitializedStateFromPool();t.type=K,t.position=0,t.size=e,t.array=Array(e)}pushMapState(e){let t=this.getUninitializedStateFromPool();t.type=Z,t.readCount=0,t.size=e,t.map={}}getUninitializedStateFromPool(){return this.stackHeadPosition++,this.stackHeadPosition===this.stack.length&&this.stack.push({type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null}),this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw Error("Invalid stack state. Released state is not on top of the stack.");e.type===K&&(e.size=0,e.array=void 0,e.position=0,e.type=void 0),(e.type===Z||e.type===J)&&(e.size=0,e.map=void 0,e.readCount=0,e.type=void 0),this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}}let X=new DataView(new ArrayBuffer(0)),ee=new Uint8Array(X.buffer);try{X.getInt8(0)}catch(e){if(!(e instanceof RangeError))throw Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}let et=RangeError("Insufficient data"),er=new G;class en{extensionCodec;context;useBigInt64;rawStrings;maxStrLength;maxBinLength;maxArrayLength;maxMapLength;maxExtLength;keyDecoder;mapKeyConverter;totalPos=0;pos=0;view=X;bytes=ee;headByte=-1;stack=new Q;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??H.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.rawStrings=e?.rawStrings??!1,this.maxStrLength=e?.maxStrLength??0xffffffff,this.maxBinLength=e?.maxBinLength??0xffffffff,this.maxArrayLength=e?.maxArrayLength??0xffffffff,this.maxMapLength=e?.maxMapLength??0xffffffff,this.maxExtLength=e?.maxExtLength??0xffffffff,this.keyDecoder=e?.keyDecoder!==void 0?e.keyDecoder:er,this.mapKeyConverter=e?.mapKeyConverter??Y}clone(){return new en({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=-1,this.stack.reset()}setBuffer(e){let t=V(e);this.bytes=t,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.pos=0}appendBuffer(e){if(-1!==this.headByte||this.hasRemaining(1)){let t=this.bytes.subarray(this.pos),r=V(e),n=new Uint8Array(t.length+r.length);n.set(t),n.set(r,t.length),this.setBuffer(n)}else this.setBuffer(e)}hasRemaining(e){return this.view.byteLength-this.pos>=e}createExtraByteError(e){let{view:t,pos:r}=this;return RangeError(`Extra ${t.byteLength-r} of ${t.byteLength} byte(s) found at buffer[${e}]`)}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);let t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t}finally{this.entered=!1}}*decodeMulti(e){if(this.entered){let t=this.clone();yield*t.decodeMulti(e);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.entered)return this.clone().decodeAsync(e);try{let t;this.entered=!0;let r=!1;for await(let n of e){if(r)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(n);try{t=this.doDecodeSync(),r=!0}catch(e){if(!(e instanceof RangeError))throw e}this.totalPos+=this.pos}if(r){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return t}let{headByte:n,pos:i,totalPos:a}=this;throw RangeError(`Insufficient data in parsing ${j(n)} at ${a} (${i} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async *decodeMultiAsync(e,t){if(this.entered){let r=this.clone();yield*r.decodeMultiAsync(e,t);return}try{this.entered=!0;let r=t,n=-1;for await(let i of e){if(t&&0===n)throw this.createExtraByteError(this.totalPos);this.appendBuffer(i),r&&(n=this.readArraySize(),r=!1,this.complete());try{for(;yield this.doDecodeSync(),0!=--n;);}catch(e){if(!(e instanceof RangeError))throw e}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){t:for(;;){let e,t=this.readHeadByte();if(t>=224)e=t-256;else if(t<192)if(t<128)e=t;else if(t<144){let r=t-128;if(0!==r){this.pushMapState(r),this.complete();continue}e={}}else if(t<160){let r=t-144;if(0!==r){this.pushArrayState(r),this.complete();continue}e=[]}else{let r=t-160;e=this.decodeString(r,0)}else if(192===t)e=null;else if(194===t)e=!1;else if(195===t)e=!0;else if(202===t)e=this.readF32();else if(203===t)e=this.readF64();else if(204===t)e=this.readU8();else if(205===t)e=this.readU16();else if(206===t)e=this.readU32();else if(207===t)e=this.useBigInt64?this.readU64AsBigInt():this.readU64();else if(208===t)e=this.readI8();else if(209===t)e=this.readI16();else if(210===t)e=this.readI32();else if(211===t)e=this.useBigInt64?this.readI64AsBigInt():this.readI64();else if(217===t){let t=this.lookU8();e=this.decodeString(t,1)}else if(218===t){let t=this.lookU16();e=this.decodeString(t,2)}else if(219===t){let t=this.lookU32();e=this.decodeString(t,4)}else if(220===t){let t=this.readU16();if(0!==t){this.pushArrayState(t),this.complete();continue}e=[]}else if(221===t){let t=this.readU32();if(0!==t){this.pushArrayState(t),this.complete();continue}e=[]}else if(222===t){let t=this.readU16();if(0!==t){this.pushMapState(t),this.complete();continue}e={}}else if(223===t){let t=this.readU32();if(0!==t){this.pushMapState(t),this.complete();continue}e={}}else if(196===t){let t=this.lookU8();e=this.decodeBinary(t,1)}else if(197===t){let t=this.lookU16();e=this.decodeBinary(t,2)}else if(198===t){let t=this.lookU32();e=this.decodeBinary(t,4)}else if(212===t)e=this.decodeExtension(1,0);else if(213===t)e=this.decodeExtension(2,0);else if(214===t)e=this.decodeExtension(4,0);else if(215===t)e=this.decodeExtension(8,0);else if(216===t)e=this.decodeExtension(16,0);else if(199===t){let t=this.lookU8();e=this.decodeExtension(t,1)}else if(200===t){let t=this.lookU16();e=this.decodeExtension(t,2)}else if(201===t){let t=this.lookU32();e=this.decodeExtension(t,4)}else throw new $(`Unrecognized type byte: ${j(t)}`);this.complete();let r=this.stack;for(;r.length>0;){let t=r.top();if(t.type===K)if(t.array[t.position]=e,t.position++,t.position===t.size)e=t.array,r.release(t);else continue t;else if(t.type===Z){if("__proto__"===e)throw new $("The key __proto__ is not allowed");t.key=this.mapKeyConverter(e),t.type=J;continue t}else if(t.map[t.key]=e,t.readCount++,t.readCount===t.size)e=t.map,r.release(t);else{t.key=null,t.type=Z;continue t}}return e}}readHeadByte(){return -1===this.headByte&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=-1}readArraySize(){let e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:if(e<160)return e-144;throw new $(`Unrecognized array type byte: ${j(e)}`)}}pushMapState(e){if(e>this.maxMapLength)throw new $(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new $(`Max length exceeded: array length (${e}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(e)}decodeString(e,t){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(e,t):this.decodeBinary(e,t)}decodeUtf8String(e,t){let r;if(e>this.maxStrLength)throw new $(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+t+e)throw et;let n=this.pos+t;return r=this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?this.keyDecoder.decode(this.bytes,n,e):function(e,t,r){if(!(r>200))return W(e,t,r);let n=e.subarray(t,t+r);return q.decode(n)}(this.bytes,n,e),this.pos+=t+e,r}stateIsMapKey(){return this.stack.length>0&&this.stack.top().type===Z}decodeBinary(e,t){if(e>this.maxBinLength)throw new $(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+t))throw et;let r=this.pos+t,n=this.bytes.subarray(r,r+e);return this.pos+=t+e,n}decodeExtension(e,t){if(e>this.maxExtLength)throw new $(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);let r=this.view.getInt8(this.pos+t),n=this.decodeBinary(e,t+1);return this.extensionCodec.decode(n,r,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){let e=this.view.getUint8(this.pos);return this.pos++,e}readI8(){let e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){let e=this.view.getUint16(this.pos);return this.pos+=2,e}readI16(){let e=this.view.getInt16(this.pos);return this.pos+=2,e}readU32(){let e=this.view.getUint32(this.pos);return this.pos+=4,e}readI32(){let e=this.view.getInt32(this.pos);return this.pos+=4,e}readU64(){var e,t;let r=(e=this.view,t=this.pos,0x100000000*e.getUint32(t)+e.getUint32(t+4));return this.pos+=8,r}readI64(){let e=D(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){let e=this.view.getBigUint64(this.pos);return this.pos+=8,e}readI64AsBigInt(){let e=this.view.getBigInt64(this.pos);return this.pos+=8,e}readF32(){let e=this.view.getFloat32(this.pos);return this.pos+=4,e}readF64(){let e=this.view.getFloat64(this.pos);return this.pos+=8,e}}class ei{extensionCodec;context;useBigInt64;maxDepth;initialBufferSize;sortKeys;forceFloat32;ignoreUndefined;forceIntegerToFloat;pos;view;bytes;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??H.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.maxDepth=e?.maxDepth??100,this.initialBufferSize=e?.initialBufferSize??2048,this.sortKeys=e?.sortKeys??!1,this.forceFloat32=e?.forceFloat32??!1,this.ignoreUndefined=e?.ignoreUndefined??!1,this.forceIntegerToFloat=e?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new ei({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(e){if(this.entered)return this.clone().encodeSharedRef(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(e){if(this.entered)return this.clone().encode(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(e,t){if(t>this.maxDepth)throw Error(`Too deep objects in depth ${t}`);null==e?this.encodeNil():"boolean"==typeof e?this.encodeBoolean(e):"number"==typeof e?this.forceIntegerToFloat?this.encodeNumberAsFloat(e):this.encodeNumber(e):"str
5726ing"==typeof e?this.encodeString(e):this.useBigInt64&&"bigint"==typeof e?this.encodeBigInt64(e):this.encodeObject(e,t)}ensureBufferSizeToWrite(e){let t=this.pos+e;this.view.byteLength<t&&this.resizeBuffer(2*t)}resizeBuffer(e){let t=new ArrayBuffer(e),r=new Uint8Array(t),n=new DataView(t);r.set(this.bytes),this.view=n,this.bytes=r}encodeNil(){this.writeU8(192)}encodeBoolean(e){!1===e?this.writeU8(194):this.writeU8(195)}encodeNumber(e){!this.forceIntegerToFloat&&Number.isSafeInteger(e)?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<0x100000000?(this.writeU8(206),this.writeU32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-0x80000000?(this.writeU8(210),this.writeI32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(211),this.writeI64(e)):this.encodeNumberAsFloat(e)}encodeNumberAsFloat(e){this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))}encodeBigInt64(e){e>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(e)):(this.writeU8(211),this.writeBigInt64(e))}writeStringHeader(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<0x100000000)this.writeU8(219),this.writeU32(e);else throw Error(`Too long string: ${e} bytes in UTF-8`)}encodeString(e){let t=function(e){let t=e.length,r=0,n=0;for(;n<t;){let i=e.charCodeAt(n++);if((0xffffff80&i)==0){r++;continue}if((0xfffff800&i)==0)r+=2;else{if(i>=55296&&i<=56319&&n<t){let t=e.charCodeAt(n);(64512&t)==56320&&(++n,i=((1023&i)<<10)+(1023&t)+65536)}(0xffff0000&i)==0?r+=3:r+=4}}return r}(e);this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),function(e,t,r){if(e.length>50)z.encodeInto(e,t.subarray(r));else!function(e,t,r){let n=e.length,i=r,a=0;for(;a<n;){let r=e.charCodeAt(a++);if((0xffffff80&r)==0){t[i++]=r;continue}if((0xfffff800&r)==0)t[i++]=r>>6&31|192;else{if(r>=55296&&r<=56319&&a<n){let t=e.charCodeAt(a);(64512&t)==56320&&(++a,r=((1023&r)<<10)+(1023&t)+65536)}(0xffff0000&r)==0?t[i++]=r>>12&15|224:(t[i++]=r>>18&7|240,t[i++]=r>>12&63|128),t[i++]=r>>6&63|128}t[i++]=63&r|128}}(e,t,r)}(e,this.bytes,this.pos),this.pos+=t}encodeObject(e,t){let r=this.extensionCodec.tryToEncode(e,this.context);if(null!=r)this.encodeExtension(r);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if("object"==typeof e)this.encodeMap(e,t);else throw Error(`Unrecognized object: ${Object.prototype.toString.apply(e)}`)}encodeBinary(e){let t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else if(t<0x100000000)this.writeU8(198),this.writeU32(t);else throw Error(`Too large binary: ${t}`);let r=V(e);this.writeU8a(r)}encodeArray(e,t){let r=e.length;if(r<16)this.writeU8(144+r);else if(r<65536)this.writeU8(220),this.writeU16(r);else if(r<0x100000000)this.writeU8(221),this.writeU32(r);else throw Error(`Too large array: ${r}`);for(let r of e)this.doEncode(r,t+1)}countWithoutUndefined(e,t){let r=0;for(let n of t)void 0!==e[n]&&r++;return r}encodeMap(e,t){let r=Object.keys(e);this.sortKeys&&r.sort();let n=this.ignoreUndefined?this.countWithoutUndefined(e,r):r.length;if(n<16)this.writeU8(128+n);else if(n<65536)this.writeU8(222),this.writeU16(n);else if(n<0x100000000)this.writeU8(223),this.writeU32(n);else throw Error(`Too large map object: ${n}`);for(let n of r){let r=e[n];this.ignoreUndefined&&void 0===r||(this.encodeString(n),this.doEncode(r,t+1))}}encodeExtension(e){if("function"==typeof e.data){let t=e.data(this.pos+6),r=t.length;if(r>=0x100000000)throw Error(`Too large extension object: ${r}`);this.writeU8(201),this.writeU32(r),this.writeI8(e.type),this.writeU8a(t);return}let t=e.data.length;if(1===t)this.writeU8(212);else if(2===t)this.writeU8(213);else if(4===t)this.writeU8(214);else if(8===t)this.writeU8(215);else if(16===t)this.writeU8(216);else if(t<256)this.writeU8(199),this.writeU8(t);else if(t<65536)this.writeU8(200),this.writeU16(t);else if(t<0x100000000)this.writeU8(201),this.writeU32(t);else throw Error(`Too large extension object: ${t}`);this.writeI8(e.type),this.writeU8a(e.data)}writeU8(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++}writeU8a(e){let t=e.length;this.ensureBufferSizeToWrite(t),this.bytes.set(e,this.pos),this.pos+=t}writeI8(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++}writeU16(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2}writeI16(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2}writeU32(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4}writeI32(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4}writeF32(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4}writeF64(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8}writeU64(e){var t,r;this.ensureBufferSizeToWrite(8),t=this.view,r=this.pos,t.setUint32(r,e/0x100000000),t.setUint32(r+4,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),L(this.view,this.pos,e),this.pos+=8}writeBigUint64(e){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,e),this.pos+=8}writeBigInt64(e){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,e),this.pos+=8}}var ea=r(82692),es=r(64190),eo=r(6203),el=r(57785),ec=r(55036),eu=r(44168).Buffer;function ed(e){let[t,r]=e.split(":");return{namespace:t,reference:r}}function eh(e,t){return e.includes(":")?[e]:t.chains||[]}
5726let ep={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}},ef={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}};function em(e,t){let{message:r,code:n}=ef[e];return{message:t?`${r} ${t}`:r,code:n}}function eg(e,t){let{message:r,code:n}=ep[e];return{message:t?`${r} ${t}`:r,code:n}}var ey=Object.defineProperty,eb=Object.defineProperties,ew=Object.getOwnPropertyDescriptors,ev=Object.getOwnPropertySymbols,eE=Object.prototype.hasOwnProperty,eC=Object.prototype.propertyIsEnumerable,eA=(e,t,r)=>t in e?ey(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ex=(e,t)=>{for(var r in t||(t={}))eE.call(t,r)&&eA(e,r,t[r]);if(ev)for(var r of ev(t))eC.call(t,r)&&eA(e,r,t[r]);return e},eI=(e,t,r)=>eA(e,"symbol"!=typeof t?t+"":t,r);let eS={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"};function eT(){return"u">typeof ec&&"u">typeof ec.versions&&"u">typeof ec.versions.node}function eP(){return!(0,k.getDocument)()&&!!(0,k.getNavigator)()&&"ReactNative"===navigator.product}function eO(){return!eT()&&!!(0,k.getNavigator)()&&!!(0,k.getDocument)()}function e_(){return eP()?eS.reactNative:eT()?eS.node:eO()?eS.browser:eS.unknown}function eN(){var e;try{return eP()&&"u">typeof global&&"u">typeof(null==global?void 0:global.Application)?null==(e=global.Application)?void 0:e.applicationId:void 0}catch{return}}function ek(){return(0,R.g)()||{name:"",description:"",url:"",icons:[""]}}function eR(e,t,r){let n=function(){if(e_()===eS.reactNative&&"u">typeof global&&"u">typeof(null==global?void 0:global.Platform)){let{OS:e,Version:t}=global.Platform;return[e,t].join("-")}let e=(0,N.o0)();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("-")}(),i=function(){var e;let t=e_();return t===eS.browser?[t,(null==(e=(0,k.getLocation)())?void 0:e.host)||"unknown"].join(":"):t}();return[[e,t].join("-"),["js",r].join("-"),n,i].join("/")}function eM(e,t){return e.filter(e=>t.includes(e)).length===e.length}function eB(e){return Object.fromEntries(e.entries())}function ej(e){return new Map(Object.entries(e))}function eU(e=P.FIVE_MINUTES,t){let r,n,i,a,s=(0,P.toMiliseconds)(e||P.FIVE_MINUTES);return{resolve:e=>{i&&r&&(clearTimeout(i),r(e),a=Promise.resolve(e))},reject:e=>{i&&n&&(clearTimeout(i),n(e))},done:()=>new Promise((e,o)=>{if(a)return e(a);i=setTimeout(()=>{let e=em("EXPIRED"),r=Error(t||e.message);r.code=e.code,o(r)},s),r=e,n=o})}}function e$(e,t,r){return new Promise(async(n,i)=>{let a=setTimeout(()=>i(Error(r)),t);try{let t=await e;n(t)}catch(e){i(e)}clearTimeout(a)})}function eL(e,t){if("string"==typeof t&&t.startsWith(`${e}:`))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===e.toLowerCase()){if("number"!=typeof t)throw Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw Error(`Unknown expirer target type: ${e}`)}function eD(e){let[t,r]=e.split(":"),n={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof r)n.topic=r;else if("id"===t&&Number.isInteger(Number(r)))n.id=Number(r);else throw Error(`Invalid target, expected id:number or topic:string, got ${t}:${r}`);return n}function eF(e,t){return(0,P.fromMiliseconds)((t||Date.now())+(0,P.toMiliseconds)(e))}function eH(e){return Date.now()>=(0,P.toMiliseconds)(e)}function ez(e,t){return`${e}${t?`:${t}`:""}`}function eW(e=[],t=[]){return[...new Set([...e,...t])]}async function eq({id:e,topic:t,wcDeepLink:r}){var n,i;try{if(!r)return;let a="string"==typeof r?JSON.parse(r):r,s=a?.href;if("string"!=typeof s)return;let o=function(e,t,r){let n=`requestId=${t}&sessionTopic=${r}`;e.endsWith("/")&&(e=e.slice(0,-1));let i=`${e}`;if(e.startsWith("https://t.me")){let t=e.includes("?")?"&startapp=":"?startapp=";i=`${i}${t}${function(e,t=!1){let r=eu.from(e).toString("base64");return t?r.replace(/[=]/g,""):r}(n,!0)}`}else i=`${i}/wc?${n}`;return i}(s,e,t),l=e_();if(l===eS.browser){let e;if(!(null!=(n=(0,k.getDocument)())&&n.hasFocus()))return void console.warn("Document does not have focus, skipping deeplink.");i=o,e="_self",!function(){try{return window.self!==window.top}catch{return!1}}()?("u">typeof window&&(window.TelegramWebviewProxy||window.Telegram||window.TelegramWebviewProxyProto)||i.startsWith("https://")||i.startsWith("http://"))&&(e="_blank"):e="_top",window.open(i,e,"noreferrer noopener")}else l===eS.reactNative&&"u">typeof(null==global?void 0:global.Linking)&&await global.Linking.openURL(o)}catch(e){console.error(e)}}async function eV(e,t){let r="";try{if(eO()&&(r=localStorage.getItem(t)))return r;r=await e.getItem(t)}catch(e){console.error(e)}return r}function eG(e,t){if(!e.includes(t))return null;let r=e.split(/([&,?,=])/),n=r.indexOf(t);return r[n+2]}function eK(){return"u">typeof crypto&&null!=crypto&&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)})}function eZ(){return"u">typeof ec&&"true"===ec.env.IS_VITEST}function eJ(e){return eu.from(e,"base64").toString("utf-8")}class eY{constructor({limit:e}){eI(this,"limit"),eI(this,"set"),this.limit=e,this.set=new Set}
5726add(e){if(!this.set.has(e)){if(this.set.size>=this.limit){let e=this.set.values().next().value;e&&this.set.delete(e)}this.set.add(e)}}has(e){return this.set.has(e)}}let eQ=BigInt(0x100000000-1),eX=BigInt(32);function e0(e,t=!1){return t?{h:Number(e&eQ),l:Number(e>>eX&eQ)}:{h:0|Number(e>>eX&eQ),l:0|Number(e&eQ)}}function e1(e,t=!1){let r=e.length,n=new Uint32Array(r),i=new Uint32Array(r);for(let a=0;a<r;a++){let{h:r,l:s}=e0(e[a],t);[n[a],i[a]]=[r,s]}return[n,i]}let e2=(e,t,r)=>e>>>r,e5=(e,t,r)=>e<<32-r|t>>>r,e6=(e,t,r)=>e>>>r|t<<32-r,e3=(e,t,r)=>e<<32-r|t>>>r,e4=(e,t,r)=>e<<64-r|t>>>r-32,e8=(e,t,r)=>e>>>r-32|t<<64-r;function e9(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/0x100000000|0)|0,l:0|i}}let e7=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),te=(e,t,r,n)=>t+r+n+(e/0x100000000|0)|0,tt=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),tr=(e,t,r,n,i)=>t+r+n+i+(e/0x100000000|0)|0,tn=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0),ti=(e,t,r,n,i,a)=>t+r+n+i+a+(e/0x100000000|0)|0,ta="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function ts(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function to(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function tl(e,...t){if(!ts(e))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function tc(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.createHasher");to(e.outputLen),to(e.blockLen)}function tu(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function td(e,t){tl(e);let r=t.outputLen;if(e.length<r)throw Error("digestInto() expects output buffer of length at least "+r)}function th(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function tp(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function tf(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function tm(e,t){return e<<32-t|e>>>t}let tg=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0];function ty(e){return e<<24&0xff000000|e<<8&0xff0000|e>>>8&65280|e>>>24&255}let tb=tg?e=>e:e=>ty(e),tw=tg?e=>e:function(e){for(let t=0;t<e.length;t++)e[t]=ty(e[t]);return e},tv="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,tE=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function tC(e){if(tl(e),tv)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=tE[e[r]];return t}let tA={_0:48,_9:57,A:65,F:70,a:97,f:102};function tx(e){return e>=tA._0&&e<=tA._9?e-tA._0:e>=tA.A&&e<=tA.F?e-(tA.A-10):e>=tA.a&&e<=tA.f?e-(tA.a-10):void 0}function tI(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);if(tv)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){let r=tx(e.charCodeAt(i)),a=tx(e.charCodeAt(i+1));if(void 0===r||void 0===a)throw Error('hex string expected, got non-hex character "'+(e[i]+e[i+1])+'" at index '+i);n[t]=16*r+a}return n}function tS(e){if("string"!=typeof e)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function tT(e){return"string"==typeof e&&(e=tS(e)),tl(e),e}function tP(...e){let t=0;for(let r=0;r<e.length;r++){let n=e[r];tl(n),t+=n.length}let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let i=e[t];r.set(i,n),n+=i.length}return r}class tO{}function t_(e){let t=t=>e().update(tT(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function tN(e=32){if(ta&&"function"==typeof ta.getRandomValues)return ta.getRandomValues(new Uint8Array(e));if(ta&&"function"==typeof ta.randomBytes)return Uint8Array.from(ta.randomBytes(e));throw Error("crypto.getRandomValues must be defined")}let tk=BigInt(0),tR=BigInt(1),tM=BigInt(2),tB=BigInt(7),tj=BigInt(256),tU=BigInt(113),t$=[],tL=[],tD=[];for(let e=0,t=tR,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],t$.push(2*(5*n+r)),tL.push((e+1)*(e+2)/2%64);let i=tk;for(let e=0;e<7;e++)(t=(t<<tR^(t>>tB)*tU)%tj)&tM&&(i^=tR<<(tR<<BigInt(e))-tR);tD.push(i)}let tF=e1(tD,!0),tH=tF[0],tz=tF[1],tW=(e,t,r)=>r>32?((e,t,r)=>t<<r-32|e>>>64-r)(e,t,r):((e,t,r)=>e<<r|t>>>32-r)(e,t,r),tq=(e,t,r)=>r>32?((e,t,r)=>e<<r-32|t>>>64-r)(e,t,r):((e,t,r)=>t<<r|e>>>32-r)(e,t,r);
5726class tV extends tO{constructor(e,t,r,n=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=i,to(r),!(0<e&&e<200))throw Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=th(this.state)}clone(){return this._cloneInto()}keccak(){tw(this.state32),function(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){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 n=(t+8)%10,i=(t+2)%10,a=r[i],s=r[i+1],o=tW(a,s,1)^r[n],l=tq(a,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=o,e[t+r+1]^=l}let t=e[2],i=e[3];for(let r=0;r<24;r++){let n=tL[r],a=tW(t,i,n),s=tq(t,i,n),o=t$[r];t=e[o],i=e[o+1],e[o]=a,e[o+1]=s}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=tH[n],e[1]^=tz[n]}tp(r)}(this.state32,this.rounds),tw(this.state32),this.posOut=0,this.pos=0}update(e){tu(this),tl(e=tT(e));let{blockLen:t,state:r}=this,n=e.length;for(let i=0;i<n;){let a=Math.min(t-this.pos,n-i);for(let t=0;t<a;t++)r[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,(128&t)!=0&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){tu(this,!1),tl(e),this.finish();let t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();let a=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+a),n),this.posOut+=a,n+=a}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return to(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(td(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,tp(this.state)}_cloneInto(e){let{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:a}=this;return e||(e=new tV(t,r,n,a,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=a,e.destroyed=this.destroyed,e}}let tG=t_(()=>new tV(136,1,32));class tK extends tO{constructor(e,t,r,n){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(e),this.view=tf(this.buffer)}update(e){tu(this),tl(e=tT(e));let{view:t,buffer:r,blockLen:n}=this,i=e.length;for(let a=0;a<i;){let s=Math.min(n-this.pos,i-a);if(s===n){let t=tf(e);for(;n<=i-a;a+=n)this.process(t,a);continue}r.set(e.subarray(a,a+s),this.pos),this.pos+=s,a+=s,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){tu(this),td(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:n,isLE:i}=this,{pos:a}=this;t[a++]=128,tp(this.buffer.subarray(a)),this.padOffset>n-a&&(this.process(r,0),a=0);for(let e=a;e<n;e++)t[e]=0;(function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),a=BigInt(0xffffffff),s=Number(r>>i&a),o=Number(r&a),l=4*!!n,c=4*!n;e.setUint32(t+l,s,n),e.setUint32(t+c,o,n)})(r,n-8,BigInt(8*this.length),i),this.process(r,0);let s=tf(e),o=this.outputLen;if(o%4)throw Error("_sha2: outputLen should be aligned to 32bit");let l=o/4,c=this.get();if(l>c.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)s.setUint32(4*e,c[e],i)}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:n,finished:i,destroyed:a,pos:s}=this;return e.destroyed=a,e.finished=i,e.length=n,e.pos=s,n%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}let tZ=Uint32Array.from([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),tJ=Uint32Array.from([0xcbbb9d5d,0xc1059ed8,0x629a292a,0x367cd507,0x9159015a,0x3070dd17,0x152fecd8,0xf70e5939,0x67332667,0xffc00b31,0x8eb44a87,0x68581511,0xdb0c2e0d,0x64f98fa7,0x47b5481d,0xbefa4fa4]),tY=Uint32Array.from([0x6a09e66
57267,0xf3bcc908,0xbb67ae85,0x84caa73b,0x3c6ef372,0xfe94f82b,0xa54ff53a,0x5f1d36f1,0x510e527f,0xade682d1,0x9b05688c,0x2b3e6c1f,0x1f83d9ab,0xfb41bd6b,0x5be0cd19,0x137e2179]),tQ=Uint32Array.from([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),tX=new Uint32Array(64);class t0 extends tK{constructor(e=32){super(64,e,8,!1),this.A=0|tZ[0],this.B=0|tZ[1],this.C=0|tZ[2],this.D=0|tZ[3],this.E=0|tZ[4],this.F=0|tZ[5],this.G=0|tZ[6],this.H=0|tZ[7]}get(){let{A:e,B:t,C:r,D:n,E:i,F:a,G:s,H:o}=this;return[e,t,r,n,i,a,s,o]}set(e,t,r,n,i,a,s,o){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|a,this.G=0|s,this.H=0|o}process(e,t){for(let r=0;r<16;r++,t+=4)tX[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=tX[e-15],r=tX[e-2],n=tm(t,7)^tm(t,18)^t>>>3,i=tm(r,17)^tm(r,19)^r>>>10;tX[e]=i+tX[e-7]+n+tX[e-16]|0}let{A:r,B:n,C:i,D:a,E:s,F:o,G:l,H:c}=this;for(let e=0;e<64;e++){var u,d,h,p;let t=c+(tm(s,6)^tm(s,11)^tm(s,25))+((u=s)&o^~u&l)+tQ[e]+tX[e]|0,f=(tm(r,2)^tm(r,13)^tm(r,22))+((d=r)&(h=n)^d&(p=i)^h&p)|0;c=l,l=o,o=s,s=a+t|0,a=i,i=n,n=r,r=t+f|0}r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,a=a+this.D|0,s=s+this.E|0,o=o+this.F|0,l=l+this.G|0,c=c+this.H|0,this.set(r,n,i,a,s,o,l,c)}roundClean(){tp(tX)}destroy(){this.set(0,0,0,0,0,0,0,0),tp(this.buffer)}}let t1=e1(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
57265771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),t2=t1[0],t5=t1[1],t6=new Uint32Array(80),t3=new Uint32Array(80);class t4 extends tK{constructor(e=64){super(128,e,16,!1),this.Ah=0|tY[0],this.Al=0|tY[1],this.Bh=0|tY[2],this.Bl=0|tY[3],this.Ch=0|tY[4],this.Cl=0|tY[5],this.Dh=0|tY[6],this.Dl=0|tY[7],this.Eh=0|tY[8],this.El=0|tY[9],this.Fh=0|tY[10],this.Fl=0|tY[11],this.Gh=0|tY[12],this.Gl=0|tY[13],this.Hh=0|tY[14],this.Hl=0|tY[15]}get(){let{Ah:e,Al:t,Bh:r,Bl:n,Ch:i,Cl:a,Dh:s,Dl:o,Eh:l,El:c,Fh:u,Fl:d,Gh:h,Gl:p,Hh:f,Hl:m}=this;return[e,t,r,n,i,a,s,o,l,c,u,d,h,p,f,m]}set(e,t,r,n,i,a,s,o,l,c,u,d,h,p,f,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|a,this.Dh=0|s,this.Dl=0|o,this.Eh=0|l,this.El=0|c,this.Fh=0|u,this.Fl=0|d,this.Gh=0|h,this.Gl=0|p,this.Hh=0|f,this.Hl=0|m}process(e,t){for(let r=0;r<16;r++,t+=4)t6[r]=e.getUint32(t),t3[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=0|t6[e-15],r=0|t3[e-15],n=e6(t,r,1)^e6(t,r,8)^e2(t,r,7),i=e3(t,r,1)^e3(t,r,8)^e5(t,r,7),a=0|t6[e-2],s=0|t3[e-2],o=e6(a,s,19)^e4(a,s,61)^e2(a,s,6),l=tt(i,e3(a,s,19)^e8(a,s,61)^e5(a,s,6),t3[e-7],t3[e-16]),c=tr(l,n,o,t6[e-7],t6[e-16]);t6[e]=0|c,t3[e]=0|l}let{Ah:r,Al:n,Bh:i,Bl:a,Ch:s,Cl:o,Dh:l,Dl:c,Eh:u,El:d,Fh:h,Fl:p,Gh:f,Gl:m,Hh:g,Hl:y}=this;for(let e=0;e<80;e++){let t=e6(u,d,14)^e6(u,d,18)^e4(u,d,41),b=e3(u,d,14)^e3(u,d,18)^e8(u,d,41),w=u&h^~u&f,v=tn(y,b,d&p^~d&m,t5[e],t3[e]),E=ti(v,g,t,w,t2[e],t6[e]),C=0|v,A=e6(r,n,28)^e4(r,n,34)^e4(r,n,39),x=e3(r,n,28)^e8(r,n,34)^e8(r,n,39),I=r&i^r&s^i&s,S=n&a^n&o^a&o;g=0|f,y=0|m,f=0|h,m=0|p,h=0|u,p=0|d,({h:u,l:d}=e9(0|l,0|c,0|E,0|C)),l=0|s,c=0|o,s=0|i,o=0|a,i=0|r,a=0|n;let T=e7(C,x,S);r=te(T,E,A,I),n=0|T}({h:r,l:n}=e9(0|this.Ah,0|this.Al,0|r,0|n)),({h:i,l:a}=e9(0|this.Bh,0|this.Bl,0|i,0|a)),({h:s,l:o}=e9(0|this.Ch,0|this.Cl,0|s,0|o)),({h:l,l:c}=e9(0|this.Dh,0|this.Dl,0|l,0|c)),({h:u,l:d}=e9(0|this.Eh,0|this.El,0|u,0|d)),({h,l:p}=e9(0|this.Fh,0|this.Fl,0|h,0|p)),({h:f,l:m}=e9(0|this.Gh,0|this.Gl,0|f,0|m)),({h:g,l:y}=e9(0|this.Hh,0|this.Hl,0|g,0|y)),this.set(r,n,i,a,s,o,l,c,u,d,h,p,f,m,g,y)}roundClean(){tp(t6,t3)}destroy(){tp(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class t8 extends t4{constructor(){super(48),this.Ah=0|tJ[0],this.Al=0|tJ[1],this.Bh=0|tJ[2],this.Bl=0|tJ[3],this.Ch=0|tJ[4],this.Cl=0|tJ[5],this.Dh=0|tJ[6],this.Dl=0|tJ[7],this.Eh=0|tJ[8],this.El=0|tJ[9],this.Fh=0|tJ[10],this.Fl=0|tJ[11],this.Gh=0|tJ[12],this.Gl=0|tJ[13],this.Hh=0|tJ[14],this.Hl=0|tJ[15]}}let t9=Uint32Array.from([0x22312194,0xfc2bf72c,0x9f555fa3,0xc84c64c2,0x2393b86b,0x6f53b151,0x96387719,0x5940eabd,0x96283ee2,0xa88effe3,0xbe5e1e25,0x53863992,0x2b0199fc,0x2c85b8aa,0xeb72ddc,0x81c52ca2]);class t7 extends t4{constructor(){super(32),this.Ah=0|t9[0],this.Al=0|t9[1],this.Bh=0|t9[2],this.Bl=0|t9[3],this.Ch=0|t9[4],this.Cl=0|t9[5],this.Dh=0|t9[6],this.Dl=0|t9[7],this.Eh=0|t9[8],this.El=0|t9[9],this.Fh=0|t9[10],this.Fl=0|t9[11],this.Gh=0|t9[12],this.Gl=0|t9[13],this.Hh=0|t9[14],this.Hl=0|t9[15]}}let re=t_(()=>new t0),rt=t_(()=>new t4),rr=t_(()=>new t8),rn=t_(()=>new t7),ri=Uint8Array.from([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]),ra=Uint32Array.from([0xf3bcc908,0x6a09e66
57267,0x84caa73b,0xbb67ae85,0xfe94f82b,0x3c6ef372,0x5f1d36f1,0xa54ff53a,0xade682d1,0x510e527f,0x2b3e6c1f,0x9b05688c,0xfb41bd6b,0x1f83d9ab,0x137e2179,0x5be0cd19]),rs=new Uint32Array(32);function ro(e,t,r,n,i,a){let s=i[a],o=i[a+1],l=rs[2*e],c=rs[2*e+1],u=rs[2*t],d=rs[2*t+1],h=rs[2*r],p=rs[2*r+1],f=rs[2*n],m=rs[2*n+1],g=e7(l,u,s);c=te(g,c,d,o),l=0|g,({Dh:m,Dl:f}={Dh:m^c,Dl:f^l}),({Dh:m,Dl:f}={Dh:f,Dl:m}),({h:p,l:h}=e9(p,h,m,f)),({Bh:d,Bl:u}={Bh:d^p,Bl:u^h}),({Bh:d,Bl:u}={Bh:e6(d,u,24),Bl:e3(d,u,24)}),rs[2*e]=l,rs[2*e+1]=c,rs[2*t]=u,rs[2*t+1]=d,rs[2*r]=h,rs[2*r+1]=p,rs[2*n]=f,rs[2*n+1]=m}function rl(e,t,r,n,i,a){let s=i[a],o=i[a+1],l=rs[2*e],c=rs[2*e+1],u=rs[2*t],d=rs[2*t+1],h=rs[2*r],p=rs[2*r+1],f=rs[2*n],m=rs[2*n+1],g=e7(l,u,s);c=te(g,c,d,o),l=0|g,({Dh:m,Dl:f}={Dh:m^c,Dl:f^l}),({Dh:m,Dl:f}={Dh:e6(m,f,16),Dl:e3(m,f,16)}),({h:p,l:h}=e9(p,h,m,f)),({Bh:d,Bl:u}={Bh:d^p,Bl:u^h}),({Bh:d,Bl:u}={Bh:e4(d,u,63),Bl:e8(d,u,63)}),rs[2*e]=l,rs[2*e+1]=c,rs[2*t]=u,rs[2*t+1]=d,rs[2*r]=h,rs[2*r+1]=p,rs[2*n]=f,rs[2*n+1]=m}class rc extends tO{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,this.length=0,this.pos=0,to(e),to(t),this.blockLen=e,this.outputLen=t,this.buffer=new Uint8Array(e),this.buffer32=th(this.buffer)}update(e){tu(this),tl(e=tT(e));let{blockLen:t,buffer:r,buffer32:n}=this,i=e.length,a=e.byteOffset,s=e.buffer;for(let o=0;o<i;){this.pos===t&&(tw(n),this.compress(n,0,!1),tw(n),this.pos=0);let l=Math.min(t-this.pos,i-o),c=a+o;if(l===t&&!(c%4)&&o+l<i){let e=new Uint32Array(s,c,Math.floor((i-o)/4));tw(e);for(let r=0;o+t<i;r+=n.length,o+=t)this.length+=t,this.compress(e,r,!1);tw(e);continue}r.set(e.subarray(o,o+l),this.pos),this.pos+=l,this.length+=l,o+=l}return this}digestInto(e){tu(this),td(e,this);let{pos:t,buffer32:r}=this;this.finished=!0,tp(this.buffer.subarray(t)),tw(r),this.compress(r,0,!0),tw(r);let n=th(e);this.get().forEach((e,t)=>n[t]=tb(e))}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){let{buffer:t,length:r,finished:n,destroyed:i,outputLen:a,pos:s}=this;return e||(e=new this.constructor({dkLen:a})),e.set(...this.get()),e.buffer.set(t),e.destroyed=i,e.finished=n,e.length=r,e.pos=s,e.outputLen=a,e}clone(){return this._cloneInto()}}class ru extends rc{constructor(e={}){let t=void 0===e.dkLen?64:e.dkLen;super(128,t),this.v0l=0|ra[0],this.v0h=0|ra[1],this.v1l=0|ra[2],this.v1h=0|ra[3],this.v2l=0|ra[4],this.v2h=0|ra[5],this.v3l=0|ra[6],this.v3h=0|ra[7],this.v4l=0|ra[8],this.v4h=0|ra[9],this.v5l=0|ra[10],this.v5h=0|ra[11],this.v6l=0|ra[12],this.v6h=0|ra[13],this.v7l=0|ra[14],this.v7h=0|ra[15],function(e,t={},r,n,i){if(to(64),e<0||e>64)throw Error("outputLen bigger than keyLen");let{key:a,salt:s,personalization:o}=t;if(void 0!==a&&(a.length<1||a.length>r))throw Error("key length must be undefined or 1.."+r);if(void 0!==s&&16!==s.length)throw Error("salt must be undefined or 16");if(void 0!==o&&16!==o.length)throw Error("personalization must be undefined or 16")}(t,e,64,16,16);let{key:r,personalization:n,salt:i}=e,a=0;if(void 0!==r&&(a=(r=tT(r)).length),this.v0l^=this.outputLen|a<<8|0x1010000,void 0!==i){let e=th(i=tT(i));this.v4l^=tb(e[0]),this.v4h^=tb(e[1]),this.v5l^=tb(e[2]),this.v5h^=tb(e[3])}if(void 0!==n){let e=th(n=tT(n));this.v6l^=tb(e[0]),this.v6h^=tb(e[1]),this.v7l^=tb(e[2]),this.v7h^=tb(e[3])}if(void 0!==r){let e=new Uint8Array(this.blockLen);e.set(r),this.update(e)}}get(){let{v0l:e,v0h:t,v1l:r,v1h:n,v2l:i,v2h:a,v3l:s,v3h:o,v4l:l,v4h:c,v5l:u,v5h:d,v6l:h,v6h:p,v7l:f,v7h:m}=this;return[e,t,r,n,i,a,s,o,l,c,u,d,h,p,f,m]}set(e,t,r,n,i,a,s,o,l,c,u,d,h,p,f,m){this.v0l=0|e,this.v0h=0|t,this.v1l=0|r,this.v1h=0|n,this.v2l=0|i,this.v2h=0|a,this.v3l=0|s,this.v3h=0|o,this.v4l=0|l,this.v4h=0|c,this.v5l=0|u,this.v5h=0|d,this.v6l=0|h,this.v6h=0|p,this.v7l=0|f,this.v7h=0|m}compress(e,t,r){this.get().forEach((e,t)=>rs[t]=e),rs.set(ra,16);let{h:n,l:i}=e0(BigInt(this.length));rs[24]=ra[8]^i,rs[25]=ra[9]^n,r&&(rs[28]=~rs[28],rs[29]=~rs[29]);let a=0;for(let r=0;r<12;r++)ro(0,4,8,12,e,t+2*ri[a++]),rl(0,4,8,12,e,t+2*ri[a++]),ro(1,5,9,13,e,t+2*ri[a++]),rl(1,5,9,13,e,t+2*ri[a++]),ro(2,6,10,14,e,t+2*ri[a++]),rl(2,6,10,14,e,t+2*ri[a++]),ro(3,7,11,15,e,t+2*ri[a++]),rl(3,7,11,15,e,t+2*ri[a++]),ro(0,5,10,15,e,t+2*ri[a++]),rl(0,5,10,15,e,t+2*ri[a++]),ro(1,6,11,12,e,t+2*ri[a++]),rl(1,6,11,12,e,t+2*ri[a++]),ro(2,7,8,13,e,t+2*ri[a++]),rl(2,7,8,13,e,t+2*ri[a++]),ro(3,4,9,14,e,t+2*ri[a++]),rl(3,4,9,14,e,t+2*ri[a++]);this.v0l^=rs[0]^rs[16],this.v0h^=rs[1]^rs[17],this.v1l^=rs[2]^rs[18],this.v1h^=rs[3]^rs[19],this.v2l^=rs[4]^rs[20],this.v2h^=rs[5]^rs[21],this.v3l^=rs[6]^rs[22],this.v3h^=rs[7]^rs[23],this.v4l^=rs[8]^rs[24],this.v4h^=rs[9]^rs[25],this.v5l^=rs[10]^rs[26],this.v5h^=rs[11]^rs[27],this.v6l^=rs[12]^rs[28],this.v6h^=rs[13]^rs[29],this.v7l^=rs[14]^rs[30],this.v7h^=rs[15]^rs[31],tp(rs)}destroy(){this.destroyed=!0,tp(this.buffer32),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}let rd=function(e){let t=(t,r)=>e(r).update(tT(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}(e=>
5726new ru(e));function rh(e){let t=`�Ethereum Signed Message: 5727${e.length}`,r=new TextEncoder().encode(t+e);return"0x"+eu.from(tG(r)).toString("hex")}async function rp(e,t,r,n,i,a){switch(r.t){case"eip191":return await function(e,t,r){let n=M.aD(r);return B.x_({payload:rh(t),signature:n}).toLowerCase()===e.toLowerCase()}(e,t,r.s);case"eip1271":return await rf(e,t,r.s,n,i,a);default:throw Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${r.t}`)}}async function rf(e,t,r,n,i,a){let s=ed(n);if(!s.namespace||!s.reference)throw Error(`isValidEip1271Signature failed: chainId must be in CAIP-2 format, received: ${n}`);try{let s="0x1626ba7e",o=r.substring(2),l=(o.length/2).toString(16).padStart(64,"0"),c=(t.startsWith("0x")?t:rh(t)).substring(2),u=s+c+"0000000000000000000000000000000000000000000000000000000000000040"+l+o,d=await fetch(`${a||"https://rpc.walletconnect.org/v1"}/?chainId=${n}&projectId=${i}`,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({id:Date.now()+Math.floor(1e3*Math.random()),jsonrpc:"2.0",method:"eth_call",params:[{to:e,data:u},"latest"]})}),{result:h}=await d.json();return!!h&&h.slice(0,s.length).toLowerCase()===s.toLowerCase()}catch(e){return console.error("isValidEip1271Signature: ",e),!1}}function rm(e){let t=new Uint8Array(re(function(e){if(e instanceof Uint8Array)return e;if(Array.isArray(e))return new Uint8Array(e);if("object"==typeof e&&null!=e&&e.data)return new Uint8Array(Object.values(e.data));if("object"==typeof e&&e)return new Uint8Array(Object.values(e));throw Error("getNearUint8ArrayFromBytes: Unexpected result type from bytes array")}(e)));return ea.tw.encode(t)}function rg(e){var t;let r=(t=eu.from(e,"base64"),new en(void 0).decode(t)).txn;if(!r)throw Error("Invalid signed transaction: missing 'txn' field");let n=new ei(void 0).encodeSharedRef(r),i=eu.from("TX"),a=rn(eu.concat([i,eu.from(n)]));return ea.RG.encode(a).replace(/=+$/,"")}function ry(e){let t=[],r=BigInt(e);for(;r>=BigInt(128);)t.push(Number(r&BigInt(127)|BigInt(128))),r>>=BigInt(7);return t.push(Number(r)),eu.from(t)}var rb=Object.defineProperty,rw=Object.defineProperties,rv=Object.getOwnPropertyDescriptors,rE=Object.getOwnPropertySymbols,rC=Object.prototype.hasOwnProperty,rA=Object.prototype.propertyIsEnumerable,rx=(e,t,r)=>t in e?rb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;let rI="did:pkh:",rS={eip155:"Ethereum",solana:"Solana",bip122:"Bitcoin"},rT=e=>e?.split(":"),rP=e=>{let t=e&&rT(e);if(t)return t[2]+":"+t[3]},rO=e=>{let t=e&&rT(e);if(t)return t.pop()};async function r_(e){let{cacao:t,projectId:r}=e,{s:n,p:i}=t,a=rN(i,i.iss),s=rO(i.iss);return await rp(s,a,n,rP(i.iss),r)}let rN=(e,t)=>{let r=(e=>{let t=e&&rT(e);if(t)return e.includes(rI)?t[2]:t[0]})(t);if(!r)throw Error("Invalid issuer: "+t);let n=`${e.domain} wants you to sign in with your ${(e=>e?rS[e]||e:"")(r)} account:`,i=rO(t);if(!e.aud&&!e.uri)throw Error("Either `aud` or `uri` is required to construct the message");let a=e.statement||void 0,s=`URI: ${e.aud||e.uri}`,o=`Version: ${e.version}`,l=`Chain ID: ${(e=>{let t=e&&rT(e);if(t)return e.includes(rI)?t[3]:t[1]})(t)}`,c=`Nonce: ${e.nonce}`,u=`Issued At: ${e.iat}`,d=e.exp?`Expiration Time: ${e.exp}`:void 0,h=e.nbf?`Not Before: ${e.nbf}`:void 0,p=e.requestId?`Request ID: ${e.requestId}`:void 0,f=e.resources?`Resources:${e.resources.map(e=>` 5728- ${e}`).join("")}`:void 0,m=rU(e.resources);return m&&(a=function(e="",t){rk(t);let r="I further authorize the stated URI to perform the following actions on my behalf: ";if(e.includes(r))return e;let n=[],i=0;Object.keys(t.att).forEach(e=>{let r=Object.keys(t.att[e]).map(e=>({ability:e.split("/")[0],action:e.split("/")[1]}));r.sort((e,t)=>e.action.localeCompare(t.action));let a={};r.forEach(e=>{a[e.ability]||(a[e.ability]=[]),a[e.ability].push(e.action)});let s=Object.keys(a).map(t=>(i++,`(${i}) '${t}': '${a[t].join("', '")}' for '${e}'.`));n.push(s.join(", ").replace(".,","."))});let a=n.join(" "),s=`${r}${a}`;return`${e?e+" ":""}${s}`}(a,rM(m))),[n,i,"",a,"",s,o,l,c,u,d,h,p,f].filter(e=>null!=e).join(` 5729`)};function rk(e){if(!e)throw Error("No recap provided, value is undefined");if(!e.att)throw Error("No `att` property found");let t=Object.keys(e.att);if(!(null!=t&&t.length))throw Error("No resources found in `att` property");t.forEach(t=>{let r=e.att[t];if(Array.isArray(r)||"object"!=typeof r)throw Error(`Resource must be an object: ${t}`);if(!Object.keys(r).length)throw Error(`Resource object is empty: ${t}`);
5729Object.keys(r).forEach(e=>{let t=r[e];if(!Array.isArray(t))throw Error(`Ability limits ${e} must be an array of objects, found: ${t}`);if(!t.length)throw Error(`Value of ${e} is empty array, must be an array with objects`);t.forEach(t=>{if("object"!=typeof t)throw Error(`Ability limits (${e}) must be an array of objects, found: ${t}`)})})})}function rR(e){return rk(e),`urn:recap:${eu.from(JSON.stringify(e)).toString("base64").replace(/=/g,"")}`}function rM(e){var t;let r=(t=e.replace("urn:recap:",""),JSON.parse(eu.from(t,"base64").toString("utf-8")));return rk(r),r}function rB(e){var t;let r=rM(e);rk(r);let n=null==(t=r.att)?void 0:t.eip155;return n?Object.keys(n).map(e=>e.split("/")[1]):[]}function rj(e){let t=rM(e);rk(t);let r=[];return Object.values(t.att).forEach(e=>{Object.values(e).forEach(e=>{var t;null!=(t=e?.[0])&&t.chains&&r.push(e[0].chains)})}),[...new Set(r.flat())]}function rU(e){if(!e)return;let t=e?.[e.length-1];return t&&t.includes("urn:recap:")?t:void 0}function r$(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function rL(e){if("boolean"!=typeof e)throw Error(`boolean expected, not ${e}`)}function rD(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function rF(e,...t){if(!r$(e))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function rH(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function rz(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function rW(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}let rq=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0];function rV(e){if("string"==typeof e)e=function(e){if("string"!=typeof e)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}(e);else if(r$(e))e=rZ(e);else throw Error("Uint8Array expected, got "+typeof e);return e}function rG(e,t,r=!0){if(void 0===t)return new Uint8Array(e);if(t.length!==e)throw Error("invalid output length, expected "+e+", got: "+t.length);if(r&&t.byteOffset%4!=0)throw Error("invalid output, must be aligned");return t}function rK(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),a=BigInt(0xffffffff),s=Number(r>>i&a),o=Number(r&a),l=4*!!n,c=4*!n;e.setUint32(t+l,s,n),e.setUint32(t+c,o,n)}function rZ(e){return Uint8Array.from(e)}let rJ=e=>Uint8Array.from(e.split("").map(e=>e.charCodeAt(0))),rY=rJ("expand 16-byte k"),rQ=rJ("expand 32-byte k"),rX=rz(rY),r0=rz(rQ);function r1(e,t){return e<<t|e>>>32-t}function r2(e){return e.byteOffset%4==0}let r5=0x100000000-1,r6=new Uint32Array,r3=(e,t)=>255&e[t++]|(255&e[t++])<<8;class r4{constructor(e){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,rF(e=rV(e),32);let t=r3(e,0),r=r3(e,2),n=r3(e,4),i=r3(e,6),a=r3(e,8),s=r3(e,10),o=r3(e,12),l=r3(e,14);this.r[0]=8191&t,this.r[1]=(t>>>13|r<<3)&8191,this.r[2]=(r>>>10|n<<6)&7939,this.r[3]=(n>>>7|i<<9)&8191,this.r[4]=(i>>>4|a<<12)&255,this.r[5]=a>>>1&8190,this.r[6]=(a>>>14|s<<2)&8191,this.r[7]=(s>>>11|o<<5)&8065,this.r[8]=(o>>>8|l<<8)&8191,this.r[9]=l>>>5&127;for(let t=0;t<8;t++)this.pad[t]=r3(e,16+2*t)}process(e,t,r=!1){let{h:n,r:i}=this,a=i[0],s=i[1],o=i[2],l=i[3],c=i[4],u=i[5],d=i[6],h=i[7],p=i[8],f=i[9],m=r3(e,t+0),g=r3(e,t+2),y=r3(e,t+4),b=r3(e,t+6),w=r3(e,t+8),v=r3(e,t+10),E=r3(e,t+12),C=r3(e,t+14),A=n[0]+(8191&m),x=n[1]+((m>>>13|g<<3)&8191),I=n[2]+((g>>>10|y<<6)&8191),S=n[3]+((y>>>7|b<<9)&8191),T=n[4]+((b>>>4|w<<12)&8191),P=n[5]+(w>>>1&8191),O=n[6]+((w>>>14|v<<2)&8191),_=n[7]+((v>>>11|E<<5)&8191),N=n[8]+((E>>>8|C<<8)&8191),k=n[9]+(C>>>5|2048*!r),R=0,M=0+A*a+5*f*x+5*p*I+5*h*S+5*d*T;R=M>>>13,M&=8191,M+=5*u*P+5*c*O+5*l*_+5*o*N+5*s*k,R+=M>>>13,M&=8191;let B=R+A*s+x*a+5*f*I+5*p*S+5*h*T;R=B>>>13,B&=8191,B+=5*d*P+5*u*O+5*c*_+5*l*N+5*o*k,R+=B>>>13,B&=8191;let j=R+A*o+x*s+I*a+5*f*S+5*p*T;R=j>>>13,j&=8191,j+=5*h*P+5*d*O+5*u*_+5*c*N+5*l*k,R+=j>>>13,j&=8191;let U=R+A*l+x*o+I*s+S*a+5*f*T;R=U>>>13,U&=8191,U+=5*p*P+5*h*O+5*d*_+5*u*N+5*c*k,R+=U>>>13,U&=8191;let $=R+A*c+x*l+I*o+S*s+T*a;R=$>>>13,$&=8191,$+=5*f*P+5*p*O+5*h*_+5*d*N+5*u*k,R+=$>>>13,$&=8191;let L=R+A*u+x*c+I*l+S*o+T*s;R=L>>>13,L&=8191,L+=P*a+5*f*O+5*p*_+5*h*N+5*d*k,R+=L>>>13,L&=8191;let D=R+A*d+x*u+I*c+S*l+T*o;R=D>>>13,D&=8191,D+=P*s+O*a+5*f*_+5*p*N+5*h*k,R+=D>>>13,D&=8191;let F=R+A*h+x*d+I*u+S*c+T*l;R=F>>>
572913,F&=8191,F+=P*o+O*s+_*a+5*f*N+5*p*k,R+=F>>>13,F&=8191;let H=R+A*p+x*h+I*d+S*u+T*c;R=H>>>13,H&=8191,H+=P*l+O*o+_*s+N*a+5*f*k,R+=H>>>13,H&=8191;let z=R+A*f+x*p+I*h+S*d+T*u;R=z>>>13,z&=8191,z+=P*c+O*l+_*o+N*s+k*a,R+=z>>>13,z&=8191,M=8191&(R=(R=(R<<2)+R|0)+M|0),R>>>=13,B+=R,n[0]=M,n[1]=B,n[2]=j,n[3]=U,n[4]=$,n[5]=L,n[6]=D,n[7]=F,n[8]=H,n[9]=z}finalize(){let{h:e,pad:t}=this,r=new Uint16Array(10),n=e[1]>>>13;e[1]&=8191;for(let t=2;t<10;t++)e[t]+=n,n=e[t]>>>13,e[t]&=8191;e[0]+=5*n,n=e[0]>>>13,e[0]&=8191,e[1]+=n,n=e[1]>>>13,e[1]&=8191,e[2]+=n,r[0]=e[0]+5,n=r[0]>>>13,r[0]&=8191;for(let t=1;t<10;t++)r[t]=e[t]+n,n=r[t]>>>13,r[t]&=8191;r[9]-=8192;let i=(1^n)-1;for(let e=0;e<10;e++)r[e]&=i;i=~i;for(let t=0;t<10;t++)e[t]=e[t]&i|r[t];e[0]=(e[0]|e[1]<<13)&65535,e[1]=(e[1]>>>3|e[2]<<10)&65535,e[2]=(e[2]>>>6|e[3]<<7)&65535,e[3]=(e[3]>>>9|e[4]<<4)&65535,e[4]=(e[4]>>>12|e[5]<<1|e[6]<<14)&65535,e[5]=(e[6]>>>2|e[7]<<11)&65535,e[6]=(e[7]>>>5|e[8]<<8)&65535,e[7]=(e[8]>>>8|e[9]<<5)&65535;let a=e[0]+t[0];e[0]=65535&a;for(let r=1;r<8;r++)a=(e[r]+t[r]|0)+(a>>>16)|0,e[r]=65535&a;rW(r)}update(e){rH(this),rF(e=rV(e));let{buffer:t,blockLen:r}=this,n=e.length;for(let i=0;i<n;){let a=Math.min(r-this.pos,n-i);if(a===r){for(;r<=n-i;i+=r)this.process(e,i);continue}t.set(e.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===r&&(this.process(t,0,!1),this.pos=0)}return this}destroy(){rW(this.h,this.r,this.buffer,this.pad)}digestInto(e){rH(this),function(e,t){rF(e);let r=t.outputLen;if(e.length<r)throw Error("digestInto() expects output buffer of length at least "+r)}(e,this),this.finished=!0;let{buffer:t,h:r}=this,{pos:n}=this;if(n){for(t[n++]=1;n<16;n++)t[n]=0;this.process(t,0,!0)}this.finalize();let i=0;for(let t=0;t<8;t++)e[i++]=r[t]>>>0,e[i++]=r[t]>>>8;return e}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}}let r8=function(e){let t=(t,r)=>e(r).update(rV(t)).digest(),r=e(new Uint8Array(32));return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}(e=>new r4(e)),r9=function(e,t){let{allowShortKeys:r,extendNonceFn:n,counterLength:i,counterRight:a,rounds:s}=function(e,t){if(null==t||"object"!=typeof t)throw Error("options must be defined");return Object.assign(e,t)}({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if("function"!=typeof e)throw Error("core must be a function");return rD(i),rD(s),rL(a),rL(r),(t,o,l,c,u=0)=>{rF(t),rF(o),rF(l);let d=l.length;if(void 0===c&&(c=new Uint8Array(d)),rF(c),rD(u),u<0||u>=r5)throw Error("arx: counter overflow");if(c.length<d)throw Error(`arx: output (${c.length}) is shorter than data (${d})`);let h=[],p=t.length,f,m;if(32===p)h.push(f=rZ(t)),m=r0;else if(16===p&&r)(f=new Uint8Array(32)).set(t),f.set(t,16),m=rX,h.push(f);else throw Error(`arx: invalid 32-byte key, got length=${p}`);r2(o)||h.push(o=rZ(o));let g=rz(f);if(n){if(24!==o.length)throw Error("arx: extended nonce must be 24 bytes");n(m,g,rz(o.subarray(0,16)),g),o=o.subarray(16)}let y=16-i;if(y!==o.length)throw Error(`arx: nonce must be ${y} or 16 bytes`);if(12!==y){let e=new Uint8Array(12);e.set(o,a?0:12-o.length),o=e,h.push(o)}return function(e,t,r,n,i,a,s,o){let l=i.length,c=new Uint8Array(64),u=rz(c),d=r2(i)&&r2(a),h=d?rz(i):r6,p=d?rz(a):r6;for(let f=0;f<l;s++){if(e(t,r,n,u,s,o),s>=r5)throw Error("arx: counter overflow");let m=Math.min(64,l-f);if(d&&64===m){let e=f/4;if(f%4!=0)throw Error("arx: invalid block position");for(let t=0,r;t<16;t++)p[r=e+t]=h[r]^u[t];f+=64;continue}for(let e=0,t;e<m;e++)a[t=f+e]=i[t]^c[e];f+=m}}
5729(e,m,g,rz(o),l,c,u,s),rW(...h),c}}(function(e,t,r,n,i,a=20){let s=e[0],o=e[1],l=e[2],c=e[3],u=t[0],d=t[1],h=t[2],p=t[3],f=t[4],m=t[5],g=t[6],y=t[7],b=r[0],w=r[1],v=r[2],E=s,C=o,A=l,x=c,I=u,S=d,T=h,P=p,O=f,_=m,N=g,k=y,R=i,M=b,B=w,j=v;for(let e=0;e<a;e+=2)O=O+(R=r1(R^(E=E+I|0),16))|0,E=E+(I=r1(I^O,12))|0,O=O+(R=r1(R^E,8))|0,I=r1(I^O,7),_=_+(M=r1(M^(C=C+S|0),16))|0,C=C+(S=r1(S^_,12))|0,_=_+(M=r1(M^C,8))|0,S=r1(S^_,7),N=N+(B=r1(B^(A=A+T|0),16))|0,A=A+(T=r1(T^N,12))|0,N=N+(B=r1(B^A,8))|0,T=r1(T^N,7),k=k+(j=r1(j^(x=x+P|0),16))|0,x=x+(P=r1(P^k,12))|0,k=k+(j=r1(j^x,8))|0,P=r1(P^k,7),N=N+(j=r1(j^(E=E+S|0),16))|0,E=E+(S=r1(S^N,12))|0,N=N+(j=r1(j^E,8))|0,S=r1(S^N,7),k=k+(R=r1(R^(C=C+T|0),16))|0,C=C+(T=r1(T^k,12))|0,k=k+(R=r1(R^C,8))|0,T=r1(T^k,7),O=O+(M=r1(M^(A=A+P|0),16))|0,A=A+(P=r1(P^O,12))|0,O=O+(M=r1(M^A,8))|0,P=r1(P^O,7),_=_+(B=r1(B^(x=x+I|0),16))|0,x=x+(I=r1(I^_,12))|0,_=_+(B=r1(B^x,8))|0,I=r1(I^_,7);let U=0;n[U++]=s+E|0,n[U++]=o+C|0,n[U++]=l+A|0,n[U++]=c+x|0,n[U++]=u+I|0,n[U++]=d+S|0,n[U++]=h+T|0,n[U++]=p+P|0,n[U++]=f+O|0,n[U++]=m+_|0,n[U++]=g+N|0,n[U++]=y+k|0,n[U++]=i+R|0,n[U++]=b+M|0,n[U++]=w+B|0,n[U++]=v+j|0},{counterRight:!1,counterLength:4,allowShortKeys:!1}),r7=new Uint8Array(16),ne=(e,t)=>{e.update(t);let r=t.length%16;r&&e.update(r7.subarray(r))},nt=new Uint8Array(32);function nr(e,t,r,n,i){let a=e(t,r,nt),s=r8.create(a);i&&ne(s,i),ne(s,n);let o=function(e,t,r){rL(r);let n=new Uint8Array(16),i=new DataView(n.buffer,n.byteOffset,n.byteLength);return rK(i,0,BigInt(t),r),rK(i,8,BigInt(e),r),n}(n.length,i?i.length:0,!0);s.update(o);let l=s.digest();return rW(a,o),l}let nn=((e,t)=>{function r(n,...i){if(rF(n),!rq)throw Error("Non little-endian hardware is not yet supported");if(void 0!==e.nonceLength){let t=i[0];if(!t)throw Error("nonce / iv required");e.varSizeNonce?rF(t):rF(t,e.nonceLength)}let a=e.tagLength;a&&void 0!==i[1]&&rF(i[1]);let s=t(n,...i),o=(e,t)=>{if(void 0!==t){if(2!==e)throw Error("cipher output not supported");rF(t)}},l=!1;return{encrypt(e,t){if(l)throw Error("cannot encrypt() twice with same key + nonce");return l=!0,rF(e),o(s.encrypt.length,t),s.encrypt(e,t)},decrypt(e,t){if(rF(e),a&&e.length<a)throw Error("invalid ciphertext length: smaller than tagLength="+a);return o(s.decrypt.length,t),s.decrypt(e,t)}}}return Object.assign(r,e),r})({blockSize:64,nonceLength:12,tagLength:16},(e=>(t,r,n)=>({encrypt(i,a){let s=i.length;(a=rG(s+16,a,!1)).set(i);let o=a.subarray(0,-16);e(t,r,o,o,1);let l=nr(e,t,r,o,n);return a.set(l,s),rW(l),a},decrypt(i,a){a=rG(i.length-16,a,!1);let s=i.subarray(0,-16),o=i.subarray(-16),l=nr(e,t,r,s,n);if(!function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r}(o,l))throw Error("invalid tag");return a.set(i.subarray(0,-16)),e(t,r,a,a,1),rW(l),a}}))(r9));class ni extends tO{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,tc(e);let r=tT(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),tp(i)}update(e){return tu(this),this.iHash.update(e),this}digestInto(e){tu(this),tl(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:n,destroyed:i,blockLen:a,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=a,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}let na=(e,t,r)=>new ni(e,t).update(r).digest();na.create=(e,t)=>new ni(e,t);let ns=Uint8Array.from([0]),no=Uint8Array.of(),nl=BigInt(0),nc=BigInt(1);function nu(e,t=""){if("boolean"!=typeof e)throw Error((t&&`"${t}"`)+"expected boolean, got type="+typeof e);return e}
vendor: 4,577 bytes, line 5729
5729function nd(e,t,r=""){let n=ts(e),i=e?.length,a=void 0!==t;if(!n||a&&i!==t)throw Error((r&&`"${r}" `)+"expected Uint8Array"+(a?` of length ${t}`:"")+", got "+(n?`length=${i}`:`type=${typeof e}`));return e}function nh(e){let t=e.toString(16);return 1&t.length?"0"+t:t}function np(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return""===e?nl:BigInt("0x"+e)}function nf(e){return tl(e),np(tC(Uint8Array.from(e).reverse()))}function nm(e,t){return tI(e.toString(16).padStart(2*t,"0"))}function ng(e,t){return nm(e,t).reverse()}function ny(e,t,r){let n;if("string"==typeof t)try{n=tI(t)}catch(t){throw Error(e+" must be hex string or Uint8Array, cause: "+t)}else if(ts(t))n=Uint8Array.from(t);else throw Error(e+" must be hex string or Uint8Array");let i=n.length;if("number"==typeof r&&i!==r)throw Error(e+" of length "+r+" expected, got "+i);return n}let nb=e=>"bigint"==typeof e&&nl<=e;function nw(e,t,r,n){if(!(nb(t)&&nb(r)&&nb(n))||!(r<=t)||!(t<n))throw Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)}function nv(e){let t;for(t=0;e>nl;e>>=nc,t+=1);return t}let nE=e=>(nc<<BigInt(e))-nc;function nC(e,t,r={}){if(!e||"object"!=typeof e)throw Error("expected valid options object");function n(t,r,n){let i=e[t];if(n&&void 0===i)return;let a=typeof i;if(a!==r||null===i)throw Error(`param "${t}" is invalid: expected ${r}, got ${a}`)}Object.entries(t).forEach(([e,t])=>n(e,t,!1)),Object.entries(r).forEach(([e,t])=>n(e,t,!0))}function nA(e){let t=new WeakMap;return(r,...n)=>{let i=t.get(r);if(void 0!==i)return i;let a=e(r,...n);return t.set(r,a),a}}let nx=BigInt(0),nI=BigInt(1),nS=BigInt(2),nT=BigInt(3),nP=BigInt(4),nO=BigInt(5),n_=BigInt(7),nN=BigInt(8),nk=BigInt(9),nR=BigInt(16);function nM(e,t){let r=e%t;return r>=nx?r:t+r}function nB(e,t,r){let n=e;for(;t-- >nx;)n*=n,n%=r;return n}function nj(e,t){if(e===nx)throw Error("invert: expected non-zero number");if(t<=nx)throw Error("invert: expected positive modulus, got "+t);let r=nM(e,t),n=t,i=nx,a=nI;for(;r!==nx;){let e=n/r,t=n%r,s=i-a*e;n=r,r=t,i=a,a=s}if(n!==nI)throw Error("invert: does not exist");return nM(i,t)}function nU(e,t,r){if(!e.eql(e.sqr(t),r))throw Error("Cannot find square root")}function n$(e,t){let r=(e.ORDER+nI)/nP,n=e.pow(t,r);return nU(e,n,t),n}function nL(e,t){let r=(e.ORDER-nO)/nN,n=e.mul(t,nS),i=e.pow(n,r),a=e.mul(t,i),s=e.mul(e.mul(a,nS),i),o=e.mul(a,e.sub(s,e.ONE));return nU(e,o,t),o}function nD(e){if(e<nT)throw Error("sqrt is not defined for small field");let t=e-nI,r=0;for(;t%nS===nx;)t/=nS,r++;let n=nS,i=nq(e);for(;1===nz(i,n);)if(n++>1e3)throw Error("Cannot find square root: probably non-prime P");if(1===r)return n$;let a=i.pow(n,t),s=(t+nI)/nS;return function(e,n){if(e.is0(n))return n;if(1!==nz(e,n))throw Error("Cannot find square root");let i=r,o=e.mul(e.ONE,a),l=e.pow(n,t),c=e.pow(n,s);for(;!e.eql(l,e.ONE);){if(e.is0(l))return e.ZERO;let t=1,r=e.sqr(l);for(;!e.eql(r,e.ONE);)if(t++,r=e.sqr(r),t===i)throw Error("Cannot find square root");let n=nI<<BigInt(i-t-1),a=e.pow(o,n);i=t,o=e.sqr(a),l=e.mul(l,o),c=e.mul(c,a)}return c}}let nF=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function nH(e,t,r=!1){let n=Array(t.length).fill(r?e.ZERO:void 0),i=t.reduce((t,r,i)=>e.is0(r)?t:(n[i]=t,e.mul(t,r)),e.ONE),a=e.inv(i);return t.reduceRight((t,r,i)=>e.is0(r)?t:(n[i]=e.mul(t,n[i]),e.mul(t,r)),a),n}function nz(e,t){let r=(e.ORDER-nI)/nS,n=e.pow(t,r),i=e.eql(n,e.ONE),a=e.eql(n,e.ZERO),s=e.eql(n,e.neg(e.ONE));if(!i&&!a&&!s)throw Error("invalid Legendre symbol result");return i?1:a?0:-1}function nW(e,t){void 0!==t&&to(t);let r=void 0!==t?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function nq(e,t,r=!1,n={}){let i;if(e<=nx)throw Error("invalid field: expected ORDER > 0, got "+e);let a,s,o=!1,l;if("object"==typeof t&&null!=t){if(n.sqrt||r)throw Error("cannot specify opts in two arguments");t.BITS&&(a=t.BITS),t.sqrt&&(s=t.sqrt),"boolean"==typeof t.isLE&&(r=t.isLE),"boolean"==typeof t.modFromBytes&&(o=t.modFromBytes),l=t.allowedLengths}else"number"==typeof t&&(a=t),n.sqrt&&(s=n.sqrt);let{nBitLength:c,nByteLength:u}=nW(e,a);if(u>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let d=Object.freeze({ORDER:e,isLE:r,BITS:c,BYTES:u,MASK:nE(c),ZERO:nx,ONE:nI,allowedLengths:l,create:t=>nM(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return nx<=t&&t<e},is0:e=>e===nx,isValidNot0:e=>!d.is0(e)&&d.isValid(e),isOdd:e=>(e&nI)===nI,neg:t=>nM(-t,e),eql:(e,t)=>
5729e===t,sqr:t=>nM(t*t,e),add:(t,r)=>nM(t+r,e),sub:(t,r)=>nM(t-r,e),mul:(t,r)=>nM(t*r,e),pow:(e,t)=>(function(e,t,r){if(r<nx)throw Error("invalid exponent, negatives unsupported");if(r===nx)return e.ONE;if(r===nI)return t;let n=e.ONE,i=t;for(;r>nx;)r&nI&&(n=e.mul(n,i)),i=e.sqr(i),r>>=nI;return n})(d,e,t),div:(t,r)=>nM(t*nj(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>nj(t,e),sqrt:s||(t=>(i||(i=e%nP===nT?n$:e%nN===nO?nL:e%nR===nk?function(e){let t=nq(e),r=nD(e),n=r(t,t.neg(t.ONE)),i=r(t,n),a=r(t,t.neg(n)),s=(e+n_)/nR;return(e,t)=>{let r=e.pow(t,s),o=e.mul(r,n),l=e.mul(r,i),c=e.mul(r,a),u=e.eql(e.sqr(o),t),d=e.eql(e.sqr(l),t);r=e.cmov(r,o,u),o=e.cmov(c,l,d);let h=e.eql(e.sqr(o),t),p=e.cmov(r,o,h);return nU(e,p,t),p}}(e):nD(e)),i(d,t))),toBytes:e=>r?ng(e,u):nm(e,u),fromBytes:(t,n=!0)=>{if(l){if(!l.includes(t.length)||t.length>u)throw Error("Field.fromBytes: expected "+l+" bytes, got "+t.length);let e=new Uint8Array(u);e.set(t,r?0:e.length-t.length),t=e}if(t.length!==u)throw Error("Field.fromBytes: expected "+u+" bytes, got "+t.length);let i=r?nf(t):np(tC(t));if(o&&(i=nM(i,e)),!n&&!d.isValid(i))throw Error("invalid field element: outside of range 0..ORDER");return i},invertBatch:e=>nH(d,e),cmov:(e,t,r)=>r?t:e});return Object.freeze(d)}function nV(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function nG(e){let t=nV(e);return t+Math.ceil(t/2)}let nK=BigInt(0),nZ=BigInt(1);function nJ(e,t){let r=t.negate();return e?r:t}function nY(e,t){let r=nH(e.Fp,t.map(e=>e.Z));return t.map((t,n)=>e.fromAffine(t.toAffine(r[n])))}function nQ(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function nX(e,t){nQ(e,t);let r=Math.ceil(t/e)+1,n=2**(e-1),i=2**e;return{windows:r,windowSize:n,mask:nE(e),maxNumber:i,shiftBy:BigInt(e)}}function n0(e,t,r){let{windowSize:n,mask:i,maxNumber:a,shiftBy:s}=r,o=Number(e&i),l=e>>s;o>n&&(o-=a,l+=nZ);let c=t*n;return{nextN:l,offset:c+Math.abs(o)-1,isZero:0===o,isNeg:o<0,isNegF:t%2!=0,offsetF:c}}let n1=new WeakMap,n2=new WeakMap;function n5(e){return n2.get(e)||1}function n6(e){if(e!==nK)throw Error("invalid wNAF")}class n3{constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}_unsafeLadder(e,t,r=this.ZERO){let n=e;for(;t>nK;)t&nZ&&(r=r.add(n)),n=n.double(),t>>=nZ;return r}precomputeWindow(e,t){let{windows:r,windowSize:n}=nX(t,this.bits),i=[],a=e,s=a;for(let e=0;e<r;e++){s=a,i.push(s);for(let e=1;e<n;e++)s=s.add(a),i.push(s);a=s.double()}return i}wNAF(e,t,r){if(!this.Fn.isValid(r))throw Error("invalid scalar");let n=this.ZERO,i=this.BASE,a=nX(e,this.bits);for(let e=0;e<a.windows;e++){let{nextN:s,offset:o,isZero:l,isNeg:c,isNegF:u,offsetF:d}=n0(r,e,a);r=s,l?i=i.add(nJ(u,t[d])):n=n.add(nJ(c,t[o]))}return n6(r),{p:n,f:i}}wNAFUnsafe(e,t,r,n=this.ZERO){let i=nX(e,this.bits);for(let e=0;e<i.windows&&r!==nK;e++){let{nextN:a,offset:s,isZero:o,isNeg:l}=n0(r,e,i);if(r=a,!o){let e=t[s];n=n.add(l?e.negate():e)}}return n6(r),n}getPrecomputes(e,t,r){let n=n1.get(t);return n||(n=this.precomputeWindow(t,e),1!==e&&("function"==typeof r&&(n=r(n)),n1.set(t,n))),n}cached(e,t,r){let n=n5(e);return this.wNAF(n,this.getPrecomputes(n,e,r),t)}unsafe(e,t,r,n){let i=n5(e);return 1===i?this._unsafeLadder(e,t,n):this.wNAFUnsafe(i,this.getPrecomputes(i,e,r),t,n)}createCache(e,t){nQ(t,this.bits),n2.set(e,t),n1.delete(e)}hasCache(e){return 1!==n5(e)}}function n4(e,t,r){if(!t)return nq(e,{isLE:r});if(t.ORDER!==e)throw Error("Field.ORDER must match order: Fp == p, Fn == n");return nC(t,nF.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"})),t}BigInt(0),BigInt(1),BigInt(2),BigInt(8),tS("HashToScalar-");let n8=BigInt(0),n9=BigInt(1),n7=BigInt(2),ie=BigInt(1),it=BigInt(2),ir=BigInt(3),ii=BigInt(5),ia=BigInt(8),is=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed");function io(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}let il=nq({p:is,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:ia,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")}.p,{isLE:!0}),ic=(()=>{let e=il.ORDER;return function(e){let{P:t,type:r,adjustScalarBytes:n,powPminus2:i,randomBytes:a}
5729=(nC(e,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...e})),s="x25519"===r;if(!s&&"x448"!==r)throw Error("invalid type");let o=a||tN,l=s?255:448,c=s?32:56,u=BigInt(s?9:5),d=BigInt(s?121665:39081),h=s?n7**BigInt(254):n7**BigInt(447),p=h+(s?BigInt(8)*n7**BigInt(251)-n9:BigInt(4)*n7**BigInt(445)-n9)+n9,f=e=>nM(e,t),m=ng(f(u),c);function g(e,r){let a=function(e,r){nw("u",e,n8,t),nw("scalar",r,h,p);let n=n9,a=n8,s=e,o=n9,c=n8;for(let t=BigInt(l-1);t>=n8;t--){let i=r>>t&n9;c^=i,({x_2:n,x_3:s}=b(c,n,s)),({x_2:a,x_3:o}=b(c,a,o)),c=i;let l=n+a,u=f(l*l),h=n-a,p=f(h*h),m=u-p,g=s+o,y=f((s-o)*l),w=f(g*h),v=y+w,E=y-w;s=f(v*v),o=f(e*f(E*E)),n=f(u*p),a=f(m*(u+f(d*m)))}return{x_2:n,x_3:s}=b(c,n,s),{x_2:a,x_3:o}=b(c,a,o),f(n*i(a))}(function(e){let t=ny("u coordinate",e,c);return s&&(t[31]&=127),f(nf(t))}(r),nf(n(ny("scalar",e,c))));if(a===n8)throw Error("invalid private or public key received");return ng(f(a),c)}function y(e){return g(e,m)}function b(e,t,r){let n=f(e*(t-r));return{x_2:t=f(t-n),x_3:r=f(r+n)}}let w={secretKey:c,publicKey:c,seed:c},v=(e=o(c))=>(tl(e,w.seed),e);return{keygen:function(e){let t=v(e);return{secretKey:t,publicKey:y(t)}},getSharedSecret:(e,t)=>g(e,t),getPublicKey:e=>y(e),scalarMult:g,scalarMultBase:y,utils:{randomSecretKey:v,randomPrivateKey:v},GuBytes:m.slice(),lengths:w}}({P:e,type:"x25519",powPminus2:t=>{let{pow_p_5_8:r,b2:n}=function(e){let t=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),a=e*e%is*e%is,s=nB(a,it,is)*a%is,o=nB(s,ie,is)*e%is,l=nB(o,ii,is)*o%is,c=nB(l,t,is)*l%is,u=nB(c,r,is)*c%is,d=nB(u,n,is)*u%is,h=nB(d,i,is)*d%is,p=nB(h,i,is)*d%is,f=nB(p,t,is)*l%is;return{pow_p_5_8:nB(f,it,is)*e%is,b2:a}}(t);return nM(nB(r,ir,e)*n,e)},adjustScalarBytes:io})})(),iu=(e,t)=>(e+(e>=0?t:-t)/ib)/t;function id(e){if(!["compact","recovered","der"].includes(e))throw Error('Signature format must be "compact", "recovered", or "der"');return e}function ih(e,t){let r={};for(let n of Object.keys(t))r[n]=void 0===e[n]?t[n]:e[n];return nu(r.lowS,"lowS"),nu(r.prehash,"prehash"),void 0!==r.format&&id(r.format),r}class ip extends Error{constructor(e=""){super(e)}}let im={Err:ip,_tlv:{encode:(e,t)=>{let{Err:r}=im;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(1&t.length)throw new r("tlv.encode: unpadded data");let n=t.length/2,i=nh(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");let a=n>127?nh(i.length/2|128):"";return nh(e)+a+i+t},decode(e,t){let{Err:r}=im,n=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[n++]!==e)throw new r("tlv.decode: wrong tlv");let i=t[n++],a=0;if(128&i){let e=127&i;if(!e)throw new r("tlv.decode(long): indefinite length not supported");if(e>4)throw new r("tlv.decode(long): byte length is too big");let s=t.subarray(n,n+e);if(s.length!==e)throw new r("tlv.decode: length bytes not complete");if(0===s[0])throw new r("tlv.decode(long): zero leftmost byte");for(let e of s)a=a<<8|e;if(n+=e,a<128)throw new r("tlv.decode(long): not minimal encoding")}else a=i;let s=t.subarray(n,n+a);if(s.length!==a)throw new r("tlv.decode: wrong value length");return{v:s,l:t.subarray(n+a)}}},_int:{encode(e){let{Err:t}=im;if(e<ig)throw new t("integer: negative integers are not allowed");let r=nh(e);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=im;if(128&e[0])throw new t("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return np(tC(e))}},toSig(e){let{Err:t,_int:r,_tlv:n}=im,i=ny("signature",e),{v:a,l:s}=n.decode(48,i);if(s.length)throw new t("invalid signature: left bytes after parsing");let{v:o,l:l}=n.decode(2,a),{v:c,l:u}=n.decode(2,l);if(u.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(o),s:r.decode(c)}},hexFromSig(e){let{_tlv:t,_int:r}=im,n=t.encode(2,r.encode(e.r)),i=t.encode(2,r.encode(e.s));return t.encode(48,n+i)}},ig=BigInt(0),iy=BigInt(1),ib=BigInt(2),iw=BigInt(3),iv=BigInt(4);function iE(e,t){let r,{BYTES:n}=e;if("bigint"==typeof t)r=t;else{let i=ny("private key",t);try{r=e.fromBytes(i)}catch{throw Error(`invalid private key: expected ui8a of size ${n}, got ${typeof t}`)}}if(!e.isValidNot0(r))throw Error("invalid private key: out of range [1..N-1]");return r}function iC(e){return Uint8Array.of(e?2:3)}function iA(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function ix(e,t){let r=t=>(function(e){let{CURVE:t,curveOpts:r,hash:n,ecdsaOpts:i}=function(e){let{CURVE:t,curveOpts:r}=function(e){let t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},r=e.Fp,n=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(e=>Math.ceil(e/2)))):void 0,i={Fp:r,Fn:nq(t.n,{BITS:e.nBitLength,allowedLengths:n,modFromBytes:e.wrapPrivateKey}),allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes};return{CURVE:t,curveOpts:i}}(e),n={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:r,hash:e.hash,ecdsaOpts:n}}(e),a=function(e,t,r={}){tc(t),nC(r,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});let n=r.randomBytes||tN,i=r.hmac||((e,...r)=>na(t,e,tP(...r))),{Fp:a,Fn:s}=e,{ORDER:o,BITS:l}=s,{keygen:c,getPublicKey:u,getSharedSecret:d,utils:h,lengths:p}=function(e,t={}){let{Fn:r}=e,n=t.randomBytes||tN,i=Object.assign(iA(e.Fp,r),{seed:nG(r.ORDER)});function a(e){try{return!!iE(r,e)}catch{return!1}}function s(e=n(i.seed)){return function(e,t,r=!1){let n=e.length,i=nV(t),a=nG(t);if(n<16||n<a||n>1024)throw Error("expected "+a+"-1024 bytes of input, got "+n);let s=nM(r?nf(e):np(tC(e)),t-nI)+nI;return r?ng(s,i):nm(s,i)}(nd(e,i.seed,"seed"),r.ORDER)}function o(t,n=!0){return e.BASE.multiply(iE(r,t)).toBytes(n)}function l(t){if("bigint"==typeof t)return!1;if(t instanceof e)return!0;let{secretKey:n,publicKey:a,publicKeyUncompressed:s}=i;
5729if(r.allowedLengths||n===a)return;let o=ny("key",t).length;return o===a||o===s}return Object.freeze({getPublicKey:o,getSharedSecret:function(t,n,i=!0){if(!0===l(t))throw Error("first arg must be private key");if(!1===l(n))throw Error("second arg must be public key");let a=iE(r,t);return e.fromHex(n).multiply(a).toBytes(i)},keygen:function(e){let t=s(e);return{secretKey:t,publicKey:o(t)}},Point:e,utils:{isValidSecretKey:a,isValidPublicKey:function(t,r){let{publicKey:n,publicKeyUncompressed:a}=i;try{let i=t.length;return(!0!==r||i===n)&&(!1!==r||i===a)&&!!e.fromBytes(t)}catch{return!1}},randomSecretKey:s,isValidPrivateKey:a,randomPrivateKey:s,normPrivateKeyToScalar:e=>iE(r,e),precompute:(t=8,r=e.BASE)=>r.precompute(t,!1)},lengths:i})}(e,r),f={prehash:!1,lowS:"boolean"==typeof r.lowS&&r.lowS,format:void 0,extraEntropy:!1},m="compact";function g(e,t){if(!s.isValidNot0(t))throw Error(`invalid signature ${e}: out of range 1..Point.Fn.ORDER`);return t}class y{constructor(e,t,r){this.r=g("r",e),this.s=g("s",t),null!=r&&(this.recovery=r),Object.freeze(this)}static fromBytes(e,t=m){let r;if(!function(e,t){id(t);let r=p.signature;nd(e,"compact"===t?r:"recovered"===t?r+1:void 0,`${t} signature`)}(e,t),"der"===t){let{r:t,s:r}=im.toSig(nd(e));return new y(t,r)}"recovered"===t&&(r=e[0],t="compact",e=e.subarray(1));let n=s.BYTES,i=e.subarray(0,n),a=e.subarray(n,2*n);return new y(s.fromBytes(i),s.fromBytes(a),r)}static fromHex(e,t){return this.fromBytes(tI(e),t)}addRecoveryBit(e){return new y(this.r,this.s,e)}recoverPublicKey(t){let r=a.ORDER,{r:n,s:i,recovery:l}=this;if(null==l||![0,1,2,3].includes(l))throw Error("recovery id invalid");if(o*ib<r&&l>1)throw Error("recovery id is ambiguous for h>1 curve");let c=2===l||3===l?n+o:n;if(!a.isValid(c))throw Error("recovery id 2 or 3 invalid");let u=a.toBytes(c),d=e.fromBytes(tP(iC((1&l)==0),u)),h=s.inv(c),p=w(ny("msgHash",t)),f=s.create(-p*h),m=s.create(i*h),g=e.BASE.multiplyUnsafe(f).add(d.multiplyUnsafe(m));if(g.is0())throw Error("point at infinify");return g.assertValidity(),g}hasHighS(){return this.s>o>>iy}toBytes(e=m){if(id(e),"der"===e)return tI(im.hexFromSig(this));let t=s.toBytes(this.r),r=s.toBytes(this.s);if("recovered"===e){if(null==this.recovery)throw Error("recovery bit must be present");return tP(Uint8Array.of(this.recovery),t,r)}return tP(t,r)}toHex(e){return tC(this.toBytes(e))}assertValidity(){}static fromCompact(e){return y.fromBytes(ny("sig",e),"compact")}static fromDER(e){return y.fromBytes(ny("sig",e),"der")}normalizeS(){return this.hasHighS()?new y(this.r,s.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return tC(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return tC(this.toBytes("compact"))}}let b=r.bits2int||function(e){if(e.length>8192)throw Error("input is too large");let t=np(tC(e)),r=8*e.length-l;return r>0?t>>BigInt(r):t},w=r.bits2int_modN||function(e){return s.create(b(e))},v=nE(l);function E(e){return nw("num < 2^"+l,e,ig,v),s.toBytes(e)}function C(e,r){return nd(e,void 0,"message"),r?nd(t(e),void 0,"prehashed message"):e}return Object.freeze({keygen:c,getPublicKey:u,getSharedSecret:d,utils:h,lengths:p,Point:e,sign:function(r,a,l={}){let{seed:c,k2sig:u}=function(t,r,i){if(["recovered","canonical"].some(e=>e in i))throw Error("sign() legacy options not supported");let{lowS:a,prehash:l,extraEntropy:c}=ih(i,f),u=w(t=C(t,l)),d=iE(s,r),h=[E(d),E(u)];if(null!=c&&!1!==c){let e=!0===c?n(p.secretKey):c;h.push(ny("extraEntropy",e))}return{seed:tP(...h),k2sig:function(t){let r=b(t);if(!s.isValidNot0(r))return;let n=s.inv(r),i=e.BASE.multiply(r).toAffine(),l=s.create(i.x);if(l===ig)return;let c=s.create(n*s.create(u+l*d));if(c===ig)return;let h=2*(i.x!==l)|Number(i.y&iy),p=c;return a&&c>o>>iy&&(p=s.neg(c),h^=1),new y(l,p,h)}}}(r=ny("message",r),a,l);return(function(e,t,r){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=e=>new Uint8Array(e),i=e=>Uint8Array.of(e),a=n(e),s=n(e),o=0,l=()=>{a.fill(1),s.fill(0),o=0},c=(...e)=>r(s,a,...e),u=(e=n(0))=>{s=c(i(0),e),a=c(),0!==e.length&&(s=c(i(1),e),a=c())},d=()=>
vendor: 4,158 bytes, line 5729
5729{if(o++>=1e3)throw Error("drbg: tried 1000 values");let e=0,r=[];for(;e<t;){let t=(a=c()).slice();r.push(t),e+=a.length}return tP(...r)};return(e,t)=>{let r;for(l(),u(e);!(r=t(d()));)u();return l(),r}})(t.outputLen,s.BYTES,i)(c,u)},verify:function(t,r,n,i={}){let{lowS:a,prehash:o,format:l}=ih(i,f);if(n=ny("publicKey",n),r=C(ny("message",r),o),"strict"in i)throw Error("options.strict was renamed to lowS");let c=void 0===l?function(e){let t,r="string"==typeof e||ts(e),n=!r&&null!==e&&"object"==typeof e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!r&&!n)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(n)t=new y(e.r,e.s);else if(r){try{t=y.fromBytes(ny("sig",e),"der")}catch(e){if(!(e instanceof im.Err))throw e}if(!t)try{t=y.fromBytes(ny("sig",e),"compact")}catch{return!1}}return t||!1}(t):y.fromBytes(ny("sig",t),l);if(!1===c)return!1;try{let t=e.fromBytes(n);if(a&&c.hasHighS())return!1;let{r:i,s:o}=c,l=w(r),u=s.inv(o),d=s.create(l*u),h=s.create(i*u),p=e.BASE.multiplyUnsafe(d).add(t.multiplyUnsafe(h));return!p.is0()&&s.create(p.x)===i}catch{return!1}},recoverPublicKey:function(e,t,r={}){let{prehash:n}=ih(r,f);return t=C(t,n),y.fromBytes(e,"recovered").recoverPublicKey(t).toBytes()},Signature:y,hash:t})}(function(e,t={}){let r=function(e,t,r={},n){if(void 0===n&&(n="edwards"===e),!t||"object"!=typeof t)throw Error(`expected valid ${e} CURVE object`);for(let e of["p","n","h"]){let r=t[e];if(!("bigint"==typeof r&&r>nK))throw Error(`CURVE.${e} must be positive bigint`)}let i=n4(t.p,r.Fp,n),a=n4(t.n,r.Fn,n);for(let r of["Gx","Gy","a","weierstrass"===e?"b":"d"])if(!i.isValid(t[r]))throw Error(`CURVE.${r} must be valid field element of CURVE.Fp`);return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:i,Fn:a}}("weierstrass",e,t),{Fp:n,Fn:i}=r,a=r.CURVE,{h:s,n:o}=a;nC(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});let{endo:l}=t;if(l&&(!n.is0(a.a)||"bigint"!=typeof l.beta||!Array.isArray(l.basises)))throw Error('invalid endo: expected "beta": bigint and "basises": array');let c=iA(n,i);function u(){if(!n.isOdd)throw Error("compression is not supported: Field does not have .isOdd()")}let d=t.toBytes||function(e,t,r){let{x:i,y:a}=t.toAffine(),s=n.toBytes(i);return(nu(r,"isCompressed"),r)?(u(),tP(iC(!n.isOdd(a)),s)):tP(Uint8Array.of(4),s,n.toBytes(a))},h=t.fromBytes||function(e){nd(e,void 0,"Point");let{publicKey:t,publicKeyUncompressed:r}=c,i=e.length,a=e[0],s=e.subarray(1);if(i===t&&(2===a||3===a)){let e,t=n.fromBytes(s);if(!n.isValid(t))throw Error("bad point: is not on curve, wrong x");let r=p(t);try{e=n.sqrt(r)}catch(e){throw Error("bad point: is not on curve, sqrt error"+(e instanceof Error?": "+e.message:""))}return u(),(1&a)==1!==n.isOdd(e)&&(e=n.neg(e)),{x:t,y:e}}if(i===r&&4===a){let e=n.BYTES,t=n.fromBytes(s.subarray(0,e)),r=n.fromBytes(s.subarray(e,2*e));if(!f(t,r))throw Error("bad point: is not on curve");return{x:t,y:r}}throw Error(`bad point: got length ${i}, expected compressed=${t} or uncompressed=${r}`)};function p(e){let t=n.sqr(e),r=n.mul(t,e);return n.add(n.add(r,n.mul(e,a.a)),a.b)}function f(e,t){let r=n.sqr(t),i=p(e);return n.eql(r,i)}if(!f(a.Gx,a.Gy))throw Error("bad curve params: generator point");let m=n.mul(n.pow(a.a,iw),iv),g=n.mul(n.sqr(a.b),BigInt(27));if(n.is0(n.add(m,g)))throw Error("bad curve params: a or b");function y(e,t,r=!1){if(!n.isValid(t)||r&&n.is0(t))throw Error(`bad point coordinate ${e}`);return t}function b(e){if(!(e instanceof A))throw Error("ProjectivePoint expected")}function w(e){if(!l||!l.basises)throw Error("no endo");return function(e,t,r){let[[n,i],[a,s]]=t,o=iu(s*e,r),l=iu(-i*e,r),c=e-o*n-l*a,u=-o*i-l*s,d=c<ig,h=u<ig;d&&(c=-c),h&&(u=-u);let p=nE(Math.ceil(nv(r)/2))+iy;if(c<ig||c>=p||u<ig||u>=p)throw Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:d,k1:c,k2neg:h,k2:u}}(e,l.basises,i.ORDER)}let v=nA((e,t)=>{let{X:r,Y:i,Z:a}=e;if(n.eql(a,n.ONE))return{x:r,y:i};let s=e.is0();null==t&&(t=s?n.ONE:n.inv(a));let o=n.mul(r,t),l=n.mul(i,t),c=n.mul(a,t);if(s)return{x:n.ZERO,y:n.ZERO};
vendor: 4,077 bytes, line 5729
5729if(!n.eql(c,n.ONE))throw Error("invZ was invalid");return{x:o,y:l}}),E=nA(e=>{if(e.is0()){if(t.allowInfinityPoint&&!n.is0(e.Y))return;throw Error("bad point: ZERO")}let{x:r,y:i}=e.toAffine();if(!n.isValid(r)||!n.isValid(i))throw Error("bad point: x or y not field elements");if(!f(r,i))throw Error("bad point: equation left != right");if(!e.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});function C(e,t,r,i,a){return r=new A(n.mul(r.X,e),r.Y,r.Z),t=nJ(i,t),r=nJ(a,r),t.add(r)}class A{constructor(e,t,r){this.X=y("x",e),this.Y=y("y",t,!0),this.Z=y("z",r),Object.freeze(this)}static CURVE(){return a}static fromAffine(e){let{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw Error("invalid affine point");if(e instanceof A)throw Error("projective point not allowed");return n.is0(t)&&n.is0(r)?A.ZERO:new A(t,r,n.ONE)}static fromBytes(e){let t=A.fromAffine(h(nd(e,void 0,"point")));return t.assertValidity(),t}static fromHex(e){return A.fromBytes(ny("pointHex",e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return I.createCache(this,e),t||this.multiply(iw),this}assertValidity(){E(this)}hasEvenY(){let{y:e}=this.toAffine();if(!n.isOdd)throw Error("Field doesn't support isOdd");return!n.isOdd(e)}equals(e){b(e);let{X:t,Y:r,Z:i}=this,{X:a,Y:s,Z:o}=e,l=n.eql(n.mul(t,o),n.mul(a,i)),c=n.eql(n.mul(r,o),n.mul(s,i));return l&&c}negate(){return new A(this.X,n.neg(this.Y),this.Z)}double(){let{a:e,b:t}=a,r=n.mul(t,iw),{X:i,Y:s,Z:o}=this,l=n.ZERO,c=n.ZERO,u=n.ZERO,d=n.mul(i,i),h=n.mul(s,s),p=n.mul(o,o),f=n.mul(i,s);return f=n.add(f,f),u=n.mul(i,o),u=n.add(u,u),l=n.mul(e,u),c=n.mul(r,p),c=n.add(l,c),l=n.sub(h,c),c=n.add(h,c),c=n.mul(l,c),l=n.mul(f,l),u=n.mul(r,u),p=n.mul(e,p),f=n.sub(d,p),f=n.mul(e,f),f=n.add(f,u),u=n.add(d,d),d=n.add(u,d),d=n.add(d,p),d=n.mul(d,f),c=n.add(c,d),p=n.mul(s,o),p=n.add(p,p),d=n.mul(p,f),l=n.sub(l,d),u=n.mul(p,h),u=n.add(u,u),new A(l,c,u=n.add(u,u))}add(e){b(e);let{X:t,Y:r,Z:i}=this,{X:s,Y:o,Z:l}=e,c=n.ZERO,u=n.ZERO,d=n.ZERO,h=a.a,p=n.mul(a.b,iw),f=n.mul(t,s),m=n.mul(r,o),g=n.mul(i,l),y=n.add(t,r),w=n.add(s,o);y=n.mul(y,w),w=n.add(f,m),y=n.sub(y,w),w=n.add(t,i);let v=n.add(s,l);return w=n.mul(w,v),v=n.add(f,g),w=n.sub(w,v),v=n.add(r,i),c=n.add(o,l),v=n.mul(v,c),c=n.add(m,g),v=n.sub(v,c),d=n.mul(h,w),c=n.mul(p,g),d=n.add(c,d),c=n.sub(m,d),d=n.add(m,d),u=n.mul(c,d),m=n.add(f,f),m=n.add(m,f),g=n.mul(h,g),w=n.mul(p,w),m=n.add(m,g),g=n.sub(f,g),g=n.mul(h,g),w=n.add(w,g),f=n.mul(m,w),u=n.add(u,f),f=n.mul(v,w),c=n.mul(y,c),c=n.sub(c,f),f=n.mul(y,m),d=n.mul(v,d),new A(c,u,d=n.add(d,f))}subtract(e){return this.add(e.negate())}is0(){return this.equals(A.ZERO)}multiply(e){let r,n,{endo:a}=t;if(!i.isValidNot0(e))throw Error("invalid scalar: out of range");let s=e=>I.cached(this,e,e=>nY(A,e));if(a){let{k1neg:t,k1:i,k2neg:o,k2:l}=w(e),{p:c,f:u}=s(i),{p:d,f:h}=s(l);n=u.add(h),r=C(a.beta,c,d,t,o)}else{let{p:t,f:i}=s(e);r=t,n=i}return nY(A,[r,n])[0]}multiplyUnsafe(e){let{endo:r}=t;if(!i.isValid(e))throw Error("invalid scalar: out of range");if(e===ig||this.is0())return A.ZERO;if(e===iy)return this;if(I.hasCache(this))return this.multiply(e);if(!r)return I.unsafe(this,e);{let{k1neg:t,k1:n,k2neg:i,k2:a}=w(e),{p1:s,p2:o}=function(e,t,r,n){let i=t,a=e.ZERO,s=e.ZERO;for(;r>nK||n>nK;)r&nZ&&(a=a.add(i)),n&nZ&&(s=s.add(i)),i=i.double(),r>>=nZ,n>>=nZ;return{p1:a,p2:s}}(A,this,n,a);return C(r.beta,s,o,t,i)}}multiplyAndAddUnsafe(e,t,r){let n=this.multiplyUnsafe(t).add(e.multiplyUnsafe(r));return n.is0()?void 0:n}toAffine(e){return v(this,e)}isTorsionFree(){let{isTorsionFree:e}=t;return s===iy||(e?e(A,this):I.unsafe(this,o).is0())}clearCofactor(){let{clearCofactor:e}=t;return s===iy?this:e?e(A,this):this.multiplyUnsafe(s)}isSmallOrder(){return this.multiplyUnsafe(s).is0()}toBytes(e=!0){return nu(e,"isCompressed"),this.assertValidity(),d(A,this,e)}toHex(e=!0){return tC(this.toBytes(e))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(e=!0){return this.toBytes(e)}
5729_setWindowSize(e){this.precompute(e)}static normalizeZ(e){return nY(A,e)}static msm(e,t){return function(e,t,r,n){(function(e,t){if(!Array.isArray(e))throw Error("array expected");e.forEach((e,r)=>{if(!(e instanceof t))throw Error("invalid point at index "+r)})})(r,e),function(e,t){if(!Array.isArray(e))throw Error("array of scalars expected");e.forEach((e,r)=>{if(!t.isValid(e))throw Error("invalid scalar at index "+r)})}(n,t);let i=r.length,a=n.length;if(i!==a)throw Error("arrays of points and scalars must have equal length");let s=e.ZERO,o=nv(BigInt(i)),l=1;o>12?l=o-3:o>4?l=o-2:o>0&&(l=2);let c=nE(l),u=Array(Number(c)+1).fill(s),d=Math.floor((t.BITS-1)/l)*l,h=s;for(let e=d;e>=0;e-=l){u.fill(s);for(let t=0;t<a;t++){let i=Number(n[t]>>BigInt(e)&c);u[i]=u[i].add(r[t])}let t=s;for(let e=u.length-1,r=s;e>0;e--)r=r.add(u[e]),t=t.add(r);if(h=h.add(t),0!==e)for(let e=0;e<l;e++)h=h.double()}return h}(A,i,e,t)}static fromPrivateKey(e){return A.BASE.multiply(iE(i,e))}}A.BASE=new A(a.Gx,a.Gy,n.ONE),A.ZERO=new A(n.ZERO,n.ONE,n.ZERO),A.Fp=n,A.Fn=i;let x=i.BITS,I=new n3(A,t.endo?Math.ceil(x/2):x);return A.BASE.precompute(8),A}(t,r),n,i),s=a.Point;return Object.assign({},a,{ProjectivePoint:s,CURVE:Object.assign({},e,nW(s.Fn.ORDER,s.Fn.BITS))})})({...e,hash:t});return{...r(t),create:r}}let iI={p:BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff"),n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),h:BigInt(1),a:BigInt("0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc"),b:BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5")},iS={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff"),n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),h:BigInt(1),a:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc"),b:BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f")},iT={p:BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),h:BigInt(1),a:BigInt("0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc"),b:BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650")},iP=nq(iI.p),iO=nq(iS.p),i_=nq(iT.p),iN=ix({...iI,Fp:iP,lowS:!1},re);ix({...iS,Fp:iO,lowS:!1},rr),ix({...iT,Fp:i_,lowS:!1,allowedPrivateKeyLengths:[130,131,132]},rt);let ik="base10",iR="base16",iM="base64pad",iB="base64url",ij="utf8";function iU(){let e=tN(32);return(0,es.dI)(e,iR)}function i$(e){let t=re((0,es.sH)(e,iR));return(0,es.dI)(t,iR)}function iL(e){let t=re((0,es.sH)(e,ij));return(0,es.dI)(t,iR)}function iD(e){return(0,es.sH)(`${e}`,ik)}function iF(e){return Number((0,es.dI)(e,ik))}function iH(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function iz(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-t.length%4)%4;return t+"=".repeat(r)}function iW(e){if(2===iF(e.type))return(0,es.dI)((0,es.xW)([e.type,e.sealed]),iM);if(1===iF(e.type)){if(typeof e.senderPublicKey>"u")throw Error("Missing sender public key for type 1 envelope");
5729return(0,es.dI)((0,es.xW)([e.type,e.senderPublicKey,e.iv,e.sealed]),iM)}return(0,es.dI)((0,es.xW)([e.type,e.iv,e.sealed]),iM)}function iq(e){let t=(e.encoding||iM)===iB?iz(e.encoded):e.encoded,r=(0,es.sH)(t,iM),n=r.slice(0,1);if(1===iF(n)){let e=r.slice(1,33),t=r.slice(33,45);return{type:n,sealed:r.slice(45),iv:t,senderPublicKey:e}}if(2===iF(n))return{type:n,sealed:r.slice(1),iv:tN(12)};let i=r.slice(1,13);return{type:n,sealed:r.slice(13),iv:i}}function iV(e){let t=e?.type||0;if(1===t){if(typeof e?.senderPublicKey>"u")throw Error("missing sender public key");if(typeof e?.receiverPublicKey>"u")throw Error("missing receiver public key")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function iG(e){return 1===e.type&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}function iK(e){return e?.relay||{protocol:"irn"}}function iZ(e){let t=eo.CG[e];if(typeof t>"u")throw Error(`Relay Protocol not supported: ${e}`);return t}var iJ=Object.defineProperty,iY=Object.defineProperties,iQ=Object.getOwnPropertyDescriptors,iX=Object.getOwnPropertySymbols,i0=Object.prototype.hasOwnProperty,i1=Object.prototype.propertyIsEnumerable,i2=(e,t,r)=>t in e?iJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,i5=(e,t)=>{for(var r in t||(t={}))i0.call(t,r)&&i2(e,r,t[r]);if(iX)for(var r of iX(t))i1.call(t,r)&&i2(e,r,t[r]);return e};function i6(e){var t;if(!e.includes("wc:")){let t=eJ(e);null!=t&&t.includes("wc:")&&(e=t)}let r=(e=(e=e.includes("wc://")?e.replace("wc://",""):e).includes("wc:")?e.replace("wc:",""):e).indexOf(":"),n=-1!==e.indexOf("?")?e.indexOf("?"):void 0,i=e.substring(0,r),a=e.substring(r+1,n).split("@"),s=Object.fromEntries(new URLSearchParams("u">typeof n?e.substring(n):"").entries()),o="string"==typeof s.methods?s.methods.split(","):void 0;return{protocol:i,topic:(t=a[0]).startsWith("//")?t.substring(2):t,version:parseInt(a[1],10),symKey:s.symKey,relay:function(e,t="-"){let r={},n="relay"+t;return Object.keys(e).forEach(t=>{if(t.startsWith(n)){let i=t.replace(n,""),a=e[t];r[i]=a}}),r}(s),methods:o,expiryTimestamp:s.expiryTimestamp?parseInt(s.expiryTimestamp,10):void 0}}function i3(e){let t=new URLSearchParams;return Object.entries(i5(i5(iY(i5({},function(e,t="-"){let r={};return Object.keys(e).forEach(n=>{e[n]&&(r["relay"+t+n]=e[n])}),r}(e.relay)),iQ({symKey:e.symKey})),e.expiryTimestamp&&{expiryTimestamp:e.expiryTimestamp.toString()}),e.methods&&{methods:e.methods.join(",")})).sort(([e],[t])=>e.localeCompare(t)).forEach(([e,r])=>{void 0!==r&&t.append(e,String(r))}),`${e.protocol}:${e.topic}@${e.version}?${t}`}function i4(e,t,r){return`${e}?wc_ev=${r}&topic=${t}`}var i8=Object.defineProperty,i9=Object.defineProperties,i7=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,ar=Object.prototype.propertyIsEnumerable,an=(e,t,r)=>t in e?i8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ai=(e,t)=>{for(var r in t||(t={}))at.call(t,r)&&an(e,r,t[r]);if(ae)for(var r of ae(t))ar.call(t,r)&&an(e,r,t[r]);return e},aa=(e,t)=>i9(e,i7(t));function as(e){let t=[];return e.forEach(e=>{let[r,n]=e.split(":");t.push(`${r}:${n}`)}),t}function ao(e){let t=[];return Object.values(e).forEach(e=>{t.push(...as(e.accounts))}),[...new Set(t)]}function al(e){return e.includes(":")}function ac(e){return al(e)?e.split(":")[0]:e}function au(e){var t,r,n;let i={};if(!ap(e))return i;for(let[a,s]of Object.entries(e)){let e=al(a)?[a]:s.chains,o=s.methods||[],l=s.events||[],c=ac(a);i[c]=aa(ai({},i[c]),{chains:eW(e,null==(t=i[c])?void 0:t.chains),methods:eW(o,null==(r=i[c])?void 0:r.methods),events:eW(l,null==(n=i[c])?void 0:n.events)})}return i}function ad(e,t){let r=function(e){let t={};return e?.forEach(e=>{var r;let[n,i]=e.split(":");t[n]||(t[n]={accounts:[],chains:[],events:[],methods:[]}),t[n].accounts.push(e),null==(r=t[n].chains)||r.push(`${n}:${i}`)}),t}(t=t.map(e=>e.replace("did:pkh:","")));for(let[t,n]of Object.entries(r))n.methods?n.methods=eW(n.methods,e):n.methods=e,n.events=["chainChanged","accountsChanged"];return r}function ah(e,t){return!!Array.isArray(e)&&(!("u">typeof t)||!e.length||e.every(t))}function ap(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function af(e){return typeof e>"u"}function am(e,t){return!!(t&&af(e))||"string"==typeof e&&!!e.trim().length}function ag(e,t){return!!(t&&af(e))||"number"==typeof e&&!isNaN(e)}function ay(e){return!!(am(e,!1)&&e.includes(":"))&&2===e.split(":").length}function ab(e){let t=!0;return ah(e)?e.length&&(t=e.every(e=>
5729am(e,!1))):t=!1,t}function aw(e,t){let r=null;return Object.values(e).forEach(e=>{var n;let i;if(r)return;let a=(n=`${t}, namespace`,i=null,ab(e?.methods)?ab(e?.events)||(i=eg("UNSUPPORTED_EVENTS",`${n}, events should be an array of strings or empty array for no events`)):i=eg("UNSUPPORTED_METHODS",`${n}, methods should be an array of strings or empty array for no methods`),i);a&&(r=a)}),r}function av(e,t){let r=null;if(e&&ap(e)){let n,i=aw(e,t);i&&(r=i);let a=(n=null,Object.values(e).forEach(e=>{var r,i;let a;if(n)return;let s=(r=e?.accounts,i=`${t} namespace`,a=null,ah(r)?r.forEach(e=>{a||function(e){if(am(e,!1)&&e.includes(":")){let t=e.split(":");if(3===t.length){let e=t[0]+":"+t[1];return!!t[2]&&ay(e)}}return!1}(e)||(a=eg("UNSUPPORTED_ACCOUNTS",`${i}, account ${e} should be a string and conform to "namespace:chainId:address" format`))}):a=eg("UNSUPPORTED_ACCOUNTS",`${i}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),a);s&&(n=s)}),n);a&&(r=a)}else r=em("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return r}function aE(e){return am(e.protocol,!0)}function aC(e){return"u">typeof e}function aA(e,t){return!(!ay(t)||!ao(e).includes(t))}function ax(e,t,r){let n=null,i=function(e){let t={};return Object.keys(e).forEach(r=>{var n;r.includes(":")?t[r]=e[r]:null==(n=e[r].chains)||n.forEach(n=>{t[n]={methods:e[r].methods,events:e[r].events}})}),t}(e),a=function(e){let t={};return Object.keys(e).forEach(r=>{if(r.includes(":"))t[r]=e[r];else{let n=as(e[r].accounts);n?.forEach(n=>{t[n]={accounts:e[r].accounts.filter(e=>e.includes(`${n}:`)),methods:e[r].methods,events:e[r].events}})}}),t}(t),s=Object.keys(i),o=Object.keys(a),l=aI(Object.keys(e)),c=aI(Object.keys(t)),u=l.filter(e=>!c.includes(e));return u.length&&(n=em("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces. 5730 Required: ${u.toString()} 5731 Received: ${Object.keys(t).toString()}`)),eM(s,o)||(n=em("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces. 5732 Required: ${s.toString()} 5733 Approved: ${o.toString()}`)),Object.keys(t).forEach(e=>{if(!e.includes(":")||n)return;let i=as(t[e].accounts);i.includes(e)||(n=em("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${e} 5734 Required: ${e} 5735 Approved: ${i.toString()}`))}),s.forEach(e=>{n||(eM(i[e].methods,a[e].methods)?eM(i[e].events,a[e].events)||(n=em("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${e}`)):n=em("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${e}`))}),n}function aI(e){return[...new Set(e.map(e=>e.includes(":")?e.split(":")[0]:e))]}function aS(){let e=e_();return new Promise(t=>{switch(e){case eS.browser:t(eO()&&navigator?.onLine);break;case eS.reactNative:t(aT());break;case eS.node:default:t(!0)}})}async function aT(){if(eP()&&"u">typeof global&&null!=global&&global.NetInfo){let e=await (null==global?void 0:global.NetInfo.fetch());return e?.isConnected}return!0}let aP={};class aO{static get(e){return aP[e]}static set(e,t){aP[e]=t}static delete(e){delete aP[e]}}function a_(e){return new Uint8Array(e.replace(/^0x/,"").match(/.{1,2}/g).map(e=>parseInt(e,16)))}function aN({logger:e,name:t}){let r="string"==typeof e?(0,l.D5)({opts:{level:e,name:t}}).logger:e;return r.level="string"==typeof e?e:e.level,r}var ak=r(96776),aR=r(7227),aM=r(63850),aB=r(44168).Buffer,aj=r(55036);let aU="core",a$=`wc@2:${aU}:`,aL={logger:"error"},aD={database:":memory:"},aF="client_ed25519_seed",aH=P.ONE_DAY,az=P.SIX_HOURS,aW="wss://relay.walletconnect.org",aq={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",publish:"relayer_publish"},aV={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},aG="2.23.7",aK={link_mode:"link_mode",relay:"relay"},aZ={inbound:"inbound",outbound:"outbound"},aJ="WALLETCONNECT_LINK_MODE_APPS",aY={created:"subscription_created",deleted:"subscription_deleted",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},aQ=(P.FIVE_SECONDS,{wc_pairingDelete:{req:{ttl:P.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:P.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:P.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:P.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:P.ONE_DAY,prompt:!1,tag:0},res:{ttl:P.ONE_DAY,prompt:!1,tag:0}}}),aX={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},a0={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},a1={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},a2="https://verify.walletconnect.org",a5=`${a2}/v3`,a6=["https://verify.walletconnect.com",a2],a3={pairing_started:"pairing_started",pairing_uri_validation_success:"pairing_uri_validation_success",pairing_uri_not_expired:"pairing_uri_not_expired",store_new_pairing:"store_new_pairing",subscribing_pairing_topic:"subscribing_pairing_topic",subscribe_pairing_topic_success:"subscribe_pairing_topic_success",existing_pairing:"existing_pairing",pairing_not_expired:"pairing_not_expired",emit_inactive_pairing:"emit_inactive_pairing",emit_session_proposal:"emit_session_proposal"},a4={no_internet_connection:"no_internet_connection",malformed_pairing_uri:"malformed_pairing_uri",active_pairing_already_exists:"active_pairing_already_exists",subscribe_pairing_topic_failure:"subscribe_pairing_topic_failure",pairing_expired:"pairing_expired",proposal_listener_not_found:"proposal_listener_not_found"},a8={session_approve_started:"session_approve_started",session_namespaces_validation_success:"session_namespaces_validation_success",subscribing_session_topic:"subscribing_session_topic",subscribe_session_topic_success:"subscribe_session_topic_success",session_approve_publish_success:"session_approve_publish_success",store_session:"store_session",session_request_response_started:"session_request_response_started",session_request_response_validation_success:"session_request_response_validation_success",session_request_response_publish_started:"session_request_response_publish_started"},a9={no_internet_connection:"no_internet_connection",proposal_expired:"proposal_expired",subscribe_session_topic_failure:"subscribe_session_topic_failure",session_approve_namespace_validation_failure:"session_approve_namespace_validation_failure",proposal_not_found:"proposal_not_found",session_request_response_validation_failure:"session_request_response_validation_failure",session_request_response_publish_failure:"session_request_response_publish_failure"},a7={authenticated_session_approve_started:"authenticated_session_approve_started",create_authenticated_session_topic:"create_authenticated_session_topic",cacaos_verified:"cacaos_verified",store_authenticated_session:"store_authenticated_session",subscribing_authenticated_session_topic:"subscribing_authenticated_session_topic",subscribe_authenticated_session_topic_success:"subscribe_authenticated_session_topic_success",publishing_authenticated_session_approve:"publishing_authenticated_session_approve"}
5735,se={no_internet_connection:"no_internet_connection",invalid_cacao:"invalid_cacao",subscribe_authenticated_session_topic_failure:"subscribe_authenticated_session_topic_failure",authenticated_session_approve_publish_failure:"authenticated_session_approve_publish_failure",authenticated_session_pending_request_not_found:"authenticated_session_pending_request_not_found"};var st=function(e,t){if(e.length>=255)throw TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var a=e.charAt(i),s=a.charCodeAt(0);if(255!==r[s])throw TypeError(a+" is ambiguous");r[s]=i}var o=e.length,l=e.charAt(0),c=Math.log(o)/Math.log(256),u=Math.log(256)/Math.log(o);function d(e){if("string"!=typeof e)throw TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[0]){for(var n=0,i=0;e[t]===l;)n++,t++;for(var a=(e.length-t)*c+1>>>0,s=new Uint8Array(a);e[t];){var u=r[e.charCodeAt(t)];if(255===u)return;for(var d=0,h=a-1;(0!==u||d<i)&&-1!==h;h--,d++)u+=o*s[h]>>>0,s[h]=u%256>>>0,u=u/256>>>0;if(0!==u)throw Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var p=a-i;p!==a&&0===s[p];)p++;for(var f=new Uint8Array(n+(a-p)),m=n;p!==a;)f[m++]=s[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 TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,a=t.length;i!==a&&0===t[i];)i++,r++;for(var s=(a-i)*u+1>>>0,c=new Uint8Array(s);i!==a;){for(var d=t[i],h=0,p=s-1;(0!==d||h<n)&&-1!==p;p--,h++)d+=256*c[p]>>>0,c[p]=d%o>>>0,d=d/o>>>0;if(0!==d)throw Error("Non-zero carry");n=h,i++}for(var f=s-n;f!==s&&0===c[f];)f++;for(var m=l.repeat(r);f<s;++f)m+=e.charAt(c[f]);return m},decodeUnsafe:d,decode:function(e){var r=d(e);if(r)return r;throw Error(`Non-${t} character`)}}};let sr=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 Error("Unknown type, must be binary type")};class sn{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")}}class si{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw 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 ss(this,e)}}class sa{constructor(e){this.decoders=e}or(e){return ss(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`)}}let ss=(e,t)=>new sa({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class so{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new sn(e,t,r),this.decoder=new si(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}let sl=({name:e,prefix:t,encode:r,decode:n})=>new so(e,t,r,n),sc=({prefix:e,name:t,alphabet:r})=>{let{encode:n,decode:i}=st(r,t);return sl({prefix:e,name:t,encode:n,decode:e=>sr(i(e))})},su=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>sl({prefix:t,name:e,encode:e=>((e,t,r)=>{let n="="===t[t.length-1],i=(1<<r)-1,a="",s=0,o=0;for(let n=0;n<e.length;++n)for(o=o<<8|e[n],s+=8;s>r;)s-=r,a+=t[i&o>>s];if(s&&(a+=t[i&o<<r-s]),n)for(;a.length*r&7;)a+="=";return a})(e,n,r),decode:t=>((e,t,r,n)=>{let i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let a=e.length;for(;"="===e[a-1];)--a;let s=new Uint8Array(a*r/8|0),o=0,l=0,c=0;for(let t=0;t<a;++t){let a=i[e[t]];if(void 0===a)throw SyntaxError(`Non-${n} character`);l=l<<r|a,(o+=r)>=8&&(o-=8,s[c++]=255&l>>o)}if(o>=r||255&l<<8-o)throw SyntaxError("Unexpected end of data");return s})(t,n,r,e)});var sd=Object.freeze({__proto__:null,identity:sl({prefix:"\0",name:"identity",encode:e=>new TextDecoder().decode(e),decode:e=>new TextEncoder().encode(e)})}),sh=Object.freeze({__proto__:null,base2:su({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1})}),sp=Object.freeze({__proto__:null,base8:su({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3})}),sf=Object.freeze({__proto__:null,base10:sc({prefix:"9",name:"base10",alphabet:"0123456789"})}),sm=Object.freeze({__proto__:null,base16:su({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),base16upper:su({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4})});let sg=su({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),sy=su({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),sb=su({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),sw=su({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),sv=su({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),sE=su({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),sC=su({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5});var sA=Object.freeze({__proto__:null,base32:sg,base32upper:sy,base32pad:sb,base32padupper:sw,base32hex:sv,base32hexupper:sE,base32hexpad:sC,base32hexpadupper:su({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),base32z:su({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})}),sx=Object.freeze({__proto__:null,base36:sc({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),base36upper:sc({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"})}),sI=Object.freeze({__proto__:null,base58btc:sc({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),base58flickr:sc({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})});let sS=su({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
5735+/",bitsPerChar:6}),sT=su({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6});var sP=Object.freeze({__proto__:null,base64:sS,base64pad:sT,base64url:su({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),base64urlpad:su({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6})});let sO=Array.from("\uD83D\uDE80\uD83E\uDE90â\uD83D\uDEF0\uD83C\uDF0C\uD83C\uDF11\uD83C\uDF12\uD83C\uDF13\uD83C\uDF14\uD83C\uDF15\uD83C\uDF16\uD83C\uDF17\uD83C\uDF18\uD83C\uDF0D\uD83C\uDF0F\uD83C\uDF0E\uD83D\uDC09â\uD83D\uDCBB\uD83D\uDDA5\uD83D\uDCBE\uD83D\uDCBF\uD83D\uDE02â¤\uD83D\uDE0D\uD83E\uDD23\uD83D\uDE0A\uD83D\uDE4F\uD83D\uDC95\uD83D\uDE2D\uD83D\uDE18\uD83D\uDC4D\uD83D\uDE05\uD83D\uDC4F\uD83D\uDE01\uD83D\uDD25\uD83E\uDD70\uD83D\uDC94\uD83D\uDC96\uD83D\uDC99\uD83D\uDE22\uD83E\uDD14\uD83D\uDE06\uD83D\uDE44\uD83D\uDCAA\uD83D\uDE09âº\uD83D\uDC4C\uD83E\uDD17\uD83D\uDC9C\uD83D\uDE14\uD83D\uDE0E\uD83D\uDE07\uD83C\uDF39\uD83E\uDD26\uD83C\uDF89\uD83D\uDC9Eââ¨\uD83E\uDD37\uD83D\uDE31\uD83D\uDE0C\uD83C\uDF38\uD83D\uDE4C\uD83D\uDE0B\uD83D\uDC97\uD83D\uDC9A\uD83D\uDE0F\uD83D\uDC9B\uD83D\uDE42\uD83D\uDC93\uD83E\uDD29\uD83D\uDE04\uD83D\uDE00\uD83D\uDDA4\uD83D\uDE03\uD83D\uDCAF\uD83D\uDE48\uD83D\uDC47\uD83C\uDFB6\uD83D\uDE12\uD83E\uDD2Dâ£\uD83D\uDE1C\uD83D\uDC8B\uD83D\uDC40\uD83D\uDE2A\uD83D\uDE11\uD83D\uDCA5\uD83D\uDE4B\uD83D\uDE1E\uD83D\uDE29\uD83D\uDE21\uD83E\uDD2A\uD83D\uDC4A\uD83E\uDD73\uD83D\uDE25\uD83E\uDD24\uD83D\uDC49\uD83D\uDC83\uD83D\uDE33â\uD83D\uDE1A\uD83D\uDE1D\uD83D\uDE34\uD83C\uDF1F\uD83D\uDE2C\uD83D\uDE43\uD83C\uDF40\uD83C\uDF37\uD83D\uDE3B\uD83D\uDE13ââ
\uD83E\uDD7A\uD83C\uDF08\uD83D\uDE08\uD83E\uDD18\uD83D\uDCA6â\uD83D\uDE23\uD83C\uDFC3\uD83D\uDC90â¹\uD83C\uDF8A\uD83D\uDC98\uD83D\uDE20â\uD83D\uDE15\uD83C\uDF3A\uD83C\uDF82\uD83C\uDF3B\uD83D\uDE10\uD83D\uDD95\uD83D\uDC9D\uD83D\uDE4A\uD83D\uDE39\uD83D\uDDE3\uD83D\uDCAB\uD83D\uDC80\uD83D\uDC51\uD83C\uDFB5\uD83E\uDD1E\uD83D\uDE1B\uD83D\uDD34\uD83D\uDE24\uD83C\uDF3C\uD83D\uDE2Bâ½\uD83E\uDD19â\uD83C\uDFC6\uD83E\uDD2B\uD83D\uDC48\uD83D\uDE2E\uD83D\uDE46\uD83C\uDF7B\uD83C\uDF43\uD83D\uDC36\uD83D\uDC81\uD83D\uDE32\uD83C\uDF3F\uD83E\uDDE1\uD83C\uDF81â¡\uD83C\uDF1E\uD83C\uDF88ââ\uD83D\uDC4B\uD83D\uDE30\uD83E\uDD28\uD83D\uDE36\uD83E\uDD1D\uD83D\uDEB6\uD83D\uDCB0\uD83C\uDF53\uD83D\uDCA2\uD83E\uDD1F\uD83D\uDE41\uD83D\uDEA8\uD83D\uDCA8\uD83E\uDD2Câ\uD83C\uDF80\uD83C\uDF7A\uD83E\uDD13\uD83D\uDE19\uD83D\uDC9F\uD83C\uDF31\uD83D\uDE16\uD83D\uDC76\uD83E\uDD74â¶â¡â\uD83D\uDC8E\uD83D\uDCB8â¬\uD83D\uDE28\uD83C\uDF1A\uD83E\uDD8B\uD83D\uDE37\uD83D\uDD7Aâ \uD83D\uDE45\uD83D\uDE1F\uD83D\uDE35\uD83D\uDC4E\uD83E\uDD32\uD83E\uDD20\uD83E\uDD27\uD83D\uDCCC\uD83D\uDD35\uD83D\uDC85\uD83E\uDDD0\uD83D\uDC3E\uD83C\uDF52\uD83D\uDE17\uD83E\uDD11\uD83C\uDF0A\uD83E\uDD2F\uD83D\uDC37â\uD83D\uDCA7\uD83D\uDE2F\uD83D\uDC86\uD83D\uDC46\uD83C\uDFA4\uD83D\uDE47\uD83C\uDF51â\uD83C\uDF34\uD83D\uDCA3\uD83D\uDC38\uD83D\uDC8C\uD83D\uDCCD\uD83E\uDD40\uD83E\uDD22\uD83D\uDC45\uD83D\uDCA1\uD83D\uDCA9\uD83D\uDC50\uD83D\uDCF8\uD83D\uDC7B\uD83E\uDD10\uD83E\uDD2E\uD83C\uDFBC\uD83E\uDD75\uD83D\uDEA9\uD83C\uDF4E\uD83C\uDF4A\uD83D\uDC7C\uD83D\uDC8D\uD83D\uDCE3\uD83E\uDD42"),s_=sO.reduce((e,t,r)=>(e[r]=t,e),[]),sN=sO.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);var sk=Object.freeze({__proto__:null,base256emoji:sl({prefix:"\uD83D\uDE80",name:"base256emoji",encode:function(e){return e.reduce((e,t)=>e+=s_[t],"")},decode:function(e){let t=[];for(let r of e){let e=sN[r.codePointAt(0)];if(void 0===e)throw Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}})});function sR(e,t,r){t=t||[],r=r||0;for(var n=r;e>=0x80000000;)t[r++]=255&e|128,e/=128;for(;-128&e;)t[r++]=255&e|128,e>>>=7;return t[r]=0|e,sR.bytes=r-n+1,t}var sM={encode:sR,encodingLength:function(e){return e<128?1:e<16384?2:e<2097152?3:e<0x10000000?4:e<0x800000000?5:e<0x40000000000?6:e<0x2000000000000?7:e<0x100000000000000?8:e<0x8000000000000000?9:10}};let sB=(e,t,r=0)=>(sM.encode(e,t,r),t),sj=e=>sM.encodingLength(e),sU=(e,t)=>{let r=t.byteLength,n=sj(e),i=n+sj(r),a=new Uint8Array(i+r);return sB(e,a,0),sB(r,a,n),a.set(t,i),new s$(e,r,t,a)};
5735class s${constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}let sL=({name:e,code:t,encode:r})=>new sD(e,t,r);class sD{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?sU(this.code,t):t.then(e=>sU(this.code,e))}throw Error("Unknown type, must be binary type")}}let sF=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t));var sH=Object.freeze({__proto__:null,sha256:sL({name:"sha2-256",code:18,encode:sF("SHA-256")}),sha512:sL({name:"sha2-512",code:19,encode:sF("SHA-512")})}),sz=Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:sr,digest:e=>sU(0,sr(e))}});new TextEncoder,new TextDecoder;let sW={...sd,...sh,...sp,...sf,...sm,...sA,...sx,...sI,...sP,...sk};function sq(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function sV(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}({...sH,...sz});let sG=sV("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),sK=sV("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?sq(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}),sZ={utf8:sG,"utf-8":sG,hex:sW.base16,latin1:sK,ascii:sK,binary:sK,...sW};var sJ=Object.defineProperty,sY=(e,t,r)=>((e,t,r)=>t in e?sJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class sQ{constructor(e,t){this.core=e,this.logger=t,sY(this,"keychain",new Map),sY(this,"name","keychain"),sY(this,"version","0.3"),sY(this,"initialized",!1),sY(this,"storagePrefix",a$),sY(this,"init",async()=>{if(!this.initialized){let e=await this.getKeyChain();"u">typeof e&&(this.keychain=e),this.initialized=!0}}),sY(this,"has",e=>(this.isInitialized(),this.keychain.has(e))),sY(this,"set",async(e,t)=>{this.isInitialized(),this.keychain.set(e,t),await this.persist()}),sY(this,"get",e=>{this.isInitialized();let t=this.keychain.get(e);if(typeof t>"u"){let{message:t}=em("NO_MATCHING_KEY",`${this.name}: ${e}`);throw Error(t)}return t}),sY(this,"del",async e=>{this.isInitialized(),this.keychain.delete(e),await this.persist()}),this.core=e,this.logger=(0,l.U5)(t,this.name)}get context(){return(0,l.oI)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,eB(e))}async getKeyChain(){let e=await this.core.storage.getItem(this.storageKey);return"u">typeof e?ej(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){let{message:e}=em("NOT_INITIALIZED",this.name);throw Error(e)}}}var sX=Object.defineProperty,s0=(e,t,r)=>((e,t,r)=>t in e?sX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class s1{constructor(e,t,r){this.core=e,this.logger=t,s0(this,"name","crypto"),s0(this,"keychain"),s0(this,"randomSessionIdentifier",iU()),s0(this,"initialized",!1),s0(this,"clientId"),s0(this,"init",async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)}),s0(this,"hasKeys",e=>(this.isInitialized(),this.keychain.has(e))),s0(this,"getClientId",async()=>{if(this.isInitialized(),this.clientId)return this.clientId;let e=await this.getClientSeed(),t=_.TZ(e),r=_.UF(t.publicKey);return this.clientId=r,r}),s0(this,"generateKeyPair",()=>{this.isInitialized();let e=function(){let e=ic.utils.randomPrivateKey(),t=ic.getPublicKey(e);return{privateKey:(0,es.dI)(e,iR),publicKey:(0,es.dI)(t,iR)}}();return this.setPrivateKey(e.publicKey,e.privateKey)}),s0(this,"signJWT",async e=>{this.isInitialized();let t=await this.getClientSeed(),r=_.TZ(t),n=this.randomSessionIdentifier;return await _.FA(n,e,aH,r)}),s0(this,"generateSharedKey",(e,t,r)=>{this.isInitialized();let n=function(e,t){var r;let n,i=ic.getSharedSecret((0,es.sH)(e,iR),(0,es.sH)(t,iR)),a=(n=void 0,function(e,t,r,n=32){tc(e),to(n);let i=e.outputLen;if(n>255*i)throw Error("Length should be <= 255*HashLen");let a=Math.ceil(n/i);void 0===r&&(r=no);let s=new Uint8Array(a*i),o=na.create(e,t),l=o._cloneInto(),c=new Uint8Array(o.outputLen);for(let e=0;e<a;e++)ns[0]=e+1,l.update(0===e?no:c).update(r).update(ns).digestInto(c),s.set(c,i*e),o._cloneInto(l);return o.destroy(),l.destroy(),tp(c,ns),s.slice(0,n)}(re,(r=void 0,tc(re),void 0===r&&(r=new Uint8Array(re.outputLen)),na(re,tT(r),tT(i))),n,32));return(0,es.dI)(a,iR)}(this.getPrivateKey(e),t);return this.setSymKey(n,r)}),s0(this,"setSymKey",async(e,t)=>{this.isInitialized();let r=t||i$(e);return await this.keychain.set(r,e),r}),s0(this,"deleteKeyPair",async e=>{this.isInitialized(),await this.keychain.del(e)}),s0(this,"deleteSymKey",async e=>{this.isInitialized(),await this.keychain.del(e)}),s0(this,"encode",async(e,t,r)=>{this.isInitialized();let n=iV(r),i=(0,O.h)(t);if(2===n.type)return function(e,t){let r=iD(2),n=tN(12),i=iW({type:r,sealed:(0,es.sH)(e,ij),iv:n});return t===iB?iH(i):i}(i,r?.encoding);
5735if(iG(n)){let t=n.senderPublicKey,r=n.receiverPublicKey;e=await this.generateSharedKey(t,r)}let a=this.getSymKey(e),{type:s,senderPublicKey:o}=n;return function(e){let t=iD("u">typeof e.type?e.type:0);if(1===iF(t)&&typeof e.senderPublicKey>"u")throw Error("Missing sender public key for type 1 envelope");let r="u">typeof e.senderPublicKey?(0,es.sH)(e.senderPublicKey,iR):void 0,n="u">typeof e.iv?(0,es.sH)(e.iv,iR):tN(12),i=iW({type:t,sealed:nn((0,es.sH)(e.symKey,iR),n).encrypt((0,es.sH)(e.message,ij)),iv:n,senderPublicKey:r});return e.encoding===iB?iH(i):i}({type:s,symKey:a,message:i,senderPublicKey:o,encoding:r?.encoding})}),s0(this,"decode",async(e,t,r)=>{this.isInitialized();let n=function(e,t){let r=iq({encoded:e,encoding:t?.encoding});return iV({type:iF(r.type),senderPublicKey:"u">typeof r.senderPublicKey?(0,es.dI)(r.senderPublicKey,iR):void 0,receiverPublicKey:t?.receiverPublicKey})}(t,r);if(2===n.type){let e=function(e,t){let{sealed:r}=iq({encoded:e,encoding:t});return(0,es.dI)(r,ij)}(t,r?.encoding);return(0,O.j)(e)}if(iG(n)){let t=n.receiverPublicKey,r=n.senderPublicKey;e=await this.generateSharedKey(t,r)}try{let n=this.getSymKey(e),i=function(e){let t=(0,es.sH)(e.symKey,iR),{sealed:r,iv:n}=iq({encoded:e.encoded,encoding:e.encoding}),i=nn(t,n).decrypt(r);if(null===i)throw Error("Failed to decrypt");return(0,es.dI)(i,ij)}({symKey:n,encoded:t,encoding:r?.encoding});return(0,O.j)(i)}catch(t){this.logger.error(`Failed to decode message from topic: '${e}', clientId: '${await this.getClientId()}'`),this.logger.error(t)}}),s0(this,"getPayloadType",(e,t=iM)=>iF(iq({encoded:e,encoding:t}).type)),s0(this,"getPayloadSenderPublicKey",(e,t=iM)=>{let r=iq({encoded:e,encoding:t});return r.senderPublicKey?(0,es.dI)(r.senderPublicKey,iR):void 0}),this.core=e,this.logger=(0,l.U5)(t,this.name),this.keychain=r||new sQ(this.core,this.logger)}get context(){return(0,l.oI)(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(aF)}catch{e=iU(),await this.keychain.set(aF,e)}return function(e,t="utf8"){let r=sZ[t];if(!r)throw Error(`Unsupported encoding "${t}"`);return("utf8"===t||"utf-8"===t)&&null!=globalThis.Buffer&&null!=globalThis.Buffer.from?sq(globalThis.Buffer.from(e,"utf-8")):r.decoder.decode(`${r.prefix}${e}`)}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){let{message:e}=em("NOT_INITIALIZED",this.name);throw Error(e)}}}var s2=Object.defineProperty,s5=Object.defineProperties,s6=Object.getOwnPropertyDescriptors,s3=Object.getOwnPropertySymbols,s4=Object.prototype.hasOwnProperty,s8=Object.prototype.propertyIsEnumerable,s9=(e,t,r)=>t in e?s2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,s7=(e,t,r)=>s9(e,"symbol"!=typeof t?t+"":t,r);class oe extends m{constructor(e,t){super(e,t),this.logger=e,this.core=t,s7(this,"messages",new Map),s7(this,"messagesWithoutClientAck",new Map),s7(this,"name","messages"),s7(this,"version","0.3"),s7(this,"initialized",!1),s7(this,"storagePrefix",a$),s7(this,"init",async()=>{if(!this.initialized){this.logger.trace("Initialized");try{let e=await this.getRelayerMessages();"u">typeof e&&(this.messages=e);let t=await this.getRelayerMessagesWithoutClientAck();"u">typeof t&&(this.messagesWithoutClientAck=t),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}}}),s7(this,"set",async(e,t,r)=>{this.isInitialized();let n=iL(t),i=this.messages.get(e);if(typeof i>"u"&&(i={}),"u">typeof i[n])return n;if(i[n]=t,this.messages.set(e,i),r===aZ.inbound){let r=this.messagesWithoutClientAck.get(e)||{};this.messagesWithoutClientAck.set(e,s5(((e,t)=>{for(var r in t||(t={}))s4.call(t,r)&&s9(e,r,t[r]);if(s3)for(var r of s3(t))s8.call(t,r)&&s9(e,r,t[r]);return e})({},r),s6({[n]:t})))}return await this.persist(),n}),s7(this,"get",e=>{this.isInitialized();let t=this.messages.get(e);return typeof t>"u"&&(t={}),t}),s7(this,"getWithoutAck",e=>{this.isInitialized();let t={};for(let r of e){let e=this.messagesWithoutClientAck.get(r)||{};t[r]=Object.values(e)}return t}),s7(this,"has",(e,t)=>(this.isInitialized(),"u">typeof this.get(e)[iL(t)])),s7(this,"ack",async(e,t)=>{this.isInitialized();let r=this.messagesWithoutClientAck.get(e);if(typeof r>"u")return;let n=iL(t);delete r[n],0===Object.keys(r).length?this.messagesWithoutClientAck.delete(e):this.messagesWithoutClientAck.set(e,r),await this.persist()}),s7(this,"del",async e=>{this.isInitialized(),this.messages.delete(e),this.messagesWithoutClientAck.delete(e),await this.persist()}),this.logger=(0,l.U5)(e,this.name),this.core=t}
5735get context(){return(0,l.oI)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get storageKeyWithoutClientAck(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name+"_withoutClientAck"}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,eB(e))}async setRelayerMessagesWithoutClientAck(e){await this.core.storage.setItem(this.storageKeyWithoutClientAck,eB(e))}async getRelayerMessages(){let e=await this.core.storage.getItem(this.storageKey);return"u">typeof e?ej(e):void 0}async getRelayerMessagesWithoutClientAck(){let e=await this.core.storage.getItem(this.storageKeyWithoutClientAck);return"u">typeof e?ej(e):void 0}async persist(){await this.setRelayerMessages(this.messages),await this.setRelayerMessagesWithoutClientAck(this.messagesWithoutClientAck)}isInitialized(){if(!this.initialized){let{message:e}=em("NOT_INITIALIZED",this.name);throw Error(e)}}}var ot=Object.defineProperty,or=Object.defineProperties,on=Object.getOwnPropertyDescriptors,oi=Object.getOwnPropertySymbols,oa=Object.prototype.hasOwnProperty,os=Object.prototype.propertyIsEnumerable,oo=(e,t,r)=>t in e?ot(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ol=(e,t)=>{for(var r in t||(t={}))oa.call(t,r)&&oo(e,r,t[r]);if(oi)for(var r of oi(t))os.call(t,r)&&oo(e,r,t[r]);return e},oc=(e,t)=>or(e,on(t)),ou=(e,t,r)=>oo(e,"symbol"!=typeof t?t+"":t,r);class od extends g{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,ou(this,"events",new i.EventEmitter),ou(this,"name","publisher"),ou(this,"queue",new Map),ou(this,"publishTimeout",(0,P.toMiliseconds)(P.ONE_MINUTE)),ou(this,"initialPublishTimeout",(0,P.toMiliseconds)(15*P.ONE_SECOND)),ou(this,"needsTransportRestart",!1),ou(this,"publish",async(e,t,r)=>{var n,i,a,s,o;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:r}});let l=r?.ttl||az,c=r?.prompt||!1,u=r?.tag||0,d=r?.id||(0,aR.getBigIntRpcId)().toString(),h=iZ(iK().protocol),p={id:d,method:r?.publishMethod||h.publish,params:ol({topic:e,message:t,ttl:l,prompt:c,tag:u,attestation:r?.attestation},r?.tvf)},f=`Failed to publish payload, please try again. id:${d} tag:${u}`;try{af(null==(n=p.params)?void 0:n.prompt)&&(null==(i=p.params)||delete i.prompt),af(null==(a=p.params)?void 0:a.tag)&&(null==(s=p.params)||delete s.tag);let o=new Promise(async e=>{let t=({id:r})=>{var n;(null==(n=p.id)?void 0:n.toString())===r.toString()&&(this.removeRequestFromQueue(r),this.relayer.events.removeListener(aq.publish,t),e())};this.relayer.events.on(aq.publish,t);let n=e$(new Promise((e,t)=>{this.rpcPublish(p,r).then(e).catch(e=>{this.logger.warn(e,e?.message),t(e)})}),this.initialPublishTimeout,`Failed initial publish, retrying.... id:${d} tag:${u}`);try{await n,this.events.removeListener(aq.publish,t)}catch(e){this.queue.set(d,{request:p,opts:r,attempt:1}),this.logger.warn(e,e?.message)}});this.logger.trace({type:"method",method:"publish",params:{id:d,topic:e,message:t,opts:r}}),await e$(o,this.publishTimeout,f)}catch(e){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(e),null!=(o=r?.internal)&&o.throwOnFailedPublish)throw e}finally{this.queue.delete(d)}}),ou(this,"publishCustom",async e=>{var t,r,n,i,a;this.logger.debug("Publishing custom payload"),this.logger.trace({type:"method",method:"publishCustom",params:e});let{payload:s,opts:o={}}=e,{attestation:l,tvf:c,publishMethod:u,prompt:d,tag:h,ttl:p=P.FIVE_MINUTES}=o,f=o.id||(0,aR.getBigIntRpcId)().toString(),m=iZ(iK().protocol),g=u||m.publish,y={id:f,method:g,params:ol(oc(ol({},s),{ttl:p,prompt:d,tag:h,attestation:l}),c)},b=`Failed to publish custom payload, please try again. id:${f} tag:${h}`;try{af(null==(t=y.params)?void 0:t.prompt)&&(null==(r=y.params)||delete r.prompt),af(null==(n=y.params)?void 0:n.tag)&&(null==(i=y.params)||delete i.tag);let e=new Promise(async e=>{let t=({id:r})=>{var n;(null==(n=y.id)?void 0:n.toString())===r.toString()&&(this.removeRequestFromQueue(r),this.relayer.events.removeListener(aq.publish,t),e())};this.relayer.events.on(aq.publish,t);let r=e$(new Promise((e,t)=>
5735{this.rpcPublish(y,o).then(e).catch(e=>{this.logger.warn(e,e?.message),t(e)})}),this.initialPublishTimeout,`Failed initial custom payload publish, retrying.... method:${g} id:${f} tag:${h}`);try{await r,this.events.removeListener(aq.publish,t)}catch(e){this.queue.set(f,{request:y,opts:o,attempt:1}),this.logger.warn(e,e?.message)}});this.logger.trace({type:"method",method:"publish",params:{id:f,payload:s,opts:o}}),await e$(e,this.publishTimeout,b)}catch(e){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(e),null!=(a=o?.internal)&&a.throwOnFailedPublish)throw e}finally{this.queue.delete(f)}}),ou(this,"on",(e,t)=>{this.events.on(e,t)}),ou(this,"once",(e,t)=>{this.events.once(e,t)}),ou(this,"off",(e,t)=>{this.events.off(e,t)}),ou(this,"removeListener",(e,t)=>{this.events.removeListener(e,t)}),this.relayer=e,this.logger=(0,l.U5)(t,this.name),this.registerEventListeners()}get context(){return(0,l.oI)(this.logger)}async rpcPublish(e,t){this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:e});let r=await this.relayer.request(e);return this.relayer.events.emit(aq.publish,ol(ol({},e),t)),this.logger.debug("Successfully Published Payload"),r}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async(e,t)=>{var r;let n=e.attempt+1;this.queue.set(t,oc(ol({},e),{attempt:n})),this.logger.warn({},`Publisher: queue->publishing: ${e.request.id}, tag: ${null==(r=e.request.params)?void 0:r.tag}, attempt: ${n}`),await this.rpcPublish(e.request,e.opts),this.logger.warn({},`Publisher: queue->published: ${e.request.id}`)})}registerEventListeners(){this.relayer.core.heartbeat.on(s.li.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(aq.connection_stalled);return}this.checkQueue()}),this.relayer.on(aq.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}var oh=Object.defineProperty,op=(e,t,r)=>((e,t,r)=>t in e?oh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class of{constructor(){op(this,"map",new Map),op(this,"set",(e,t)=>{let r=this.get(e);this.exists(e,t)||this.map.set(e,[...r,t])}),op(this,"get",e=>this.map.get(e)||[]),op(this,"exists",(e,t)=>this.get(e).includes(t)),op(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 n=r.filter(e=>e!==t);if(!n.length)return void this.map.delete(e);this.map.set(e,n)}),op(this,"clear",()=>{this.map.clear()})}get topics(){return Array.from(this.map.keys())}}var om=Object.defineProperty,og=Object.defineProperties,oy=Object.getOwnPropertyDescriptors,ob=Object.getOwnPropertySymbols,ow=Object.prototype.hasOwnProperty,ov=Object.prototype.propertyIsEnumerable,oE=(e,t,r)=>t in e?om(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,oC=(e,t)=>{for(var r in t||(t={}))ow.call(t,r)&&oE(e,r,t[r]);if(ob)for(var r of ob(t))ov.call(t,r)&&oE(e,r,t[r]);return e},oA=(e,t)=>og(e,oy(t)),ox=(e,t,r)=>oE(e,"symbol"!=typeof t?t+"":t,r);class oI extends w{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,ox(this,"subscriptions",new Map),ox(this,"topicMap",new of),ox(this,"events",new i.EventEmitter),ox(this,"name","subscription"),ox(this,"version","0.3"),ox(this,"pending",new Map),ox(this,"cached",[]),ox(this,"initialized",!1),ox(this,"storagePrefix",a$),ox(this,"subscribeTimeout",(0,P.toMiliseconds)(P.ONE_MINUTE)),ox(this,"initialSubscribeTimeout",(0,P.toMiliseconds)(15*P.ONE_SECOND)),ox(this,"clientId"),ox(this,"batchSubscribeTopicsLimit",500),ox(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),await this.restore()),this.initialized=!0}),ox(this,"subscribe",async(e,t)=>{var r;this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}});try{let n=iK(t),i={topic:e,relay:n,transportType:t?.transportType};null!=(r=t?.internal)&&r.skipSubscribe||this.pending.set(e,i);let a=await this.rpcSubscribe(e,n,t);return"string"==typeof a&&(this.onSubscribe(a,i),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}})),a}catch(e){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(e),e}}),ox(this,"unsubscribe",async(e,t)=>{this.isInitialized(),"u">typeof t?.id?await this.unsubscribeById(e,t.id,t):await this.unsubscribeByTopic(e,t)}),ox(this,"isSubscribed",e=>new Promise(t=>{t(this.topicMap.topics.includes(e))})),ox(this,"isKnownTopic",e=>new Promise(t=>{t(this.topicMap.topics.includes(e)||this.pending.has(e)||this.cached.some(t=>t.topic===e))})),ox(this,"on",(e,t)=>{this.events.on(e,t)}),ox(this,"once",(e,t)=>{this.events.once(e,t)}),ox(this,"off",(e,t)=>{this.events.off(e,t)}),ox(this,"removeListener",(e,t)=>{this.events.removeListener(e,t)}),ox(this,"start",async()=>{await this.onConnect()}),ox(this,"stop",async()=>{await this.onDisconnect()}),ox(this,"restart",async()=>
5735{await this.restore(),await this.onRestart()}),ox(this,"checkPending",async()=>{if(0===this.pending.size&&(!this.initialized||!this.relayer.connected))return;let e=[];this.pending.forEach(t=>{e.push(t)}),await this.batchSubscribe(e)}),ox(this,"registerEventListeners",()=>{this.relayer.core.heartbeat.on(s.li.pulse,async()=>{await this.checkPending()}),this.events.on(aY.created,async e=>{let t=aY.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}),this.events.on(aY.deleted,async e=>{let t=aY.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})}),this.relayer=e,this.logger=(0,l.U5)(t,this.name),this.clientId=""}get context(){return(0,l.oI)(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}get hasAnyTopics(){return this.topicMap.topics.length>0||this.pending.size>0||this.cached.length>0||this.subscriptions.size>0}hasSubscription(e,t){let r=!1;try{r=this.getSubscription(e).topic===t}catch{}return r}reset(){this.cached=[],this.initialized=!0}onDisable(){this.values.length>0&&(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 n=iK(r);await this.restartToComplete({topic:e,id:t,relay:n}),await this.rpcUnsubscribe(e,t,n);let i=eg("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,i),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,r){var n,i;
5735let a=await this.getSubscriptionId(e);if(null!=(n=r?.internal)&&n.skipSubscribe)return a;r&&r?.transportType!==aK.relay||await this.restartToComplete({topic:e,id:e,relay:t});let s={method:iZ(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:s});let o=null==(i=r?.internal)?void 0:i.throwOnFailedPublish;try{if(r?.transportType===aK.link_mode)return setTimeout(()=>{(this.relayer.connected||this.relayer.connecting)&&this.relayer.request(s).catch(e=>this.logger.warn(e))},(0,P.toMiliseconds)(P.ONE_SECOND)),a;let t=new Promise(async t=>{let r=n=>{n.topic===e&&(this.events.removeListener(aY.created,r),t(n.id))};this.events.on(aY.created,r);try{let n=await e$(new Promise((e,t)=>{this.relayer.request(s).catch(e=>{this.logger.warn(e,e?.message),t(e)}).then(e)}),this.initialSubscribeTimeout,`Subscribing to ${e} failed, please try again`);this.events.removeListener(aY.created,r),t(n)}catch{}}),n=await e$(t,this.subscribeTimeout,`Subscribing to ${e} failed, please try again`);if(!n&&o)throw Error(`Subscribing to ${e} failed, please try again`);return n?a:null}catch(e){if(this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(aq.connection_stalled),o)throw e}return null}async rpcBatchSubscribe(e){if(!e.length)return!0;let t={method:iZ(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 e$(new Promise((e,r)=>{this.relayer.request(t).then(e).catch(e=>{this.logger.warn(e),r(e)})}),this.subscribeTimeout,"rpcBatchSubscribe failed, please try again"),!0}catch{return this.relayer.events.emit(aq.connection_stalled),!1}}async rpcBatchFetchMessages(e){let t;if(!e.length)return;let r={method:iZ(e[0].relay.protocol).batchFetchMessages,params:{topics:e.map(e=>e.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{t=await await e$(new Promise((e,t)=>{this.relayer.request(r).catch(e=>{this.logger.warn(e),t(e)}).then(e)}),this.subscribeTimeout,"rpcBatchFetchMessages failed, please try again")}catch{this.relayer.events.emit(aq.connection_stalled)}return t}rpcUnsubscribe(e,t,r){let n={method:iZ(r.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n}),this.relayer.request(n)}onSubscribe(e,t){this.setSubscription(e,oA(oC({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach(e=>{this.setSubscription(e.id,oC({},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.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,oC({},t)),this.topicMap.set(t.topic,e),this.events.emit(aY.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}=em("NO_MATCHING_KEY",`${this.name}: ${e}`);throw 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(aY.deleted,oA(oC({},r),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(aY.sync)}async onRestart(){if(this.cached.length){let e=[...this.cached],t=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let r=0;r<t;r++){let t=e.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(t)}}this.events.emit(aY.resubscribed)}
5735async restore(){try{let e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size&&!e.every(e=>{var t;return e.topic===(null==(t=this.subscriptions.get(e.id))?void 0:t.topic)})){let{message:e}=em("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),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){if(!await this.rpcBatchSubscribe(e)){this.logger.warn(`Batch subscribe failed for ${e.length} topics, adding to pending for retry`),e.forEach(e=>{this.pending.set(e.topic,e)});return}this.onBatchSubscribe(await Promise.all(e.map(async e=>oA(oC({},e),{id:await this.getSubscriptionId(e.topic)}))))}}async batchFetchMessages(e){var t;if(!e.length)return;this.logger.trace(`Fetching batch messages for ${e.length} subscriptions`);let r=await this.rpcBatchFetchMessages(e);r&&r.messages&&(await (t=(0,P.toMiliseconds)(P.ONE_SECOND),new Promise(e=>setTimeout(e,t))),await this.relayer.handleBatchMessageEvents(r.messages))}async onConnect(){await this.restart(),this.reset()}onDisconnect(){this.onDisable()}isInitialized(){if(!this.initialized){let{message:e}=em("NOT_INITIALIZED",this.name);throw Error(e)}}async restartToComplete(e){this.relayer.connected||this.relayer.connecting||(this.cached.push(e),await this.relayer.transportOpen())}async getClientId(){return this.clientId||(this.clientId=await this.relayer.core.crypto.getClientId()),this.clientId}async getSubscriptionId(e){return iL(e+await this.getClientId())}}var oS=Object.defineProperty,oT=Object.getOwnPropertySymbols,oP=Object.prototype.hasOwnProperty,oO=Object.prototype.propertyIsEnumerable,o_=(e,t,r)=>t in e?oS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,oN=(e,t)=>{for(var r in t||(t={}))oP.call(t,r)&&o_(e,r,t[r]);if(oT)for(var r of oT(t))oO.call(t,r)&&o_(e,r,t[r]);return e},ok=(e,t,r)=>o_(e,"symbol"!=typeof t?t+"":t,r);class oR extends y{constructor(e){var t;super(e),ok(this,"protocol","wc"),ok(this,"version",2),ok(this,"core"),ok(this,"logger"),ok(this,"events",new i.EventEmitter),ok(this,"provider"),ok(this,"messages"),ok(this,"subscriber"),ok(this,"publisher"),ok(this,"name","relayer"),ok(this,"transportExplicitlyClosed",!1),ok(this,"initialized",!1),ok(this,"connectionAttemptInProgress",!1),ok(this,"relayUrl"),ok(this,"projectId"),ok(this,"packageName"),ok(this,"bundleId"),ok(this,"hasExperiencedNetworkDisruption",!1),ok(this,"pingTimeout"),ok(this,"heartBeatTimeout",(0,P.toMiliseconds)(P.THIRTY_SECONDS+P.FIVE_SECONDS)),ok(this,"reconnectTimeout"),ok(this,"connectPromise"),ok(this,"reconnectInProgress",!1),ok(this,"requestsInFlight",[]),ok(this,"connectTimeout",(0,P.toMiliseconds)(15*P.ONE_SECOND)),ok(this,"stalledRestartInProgress",!1),ok(this,"stalledRestartTimeout"),ok(this,"stalledRestartBackoff",0),ok(this,"stalledRestartBaseInterval",(0,P.toMiliseconds)(2*P.ONE_SECOND)),ok(this,"stalledRestartMaxInterval",(0,P.toMiliseconds)(P.THIRTY_SECONDS)),ok(this,"request",async e=>{var t,r;this.logger.debug("Publishing Request Payload");let n=e.id||(0,aR.getBigIntRpcId)().toString();await this.toEstablishConnection();try{this.logger.trace({id:n,method:e.method,topic:null==(t=e.params)?void 0:t.topic},"relayer.request - publishing...");let i=`${n}:${(null==(r=e.params)?void 0:r.tag)||""}`;this.requestsInFlight.push(i);let a=await this.provider.request(e);return this.requestsInFlight=this.requestsInFlight.filter(e=>e!==i),a}catch(e){throw this.logger.debug(`Failed to Publish Request: ${n}`),e}}),ok(this,"resetPingTimeout",()=>{eT()&&(clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var e,t,r,n;try{this.logger.debug({},"pingTimeout: Connection stalled, terminating..."),null==(n=null==(r=null==(t=null==(e=this.provider)?void 0:e.connection)?void 0:t.socket)?void 0:r.terminate)||n.call(r)}catch(e){this.logger.warn(e,e?.message)}},this.heartBeatTimeout))}),ok(this,"onPayloadHandler",e=>{this.onProviderPayload(e),this.resetPingTimeout()}),ok(this,"onConnectHandler",()=>{this.logger.warn({},"Relayer connected \uD83D\uDEDC"),this.startPingTimeout(),this.events.emit(aq.connect)}),ok(this,"onDisconnectHandler",()=>{this.logger.warn({},"Relayer disconnected \uD83D\uDED1"),this.requestsInFlight=[],this.onProviderDisconnect()}),ok(this,"onProviderErrorHandler",e=>{this.logger.fatal(`Fatal socket error: ${e.message}`),this.events.emit(aq.error,e),this.logger.fatal("Fatal socket error received, closing transport"),this.transportExplicitlyClosed=!0,clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectInProgress=!1,this.transportClose().catch(e=>this.logger.warn(e))}),ok(this,"registerProviderListeners",()=>{this.provider.on(aV.payload,this.onPayloadHandler),this.provider.on(aV.connect,this.onConnectHandler),this.provider.on(aV.disconnect,this.onDisconnectHandler),this.provider.on(aV.error,this.onProviderErrorHandler)}),this.core=e.core,this.logger=aN({logger:null!=(t=e.logger)?t:"error",name:this.name}),this.messages=new oe(this.logger,e.core),this.subscriber=new oI(this,this.logger),this.publisher=new od(this,this.logger),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||aW,eP()&&"u">typeof global&&"u">typeof(null==global?void 0:global.Platform)&&(null==global?void 0:global.Platform.OS)==="android"?this.packageName=eN():eP()&&"u">typeof global&&"u">typeof(null==global?void 0:global.Platform)&&(null==global?void 0:global.Platform.OS)==="ios"&&(this.bundleId=eN()),this.provider={}}
5735async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]),this.initialized=!0,this.transportOpen().catch(e=>this.logger.warn(e,e?.message))}get context(){return(0,l.oI)(this.logger)}get connected(){var e,t,r;return(null==(r=null==(t=null==(e=this.provider)?void 0:e.connection)?void 0:t.socket)?void 0:r.readyState)===1}get connecting(){var e,t,r;return(null==(r=null==(t=null==(e=this.provider)?void 0:e.connection)?void 0:t.socket)?void 0:r.readyState)===0||void 0!==this.connectPromise}async publish(e,t,r){this.isInitialized(),await this.publisher.publish(e,t,r),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now(),transportType:aK.relay},aZ.outbound)}async publishCustom(e){this.isInitialized(),await this.publisher.publishCustom(e)}async subscribe(e,t){var r,n,i;this.isInitialized(),null!=t&&t.transportType&&t?.transportType!=="relay"||await this.toEstablishConnection();let a=typeof(null==(r=t?.internal)?void 0:r.throwOnFailedPublish)>
5735"u"||(null==(n=t?.internal)?void 0:n.throwOnFailedPublish),s=(null==(i=this.subscriber.topicMap.get(e))?void 0:i[0])||"",o,l=t=>{t.topic===e&&(this.subscriber.off(aY.created,l),o())};return await Promise.all([new Promise(e=>{o=e,this.subscriber.on(aY.created,l)}),new Promise(async(r,n)=>{s=await this.subscriber.subscribe(e,oN({internal:{throwOnFailedPublish:a}},t)).catch(e=>{a&&n(e)})||s,r()})]),s}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 transportDisconnect(){this.provider.disconnect&&(this.hasExperiencedNetworkDisruption||this.connected)?await e$(this.provider.disconnect(),2e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,clearTimeout(this.stalledRestartTimeout),this.stalledRestartInProgress=!1,this.stalledRestartBackoff=0,await this.resetTransport()}async transportOpen(e){if(!this.subscriber.hasAnyTopics)return void this.logger.info("Starting WS connection skipped because the client has no topics to work with.");if(this.connectPromise?(this.logger.debug({},"Waiting for existing connection attempt to resolve..."),await this.connectPromise,this.logger.debug({},"Existing connection attempt resolved")):(this.connectPromise=new Promise(async(t,r)=>{await this.connect(e).then(t).catch(r).finally(()=>{this.connectPromise=void 0})}),await this.connectPromise),!this.connected)throw Error(`Couldn't establish socket connection to the relay server: ${this.relayUrl}`)}async restartTransport(e){this.logger.debug({},"Restarting transport..."),this.connectionAttemptInProgress||(this.relayUrl=e||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.resetTransport(),await this.transportOpen())}async resetTransport(){this.reconnectInProgress=!0,clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,await this.transportDisconnect(),await this.subscriber.stop(),this.reconnectInProgress=!1}async confirmOnlineStateOrThrow(){if(!await aS())throw Error("No internet connection detected. Please restart your network and try again.")}async handleBatchMessageEvents(e){if(e?.length===0)return void this.logger.trace("Batch message events is empty. Ignoring...");let t=e.sort((e,t)=>e.publishedAt-t.publishedAt);for(let e of(this.logger.debug(`Batch of ${t.length} message events sorted`),t))try{await this.onMessageEvent(e)}catch(e){this.logger.warn(e,"Error while processing batch message event: "+e?.message)}this.logger.trace(`Batch of ${t.length} message events processed`)}async onLinkMessageEvent(e,t){let{topic:r}=e;if(!t.sessionExists){let e=eF(P.FIVE_MINUTES);await this.core.pairing.pairings.set(r,{topic:r,expiry:e,relay:{protocol:"irn"},active:!1})}this.events.emit(aq.message,e),await this.recordMessageEvent(e,aZ.inbound)}async connect(e){await this.confirmOnlineStateOrThrow(),e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportDisconnect()),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;let t=1;for(;t<6;){try{if(this.transportExplicitlyClosed)break;this.logger.debug({},`Connecting to ${this.relayUrl}, attempt: ${t}...`),await this.createProvider(),await new Promise(async(e,t)=>{let r=()=>{t(Error("Connection interrupted while trying to connect"))};this.provider.once(aV.disconnect,r),await e$(new Promise((e,t)=>{this.provider.connect().then(e).catch(t)}),this.connectTimeout,`Socket stalled when trying to connect to ${this.relayUrl}`).catch(e=>{t(e)}).finally(()=>{this.provider.off(aV.disconnect,r),clearTimeout(this.reconnectTimeout)}),await new Promise(async(e,r)=>{let n=()=>{t(Error("Connection interrupted while trying to subscribe"))};this.provider.once(aV.disconnect,n),await this.subscriber.start().then(e).catch(r).finally(()=>{this.provider.off(aV.disconnect,n)})}),this.hasExperiencedNetworkDisruption=!1,e()})}catch(e){await this.subscriber.stop(),this.logger.warn({},e.message),this.hasExperiencedNetworkDisruption=!0}finally{this.connectionAttemptInProgress=!1}if(this.connected){this.logger.debug({},`Connected to ${this.relayUrl} successfully on attempt: ${t}`);break}await new Promise(e=>setTimeout(e,(0,P.toMiliseconds)(+t))),t++}}startPingTimeout(){var e,t,r,n,i;if(eT())try{null!=(t=null==(e=this.provider)?void 0:e.connection)&&t.socket&&(null==(i=null==(n=null==(r=this.provider)?void 0:r.connection)?void 0:n.socket)||i.on("ping",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(e){this.logger.warn(e,e?.message)}}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();let e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new ak.F(new aM.A(function({protocol:e,version:t,relayUrl:r,sdkVersion:n,auth:i,projectId:a,useOnCloseEvent:s,bundleId:o,packageName:l}){let c=r.split("?"),u=eR(e,t,n),d=function(e,t){let r=new URLSearchParams(e);return Object.entries(t).sort(([e],[t])=>
5735e.localeCompare(t)).forEach(([e,t])=>{null!=t&&r.set(e,String(t))}),r.toString()}(c[1]||"",{auth:i,ua:u,projectId:a,useOnCloseEvent:s||void 0,packageName:l||void 0,bundleId:o||void 0});return c[0]+"?"+d}({sdkVersion:aG,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId,packageName:this.packageName}))),this.registerProviderListeners()}async recordMessageEvent(e,t){let{topic:r,message:n}=e;await this.messages.set(r,n,t)}async shouldIgnoreMessageEvent(e){let{topic:t,message:r}=e;if(!r||0===r.length)return this.logger.warn(`Ignoring invalid/empty message: ${r}`),!0;if(!await this.subscriber.isKnownTopic(t))return this.logger.warn(`Ignoring message for unknown topic ${t}`),!0;let n=this.messages.has(t,r);return n&&this.logger.warn(`Ignoring duplicate message: ${r}`),n}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),(0,aR.isJsonRpcRequest)(e)){if(!e.method.endsWith("_subscription"))return;let t=e.params,{topic:r,message:n,publishedAt:i,attestation:a}=t.data,s={topic:r,message:n,publishedAt:i,transportType:aK.relay,attestation:a};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(oN({type:"event",event:t.id},s)),this.events.emit(t.id,s),await this.acknowledgePayload(e),await this.onMessageEvent(s)}else(0,aR.isJsonRpcResponse)(e)&&this.events.emit(aq.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(await this.recordMessageEvent(e,aZ.inbound),this.events.emit(aq.message,e))}async acknowledgePayload(e){let t=(0,aR.formatJsonRpcResult)(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(aV.payload,this.onPayloadHandler),this.provider.off(aV.connect,this.onConnectHandler),this.provider.off(aV.disconnect,this.onDisconnectHandler),this.provider.off(aV.error,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let e=await aS();(function(e){var t,r;switch(e_()){case eS.browser:t=e,!eP()&&eO()&&(window.addEventListener("online",()=>t(!0)),window.addEventListener("offline",()=>t(!1)));break;case eS.reactNative:r=e,eP()&&"u">typeof global&&null!=global&&global.NetInfo&&global?.NetInfo.addEventListener(e=>r(e?.isConnected));case eS.node:}})(async t=>{e!==t&&(e=t,t?await this.transportOpen().catch(e=>this.logger.error(e,e?.message)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))}),this.core.heartbeat.on(s.li.pulse,async()=>{var e;if(!this.transportExplicitlyClosed&&!this.connected&&(!(eO()&&(0,k.getDocument)())||(null==(e=(0,k.getDocument)())?void 0:e.visibilityState)==="visible"))try{await this.confirmOnlineStateOrThrow(),await this.transportOpen()}catch(e){this.logger.warn(e,e?.message)}}),this.events.on(aq.connection_stalled,()=>{if(this.transportExplicitlyClosed||this.stalledRestartInProgress)return;this.stalledRestartInProgress=!0;let e=0===this.stalledRestartBackoff?0:Math.min(Math.pow(2,this.stalledRestartBackoff-1)*this.stalledRestartBaseInterval,this.stalledRestartMaxInterval);this.stalledRestartBackoff++,this.logger.warn(`Connection stalled, restarting transport${e?` in ${e}ms`:""}...`),this.stalledRestartTimeout=setTimeout(async()=>{try{if(this.transportExplicitlyClosed)return;await this.restartTransport()}catch(e){this.logger.error(e,e?.message)}finally{this.stalledRestartInProgress=!1}},e)})}async onProviderDisconnect(){clearTimeout(this.pingTimeout),this.events.emit(aq.disconnect),this.connectionAttemptInProgress=!1,!this.reconnectInProgress&&(this.reconnectInProgress=!0,await this.subscriber.stop(),this.subscriber.hasAnyTopics&&(this.transportExplicitlyClosed||(this.reconnectTimeout=setTimeout(async()=>{await this.transportOpen().catch(e=>this.logger.error(e,e?.message)),this.reconnectTimeout=void 0,this.reconnectInProgress=!1},(0,P.toMiliseconds)(.1)))))}isInitialized(){if(!this.initialized){let{message:e}=em("NOT_INITIALIZED",this.name);throw Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectPromise)return void await this.connectPromise;await this.connect()}}}function oM(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}
5735function oB(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}let oj="[object Arguments]",oU="[object Object]";function o$(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&"[object Object]"===Object.prototype.toString.call(e)}function oL(){}var oD=Object.defineProperty,oF=Object.getOwnPropertySymbols,oH=Object.prototype.hasOwnProperty,oz=Object.prototype.propertyIsEnumerable,oW=(e,t,r)=>t in e?oD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,oq=(e,t)=>{for(var r in t||(t={}))oH.call(t,r)&&oW(e,r,t[r]);if(oF)for(var r of oF(t))oz.call(t,r)&&oW(e,r,t[r]);return e},oV=(e,t,r)=>oW(e,"symbol"!=typeof t?t+"":t,r);class oG extends b{constructor(e,t,r,n=a$,i){super(e,t,r,n),this.core=e,this.logger=t,this.name=r,oV(this,"map",new Map),oV(this,"version","0.3"),oV(this,"cached",[]),oV(this,"initialized",!1),oV(this,"getKey"),oV(this,"storagePrefix",a$),oV(this,"recentlyDeleted",[]),oV(this,"recentlyDeletedLimit",200),oV(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(e=>{this.getKey&&null!==e&&!af(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):e?.topic&&this.map.set(e.topic,e)}),this.cached=[],this.initialized=!0)}),oV(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())}),oV(this,"get",e=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:e}),this.getData(e))),oV(this,"getAll",e=>(this.isInitialized(),e?this.values.filter(t=>Object.keys(e).every(r=>{var n;return n=t[r],function e(t,r,n,i,a,s,o){let l=o(t,r,n,i,a,s);if(void 0!==l)return l;if(typeof t==typeof r)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":case"function":return t===r;case"number":return t===r||Object.is(t,r)}return function t(r,n,i,a){if(Object.is(r,n))return!0;let s=oB(r),o=oB(n);if(s===oj&&(s=oU),o===oj&&(o=oU),s!==o)return!1;switch(s){case"[object String]":return r.toString()===n.toString();case"[object Number]":{let e=r.valueOf(),t=n.valueOf();return e===t||Number.isNaN(e)&&Number.isNaN(t)}case"[object Boolean]":case"[object Date]":case"[object Symbol]":return Object.is(r.valueOf(),n.valueOf());case"[object RegExp]":return r.source===n.source&&r.flags===n.flags;case"[object Function]":return r===n}let l=(i=i??new Map).get(r),c=i.get(n);if(null!=l&&null!=c)return l===n;i.set(r,n),i.set(n,r);try{switch(s){case"[object Map]":if(r.size!==n.size)return!1;for(let[t,s]of r.entries())if(!n.has(t)||!e(s,n.get(t),t,r,n,i,a))return!1;return!0;case"[object Set]":{if(r.size!==n.size)return!1;let t=Array.from(r.values()),s=Array.from(n.values());for(let o=0;o<t.length;o++){let l=t[o],c=s.findIndex(t=>e(l,t,void 0,r,n,i,a));if(-1===c)return!1;s.splice(c,1)}return!0}case"[object Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":case"[object BigUint64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object BigInt64Array]":case"[object Float32Array]":case"[object Float64Array]":if("u">typeof aB&&aB.isBuffer(r)!==aB.isBuffer(n)||r.length!==n.length)return!1;for(let t=0;t<r.length;t++)if(!e(r[t],n[t],t,r,n,i,a))return!1;return!0;case"[object ArrayBuffer]":return r.byteLength===n.byteLength&&t(new Uint8Array(r),new Uint8Array(n),i,a);case"[object DataView]":return r.byteLength===n.byteLength&&r.byteOffset===n.byteOffset&&t(new Uint8Array(r),new Uint8Array(n),i,a);case"[object Error]":return r.name===n.name&&r.message===n.message;case oU:{if(!(t(r.constructor,n.constructor,i,a)||o$(r)&&o$(n)))return!1;let s=[...Object.keys(r),...oM(r)],o=[...Object.keys(n),...oM(n)];if(s.length!==o.length)return!1;for(let t=0;t<s.length;t++){let o=s[t],l=r[o];if(!Object.hasOwn(n,o))return!1;let c=n[o];if(!e(l,c,o,r,n,i,a))return!1}return!0}default:return!1}}finally{i.delete(r),i.delete(n)}}(t,r,s,o)}(n,e[r],void 0,void 0,void 0,void 0,oL)})):this.values)),oV(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=oq(oq({},this.getData(e)),t);this.map.set(e,r),await this.persist()}),oV(this,"delete",async(e,t)=>{this.isInitialized(),this.map.has(e)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",ke
5735y:e,reason:t}),this.map.delete(e),this.addToRecentlyDeleted(e),await this.persist())}),this.logger=(0,l.U5)(t,this.name),this.storagePrefix=n,this.getKey=i}get context(){return(0,l.oI)(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())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}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){if(this.recentlyDeleted.includes(e)){let{message:t}=em("MISSING_OR_INVALID",`Record was recently deleted - ${this.name}: ${e}`);throw this.logger.error(t),Error(t)}let{message:t}=em("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),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}=em("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),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}=em("NOT_INITIALIZED",this.name);throw Error(e)}}}var oK=Object.defineProperty,oZ=(e,t,r)=>((e,t,r)=>t in e?oK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class oJ{constructor(e,t){this.core=e,this.logger=t,oZ(this,"name","pairing"),oZ(this,"version","0.3"),oZ(this,"events",new i),oZ(this,"pairings"),oZ(this,"initialized",!1),oZ(this,"storagePrefix",a$),oZ(this,"ignoredPayloadTypes",[1]),oZ(this,"registeredMethods",[]),oZ(this,"init",async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))}),oZ(this,"register",({methods:e})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...e])]}),oZ(this,"create",async e=>{this.isInitialized();let t=iU(),r=await this.core.crypto.setSymKey(t),n=eF(P.FIVE_MINUTES),i={protocol:"irn"},a={topic:r,expiry:n,relay:i,active:!1,methods:e?.methods},s=i3({protocol:this.core.protocol,version:this.core.version,topic:r,symKey:t,relay:i,expiryTimestamp:n,methods:e?.methods});return this.events.emit(aX.create,a),this.core.expirer.set(r,n),await this.pairings.set(r,a),await this.core.relayer.subscribe(r,{transportType:e?.transportType,internal:e?.internal}),{topic:r,uri:s}}),oZ(this,"pair",async e=>{let t;this.isInitialized();let r=this.core.eventClient.createEvent({properties:{topic:e?.uri,trace:[a3.pairing_started]}});this.isValidPair(e,r);let{topic:n,symKey:i,relay:a,expiryTimestamp:s,methods:o}=i6(e.uri);if(r.props.properties.topic=n,r.addTrace(a3.pairing_uri_validation_success),r.addTrace(a3.pairing_uri_not_expired),this.pairings.keys.includes(n)){if(t=this.pairings.get(n),r.addTrace(a3.existing_pairing),t.active)throw r.setError(a4.active_pairing_already_exists),Error(`Pairing already exists: ${n}. Please try again with a new connection URI.`);r.addTrace(a3.pairing_not_expired)}let l=s||eF(P.FIVE_MINUTES),c={topic:n,relay:a,expiry:l,active:!1,methods:o};this.core.expirer.set(n,l),await this.pairings.set(n,c),r.addTrace(a3.store_new_pairing),e.activatePairing&&await this.activate({topic:n}),this.events.emit(aX.create,c),r.addTrace(a3.emit_inactive_pairing),this.core.crypto.keychain.has(n)||await this.core.crypto.setSymKey(i,n),r.addTrace(a3.subscribing_pairing_topic);try{await this.core.relayer.confirmOnlineStateOrThrow()}catch{r.setError(a4.no_internet_connection)}try{await this.core.relayer.subscribe(n,{relay:a})}catch(e){throw r.setError(a4.subscribe_pairing_topic_failure),e}return r.addTrace(a3.subscribe_pairing_topic_success),c}),oZ(this,"activate",async({topic:e})=>{this.isInitialized();let t=eF(P.FIVE_MINUTES);this.core.expirer.set(e,t),await this.pairings.update(e,{active:!0,expiry:t})}),oZ(this,"ping",async e=>{this.isInitialized(),await this.isValidPing(e),this.logger.warn("ping() is deprecated and will be removed in the next major release.");let{topic:t}=e;if(this.pairings.keys.includes(t)){let e=await this.sendRequest(t,"wc_pairingPing",{}),{done:r,resolve:n,reject:i}=eU();this.events.once(ez("pairing_ping",e),({error:e})=>{e?i(e):n()}),await r()}}),oZ(this,"updateExpiry",async({topic:e,expiry:t})=>{this.isInitialized(),await this.pairings.update(e,{expiry:t})}),oZ(this,"updateMetadata",async({topic:e,metadata:t})=>{this.isInitialized(),await this.pairings.update(e,{peerMetadata:t})}),oZ(this,"getPairings",()=>(this.isInitialized(),this.pairings.values)),oZ(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",eg("USER_DISCONNECTED")),await this.deletePairing(t))}),oZ(this,"formatUriFromPairing",e=>{this.isInitialized();let{topic:t,relay:r,expiry:n,methods:i}=e,a=this.core.crypto.keychain.get(t);return i3({protocol:this.core.protocol,version:this.core.version,topic:t,symKey:a,relay:r,expiryTimestamp:n,methods:i})}),oZ(this,"sendRequest",async(e,t,r)=>{let n=(0,aR.formatJsonRpcRequest)(t,r),i=await this.core.crypto.encode(e,n),a=aQ[t].req;return this.core.history.set(e,n),this.core.relayer.publish(e,i,a),n.id}),oZ(this,"sendResult",async(e,t,r)=>{let n=(0,aR.formatJsonRpcResult)(e,r),i=await this.core.crypto.encode(t,n),a=aQ[(await this.core.history.get(t,e)).request.method].res;await this.core.relayer.publish(t,i,a),await this.core.history.resolve(n)}),oZ(this,"sendError",async(e,t,r)=>{let n=(0,aR.formatJsonRpcError)(e,r),i=await this.core.crypto.encode(t,n),a=(await this.core.history.get(t,e)).request.method,s=aQ[a]?aQ[a].res:aQ.unregistered_method.res;await this.core.relayer.publish(t,i,s),await this.core.history.resolve(n)}),oZ(this,"deletePairing",async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,eg("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(e),t?Promise.resolve():this.core.expirer.del(e)])}),oZ(this,"cleanup",async()=>{let e=this.pairings.getAll().filter(e=>eH(e.expiry));await Promise.all(e.map(e=>this.deletePairing(e.topic)))}),oZ(this,"onRelayEventRequest",async e=>{let{topic:t,payload:r}=e;switch(r.method){case"wc_pairingPing":return await this.onPairingPingRequest(t,r);case"wc_pairingDelete":return await this.onPairingDeleteRequest(t,r);default:return await this.onUnknownRpcMethodRequest(t,r)}}),oZ(this,"onRelayEventResponse",async e=>{let{topic:t,payload:r}=e,n=(await this.core.history.get(t,r.id)).request.method;return"wc_pairingPing"===n?this.onPairingPingResponse(t,r):this.onUnknownRpcMethodResponse(n)}),oZ(this,"onPairingPingRequest",async(e,t)=>{let{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult(r,e,!0),this.events.emit(aX.ping,{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.logger.error(t)}}),oZ(this,"onPairingPingResponse",(e,t)=>{let{id:r}=t;setTimeout(()=>{(0,aR.isJsonRpcResult)(t)?this.events.emit(ez("pairing_ping",r),{}):(0,aR.isJsonRpcError)(t)&&this.events.emit(ez("pairing_ping",r),{error:t.error})},500)}),oZ(this,"onPairingDeleteRequest",async(e,t)=>{let{id:r}=t;try{this.isValidDisconnect({topic:e}),await this.deletePairing(e),this.events.emit(aX.delete,{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.logger.error(t)}}),oZ(this,"onUnknownRpcMethodRequest",async(e,t)=>{let{id:r,method:n}=t;try{if(this.registeredMethods.includes(n))return;let t=eg("WC_METHOD_UNSUPPORTED",n);await this.sendError(r,e,t),this.logger.error(t)}catch(t){await this.sendError(r,e,t),this.logger.error(t)}}),oZ(this,"onUnknownRpcMethodResponse",e=>{this.registeredMethods.includes(e)||this.logger.error(eg("WC_METHOD_UNSUPPORTED",e))}),oZ(this,"isValidPair",(e,t)=>{var r;if(!aC(e)){let{message:r}=em("MISSING_OR_INVALID",`pair() params: ${e}`);throw t.setError(a4.malformed_pairing_uri),Error(r)}if(!function(e){function t(e){try{return"u">typeof new URL(e)}catch{return!1}}try{if(am(e,!1)){if(t(e))return!0;let r=eJ(e);return t(r)}}catch{}return!1}(e.uri)){let{message:r}=em("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw t.setError(a4.malformed_pairing_uri),Error(r)}let n=i6(e?.uri);if(!(null!=(r=n?.relay)&&r.protocol)){let{message:e}=em("MISSING_OR_INVALID","pair() uri#relay-protocol");throw t.setError(a4.malformed_pairing_uri),Error(e)}if(!(null!=n&&n.symKey)){let{message:e}=em("MISSING_OR_INVALID","pair() uri#symKey");throw t.setError(a4.malformed_pairing_uri),Error(e)}if(null!=n&&n.expiryTimestamp&&(0,P.toMiliseconds)(n?.expiryTimestamp)<Date.now()){t.setError(a4.pairing_expired);let{message:e}=em("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw Error(e)}}),oZ(this,"isValidPing",async e=>{if(!aC(e)){let{message:t}=em("MISSING_OR_INVALID",`ping() params: ${e}`);throw Error(t)}let{topic:t}=e;await this.isValidPairingTopic(t)}),oZ(this,"isValidDisconnect",async e=>{if(!aC(e)){let{message:t}=em("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw Error(t)}let{topic:t}=e;await this.isValidPairingTopic(t)}),oZ(this,"isValidPairingTopic",async e=>{if(!am(e,!1)){let{message:t}=em("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw Error(t)}if(!this.pairings.keys.includes(e)){let{message:t}=em("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw Error(t)}if(eH(this.pairings.get(e).expiry)){await this.deletePairing(e);let{message:t}=em("EXPIRED",`pairing topic: ${e}`);throw Error(t)}}),this.core=e,this.logger=(0,l.U5)(t,this.name),this.pairings=new oG(this.core,this.logger,this.name,this.storagePrefix)}get context(){return(0,l.oI)(this.logger)}isInitialized(){if(!this.initialized){let{message:e}=em("NOT_INITIALIZED",this.name);throw Error(e)}}registerRelayerEvents(){this.core.relayer.on(aq.message,async e=>{let{topic:t,message:r,transportType:n}=e;if(this.pairings.keys.includes(t)&&n!==aK.link_mode&&!this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(r)))try{let e=await this.core.crypto.decode(t,r);(0,aR.isJsonRpcRequest)(e)?(this.core.history.set(t,e),await this.onRelayEventRequest({topic:t,payload:e})):(0,aR.isJsonRpcResponse)(e)&&(await this.core.history.resolve(e),await this.onRelayEventResponse({topic:t,payload:e}),this.core.history.delete(t,e.id)),await this.core.relayer.messages.ack(t,r)}catch(e){this.logger.error(e)}})}registerExpirerEvents(){this.core.expirer.on(a1.expired,async e=>{let{topic:t}=eD(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(aX.expire,{topic:t}))})}}var oY=Object.defineProperty,oQ=(e,t,r)=>((e,t,r)=>t in e?oY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class oX extends f{constructor(e,t){super(e,t),this.core=e,this.logger=t,oQ(this,"records",new Map),oQ(this,"events",new i.EventEmitter),oQ(this,"name","history"),oQ(this,"version","0.3"),oQ(this,"cac
5735hed",[]),oQ(this,"initialized",!1),oQ(this,"storagePrefix",a$),oQ(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)}),oQ(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 n={id:t.id,topic:e,request:{method:t.method,params:t.params||null},chainId:r,expiry:eF(P.THIRTY_DAYS)};this.records.set(n.id,n),this.persist(),this.events.emit(a0.created,n)}),oQ(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=(0,aR.isJsonRpcError)(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.persist(),this.events.emit(a0.updated,t))}),oQ(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))),oQ(this,"delete",(e,t)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:t}),this.values.forEach(r=>{r.topic===e&&("u">typeof t&&r.id!==t||(this.records.delete(r.id),this.events.emit(a0.deleted,r)))}),this.persist()}),oQ(this,"exists",async(e,t)=>(this.isInitialized(),!!this.records.has(t)&&(await this.getRecord(t)).topic===e)),oQ(this,"on",(e,t)=>{this.events.on(e,t)}),oQ(this,"once",(e,t)=>{this.events.once(e,t)}),oQ(this,"off",(e,t)=>{this.events.off(e,t)}),oQ(this,"removeListener",(e,t)=>{this.events.removeListener(e,t)}),this.logger=(0,l.U5)(t,this.name)}get context(){return(0,l.oI)(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("u">typeof t.response)return;let r={topic:t.topic,request:(0,aR.formatJsonRpcRequest)(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}=em("NO_MATCHING_KEY",`${this.name}: ${e}`);throw Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(a0.sync)}async restore(){try{let e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){let{message:e}=em("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),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(a0.created,e=>{let t=a0.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.events.on(a0.updated,e=>{let t=a0.updated;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.events.on(a0.deleted,e=>{let t=a0.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.core.heartbeat.on(s.li.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach(t=>{(0,P.toMiliseconds)(t.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${t.id}`),this.records.delete(t.id),this.events.emit(a0.deleted,t,!1),e=!0)}),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){let{message:e}=em("NOT_INITIALIZED",this.name);throw Error(e)}}}var o0=Object.defineProperty,o1=(e,t,r)=>((e,t,r)=>t in e?o0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class o2 extends v{constructor(e,t){super(e,t),this.core=e,this.logger=t,o1(this,"expirations",new Map),o1(this,"events",new i.EventEmitter),o1(this,"name","expirer"),o1(this,"version","0.3"),o1(this,"cac
5735hed",[]),o1(this,"initialized",!1),o1(this,"storagePrefix",a$),o1(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)}),o1(this,"has",e=>{try{let t=this.formatTarget(e);return"u">typeof this.getExpiration(t)}catch{return!1}}),o1(this,"set",(e,t)=>{this.isInitialized();let r=this.formatTarget(e),n={target:r,expiry:t};this.expirations.set(r,n),this.checkExpiry(r,n),this.events.emit(a1.created,{target:r,expiration:n})}),o1(this,"get",e=>{this.isInitialized();let t=this.formatTarget(e);return this.getExpiration(t)}),o1(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(a1.deleted,{target:t,expiration:r})}}),o1(this,"on",(e,t)=>{this.events.on(e,t)}),o1(this,"once",(e,t)=>{this.events.once(e,t)}),o1(this,"off",(e,t)=>{this.events.off(e,t)}),o1(this,"removeListener",(e,t)=>{this.events.removeListener(e,t)}),this.logger=(0,l.U5)(t,this.name)}get context(){return(0,l.oI)(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 eL("topic",e);if("number"==typeof e)return eL("id",e);let{message:t}=em("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw 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(a1.sync)}async restore(){try{let e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){let{message:e}=em("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),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}=em("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.warn(t),Error(t)}return t}checkExpiry(e,t){let{expiry:r}=t;(0,P.toMiliseconds)(r)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(a1.expired,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,t)=>this.checkExpiry(t,e))}registerEventListeners(){this.core.heartbeat.on(s.li.pulse,()=>this.checkExpirations()),this.events.on(a1.created,e=>{let t=a1.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(a1.expired,e=>{let t=a1.expired;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(a1.deleted,e=>{let t=a1.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})}isInitialized(){if(!this.initialized){let{message:e}=em("NOT_INITIALIZED",this.name);throw Error(e)}}}var o5=Object.defineProperty,o6=(e,t,r)=>((e,t,r)=>t in e?o5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class o3 extends E{constructor(e,t,r){super(e,t,r),this.core=e,this.logger=t,this.store=r,o6(this,"name","verify-api"),o6(this,"abortController"),o6(this,"isDevEnv"),o6(this,"verifyUrlV3",a5),o6(this,"storagePrefix",a$),o6(this,"version",2),o6(this,"publicKey"),o6(this,"fetchPromise"),o6(this,"init",async()=>{var e;this.isDevEnv||(this.publicKey=await this.store.getItem(this.storeKey),this.publicKey&&(0,P.toMiliseconds)(null==(e=this.publicKey)?void 0:e.expiresAt)<Date.now()&&(this.logger.debug("verify v2 public key expired"),await this.removePublicKey()))}),o6(this,"register",async e=>{if(!eO()||this.isDevEnv)return;let t=window.location.origin,{id:r,decryptedId:n}=e,i=`${this.verifyUrlV3}/attestation?projectId=${this.core.projectId}&origin=${t}&id=${r}&decryptedId=${n}`;try{let e=(0,k.getDocument)(),t=this.startAbortTimer(5*P.ONE_SECOND),n=await new Promise((n,a)=>{let s=()=>{window.removeEventListener("message",l),e.body.removeChild(o),a("attestation aborted")};this.abortController.signal.addEventListener("abort",s);let o=e.createElement("iframe");o.src=i,o.style.display="none",o.addEventListener("error",s,{signal:this.abortController.signal});let l=i=>{if(i.data&&"string"==typeof i.data)try{let a=JSON.parse(i.data);if("verify_attestation"===a.type){if((0,_.Cq)(a.attestation).payload.id!==r)return;clearInterval(t),e.body.removeChild(o),this.abortController.signal.removeEventListener("abort",s),window.removeEventListener("message",l),n(null===a.attestation?"":a.attestation)}}catch(e){this.logger.warn(e)}};e.body.appendChild(o),window.addEventListener("message",l,{signal:this.abortController.signal})});return this.logger.debug(n,"jwt attestation"),n}catch(e){this.logger.warn(e)}return""}),o6(this,"resolve",async e=>{if(this.isDevEnv)return"";let{attestationId:t,hash:r,encryptedId:n}=e;if(""===t)return void this.logger.debug("resolve: attestationId is empty, skipping");if(t){if((0,_.Cq)(t).payload.id!==n)return;let e=await this.isValidJwtAttestation(t);
5735if(e)return e.isVerified?e:void this.logger.warn("resolve: jwt attestation: origin url not verified")}if(!r)return;let i=this.getVerifyUrl(e?.verifyUrl);return this.fetchAttestation(r,i)}),o6(this,"fetchAttestation",async(e,t)=>{this.logger.debug(`resolving attestation: ${e} from url: ${t}`);let r=this.startAbortTimer(5*P.ONE_SECOND),n=await fetch(`${t}/attestation/${e}?v2Supported=true`,{signal:this.abortController.signal});return clearTimeout(r),200===n.status?await n.json():void 0}),o6(this,"getVerifyUrl",e=>{let t=e||a2;return a6.includes(t)||(this.logger.info(`verify url: ${t}, not included in trusted list, assigning default: ${a2}`),t=a2),t}),o6(this,"fetchPublicKey",async()=>{try{this.logger.debug(`fetching public key from: ${this.verifyUrlV3}`);let e=this.startAbortTimer(P.FIVE_SECONDS),t=await fetch(`${this.verifyUrlV3}/public-key`,{signal:this.abortController.signal});return clearTimeout(e),await t.json()}catch(e){this.logger.warn(e)}}),o6(this,"persistPublicKey",async e=>{this.logger.debug(e,"persisting public key to local storage"),await this.store.setItem(this.storeKey,e),this.publicKey=e}),o6(this,"removePublicKey",async()=>{this.logger.debug("removing verify v2 public key from storage"),await this.store.removeItem(this.storeKey),this.publicKey=void 0}),o6(this,"isValidJwtAttestation",async e=>{let t=await this.getPublicKey();try{if(t)return this.validateAttestation(e,t)}catch(e){this.logger.error(e),this.logger.warn("error validating attestation")}let r=await this.fetchAndPersistPublicKey();try{if(r)return this.validateAttestation(e,r)}catch(e){this.logger.error(e),this.logger.warn("error validating attestation")}}),o6(this,"getPublicKey",async()=>this.publicKey?this.publicKey:await this.fetchAndPersistPublicKey()),o6(this,"fetchAndPersistPublicKey",async()=>{if(this.fetchPromise)return await this.fetchPromise,this.publicKey;this.fetchPromise=new Promise(async e=>{let t=await this.fetchPublicKey();t&&(await this.persistPublicKey(t),e(t))});let e=await this.fetchPromise;return this.fetchPromise=void 0,e}),o6(this,"validateAttestation",(e,t)=>{let r=function(e,t){let[r,n,i]=e.split("."),a=eu.from(iz(i),"base64");if(64!==a.length)throw Error("Invalid signature length");let s=a.slice(0,32),o=a.slice(32,64),l=re(`${r}.${n}`),c=function(e){let t=eu.from(e.x,"base64"),r=eu.from(e.y,"base64");return(0,es.xW)([new Uint8Array([4]),t,r])}(t);if(!iN.verify((0,es.xW)([s,o]),l,c))throw Error("Invalid signature");return(0,_.Cq)(e).payload}(e,t.publicKey),n={hasExpired:(0,P.toMiliseconds)(r.exp)<Date.now(),payload:r};if(n.hasExpired)throw this.logger.warn("resolve: jwt attestation expired"),Error("JWT attestation expired");return{origin:n.payload.origin,isScam:n.payload.isScam,isVerified:n.payload.isVerified}}),this.logger=(0,l.U5)(t,this.name),this.abortController=new AbortController,this.isDevEnv=eZ(),this.init()}get storeKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//verify:public:key"}get context(){return(0,l.oI)(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),(0,P.toMiliseconds)(e))}}var o4=Object.defineProperty,o8=(e,t,r)=>((e,t,r)=>t in e?o4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class o9 extends C{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,o8(this,"context","echo"),o8(this,"registerDeviceToken",async e=>{let{clientId:t,token:r,notificationType:n,enableEncrypted:i=!1}=e,a=`https://echo.walletconnect.com/${this.projectId}/clients`;await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:t,type:n,token:r,always_raw:i})})}),this.logger=(0,l.U5)(t,this.context)}}var o7=Object.defineProperty,le=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,ln=(e,t,r)=>t in e?o7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,li=(e,t)=>{for(var r in t||(t={}))lt.call(t,r)&&ln(e,r,t[r]);if(le)for(var r of le(t))lr.call(t,r)&&ln(e,r,t[r]);return e},la=(e,t,r)=>ln(e,"symbol"!=typeof t?t+"":t,r);class ls extends A{constructor(e,t,r=!0){super(e,t,r),this.core=e,this.logger=t,la(this,"context","event-client"),la(this,"storagePrefix",a$),la(this,"storageVersion",.1),la(this,"events",new Map),la(this,"shouldPersist",!1),la(this,"init",async()=>
5735{if(!eZ())try{let e={eventId:eK(),timestamp:Date.now(),domain:this.getAppDomain(),props:{event:"INIT",type:"",properties:{client_id:await this.core.crypto.getClientId(),user_agent:eR(this.core.relayer.protocol,this.core.relayer.version,aG)}}};await this.sendEvent([e])}catch(e){this.logger.warn(e)}}),la(this,"createEvent",e=>{let{event:t="ERROR",type:r="",properties:{topic:n,trace:i}}=e,a=eK(),s=this.core.projectId||"",o=li({eventId:a,timestamp:Date.now(),props:{event:t,type:r,properties:{topic:n,trace:i}},bundleId:s,domain:this.getAppDomain()},this.setMethods(a));return this.telemetryEnabled&&(this.events.set(a,o),this.shouldPersist=!0),o}),la(this,"getEvent",e=>{let{eventId:t,topic:r}=e;if(t)return this.events.get(t);let n=Array.from(this.events.values()).find(e=>e.props.properties.topic===r);if(n)return li(li({},n),this.setMethods(n.eventId))}),la(this,"deleteEvent",e=>{let{eventId:t}=e;this.events.delete(t),this.shouldPersist=!0}),la(this,"setEventListeners",()=>{this.core.heartbeat.on(s.li.pulse,async()=>{this.shouldPersist&&await this.persist(),this.events.forEach(e=>{(0,P.fromMiliseconds)(Date.now())-(0,P.fromMiliseconds)(e.timestamp)>86400&&(this.events.delete(e.eventId),this.shouldPersist=!0)})})}),la(this,"setMethods",e=>({addTrace:t=>this.addTrace(e,t),setError:t=>this.setError(e,t)})),la(this,"addTrace",(e,t)=>{let r=this.events.get(e);r&&(r.props.properties.trace.push(t),this.events.set(e,r),this.shouldPersist=!0)}),la(this,"setError",(e,t)=>{let r=this.events.get(e);r&&(r.props.type=t,r.timestamp=Date.now(),this.events.set(e,r),this.shouldPersist=!0)}),la(this,"persist",async()=>{await this.core.storage.setItem(this.storageKey,Array.from(this.events.values())),this.shouldPersist=!1}),la(this,"restore",async()=>{try{let e=await this.core.storage.getItem(this.storageKey)||[];if(!e.length)return;e.forEach(e=>{this.events.set(e.eventId,li(li({},e),this.setMethods(e.eventId)))})}catch(e){this.logger.warn(e)}}),la(this,"submit",async()=>{if(!this.telemetryEnabled||0===this.events.size)return;let e=[];for(let[t,r]of this.events)r.props.type&&e.push(r);if(0!==e.length)try{if((await this.sendEvent(e)).ok)for(let t of e)this.events.delete(t.eventId),this.shouldPersist=!0}catch(e){this.logger.warn(e)}}),la(this,"sendEvent",async e=>{let t=this.getAppDomain()?"":"&sp=desktop";return await fetch(`https://pulse.walletconnect.org/batch?projectId=${this.core.projectId}&st=events_sdk&sv=js-${aG}${t}`,{method:"POST",body:JSON.stringify(e)})}),la(this,"getAppDomain",()=>ek().url),this.logger=(0,l.U5)(t,this.context),this.telemetryEnabled=r,r?this.restore().then(async()=>{await this.submit(),this.setEventListeners()}):this.persist()}get storageKey(){return this.storagePrefix+this.storageVersion+this.core.customStoragePrefix+"//"+this.context}}var lo=Object.defineProperty,ll=Object.getOwnPropertySymbols,lc=Object.prototype.hasOwnProperty,lu=Object.prototype.propertyIsEnumerable,ld=(e,t,r)=>t in e?lo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lh=(e,t)=>{for(var r in t||(t={}))lc.call(t,r)&&ld(e,r,t[r]);if(ll)for(var r of ll(t))lu.call(t,r)&&ld(e,r,t[r]);return e},lp=(e,t,r)=>ld(e,"symbol"!=typeof t?t+"":t,r);class lf extends h{constructor(e){var t;super(e),lp(this,"protocol","wc"),lp(this,"version",2),lp(this,"name",aU),lp(this,"relayUrl"),lp(this,"projectId"),lp(this,"customStoragePrefix"),lp(this,"events",new i.EventEmitter),lp(this,"logger"),lp(this,"heartbeat"),lp(this,"relayer"),lp(this,"crypto"),lp(this,"storage"),lp(this,"history"),lp(this,"expirer"),lp(this,"pairing"),lp(this,"verify"),lp(this,"echoClient"),lp(this,"linkModeSupportedApps"),lp(this,"eventClient"),lp(this,"initialized",!1),lp(this,"logChunkController"),lp(this,"on",(e,t)=>this.events.on(e,t)),lp(this,"once",(e,t)=>this.events.once(e,t)),lp(this,"off",(e,t)=>this.events.off(e,t)),lp(this,"removeListener",(e,t)=>this.events.removeListener(e,t)),lp(this,"dispatchEnvelope",({topic:e,message:t,sessionExists:r})=>{if(!e||!t)return;let n={topic:e,message:t,publishedAt:Date.now(),transportType:aK.link_mode};this.relayer.onLinkMessageEvent(n,{sessionExists:r})});let r=this.getGlobalCore(e?.customStoragePrefix);if(r)try{return this.customStoragePrefix=r.customStoragePrefix,this.logger=r.logger,this.heartbeat=r.heartbeat,this.crypto=r.crypto,this.history=r.history,this.expirer=r.expirer,this.storage=r.storage,this.relayer=r.relayer,this.pairing=r.pairing,this.verify=r.verify,this.echoClient=r.echoClient,this.linkModeSupportedApps=r.linkModeSupportedApps,this.eventClient=r.eventClient,this.initialized=r.initialized,this.logChunkController=r.logChunkController,r}catch(e){console.warn("Failed to copy global core",e)}this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||aW,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";let n=(0,l.iP)({level:"string"==typeof e?.logger&&e.logger?e.logger:aL.logger,name:aU}),{logger:a,chunkLoggerController:c}=(0,l.D5)({opts:n,maxSizeInBytes:e?.maxLogBlobSizeInBytes,loggerOverride:e?.logger});this.logChunkController=c,null!=(t=this.logChunkController)&&t.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var e,t;null!=(e=this.logChunkController)&&e.downloadLogsBlobInBrowser&&(null==(t=this.logChunkController)||t.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=(0,l.U5)(a,this.name),this.heartbeat=new s.VH,this.crypto=new s1(this,this.logger,e?.keychain),this.history=new oX(this,this.logger),this.expirer=new o2(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new o.A(lh(lh({},aD),e?.storageOptions)),this.relayer=new oR({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new oJ(this,this.logger),this.verify=new o3(this,this.logger,this.storage),this.echoClient=new o9(this.projectId||"",this.logger),this.linkModeSupportedApps=[],this.eventClient=new ls(this,this.logger,e?.telemetryEnabled),this.setGlobalCore(this)}static async init(e){let t=new lf(e);await t.initialize();let r=await t.crypto.getClientId();return await t.storage.setItem("WALLETCONNECT_CLIENT_ID",r),t}get context(){return(0,l.oI)(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var e;return null==(e=this.logChunkController)?void 0:e.logsToBlob({clientId:await this.crypto.getClientId()})}async addLinkModeSupportedApp(e){this.linkModeSupportedApps.includes(e)||(this.linkModeSupportedApps.push(e),await this.storage.setItem(aJ,this.linkModeSupportedApps))}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(
5735),await this.pairing.init(),this.linkModeSupportedApps=await this.storage.getItem(aJ)||[],this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(e,`Core Initialization Failure at epoch ${Date.now()}`),this.logger.error(e.message),e}}getGlobalCore(e=""){try{if(this.isGlobalCoreDisabled())return;let t=`_walletConnectCore_${e}`,r=`${t}_count`;return globalThis[r]=(globalThis[r]||0)+1,globalThis[r]>1&&console.warn(`WalletConnect Core is already initialized. This is probably a mistake and can lead to unexpected behavior. Init() was called ${globalThis[r]} times.`),globalThis[t]}catch(e){console.warn("Failed to get global WalletConnect core",e);return}}setGlobalCore(e){var t;try{if(this.isGlobalCoreDisabled())return;let r=`_walletConnectCore_${(null==(t=e.opts)?void 0:t.customStoragePrefix)||""}`;globalThis[r]=e}catch(e){console.warn("Failed to set global WalletConnect core",e)}}isGlobalCoreDisabled(){try{return"u">typeof aj&&"true"===aj.env.DISABLE_GLOBAL_CORE}catch{return!0}}}let lm="client",lg=`wc@2:${lm}:`,ly={name:lm,logger:"error"},lb="WALLETCONNECT_DEEPLINK_CHOICE",lw="Proposal expired",lv=P.SEVEN_DAYS,lE={wc_sessionPropose:{req:{ttl:P.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:P.FIVE_MINUTES,prompt:!1,tag:1101},reject:{ttl:P.FIVE_MINUTES,prompt:!1,tag:1120},autoReject:{ttl:P.FIVE_MINUTES,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:P.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:P.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:P.ONE_DAY,prompt:!1,tag:1104},res:{ttl:P.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:P.ONE_DAY,prompt:!1,tag:1106},res:{ttl:P.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:3*P.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:3*P.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:P.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:P.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:P.ONE_DAY,prompt:!1,tag:1112},res:{ttl:P.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:P.ONE_DAY,prompt:!1,tag:1114},res:{ttl:P.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:P.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:P.ONE_HOUR,prompt:!1,tag:1117},reject:{ttl:P.FIVE_MINUTES,prompt:!1,tag:1118},autoReject:{ttl:P.FIVE_MINUTES,prompt:!1,tag:1119}}},lC={min:P.FIVE_MINUTES,max:P.SEVEN_DAYS},lA={idle:"IDLE",active:"ACTIVE"},lx={eth_sendTransaction:{key:""},eth_sendRawTransaction:{key:""},wallet_sendCalls:{key:""},solana_signTransaction:{key:"signature"},solana_signAllTransactions:{key:"transactions"},solana_signAndSendTransaction:{key:"signature"},sui_signAndExecuteTransaction:{key:"digest"},sui_signTransaction:{key:""},hedera_signAndExecuteTransaction:{key:"transactionId"},hedera_executeTransaction:{key:"transactionId"},near_signTransaction:{key:""},near_signTransactions:{key:""},tron_signTransaction:{key:"txID"},xrpl_signTransaction:{key:""},xrpl_signTransactionFor:{key:""},algo_signTxn:{key:""},sendTransfer:{key:"txid"},stacks_stxTransfer:{key:"txId"},polkadot_signTransaction:{key:""},cosmos_signDirect:{key:""}},lI=["wc_sessionPropose","wc_sessionRequest","wc_authRequest","wc_sessionAuthenticate"],lS="[email protected]:auth:",lT=`${lS}:PUB_KEY`;var lP=Object.defineProperty,lO=Object.defineProperties,l_=Object.getOwnPropertyDescriptors,lN=Object.getOwnPropertySymbols,lk=Object.prototype.hasOwnProperty,lR=Object.prototype.propertyIsEnumerable,lM=(e,t,r)=>t in e?lP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lB=(e,t)=>{for(var r in t||(t={}))lk.call(t,r)&&lM(e,r,t[r]);if(lN)for(var r of lN(t))lR.call(t,r)&&lM(e,r,t[r]);return e},lj=(e,t)=>lO(e,l_(t)),lU=(e,t,r)=>lM(e,"symbol"!=typeof t?t+"":t,r);class l$ extends T{constructor(e){super(e),lU(this,"name","engine"),lU(this,"events",new i),lU(this,"initialized",!1),lU(this,"requestQueue",{state:lA.idle,queue:[]}),lU(this,"sessionRequestQueue",{state:lA.idle,queue:[]}),lU(this,"emittedSessionRequests",new eY({limit:500})),lU(this,"requestQueueDelay",P.ONE_SECOND),lU(this,"expectedPairingMethodMap",new Map),lU(this,"recentlyDeletedMap",new Map),lU(this,"recentlyDeletedLimit",200),lU(this,"relayMessageCache",[]),lU(this,"pendingSessions",new Map),lU(this,"init",async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),await this.registerLinkModeListeners(),this.client.core.pairing.register({methods:Object.keys(lE)}),this.initialized=!0,setTimeout(async()=>{await this.processPendingMessageEvents(),this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},(0,P.toMiliseconds)(this.requestQueueDelay)))}),lU(this,"connect",async e=>{var t;this.isInitialized(),await this.confirmOnlineStateOrThrow();let r=lj(lB({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(r),r.optionalNamespaces=function(e,t){var r,n,i,a,s,o;let l=au(e),c=au(t),u={};for(let e of Object.keys(l).concat(Object.keys(c)))u[e]={chains:eW(null==(r=l[e])?void 0:r.chains,null==(n=c[e])?void 0:n.chains),methods:eW(null==(i=l[e])?void 0:i.methods,null==(a=c[e])?void 0:a.methods),events:eW(null==(s=l[e])?void 0:s.events,null==(o=c[e])?void 0:o.events)};return u}(r.requiredNamespaces,r.optionalNamespaces),r.requiredNamespaces={};let{pairingTopic:n,requiredNamespaces:i,optionalNamespaces:a,sessionProperties:s,scopedProperties:o,relays:l,authentication:c,walletPay:u}=r,d=(null==(t=c?.[0])?void 0:t.ttl)||lE.wc_sessionPropose.req.ttl||P.FIVE_MINUTES;this.validateRequestExpiry(d);let h=n,p,f=!1;try{if(h){let e=this.client.core.pairing.pairings.get(h);this.client.logger.warn("connect() with existing pairing topic is deprecated and will be removed in the next major release."),f=e.active}}catch(e){throw this.client.logger.error(`connect() -> pairing.get(${h}) failed`),e}if(!h||!f){let{topic:e,uri:t}=await this.client.core.pairing.create({internal:{skipSubscribe:!0}});h=e,p=t}if(!h){let{message:e}=em("NO_MATCHING_KEY",`connect() pairing topic: ${h}`);throw Error(e)}let m=await this.client.core.crypto.generateKeyPair(),g=eF(d),y=lB(lj(lB(lB({requiredNamespaces:i,optionalNamespaces:a,relays:l??[{protocol:"irn"}],proposer:{publicKey:m,metadata:this.client.metadata},expiryTimestamp:g,pairingTopic:h},s&&{sessionProperties:s}),o&&{scopedProperties:o}),{id:(0,aR.payloadId)()}),(c||u)&&{requests:{authentication:c?.map(e=>{let{domain:t,chains:r,nonce:n,uri:i,exp:a,nbf:s,type:o,statement:l,requestId:c,resources:u,signatureTypes:d}=e;return{domain:t,chains:r,nonce:n,type:o??"caip122",aud:i,version:"1",iat:new Date().toISOString(),exp:a,nbf:s,statement:l,requestId:c,resources:u,signatureTypes:d}}),walletPay:u}}),b=ez("session_connect",y.id),{reject:w,resolve:v,done:E}=eU(d,lw),C=({id:e})=>{e===y.id&&(this.client.events.off("proposal_expire",C),this.pendingSessions.delete(y.id),this.events.emit(b,{error:{message:lw,code:0}}))};return this.client.events.on("proposal_expire",C),this.events.once(b,({error:e,session:t})=>{this.client.events.off("proposal_expire",C),e?w(e):t&&v(t)}
5735),await this.setProposal(y.id,y),await this.sendProposeSession({proposal:y,publishOpts:{internal:{throwOnFailedPublish:!0},tvf:{correlationId:y.id}}}).catch(e=>{throw this.deleteProposal(y.id),e}),{uri:p,approval:E}}),lU(this,"pair",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{return await this.client.core.pairing.pair(e)}catch(e){throw this.client.logger.error("pair() failed"),e}}),lU(this,"approve",async e=>{var t,r,n;let i=this.client.core.eventClient.createEvent({properties:{topic:null==(t=e?.id)?void 0:t.toString(),trace:[a8.session_approve_started]}});try{this.isInitialized(),await this.confirmOnlineStateOrThrow()}catch(e){throw i.setError(a9.no_internet_connection),e}try{await this.isValidProposalId(e?.id)}catch(t){throw this.client.logger.error(`approve() -> proposal.get(${e?.id}) failed`),i.setError(a9.proposal_not_found),t}try{await this.isValidApprove(e)}catch(e){throw this.client.logger.error("approve() -> isValidApprove() failed"),i.setError(a9.session_approve_namespace_validation_failure),e}let{id:a,relayProtocol:s,namespaces:o,sessionProperties:l,scopedProperties:c,sessionConfig:u,proposalRequestsResponses:d}=e,h=this.client.proposal.get(a);this.client.core.eventClient.deleteEvent({eventId:i.eventId});let{pairingTopic:p,proposer:f,requiredNamespaces:m,optionalNamespaces:g}=h,y=null==(r=this.client.core.eventClient)?void 0:r.getEvent({topic:p});y||(y=null==(n=this.client.core.eventClient)?void 0:n.createEvent({type:a8.session_approve_started,properties:{topic:p,trace:[a8.session_approve_started,a8.session_namespaces_validation_success]}}));let b=await this.client.core.crypto.generateKeyPair(),w=f.publicKey,v=await this.client.core.crypto.generateSharedKey(b,w),E=lj(lB(lB(lB({relay:{protocol:s??"irn"},namespaces:o,controller:{publicKey:b,metadata:this.client.metadata},expiry:eF(lv)},l&&{sessionProperties:l}),c&&{scopedProperties:c}),u&&{sessionConfig:u}),{proposalRequestsResponses:d}),C=aK.relay;y.addTrace(a8.subscribing_session_topic);try{await this.client.core.relayer.subscribe(v,{transportType:C,internal:{skipSubscribe:!0}})}catch(e){throw y.setError(a9.subscribe_session_topic_failure),e}y.addTrace(a8.subscribe_session_topic_success);let A=lj(lB({},E),{topic:v,requiredNamespaces:m,optionalNamespaces:g,pairingTopic:p,acknowledged:!1,self:E.controller,peer:{publicKey:f.publicKey,metadata:f.metadata},controller:b,transportType:aK.relay,authentication:d?.authentication,walletPayResult:d?.walletPay});await this.client.session.set(v,A),y.addTrace(a8.store_session);try{await this.sendApproveSession({sessionTopic:v,proposal:h,pairingProposalResponse:{relay:{protocol:s??"irn"},responderPublicKey:b},sessionSettleRequest:E,publishOpts:{internal:{throwOnFailedPublish:!0},tvf:lB({correlationId:a},this.getTVFApproveParams(A))}}),y.addTrace(a8.session_approve_publish_success)}catch(e){throw this.client.logger.error(e),this.client.session.delete(v,eg("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(v),e}return this.client.core.eventClient.deleteEvent({eventId:y.eventId}),await this.client.core.pairing.updateMetadata({topic:p,metadata:f.metadata}),await this.deleteProposal(a),await this.client.core.pairing.activate({topic:p}),await this.setExpiry(v,eF(lv)),{topic:v,acknowledged:()=>Promise.resolve(this.client.session.get(v))}}),lU(this,"reject",async e=>{let t;this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidReject(e)}catch(e){throw this.client.logger.error("reject() -> isValidReject() failed"),e}let{id:r,reason:n}=e;try{t=this.client.proposal.get(r).pairingTopic}catch(e){throw this.client.logger.error(`reject() -> proposal.get(${r}) failed`),e}t&&await this.sendError({id:r,topic:t,error:n,rpcOpts:lE.wc_sessionPropose.reject}),await this.deleteProposal(r)}),lU(this,"update",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidUpdate(e)}catch(e){throw this.client.logger.error("update() -> isValidUpdate() failed"),e}let{topic:t,namespaces:r}=e,{done:n,resolve:i,reject:a}=eU(P.FIVE_MINUTES,"Session update request expired without receiving any acknowledgement"),s=(0,aR.payloadId)(),o=(0,aR.getBigIntRpcId)().toString(),l=this.client.session.get(t).namespaces;return this.events.once(ez("session_update",s),({error:e})=>{e?a(e):i()}),await this.client.session.update(t,{namespaces:r}),await this.sendRequest({topic:t,method:"wc_sessionUpdate",params:{namespaces:r},throwOnFailedPublish:!0,clientRpcId:s,relayRpcId:o}).catch(e=>{this.client.logger.error(e),this.client.session.update(t,{namespaces:l}),a(e)}),{acknowledged:n}}),lU(this,"extend",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidExtend(e)}catch(e){throw this.client.logger.error("extend() -> isValidExtend() failed"),e}let{topic:t}=e,r=(0,aR.payloadId)(),{done:n,resolve:i,reject:a}=eU(P.FIVE_MINUTES,"Session extend request expired without receiving any acknowledgement");return this.events.once(ez("session_extend",r),({error:e})=>{e?a(e):i()}),await this.setExpiry(t,eF(lv)),this.sendRequest({topic:t,method:"wc_sessionExtend",params:{},clientRpcId:r,throwOnFailedPublish:!0}).catch(e=>{a(e)}),{acknowledged:n}}),lU(this,"request",async e=>{this.isInitialized();try{await this.isValidRequest(e)}catch(e){throw this.client.logger.error("request() -> isValidRequest() failed"),e}let{chainId:t,request:r,topic:n,expiry:i=lE.wc_sessionRequest.req.ttl}=e,a=this.client.session.get(n);a?.transportType===aK.relay&&await this.confirmOnlineStateOrThrow();let s=(0,aR.payloadId)(),o=(0,aR.getBigIntRpcId)().toString(),{done:l,resolve:c,reject:u}=eU(i,"Request expired. Please try again.");this.events.once(ez("session_request",s),({error:e,result:t})=>{e?u(e):c(t)});let d="wc_sessionRequest",h=this.getAppLinkIfEnabled(a.peer.metadata,a.transportType);if(h)return await this.sendRequest({clientRpcId:s,relayRpcId:o,topic:n,method:d,params:{request:lj(lB({},r),{expiryTimestamp:eF(i)}),chainId:t},expiry:i,throwOnFailedPublish:!0,appLink:h}).catch(e=>u(e)),this.client.events.emit("session_request_sent",{topic:n,request:r,chainId:t,id:s}),await l();let p={request:lj(lB({},r),{expiryTimestamp:eF(i)}),chainId:t};return await Promise.all([new Promise(async e=>{await this.sendRequest({clientRpcId:s,relayRpcId:o,topic:n,method:d,params:p,expiry:i,throwOnFailedPublish:!0,tvf:this.getTVFParams(s,p)}).catch(e=>u(e)),this.client.events.emit("session_request_sent",{topic:n,request:r,chainId:t,id:s}),e()}),new Promise(async e=>{var t;if(!(null!=(t=a.sessionConfig)&&t.disableDeepLink)){let e=await eV(this.client.core.storage,lb);await eq({id:s,topic:n,wcDeepLink:e})}e()}),l()]).then(e=>e[2])}),lU(this,"respond",async e=>{var t,r;this.isInitialized();let n=this.client.core.eventClient.createEvent({properties:{topic:e?.topic||(null==(r=null==(t=e?.response)?void 0:t.id)?void 0:r.toString()),trace:[a8.session_request_response_started]}});try{await this.isValidRespond(e)}catch(e){throw n.addTrace(e?.message),n.setError(a9.session_request_response_validation_failure),e}n.addTrace(a8.session_request_response_validation_success);let{topic:i,response:a}=e,{id:s}=a,o=this.client.session.get(i);o.transportType===aK.relay&&await this.confirmOnlineStateOrThrow();let l=this.getAppLinkIfEnabled(o.peer.metadata,o.transportType);try{n.addTrace(a8.session_request_response_publish_started),(0,aR.isJsonRpcResult)(a)?await this.sendResult({id:s,topic:i,result:a.result,throwOnFailedPublish:!0,appLink:l}
5735):(0,aR.isJsonRpcError)(a)&&await this.sendError({id:s,topic:i,error:a.error,appLink:l}),this.cleanupAfterResponse(e)}catch(e){throw n.addTrace(e?.message),n.setError(a9.session_request_response_publish_failure),e}}),lU(this,"ping",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidPing(e)}catch(e){throw this.client.logger.error("ping() -> isValidPing() failed"),e}let{topic:t}=e;if(this.client.session.keys.includes(t)){let e=(0,aR.payloadId)(),r=(0,aR.getBigIntRpcId)().toString(),{done:n,resolve:i,reject:a}=eU(P.FIVE_MINUTES,"Ping request expired without receiving any acknowledgement");this.events.once(ez("session_ping",e),({error:e})=>{e?a(e):i()}),await Promise.all([this.sendRequest({topic:t,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:e,relayRpcId:r}),n()])}else this.client.core.pairing.pairings.keys.includes(t)&&(this.client.logger.warn("ping() on pairing topic is deprecated and will be removed in the next major release."),await this.client.core.pairing.ping({topic:t}))}),lU(this,"emit",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidEmit(e);let{topic:t,event:r,chainId:n}=e,i=(0,aR.getBigIntRpcId)().toString(),a=(0,aR.payloadId)();await this.sendRequest({topic:t,method:"wc_sessionEvent",params:{event:r,chainId:n},throwOnFailedPublish:!0,relayRpcId:i,clientRpcId:a})}),lU(this,"disconnect",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidDisconnect(e);let{topic:t}=e;if(this.client.session.keys.includes(t))await this.sendRequest({topic:t,method:"wc_sessionDelete",params:eg("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:t,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(t))await this.client.core.pairing.disconnect({topic:t});else{let{message:e}=em("MISMATCHED_TOPIC",`Session or pairing topic not found: ${t}`);throw Error(e)}}),lU(this,"find",e=>(this.isInitialized(),this.client.session.getAll().filter(t=>(function(e,t){let{requiredNamespaces:r}=t,n=Object.keys(e.namespaces),i=Object.keys(r),a=!0;return!!eM(i,n)&&(n.forEach(t=>{let{accounts:n,methods:i,events:s}=e.namespaces[t],o=as(n),l=r[t];eM(eh(t,l),o)&&eM(l.methods,i)&&eM(l.events,s)||(a=!1)}),a)})(t,e)))),lU(this,"getPendingSessionRequests",()=>this.client.pendingRequest.getAll()),lU(this,"authenticate",async(e,t)=>{var r,n,i;let a;this.isInitialized(),this.isValidAuthenticate(e);let s=t&&this.client.core.linkModeSupportedApps.includes(t)&&(null==(r=this.client.metadata.redirect)?void 0:r.linkMode),o=s?aK.link_mode:aK.relay;o===aK.relay&&await this.confirmOnlineStateOrThrow();let{chains:l,statement:c="",uri:u,domain:d,nonce:h,type:p,exp:f,nbf:m,methods:g=[],expiry:y}=e,b=[...e.resources||[]],{topic:w,uri:v}=await this.client.core.pairing.create({methods:["wc_sessionAuthenticate"],transportType:o});this.client.logger.info({message:"Generated new pairing",pairing:{topic:w,uri:v}});let E=await this.client.core.crypto.generateKeyPair(),C=i$(E);if(await Promise.all([this.client.auth.authKeys.set(lT,{responseTopic:C,publicKey:E}),this.client.auth.pairingTopics.set(C,{topic:C,pairingTopic:w})]),await this.client.core.relayer.subscribe(C,{transportType:o}),this.client.logger.info(`sending request to new pairing topic: ${w}`),g.length>0){let{namespace:e}=ed(l[0]),t=rR(function(e,t,r,n={}){return r?.sort((e,t)=>e.localeCompare(t)),{att:{[e]:function(e,t,r={}){return Object.assign({},...(t=t?.sort((e,t)=>e.localeCompare(t))).map(t=>({[`${e}/${t}`]:[r]})))}(t,r,n)}}}(e,"request",g));rU(b)&&(n=t,i=b.pop(),t=rR(function(e,t){rk(e),rk(t);let r=Object.keys(e.att).concat(Object.keys(t.att)).sort((e,t)=>e.localeCompare(t)),n={att:{}};return r.forEach(r=>{var i,a;Object.keys((null==(i=e.att)?void 0:i[r])||{}).concat(Object.keys((null==(a=t.att)?void 0:a[r])||{})).sort((e,t)=>e.localeCompare(t)).forEach(i=>{var a,s;n.att[r]=rw(((e,t)=>{for(var r in t||(t={}))rC.call(t,r)&&rx(e,r,t[r]);if(rE)for(var r of rE(t))rA.call(t,r)&&rx(e,r,t[r]);return e})({},n.att[r]),rv({[i]:(null==(a=e.att[r])?void 0:a[i])||(null==(s=t.att[r])?void 0:s[i])}))})}),n}
5735(rM(n),rM(i)))),b.push(t)}let A=y&&y>lE.wc_sessionAuthenticate.req.ttl?y:lE.wc_sessionAuthenticate.req.ttl,x={authPayload:{type:p??"caip122",chains:l,statement:c,aud:u,domain:d,version:"1",nonce:h,iat:new Date().toISOString(),exp:f,nbf:m,resources:b},requester:{publicKey:E,metadata:this.client.metadata},expiryTimestamp:eF(A)},I={requiredNamespaces:{},optionalNamespaces:{eip155:{chains:l,methods:[...new Set(["personal_sign",...g])],events:["chainChanged","accountsChanged"]}},relays:[{protocol:"irn"}],pairingTopic:w,proposer:{publicKey:E,metadata:this.client.metadata},expiryTimestamp:eF(lE.wc_sessionPropose.req.ttl),id:(0,aR.payloadId)()},{done:S,resolve:T,reject:P}=eU(A,"Request expired"),O=(0,aR.payloadId)(),_=ez("session_connect",I.id),N=ez("session_request",O),k=async({error:e,session:t})=>{this.events.off(N,R),e?P(e):t&&T({session:t})},R=async e=>{var r,n,i;let a;if(await this.deletePendingAuthRequest(O,{message:"fulfilled",code:0}),e.error){let t=eg("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return e.error.code===t.code?void 0:(this.events.off(_,k),P(e.error.message))}await this.deleteProposal(I.id),this.events.off(_,k);let{cacaos:s,responder:l}=e.result,c=[],u=[];for(let e of s){await r_({cacao:e,projectId:this.client.core.projectId})||(this.client.logger.error(e,"Signature verification failed"),P(eg("SESSION_SETTLEMENT_FAILED","Signature verification failed")));let{p:t}=e,r=rU(t.resources),n=[rP(t.iss)],i=rO(t.iss);if(r){let e=rB(r),t=rj(r);c.push(...e),n.push(...t)}for(let e of n)u.push(`${e}:${i}`)}let d=await this.client.core.crypto.generateSharedKey(E,l.publicKey);c.length>0&&(a={topic:d,acknowledged:!0,self:{publicKey:E,metadata:this.client.metadata},peer:l,controller:l.publicKey,expiry:eF(lv),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:w,namespaces:ad([...new Set(c)],[...new Set(u)]),transportType:o},await this.client.core.relayer.subscribe(d,{transportType:o}),await this.client.session.set(d,a),w&&await this.client.core.pairing.updateMetadata({topic:w,metadata:l.metadata}),a=this.client.session.get(d)),null!=(r=this.client.metadata.redirect)&&r.linkMode&&null!=(n=l.metadata.redirect)&&n.linkMode&&null!=(i=l.metadata.redirect)&&i.universal&&t&&(this.client.core.addLinkModeSupportedApp(l.metadata.redirect.universal),this.client.session.update(d,{transportType:aK.link_mode})),T({auths:s,session:a})};this.events.once(_,k),this.events.once(N,R);try{if(s){let e=(0,aR.formatJsonRpcRequest)("wc_sessionAuthenticate",x,O);this.client.core.history.set(w,e);let r=await this.client.core.crypto.encode("",e,{type:2,encoding:iB});a=i4(t,w,r)}else await Promise.all([this.sendRequest({topic:w,method:"wc_sessionAuthenticate",params:x,expiry:e.expiry,throwOnFailedPublish:!0,clientRpcId:O}),this.sendRequest({topic:w,method:"wc_sessionPropose",params:I,expiry:lE.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:I.id})])}catch(e){throw this.events.off(_,k),this.events.off(N,R),e}return await this.setProposal(I.id,I),await this.setAuthRequest(O,{request:lj(lB({},x),{verifyContext:{}}),pairingTopic:w,transportType:o}),{uri:a??v,response:S}}),lU(this,"approveSessionAuthenticate",async e=>{let t,{id:r,auths:n}=e,i=this.client.core.eventClient.createEvent({properties:{topic:r.toString(),trace:[a7.authenticated_session_approve_started]}});try{this.isInitialized()}catch(e){throw i.setError(se.no_internet_connection),e}let a=this.getPendingAuthRequest(r);if(!a)throw i.setError(se.authenticated_session_pending_request_not_found),Error(`Could not find pending auth request with id ${r}`);let s=a.transportType||aK.relay;s===aK.relay&&await this.confirmOnlineStateOrThrow();let o=a.requester.publicKey,l=await this.client.core.crypto.generateKeyPair(),c=i$(o),u={type:1,receiverPublicKey:o,senderPublicKey:l},d=[],h=[];for(let e of n){if(!await r_({cacao:e,projectId:this.client.core.projectId})){i.setError(se.invalid_cacao);let e=eg("SESSION_SETTLEMENT_FAILED","Signature verification failed");throw await this.sendError({id:r,topic:c,error:e,encodeOpts:u}),Error(e.message)}i.addTrace(a7.cacaos_verified);let{p:t}=e,n=rU(t.resources),a=[rP(t.iss)],s=rO(t.iss);if(n){let e=rB(n),t=rj(n);d.push(...e),a.push(...t)}for(let e of a)h.push(`${e}:${s}`)}let p=await this.client.core.crypto.generateSharedKey(l,o);if(i.addTrace(a7.create_authenticated_session_topic),d?.length>0){t={topic:p,acknowledged:!0,self:{publicKey:l,metadata:this.client.metadata},peer:{publicKey:o,metadata:a.requester.metadata},controller:o,expiry:eF(lv),authentication:n,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:a.pairingTopic,namespaces:ad([...new Set(d)],[...new Set(h)]),transportType:s},i.addTrace(a7.subscribing_authenticated_session_topic);try{await this.client.core.relayer.subscribe(p,{transportType:s})}catch(e){throw i.setError(se.subscribe_authenticated_session_topic_failure),e}i.addTrace(a7.subscribe_authenticated_session_topic_success),await this.client.session.set(p,t),i.addTrace(a7.store_authenticated_session),await this.client.core.pairing.updateMetadata({topic:a.pairingTopic,metadata:a.requester.metadata})}i.addTrace(a7.publishing_authenticated_session_approve);
5735try{await this.sendResult({topic:c,id:r,result:{cacaos:n,responder:{publicKey:l,metadata:this.client.metadata}},encodeOpts:u,throwOnFailedPublish:!0,appLink:this.getAppLinkIfEnabled(a.requester.metadata,s)})}catch(e){throw i.setError(se.authenticated_session_approve_publish_failure),e}return await this.client.auth.requests.delete(r,{message:"fulfilled",code:0}),await this.client.core.pairing.activate({topic:a.pairingTopic}),this.client.core.eventClient.deleteEvent({eventId:i.eventId}),{session:t}}),lU(this,"rejectSessionAuthenticate",async e=>{this.isInitialized();let{id:t,reason:r}=e,n=this.getPendingAuthRequest(t);if(!n)throw Error(`Could not find pending auth request with id ${t}`);n.transportType===aK.relay&&await this.confirmOnlineStateOrThrow();let i=n.requester.publicKey,a=await this.client.core.crypto.generateKeyPair(),s=i$(i);await this.sendError({id:t,topic:s,error:r,encodeOpts:{type:1,receiverPublicKey:i,senderPublicKey:a},rpcOpts:lE.wc_sessionAuthenticate.reject,appLink:this.getAppLinkIfEnabled(n.requester.metadata,n.transportType)}),await this.client.auth.requests.delete(t,{message:"rejected",code:0}),await this.deleteProposal(t)}),lU(this,"formatAuthMessage",e=>{this.isInitialized();let{request:t,iss:r}=e;return rN(t,r)}),lU(this,"processRelayMessageCache",()=>{setTimeout(async()=>{if(0!==this.relayMessageCache.length)for(;this.relayMessageCache.length>0;)try{let e=this.relayMessageCache.shift();e&&await this.onRelayMessage(e)}catch(e){this.client.logger.error(e)}},50)}),lU(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 n,i;return(null==(n=r.peerMetadata)?void 0:n.url)&&(null==(i=r.peerMetadata)?void 0:i.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)}}),lU(this,"deleteSession",async e=>{var t;let{topic:r,expirerHasDeleted:n=!1,emitEvent:i=!0,id:a=0}=e,{self:s}=this.client.session.get(r);await this.client.core.relayer.unsubscribe(r),await this.client.session.delete(r,eg("USER_DISCONNECTED")),this.addToRecentlyDeleted(r,"session"),this.client.core.crypto.keychain.has(s.publicKey)&&await this.client.core.crypto.deleteKeyPair(s.publicKey),this.client.core.crypto.keychain.has(r)&&await this.client.core.crypto.deleteSymKey(r),n||this.client.core.expirer.del(r),this.client.core.storage.removeItem(lb).catch(e=>this.client.logger.warn(e)),r===(null==(t=this.sessionRequestQueue.queue[0])?void 0:t.topic)&&(this.sessionRequestQueue.state=lA.idle),await Promise.all(this.getPendingSessionRequests().filter(e=>e.topic===r).map(e=>this.deletePendingSessionRequest(e.id,eg("USER_DISCONNECTED")))),i&&this.client.events.emit("session_delete",{id:a,topic:r})}),lU(this,"deleteProposal",async(e,t)=>{if(t)try{let t=this.client.proposal.get(e),r=this.client.core.eventClient.getEvent({topic:t.pairingTopic});r?.setError(a9.proposal_expired)}catch{}await Promise.all([this.client.proposal.delete(e,eg("USER_DISCONNECTED")),t?Promise.resolve():this.client.core.expirer.del(e)]),this.addToRecentlyDeleted(e,"proposal")}),lU(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.addToRecentlyDeleted(e,"request"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(t=>t.id!==e),r&&(this.sessionRequestQueue.state=lA.idle,this.client.events.emit("session_request_expire",{id:e}))}),lU(this,"deletePendingAuthRequest",async(e,t,r=!1)=>{await Promise.all([this.client.auth.requests.delete(e,t),r?Promise.resolve():this.client.core.expirer.del(e)])}),lU(this,"setExpiry",async(e,t)=>{this.client.session.keys.includes(e)&&(this.client.core.expirer.set(e,t),await this.client.session.update(e,{expiry:t}))}),lU(this,"setProposal",async(e,t)=>{this.client.core.expirer.set(e,eF(lE.wc_sessionPropose.req.ttl)),await this.client.proposal.set(e,t)}),lU(this,"setAuthRequest",async(e,t)=>{let{request:r,pairingTopic:n,transportType:i=aK.relay}=t;this.client.core.expirer.set(e,r.expiryTimestamp),await this.client.auth.requests.set(e,{authPayload:r.authPayload,requester:r.requester,expiryTimestamp:r.expiryTimestamp,id:e,pairingTopic:n,verifyContext:r.verifyContext,transportType:i})}),lU(this,"setPendingSessionRequest",async e=>{let{id:t,topic:r,params:n,verifyContext:i}=e,a=n.request.expiryTimestamp||eF(lE.wc_sessionRequest.req.ttl);
5735this.client.core.expirer.set(t,a),await this.client.pendingRequest.set(t,{id:t,topic:r,params:n,verifyContext:i})}),lU(this,"sendRequest",async e=>{let t,r,{topic:n,method:i,params:a,expiry:s,relayRpcId:o,clientRpcId:l,throwOnFailedPublish:c,appLink:u,tvf:d,publishOpts:h={}}=e,p=(0,aR.formatJsonRpcRequest)(i,a,l),f=!!u;try{let e=f?iB:iM;t=await this.client.core.crypto.encode(n,p,{encoding:e})}catch(e){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${n} failed`),e}if(lI.includes(i)){let e=iL(JSON.stringify(p)),n=iL(t);r=await this.client.core.verify.register({id:n,decryptedId:e})}let m=lB(lB({},lE[i].req),h);if(m.attestation=r,s&&(m.ttl=s),o&&(m.id=o),this.client.core.history.set(n,p),f){let e=i4(u,n,t);await global.Linking.openURL(e,this.client.name)}else m.tvf=lj(lB({},d),{correlationId:p.id}),c?(m.internal=lj(lB({},m.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,t,m)):this.client.core.relayer.publish(n,t,m).catch(e=>this.client.logger.error(e));return p.id}),lU(this,"sendProposeSession",async e=>{let{proposal:t,publishOpts:r}=e,n=(0,aR.formatJsonRpcRequest)("wc_sessionPropose",t,t.id);this.client.core.history.set(t.pairingTopic,n);let i=await this.client.core.crypto.encode(t.pairingTopic,n,{encoding:iM}),a=iL(JSON.stringify(n)),s=iL(i),o=await this.client.core.verify.register({id:s,decryptedId:a});await this.client.core.relayer.publishCustom({payload:{pairingTopic:t.pairingTopic,sessionProposal:i},opts:lj(lB({},r),{publishMethod:"wc_proposeSession",attestation:o})})}),lU(this,"sendApproveSession",async e=>{let{sessionTopic:t,pairingProposalResponse:r,proposal:n,sessionSettleRequest:i,publishOpts:a}=e,s=(0,aR.formatJsonRpcResult)(n.id,r),o=await this.client.core.crypto.encode(n.pairingTopic,s,{encoding:iM}),l=(0,aR.formatJsonRpcRequest)("wc_sessionSettle",i,a?.id),c=await this.client.core.crypto.encode(t,l,{encoding:iM});this.client.core.history.set(t,l),await this.client.core.relayer.publishCustom({payload:{sessionTopic:t,pairingTopic:n.pairingTopic,sessionProposalResponse:o,sessionSettlementRequest:c},opts:lj(lB({},a),{publishMethod:"wc_approveSession"})})}),lU(this,"sendResult",async e=>{let t,r,n,{id:i,topic:a,result:s,throwOnFailedPublish:o,encodeOpts:l,appLink:c}=e,u=(0,aR.formatJsonRpcResult)(i,s),d=c&&"u">typeof(null==global?void 0:global.Linking);try{let e=d?iB:iM;t=await this.client.core.crypto.encode(a,u,lj(lB({},l||{}),{encoding:e}))}catch(e){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${a} failed`),e}try{let e=(r=await this.client.core.history.get(a,i)).request;try{n=this.getTVFParams(i,e.params,s)}catch(e){this.client.logger.warn(`sendResult() -> getTVFParams() failed: ${e?.message}`)}}catch(e){throw this.client.logger.error(`sendResult() -> history.get(${a}, ${i}) failed`),e}if(d){let e=i4(c,a,t);await global.Linking.openURL(e,this.client.name)}else{let e=lE[r.request.method].res;e.tvf=lj(lB({},n),{correlationId:i}),o?(e.internal=lj(lB({},e.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(a,t,e)):this.client.core.relayer.publish(a,t,e).catch(e=>this.client.logger.error(e))}await this.client.core.history.resolve(u)}),lU(this,"sendError",async e=>{let t,r,{id:n,topic:i,error:a,encodeOpts:s,rpcOpts:o,appLink:l}=e,c=(0,aR.formatJsonRpcError)(n,a),u=l&&"u">typeof(null==global?void 0:global.Linking);try{let e=u?iB:iM;t=await this.client.core.crypto.encode(i,c,lj(lB({},s||{}),{encoding:e}))}catch(e){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${i} failed`),e}try{r=await this.client.core.history.get(i,n)}catch(e){throw this.client.logger.error(`sendError() -> history.get(${i}, ${n}) failed`),e}if(u){let e=i4(l,i,t);await global.Linking.openURL(e,this.client.name)}else{let e=r.request.method,n=o||lE[e].res;this.client.core.relayer.publish(i,t,n)}await this.client.core.history.resolve(c)}),lU(this,"cleanup",async()=>{let e=[],t=[];this.client.session.getAll().forEach(t=>{let r=!1;eH(t.expiry)&&(r=!0),this.client.core.crypto.keychain.has(t.topic)||(r=!0),r&&e.push(t.to
5735pic)}),this.client.proposal.getAll().forEach(e=>{eH(e.expiryTimestamp)&&t.push(e.id)}),await Promise.all([...e.map(e=>this.deleteSession({topic:e})),...t.map(e=>this.deleteProposal(e))])}),lU(this,"onProviderMessageEvent",async e=>{!this.initialized||this.relayMessageCache.length>0?this.relayMessageCache.push(e):await this.onRelayMessage(e)}),lU(this,"onRelayEventRequest",async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()}),lU(this,"processRequestsQueue",async()=>{if(this.requestQueue.state===lA.active)return void this.client.logger.info("Request queue already active, skipping...");for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=lA.active;let e=this.requestQueue.queue.shift();if(e)try{await this.processRequest(e)}catch(e){this.client.logger.warn(e)}}this.requestQueue.state=lA.idle}),lU(this,"processRequest",async e=>{let{topic:t,payload:r,attestation:n,transportType:i,encryptedId:a}=e,s=r.method;if(!this.shouldIgnorePairingRequest({topic:t,requestMethod:s}))switch(s){case"wc_sessionPropose":return await this.onSessionProposeRequest
5735({topic:t,payload:r,attestation:n,encryptedId:a});case"wc_sessionSettle":return await this.onSessionSettleRequest(t,r);case"wc_sessionUpdate":return await this.onSessionUpdateRequest(t,r);case"wc_sessionExtend":return await this.onSessionExtendRequest(t,r);case"wc_sessionPing":return await this.onSessionPingRequest(t,r);case"wc_sessionDelete":return await this.onSessionDeleteRequest(t,r);case"wc_sessionRequest":return await this.onSessionRequest({topic:t,payload:r,attestation:n,encryptedId:a,transportType:i});case"wc_sessionEvent":return await this.onSessionEventRequest(t,r);case"wc_sessionAuthenticate":return await this.onSessionAuthenticateRequest({topic:t,payload:r,attestation:n,encryptedId:a,transportType:i});default:return this.client.logger.info(`Unsupported request method ${s}`)}}),lU(this,"onRelayEventResponse",async e=>{let{topic:t,payload:r,transportType:n}=e,i=(await this.client.core.history.get(t,r.id)).request.method;switch(i){case"wc_sessionPropose":return this.onSessionProposeResponse(t,r,n);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);case"wc_sessionAuthenticate":return this.onSessionAuthenticateResponse(t,r);default:return this.client.logger.info(`Unsupported response method ${i}`)}}),lU(this,"onRelayEventUnknownPayload",e=>{let{topic:t}=e,{message:r}=em("MISSING_OR_INVALID",`Decoded payload on topic ${t} is not identifiable as a JSON-RPC request or a response.`);throw Error(r)}),lU(this,"shouldIgnorePairingRequest",e=>{let{topic:t,requestMethod:r}=e,n=this.expectedPairingMethodMap.get(t);return!(!n||n.includes(r))&&!!(n.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)}),lU(this,"onSessionProposeRequest",async e=>{let{topic:t,payload:r,attestation:n,encryptedId:i}=e,{params:a,id:s}=r;try{let e=this.client.core.eventClient.getEvent({topic:t});0===this.client.events.listenerCount("session_proposal")&&(console.warn("No listener for session_proposal event"),e?.setError(a4.proposal_listener_not_found)),this.isValidConnect(lB({},r.params));let o=a.expiryTimestamp||eF(lE.wc_sessionPropose.req.ttl),l=lB({id:s,pairingTopic:t,expiryTimestamp:o,attestation:n,encryptedId:i},a);await this.setProposal(s,l);let c=await this.getVerifyContext({attestationId:n,hash:iL(JSON.stringify(r)),encryptedId:i,metadata:l.proposer.metadata});e?.addTrace(a3.emit_session_proposal),this.client.events.emit("session_proposal",{id:s,params:l,verifyContext:c})}catch(e){await this.sendError({id:s,topic:t,error:e,rpcOpts:lE.wc_sessionPropose.autoReject}),this.client.logger.error(e)}}),lU(this,"onSessionProposeResponse",async(e,t,r)=>{let{id:n}=t;if((0,aR.isJsonRpcResult)(t)){let{result:i}=t;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:i});let a=this.client.proposal.get(n);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:a});let s=a.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:s});let o=i.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:o});let l=await this.client.core.crypto.generateSharedKey(s,o);this.pendingSessions.set(n,{sessionTopic:l,pairingTopic:e,proposalId:n,publicKey:s});let c=await this.client.core.relayer.subscribe(l,{transportType:r});this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:c}),await this.client.core.pairing.activate({topic:e})}else if((0,aR.isJsonRpcError)(t)){await this.deleteProposal(n);let e=ez("session_connect",n);if(0===this.events.listenerCount(e))throw Error(`emitting ${e} without any listeners, 954`);this.events.emit(e,{error:t.error})}}),lU(this,"onSessionSettleRequest",async(e,t)=>{let{id:r,params:n}=t;try{this.isValidSessionSettleRequest(n);let{relay:r,controller:i,expiry:a,namespaces:s,sessionProperties:o,scopedProperties:l,sessionConfig:c,proposalRequestsResponses:u}=t.params,d=[...this.pendingSessions.values()].find(t=>t.sessionTopic===e);if(!d)return this.client.logger.error(`Pending session not found for topic ${e}`);let h=this.client.proposal.get(d.proposalId),p=lj(lB(lB(lB({topic:e,relay:r,expiry:a,namespaces:s,acknowledged:!0,pairingTopic:d.pairingTopic,requiredNamespaces:h.requiredNamespaces,optionalNamespaces:h.optionalNamespaces,controller:i.publicKey,self:{publicKey:d.publicKey,metadata:this.client.metadata},peer:{publicKey:i.publicKey,metadata:i.metadata}},o&&{sessionProperties:o}),l&&{scopedProperties:l}),c&&{sessionConfig:c}
5735),{transportType:aK.relay,authentication:u?.authentication,walletPayResult:u?.walletPay});await this.client.session.set(p.topic,p),await this.setExpiry(p.topic,p.expiry),await this.client.core.pairing.updateMetadata({topic:d.pairingTopic,metadata:p.peer.metadata}),this.pendingSessions.delete(d.proposalId),this.deleteProposal(d.proposalId,!1),this.cleanupDuplicatePairings(p),await this.sendResult({id:t.id,topic:e,throwOnFailedPublish:!0,result:!0}),this.client.events.emit("session_connect",{session:p}),this.events.emit(ez("session_connect",d.proposalId),{session:p})}catch(t){await this.sendError({id:r,topic:e,error:t}),this.client.logger.error(t)}}),lU(this,"onSessionSettleResponse",async(e,t)=>{let{id:r}=t;(0,aR.isJsonRpcResult)(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(ez("session_approve",r),{})):(0,aR.isJsonRpcError)(t)&&(await this.client.session.delete(e,eg("USER_DISCONNECTED")),this.events.emit(ez("session_approve",r),{error:t.error}))}),lU(this,"onSessionUpdateRequest",async(e,t)=>{let{params:r,id:n}=t;try{let t=`${e}_session_update`,i=aO.get(t);if(i&&this.isRequestOutOfSync(i,n)){this.client.logger.warn(`Discarding out of sync request - ${n}`),this.sendError({id:n,topic:e,error:eg("INVALID_UPDATE_REQUEST")});return}this.isValidUpdate(lB({topic:e},r));try{aO.set(t,n),await this.client.session.update(e,{namespaces:r.namespaces}),await this.sendResult({id:n,topic:e,result:!0})}catch(e){throw aO.delete(t),e}this.client.events.emit("session_update",{id:n,topic:e,params:r})}catch(t){await this.sendError({id:n,topic:e,error:t}),this.client.logger.error(t)}}),lU(this,"isRequestOutOfSync",(e,t)=>t.toString().slice(0,-3)<e.toString().slice(0,-3)),lU(this,"onSessionUpdateResponse",(e,t)=>{let{id:r}=t,n=ez("session_update",r);if(0===this.events.listenerCount(n))throw Error(`emitting ${n} without any listeners`);(0,aR.isJsonRpcResult)(t)?this.events.emit(ez("session_update",r),{}):(0,aR.isJsonRpcError)(t)&&this.events.emit(ez("session_update",r),{error:t.error})}),lU(this,"onSessionExtendRequest",async(e,t)=>{let{id:r}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,eF(lv)),await this.sendResult({id:r,topic:e,result:!0}),this.client.events.emit("session_extend",{id:r,topic:e})}catch(t){await this.sendError({id:r,topic:e,error:t}),this.client.logger.error(t)}}),lU(this,"onSessionExtendResponse",(e,t)=>{let{id:r}=t,n=ez("session_extend",r);if(0===this.events.listenerCount(n))throw Error(`emitting ${n} without any listeners`);(0,aR.isJsonRpcResult)(t)?this.events.emit(ez("session_extend",r),{}):(0,aR.isJsonRpcError)(t)&&this.events.emit(ez("session_extend",r),{error:t.error})}),lU(this,"onSessionPingRequest",async(e,t)=>{let{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult({id:r,topic:e,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_ping",{id:r,topic:e})}catch(t){await this.sendError({id:r,topic:e,error:t}),this.client.logger.error(t)}}),lU(this,"onSessionPingResponse",(e,t)=>{let{id:r}=t,n=ez("session_ping",r);setTimeout(()=>{if(0===this.events.listenerCount(n))throw Error(`emitting ${n} without any listeners 2176`);(0,aR.isJsonRpcResult)(t)?this.events.emit(ez("session_ping",r),{}):(0,aR.isJsonRpcError)(t)&&this.events.emit(ez("session_ping",r),{error:t.error})},500)}),lU(this,"onSessionDeleteRequest",async(e,t)=>{let{id:r}=t;try{await this.isValidDisconnect({topic:e,reason:t.params}),this.cleanupPendingSentRequestsForTopic({topic:e,error:eg("USER_DISCONNECTED")}),await this.deleteSession({topic:e,id:r})}catch(e){this.client.logger.error(e)}}),lU(this,"onSessionRequest",async e=>{var t,r,n;let{topic:i,payload:a,attestation:s,encryptedId:o,transportType:l}=e,{id:c,params:u}=a;try{await this.isValidRequest(lB({topic:i},u));let e=this.client.session.get(i),a=await this.getVerifyContext({attestationId:s,hash:iL(JSON.stringify((0,aR.formatJsonRpcRequest)("wc_sessionRequest",u,c))),encryptedId:o,metadata:e.peer.metadata,transportType:l}),d={id:c,topic:i,params:u,verifyContext:a};await this.setPendingSessionRequest(d),l===aK.link_mode&&null!=(t=e.peer.metadata.redirect)&&t.universal&&this.client.core.addLinkModeSupportedApp(null==(r=e.peer.metadata.redirect)?void 0:r.universal),null!=(n=this.client.signConfig)&&n.disableRequestQueue?this.emitSessionRequest(d):(this.addSessionRequestToSessionRequestQueue(d),this.processSessionRequestQueue())}
5735catch(e){await this.sendError({id:c,topic:i,error:e}),this.client.logger.error(e)}}),lU(this,"onSessionRequestResponse",(e,t)=>{let{id:r}=t,n=ez("session_request",r);if(0===this.events.listenerCount(n))throw Error(`emitting ${n} without any listeners`);(0,aR.isJsonRpcResult)(t)?this.events.emit(ez("session_request",r),{result:t.result}):(0,aR.isJsonRpcError)(t)&&this.events.emit(ez("session_request",r),{error:t.error})}),lU(this,"onSessionEventRequest",async(e,t)=>{let{id:r,params:n}=t;try{let t=`${e}_session_event_${n.event.name}`,i=aO.get(t);if(i&&this.isRequestOutOfSync(i,r))return void this.client.logger.info(`Discarding out of sync request - ${r}`);this.isValidEmit(lB({topic:e},n)),this.client.events.emit("session_event",{id:r,topic:e,params:n}),aO.set(t,r)}catch(t){await this.sendError({id:r,topic:e,error:t}),this.client.logger.error(t)}}),lU(this,"onSessionAuthenticateResponse",(e,t)=>{let{id:r}=t;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:e,payload:t}),(0,aR.isJsonRpcResult)(t)?this.events.emit(ez("session_request",r),{result:t.result}):(0,aR.isJsonRpcError)(t)&&this.events.emit(ez("session_request",r),{error:t.error})}),lU(this,"onSessionAuthenticateRequest",async e=>{var t;let{topic:r,payload:n,attestation:i,encryptedId:a,transportType:s}=e;try{let{requester:e,authPayload:o,expiryTimestamp:l}=n.params,c=await this.getVerifyContext({attestationId:i,hash:iL(JSON.stringify(n)),encryptedId:a,metadata:e.metadata,transportType:s}),u={requester:e,pairingTopic:r,id:n.id,authPayload:o,verifyContext:c,expiryTimestamp:l};await this.setAuthRequest(n.id,{request:u,pairingTopic:r,transportType:s}),s===aK.link_mode&&null!=(t=e.metadata.redirect)&&t.universal&&this.client.core.addLinkModeSupportedApp(e.metadata.redirect.universal),this.client.events.emit("session_authenticate",{topic:r,params:n.params,id:n.id,verifyContext:c})}catch(a){this.client.logger.error(a);let e=n.params.requester.publicKey,t=await this.client.core.crypto.generateKeyPair(),i=this.getAppLinkIfEnabled(n.params.requester.metadata,s);await this.sendError({id:n.id,topic:r,error:a,encodeOpts:{type:1,receiverPublicKey:e,senderPublicKey:t},rpcOpts:lE.wc_sessionAuthenticate.autoReject,appLink:i})}}),lU(this,"addSessionRequestToSessionRequestQueue",e=>{this.sessionRequestQueue.queue.push(e)}),lU(this,"cleanupAfterResponse",e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=lA.idle,this.processSessionRequestQueue()},(0,P.toMiliseconds)(this.requestQueueDelay))}),lU(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(ez("session_request",e.request.id),{error:t})})}),lU(this,"processSessionRequestQueue",()=>{if(this.sessionRequestQueue.state===lA.active)return void this.client.logger.info("session request queue is already active.");let e=this.sessionRequestQueue.queue[0];if(!e)return void this.client.logger.info("session request queue is empty.");try{this.emitSessionRequest(e)}catch(e){this.client.logger.error(e)}}),lU(this,"emitSessionRequest",e=>{if(this.emittedSessionRequests.has(e.id))return void this.client.logger.warn({id:e.id},`Skipping emitting \`session_request\` event for duplicate request. id: ${e.id}`);this.sessionRequestQueue.state=lA.active,this.emittedSessionRequests.add(e.id),this.client.events.emit("session_request",e)}),lU(this,"onPairingCreated",e=>{if(e.methods&&this.expectedPairingMethodMap.set(e.topic,e.methods),e.active)return;let t=this.client.proposal.getAll().find(t=>t.pairingTopic===e.topic);
5735t&&this.onSessionProposeRequest({topic:e.topic,payload:(0,aR.formatJsonRpcRequest)("wc_sessionPropose",lj(lB({},t),{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces,relays:t.relays,proposer:t.proposer,sessionProperties:t.sessionProperties,scopedProperties:t.scopedProperties}),t.id),attestation:t.attestation,encryptedId:t.encryptedId})}),lU(this,"isValidConnect",async e=>{if(!aC(e)){let{message:t}=em("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw Error(t)}let{pairingTopic:t,requiredNamespaces:r,optionalNamespaces:n,sessionProperties:i,scopedProperties:a,relays:s}=e;if(af(t)||await this.isValidPairingTopic(t),!function(e,t){let r=!1;return t&&!e?r=!0:e&&ah(e)&&e.length&&e.forEach(e=>{r=aE(e)}),r}(s,!0)){let{message:e}=em("MISSING_OR_INVALID",`connect() relays: ${s}`);throw Error(e)}if(r&&!af(r)&&0!==ap(r)){let e="requiredNamespaces are deprecated and are automatically assigned to optionalNamespaces";["fatal","error","silent"].includes(this.client.logger.level)?console.warn(e):this.client.logger.warn(e),this.validateNamespaces(r,"requiredNamespaces")}if(n&&!af(n)&&0!==ap(n)&&this.validateNamespaces(n,"optionalNamespaces"),i&&!af(i)&&this.validateSessionProps(i,"sessionProperties"),a&&!af(a)){this.validateSessionProps(a,"scopedProperties");let e=Object.keys(r||{}).concat(Object.keys(n||{}));if(!Object.keys(a).every(t=>e.includes(t.split(":")[0])))throw Error(`Scoped properties must be a subset of required/optional namespaces, received: ${JSON.stringify(a)}, required/optional namespaces: ${JSON.stringify(e)}`)}}),lU(this,"validateNamespaces",(e,t)=>{let r=function(e,t,r){let n=null;if(e&&ap(e)){let i,a=aw(e,t);a&&(n=a);let s=(i=null,Object.entries(e).forEach(([e,n])=>{var a,s;let o;if(i)return;let l=(a=eh(e,n),s=`${t} ${r}`,o=null,ah(a)&&a.length?a.forEach(e=>{o||ay(e)||(o=eg("UNSUPPORTED_CHAINS",`${s}, chain ${e} should be a string and conform to "namespace:chainId" format`))}):ay(e)||(o=eg("UNSUPPORTED_CHAINS",`${s}, 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"] }`)),o);l&&(i=l)}),i);s&&(n=s)}else n=em("MISSING_OR_INVALID",`${t}, ${r} should be an object with data`);return n}(e,"connect()",t);if(r)throw Error(r.message)}),lU(this,"isValidApprove",async e=>{if(!aC(e))throw Error(em("MISSING_OR_INVALID",`approve() params: ${e}`).message);let{id:t,namespaces:r,relayProtocol:n,sessionProperties:i,scopedProperties:a}=e;this.checkRecentlyDeleted(t),await this.isValidProposalId(t);let s=this.client.proposal.get(t),o=av(r,"approve()");if(o)throw Error(o.message);let l=ax(s.requiredNamespaces,r,"approve()");if(l)throw Error(l.message);if(!am(n,!0)){let{message:e}=em("MISSING_OR_INVALID",`approve() relayProtocol: ${n}`);throw Error(e)}if(i&&!af(i)&&this.validateSessionProps(i,"sessionProperties"),a&&!af(a)){this.validateSessionProps(a,"scopedProperties");let e=new Set(Object.keys(r));if(!Object.keys(a).every(t=>e.has(t.split(":")[0])))throw Error(`Scoped properties must be a subset of approved namespaces, received: ${JSON.stringify(a)}, approved namespaces: ${Array.from(e).join(", ")}`)}}),lU(this,"isValidReject",async e=>{if(!aC(e)){let{message:t}=em("MISSING_OR_INVALID",`reject() params: ${e}`);throw Error(t)}let{id:t,reason:r}=e;if(this.checkRecentlyDeleted(t),await this.isValidProposalId(t),!function(e){return!(!e||"object"!=typeof e||!e.code||!ag(e.code,!1)||!e.message||!am(e.message,!1))}(r)){let{message:e}=em("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(r)}`);throw Error(e)}}),lU(this,"isValidSessionSettleRequest",e=>{if(!aC(e)){let{message:t}=em("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw Error(t)}
5735let{relay:t,controller:r,namespaces:n,expiry:i}=e;if(!aE(t)){let{message:e}=em("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw Error(e)}let a=function(e,t){let r=null;return am(e?.publicKey,!1)||(r=em("MISSING_OR_INVALID",`${t} controller public key should be a string`)),r}(r,"onSessionSettleRequest()");if(a)throw Error(a.message);let s=av(n,"onSessionSettleRequest()");if(s)throw Error(s.message);if(eH(i)){let{message:e}=em("EXPIRED","onSessionSettleRequest()");throw Error(e)}}),lU(this,"isValidUpdate",async e=>{if(!aC(e)){let{message:t}=em("MISSING_OR_INVALID",`update() params: ${e}`);throw Error(t)}let{topic:t,namespaces:r}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t);let n=this.client.session.get(t),i=av(r,"update()");if(i)throw Error(i.message);let a=ax(n.requiredNamespaces,r,"update()");if(a)throw Error(a.message)}),lU(this,"isValidExtend",async e=>{if(!aC(e)){let{message:t}=em("MISSING_OR_INVALID",`extend() params: ${e}`);throw Error(t)}let{topic:t}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t)}),lU(this,"isValidRequest",async e=>{if(!aC(e)){let{message:t}=em("MISSING_OR_INVALID",`request() params: ${e}`);throw Error(t)}let{topic:t,request:r,chainId:n,expiry:i}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t);let{namespaces:a}=this.client.session.get(t);if(!aA(a,n)){let{message:e}=em("MISSING_OR_INVALID",`request() chainId: ${n}`);throw Error(e)}if(!function(e){return!(af(e)||!am(e.method,!1))}(r)){let{message:e}=em("MISSING_OR_INVALID",`request() ${JSON.stringify(r)}`);throw Error(e)}if(!function(e,t,r){return!!am(r,!1)&&(function(e,t){let r=[];return Object.values(e).forEach(e=>{as(e.accounts).includes(t)&&r.push(...e.methods)}),r})(e,t).includes(r)}(a,n,r.method)){let{message:e}=em("MISSING_OR_INVALID",`request() method: ${r.method}`);throw Error(e)}this.validateRequestExpiry(i)}),lU(this,"isValidRespond",async e=>{var t;if(!aC(e)){let{message:t}=em("MISSING_OR_INVALID",`respond() params: ${e}`);throw Error(t)}let{topic:r,response:n}=e;try{await this.isValidSessionTopic(r)}catch(r){throw null!=(t=e?.response)&&t.id&&this.cleanupAfterResponse(e),r}if(!function(e){return!(af(e)||af(e.result)&&af(e.error)||!ag(e.id,!1)||!am(e.jsonrpc,!1))}(n)){let{message:e}=em("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(n)}`);throw Error(e)}let i=this.client.pendingRequest.get(n.id);if(i.topic!==r){let{message:e}=em("MISMATCHED_TOPIC",`Request response topic mismatch. reqId: ${n.id}, expected topic: ${i.topic}, received topic: ${r}`);throw Error(e)}}),lU(this,"isValidPing",async e=>{if(!aC(e)){let{message:t}=em("MISSING_OR_INVALID",`ping() params: ${e}`);throw Error(t)}let{topic:t}=e;await this.isValidSessionOrPairingTopic(t)}),lU(this,"isValidEmit",async e=>{if(!aC(e)){let{message:t}=em("MISSING_OR_INVALID",`emit() params: ${e}`);throw Error(t)}let{topic:t,event:r,chainId:n}=e;await this.isValidSessionTopic(t);let{namespaces:i}=this.client.session.get(t);if(!aA(i,n)){let{message:e}=em("MISSING_OR_INVALID",`emit() chainId: ${n}`);throw Error(e)}if(!function(e){return!(af(e)||!am(e.name,!1))}(r)||!function(e,t,r){return!!am(r,!1)&&(function(e,t){let r=[];return Object.values(e).forEach(e=>{as(e.accounts).includes(t)&&r.push(...e.events)}),r})(e,t).includes(r)}(i,n,r.name)){let{message:e}=em("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw Error(e)}}),lU(this,"isValidDisconnect",async e=>{if(!aC(e)){let{message:t}=em("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw Error(t)}let{topic:t}=e;await this.isValidSessionOrPairingTopic(t)}),lU(this,"isValidAuthenticate",e=>{let{chains:t,uri:r,domain:n,nonce:i}=e;if(!Array.isArray(t)||0===t.length)throw Error("chains is required and must be a non-empty array");if(!am(r,!1))throw Error("uri is required parameter");if(!am(n,!1))throw Error("domain is required parameter");if(!am(i,!1))throw Error("nonce is required parameter");if([...new Set(t.map(e=>ed(e).namespace))].length>1)throw Error("Multi-namespace requests are not supported. Please request single namespace only.");let{namespace:a}=ed(t[0]);if("eip155"!==a)throw Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")}),lU(this,"getVerifyContext",async e=>{let{attestationId:t,hash:r,encryptedId:n,metadata:i,transportType:a}=e,s={verified:{verifyUrl:i.verifyUrl||a2,validation:"UNKNOWN",origin:i.url||""}};try{if(a===aK.link_mode){let e=this.getAppLinkIfEnabled(i,a);return s.verified.validation=e&&new URL(e).origin===new URL(i.url).origin?"VALID":"INVALID",s}let e=await this.client.core.verify.resolve({attestationId:t,hash:r,encryptedId:n,verifyUrl:i.verifyUrl});e&&(s.verified.origin=e.origin,s.verified.isScam=e.isScam,s.verified.validation=e.origin===new URL(i.url).origin?"VALID":"INVALID")}catch(e){this.client.logger.warn(e)}return this.client.logger.debug(`Verify context: ${JSON.stringify(s)}`),s}),lU(this,"validateSessionProps",(e,t)=>{Object.values(e).forEach((r,n)=>{if(null==r){let{message:i}=em("MISSING_OR_INVALID",`${t} must contain an existing value for each key. Received: ${r} for key ${Object.keys(e)[n]}`);throw Error(i)}})}),lU(this,"getPendingAuthRequest",e=>{let t=this.client.auth.requests.get(e);return"object"==typeof t?t:void 0}),lU(this,"addToRecentlyDeleted",(e,t)=>{if(this.recentlyDeletedMap.set(e,t),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let e=0,t=this.recentlyDeletedLimit/2;
5735for(let r of this.recentlyDeletedMap.keys()){if(e++>=t)break;this.recentlyDeletedMap.delete(r)}}}),lU(this,"checkRecentlyDeleted",e=>{let t=this.recentlyDeletedMap.get(e);if(t){let{message:r}=em("MISSING_OR_INVALID",`Record was recently deleted - ${t}: ${e}`);throw Error(r)}}),lU(this,"isLinkModeEnabled",(e,t)=>{var r,n,i,a,s,o,l,c,u;return!!e&&t===aK.link_mode&&(null==(n=null==(r=this.client.metadata)?void 0:r.redirect)?void 0:n.linkMode)===!0&&(null==(a=null==(i=this.client.metadata)?void 0:i.redirect)?void 0:a.universal)!==void 0&&(null==(o=null==(s=this.client.metadata)?void 0:s.redirect)?void 0:o.universal)!==""&&(null==(l=e?.redirect)?void 0:l.universal)!==void 0&&(null==(c=e?.redirect)?void 0:c.universal)!==""&&(null==(u=e?.redirect)?void 0:u.linkMode)===!0&&this.client.core.linkModeSupportedApps.includes(e.redirect.universal)&&"u">typeof(null==global?void 0:global.Linking)}),lU(this,"getAppLinkIfEnabled",(e,t)=>{var r;return this.isLinkModeEnabled(e,t)?null==(r=e?.redirect)?void 0:r.universal:void 0}),lU(this,"handleLinkModeMessage",({url:e})=>{if(!e||!e.includes("wc_ev")||!e.includes("topic"))return;let t=eG(e,"topic")||"",r=decodeURIComponent(eG(e,"wc_ev")||""),n=this.client.session.keys.includes(t);n&&this.client.session.update(t,{transportType:aK.link_mode}),this.client.core.dispatchEnvelope({topic:t,message:r,sessionExists:n})}),lU(this,"registerLinkModeListeners",async()=>{var e;if(eZ()||eP()&&null!=(e=this.client.metadata.redirect)&&e.linkMode){let e=null==global?void 0:global.Linking;if("u">typeof e){e.addEventListener("url",this.handleLinkModeMessage,this.client.name);let t=await e.getInitialURL();t&&setTimeout(()=>{this.handleLinkModeMessage({url:t})},50)}}}),lU(this,"getTVFApproveParams",e=>{try{let t=ao(e.namespaces),r=function(e){let t=[];return Object.values(e).forEach(e=>{t.push(...e.methods)}),[...new Set(t)]}(e.namespaces),n=function(e){let t=[];return Object.values(e).forEach(e=>{t.push(...e.events)}),[...new Set(t)]}(e.namespaces),i=e.sessionProperties,a=e.scopedProperties;return{approvedChains:t,approvedMethods:r,approvedEvents:n,sessionProperties:i,scopedProperties:a}}catch(e){return this.client.logger.warn(e,"Error getting TVF approve params"),{}}}),lU(this,"getTVFParams",(e,t,r)=>{var n,i,a;if(!(null!=(n=t.request)&&n.method))return{};let s={correlationId:e,rpcMethods:[t.request.method],chainId:t.chainId};try{s.txHashes=this.extractTxHashesFromResult(t.request,r),s.contractAddresses=this.isValidContractData(t.request.params)?[null==(a=null==(i=t.request.params)?void 0:i[0])?void 0:a.to]:[]}catch(e){this.client.logger.warn(e,"Error getting TVF params")}return s}),lU(this,"isValidContractData",e=>{var t;if(!e)return!1;try{let r=e?.data||(null==(t=e?.[0])?void 0:t.data);if(!r.startsWith("0x"))return!1;let n=r.slice(2);return!!/^[0-9a-fA-F]*$/.test(n)&&n.length%2==0}catch{}return!1}),lU(this,"extractTxHashesFromResult",(e,t)=>{var r;try{if(!t)return[];let n=e.method,i=lx[n];if("sui_signTransaction"===n)return[function(e){let t=new Uint8Array(eu.from(e,"base64")),r=Array.from("TransactionData::").map(e=>e.charCodeAt(0)),n=new Uint8Array(r.length+t.length);n.set(r),n.set(t,r.length);let i=rd(n,{dkLen:32});return ea.tw.encode(i)}(t.transactionBytes)];if("near_signTransaction"===n)return[rm(t)];if("near_signTransactions"===n)return t.map(e=>rm(e));if("xrpl_signTransactionFor"===n||"xrpl_signTransaction"===n)return[null==(r=t.tx_json)?void 0:r.hash];if("polkadot_signTransaction"===n)return[function(e){let t=Uint8Array.from(eu.from(e.signature,"hex")),r=function({publicKey:e,signature:t,payload:r}){var n,i;let a=a_(r.method),s=128|parseInt((null==(n=r.version)?void 0:n.toString())||"4"),o=function(e){let t=ea.tw.decode(e)[0];return 42===t?0:60===t?2:1}(r.address),l="00"===r.era?new Uint8Array([0]):a_(r.era);if(1!==l.length&&2!==l.length)throw Error("Invalid era length");let c=parseInt(r.nonce,16),u=new Uint8Array([255&c,c>>8&255]),d=new Uint8Array([0,...e,o,...t,...l,...u,...function(e){if(e<BigInt(1)<<BigInt(6))return new Uint8Array([Number(e<<BigInt(2))]);if(e<BigInt(1)<<BigInt(14)){let t=e<<BigInt(2)|BigInt(1);return new Uint8Array([Number(t&BigInt(255)),Number(t>>BigInt(8)&BigInt(255))])}if(e<BigInt(1)<<BigInt(30)){let t=e<<BigInt(2)|BigInt(2);return new Uint8Array([Number(t&BigInt(255)),Number(t>>BigInt(8)&BigInt(255)),Number(t>>BigInt(16)&BigInt(255)),Number(t>>BigInt(24)&BigInt(255))])}throw Error("BigInt compact encoding not supported > 2^30")}(BigInt(`0x${(i=r.tip).startsWith("0x")?i.slice(2):i}`)),...a]);return new Uint8Array([...function(e){if(e<64)return new Uint8Array([e<<2]);if(e<16384){let t=e<<2|1;return new Uint8Array([255&t,t>>8&255])}if(e<0x40000000){let t=e<<2|2;return new Uint8Array([255&t,t>>8&255,t>>16&255,t>>24&255])}throw Error("Compact encoding > 2^30 not supported")}(d.length+1),s,...d])}({publicKey:function(e){let t=ea.tw.decode(e);if(t.length<33)throw Error("Too short to contain a public key");return t.slice(1,33)}(e.transaction.address),signature:t,payload:e.transaction});var n=eu.from(r).toString("hex");let i=a_(n),a=(0,el.blake2b)(i,void 0,32);return"0x"+eu.from(a).toString("hex")}({transaction:e.params.transactionPayload,signature:t.signature})];if("algo_signTxn"===n)return ah(t)?t.map(e=>rg(e)):[rg(t)];
5735if("cosmos_signDirect"===n)return[function(e){let t=eu.from(e.signed.bodyBytes,"base64"),r=eu.from(e.signed.authInfoBytes,"base64"),n=eu.from(e.signature.signature,"base64"),i=[];i.push(eu.from([10])),i.push(ry(t.length)),i.push(t),i.push(eu.from([18])),i.push(ry(r.length)),i.push(r),i.push(eu.from([26])),i.push(ry(n.length)),i.push(n);let a=re(eu.concat(i));return eu.from(a).toString("hex").toUpperCase()}(t)];if("wallet_sendCalls"===n)return function(e){var t,r;let n=[];try{if("string"==typeof e)return n.push(e),n;if("object"!=typeof e)return n;null!=e&&e.id&&n.push(e.id);let i=null==(r=null==(t=e?.capabilities)?void 0:t.caip345)?void 0:r.transactionHashes;i&&n.push(...i)}catch(e){console.warn("getWalletSendCallsHashes failed: ",e)}return n}(t);if("string"==typeof t)return[t];let a=t[i.key];if(ah(a))return"solana_signAllTransactions"===n?a.map(e=>(function(e){let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);let n=r[0];if(0===n)throw Error("No signatures found");if(r.length<1+64*n)throw Error("Transaction data too short for claimed signature count");if(r.length<100)throw Error("Transaction too short");let i=eu.from(e,"base64").slice(1,65);return ea.tw.encode(i)})(e)):a;if("string"==typeof a)return[a]}catch(e){this.client.logger.warn(e,"Error extracting tx hashes from result")}return[]})}async processPendingMessageEvents(){try{let e=this.client.session.keys,t=this.client.core.relayer.messages.getWithoutAck(e);for(let[e,r]of Object.entries(t))for(let t of r)try{await this.onProviderMessageEvent({topic:e,message:t,publishedAt:Date.now()})}catch{this.client.logger.warn(`Error processing pending message event for topic: ${e}, message: ${t}`)}}catch(e){this.client.logger.warn(e,"processPendingMessageEvents failed")}}isInitialized(){if(!this.initialized){let{message:e}=em("NOT_INITIALIZED",this.name);throw Error(e)}}async confirmOnlineStateOrThrow(){await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(aq.message,e=>{this.onProviderMessageEvent(e)})}async onRelayMessage(e){let{topic:t,message:r,attestation:n,transportType:i}=e,{publicKey:a}=this.client.auth.authKeys.keys.includes(lT)?this.client.auth.authKeys.get(lT):{responseTopic:void 0,publicKey:void 0};try{let e=await this.client.core.crypto.decode(t,r,{receiverPublicKey:a,encoding:i===aK.link_mode?iB:iM});(0,aR.isJsonRpcRequest)(e)?(this.client.core.history.set(t,e),await this.onRelayEventRequest({topic:t,payload:e,attestation:n,transportType:i,encryptedId:iL(r)})):(0,aR.isJsonRpcResponse)(e)?(await this.client.core.history.resolve(e),await this.onRelayEventResponse({topic:t,payload:e,transportType:i}),this.client.core.history.delete(t,e.id)):(this.client.logger.error(`onRelayMessage() -> unknown payload: ${JSON.stringify(e)}`),await this.onRelayEventUnknownPayload({topic:t,payload:e,transportType:i})),await this.client.core.relayer.messages.ack(t,r)}catch(e){this.client.logger.error(`onRelayMessage() -> failed to process an inbound message: ${r}`),this.client.logger.error(e)}}registerExpirerEvents(){this.client.core.expirer.on(a1.expired,async e=>{let{topic:t,id:r}=eD(e.target);return r&&this.client.pendingRequest.keys.includes(r)?await this.deletePendingSessionRequest(r,em("EXPIRED"),!0):r&&this.client.auth.requests.keys.includes(r)?await this.deletePendingAuthRequest(r,em("EXPIRED"),!0):void(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(aX.create,e=>this.onPairingCreated(e)),this.client.core.pairing.events.on(aX.delete,e=>{this.addToRecentlyDeleted(e.topic,"pairing")})}isValidPairingTopic(e){if(!am(e,!1)){let{message:t}=em("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){let{message:t}=em("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw Error(t)}if(eH(this.client.core.pairing.pairings.get(e).expiry)){let{message:t}=em("EXPIRED",`pairing topic: ${e}`);throw Error(t)}}async isValidSessionTopic(e){if(!am(e,!1)){let{message:t}=em("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw Error(t)}if(this.checkRecentlyDeleted(e),!this.client.session.keys.includes(e)){let{message:t}=em("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw Error(t)}if(eH(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});let{message:t}=em("EXPIRED",`session topic: ${e}`);throw Error(t)}if(!this.client.core.crypto.keychain.has(e)){let{message:t}=em("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),Error(t)}}async isValidSessionOrPairingTopic(e){if(this.checkRecentlyDeleted(e),this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(am(e,!1)){let{message:t}=em("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw Error(t)}else{let{message:t}=em("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw Error(t)}}async isValidProposalId(e){if("number"!=typeof e){let{message:t}=em("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw Error(t)}if(!this.client.proposal.keys.includes(e)){let{message:t}=em("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw Error(t)}if(eH(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);let{message:t}=em("EXPIRED",`proposal id: ${e}`);throw Error(t)}}
5735validateRequestExpiry(e){if(e&&(!ag(e,!1)||!(e<=lC.max)||!(e>=lC.min))){let{message:t}=em("MISSING_OR_INVALID",`request() expiry: ${e}. Expiry must be a number (in seconds) between ${lC.min} and ${lC.max}`);throw Error(t)}}}class lL extends oG{constructor(e,t){super(e,t,"proposal",lg),this.core=e,this.logger=t}}class lD extends oG{constructor(e,t){super(e,t,"session",lg),this.core=e,this.logger=t}}class lF extends oG{constructor(e,t){super(e,t,"request",lg,e=>e.id),this.core=e,this.logger=t}}class lH extends oG{constructor(e,t){super(e,t,"authKeys",lS,()=>lT),this.core=e,this.logger=t}}class lz extends oG{constructor(e,t){super(e,t,"pairingTopics",lS),this.core=e,this.logger=t}}class lW extends oG{constructor(e,t){super(e,t,"requests",lS,e=>e.id),this.core=e,this.logger=t}}var lq=Object.defineProperty,lV=(e,t,r)=>((e,t,r)=>t in e?lq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class lG{constructor(e,t){this.core=e,this.logger=t,lV(this,"authKeys"),lV(this,"pairingTopics"),lV(this,"requests"),this.authKeys=new lH(this.core,this.logger),this.pairingTopics=new lz(this.core,this.logger),this.requests=new lW(this.core,this.logger)}
5735async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}}var lK=Object.defineProperty,lZ=(e,t,r)=>((e,t,r)=>t in e?lK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class lJ extends S{constructor(e){super(e),lZ(this,"protocol","wc"),lZ(this,"version",2),lZ(this,"name",ly.name),lZ(this,"metadata"),lZ(this,"core"),lZ(this,"logger"),lZ(this,"events",new i.EventEmitter),lZ(this,"engine"),lZ(this,"session"),lZ(this,"proposal"),lZ(this,"pendingRequest"),lZ(this,"auth"),lZ(this,"signConfig"),lZ(this,"on",(e,t)=>this.events.on(e,t)),lZ(this,"once",(e,t)=>this.events.once(e,t)),lZ(this,"off",(e,t)=>this.events.off(e,t)),lZ(this,"removeListener",(e,t)=>this.events.removeListener(e,t)),lZ(this,"removeAllListeners",e=>this.events.removeAllListeners(e)),lZ(this,"connect",async e=>{try{return await this.engine.connect(e)}catch(e){throw this.logger.error(e.message),e}}),lZ(this,"pair",async e=>{try{return await this.engine.pair(e)}catch(e){throw this.logger.error(e.message),e}}),lZ(this,"approve",async e=>{try{return await this.engine.approve(e)}catch(e){throw this.logger.error(e.message),e}}),lZ(this,"reject",async e=>{try{return await this.engine.reject(e)}catch(e){throw this.logger.error(e.message),e}}),lZ(this,"update",async e=>{try{return await this.engine.update(e)}catch(e){throw this.logger.error(e.message),e}}),lZ(this,"extend",async e=>{try{return await this.engine.extend(e)}catch(e){throw this.logger.error(e.message),e}}),lZ(this,"request",async e=>{try{return await this.engine.request(e)}catch(e){throw this.logger.error(e.message),e}}),lZ(this,"respond",async e=>{try{return await this.engine.respond(e)}catch(e){throw this.logger.error(e.message),e}}),lZ(this,"ping",async e=>{try{return await this.engine.ping(e)}catch(e){throw this.logger.error(e.message),e}}),lZ(this,"emit",async e=>{try{return await this.engine.emit(e)}catch(e){throw this.logger.error(e.message),e}}),lZ(this,"disconnect",async e=>{try{return await this.engine.disconnect(e)}catch(e){throw this.logger.error(e.message),e}}),lZ(this,"find",e=>{try{return this.engine.find(e)}catch(e){throw this.logger.error(e.message),e}}),lZ(this,"getPendingSessionRequests",()=>{try{return this.engine.getPendingSessionRequests()}catch(e){throw this.logger.error(e.message),e}}),lZ(this,"authenticate",async(e,t)=>{try{return await this.engine.authenticate(e,t)}catch(e){throw this.logger.error(e.message),e}}),lZ(this,"formatAuthMessage",e=>{try{return this.engine.formatAuthMessage(e)}catch(e){throw this.logger.error(e.message),e}}),lZ(this,"approveSessionAuthenticate",async e=>{try{return await this.engine.approveSessionAuthenticate(e)}catch(e){throw this.logger.error(e.message),e}}),lZ(this,"rejectSessionAuthenticate",async e=>{try{return await this.engine.rejectSessionAuthenticate(e)}catch(e){throw this.logger.error(e.message),e}}),this.name=e?.name||ly.name,this.metadata=function(e){var t,r;let n=ek();try{let i,a;return null!=e&&e.url&&n.url&&new URL(e.url).host!==new URL(n.url).host&&(console.warn(`The configured WalletConnect 'metadata.url':${e.url} differs from the actual page url:${n.url}. This is probably unintended and can lead to issues.`),e.url=n.url),null!=(t=e?.icons)&&t.length&&e.icons.length>0&&(e.icons=e.icons.filter(e=>""!==e)),i=ex(ex({},n),e),a={url:e?.url||n.url,name:e?.name||n.name,description:e?.description||n.description,icons:null!=(r=e?.icons)&&r.length&&e.icons.length>0?e.icons:n.icons},eb(i,ew(a))}catch(t){return console.warn("Error populating app metadata",t),e||n}}(e?.metadata),this.signConfig=e?.signConfig;let t=aN({logger:e?.logger||ly.logger,name:this.name});this.logger=t,this.core=e?.core||new lf(e),this.session=new lD(this.core,this.logger),this.proposal=new lL(this.core,this.logger),this.pendingRequest=new lF(this.core,this.logger),this.engine=new l$(this),this.auth=new lG(this.core,this.logger)}static async init(e){let t=new lJ(e);return await t.initialize(),t}get context(){return(0,l.oI)(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.auth.init(),await this.engine.init(),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}}var lY=r(90615),lQ=r.n(lY),lX=Object.defineProperty,l0=Object.defineProperties,l1=Object.getOwnPropertyDescriptors,l2=Object.getOwnPropertySymbols,l5=Object.prototype.hasOwnProperty,l6=Object.prototype.propertyIsEnumerable,l3=(e,t,r)=>t in e?lX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l4=(e,t)=>{for(var r in t||(t={}))l5.call(t,r)&&l3(e,r,t[r]);if(l2)for(var r of l2(t))l6.call(t,r)&&l3(e,r,t[r]);return e},l8=(e,t)=>
5735l0(e,l1(t));let l9={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class l7{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new i.EventEmitter,this.isAvailable=!1,this.registering=!1,!(0,aR.isHttpUrl)(e))throw 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 Error("Connection already closed");this.onClose()}async send(e){this.isAvailable||await this.register();try{let t=(0,O.h)(e),r=await (await lQ()(this.url,l8(l4({},l9),{body:t}))).json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!(0,aR.isHttpUrl)(e))throw 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(Error("HTTP connection is missing or invalid"));e()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){let t=(0,O.h)({id:1,jsonrpc:"2.0",method:"test",params:[]});await lQ()(e,l8(l4({},l9),{body:t}))}this.onOpen()}catch(t){let e=this.parseError(t);throw this.events.emit("register_error",e),this.onClose(),e}}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?(0,O.j)(e.data):e.data;this.events.emit("payload",t)}onError(e,t){let r=this.parseError(t),n=r.message||r.toString(),i=(0,aR.formatJsonRpcError)(e,n);this.events.emit("payload",i)}parseError(e,t=this.url){return(0,aR.parseConnectionError)(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}var ce=r(44168).Buffer;function ct(e){return null==e||"object"!=typeof e&&"function"!=typeof e}function cr(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function cn(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}let ci="[object String]",ca="[object Number]",cs="[object Boolean]",co="[object Arguments]",cl="[object Object]";function cc(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function cu(e,t,r,n=new Map,i){let a=i?.(e,t,r,n);if(void 0!==a)return a;if(ct(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){let t=Array(e.length);n.set(e,t);for(let a=0;a<e.length;a++)t[a]=cu(e[a],a,r,n,i);return Object.hasOwn(e,"index")&&(t.index=e.index),Object.hasOwn(e,"input")&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;for(let[a,s]of(n.set(e,t),e))t.set(a,cu(s,a,r,n,i));return t}if(e instanceof Set){let t=new Set;for(let a of(n.set(e,t),e))t.add(cu(a,void 0,r,n,i));return t}if("u">typeof ce&&ce.isBuffer(e))return e.subarray();if(cc(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);n.set(e,t);for(let a=0;a<e.length;a++)t[a]=cu(e[a],a,r,n,i);return t}if(e instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,t),cd(t,e,r,n,i),t}if("u">typeof File&&e instanceof File){let t=new File([e],e.name,{type:e.type});return n.set(e,t),cd(t,e,r,n,i),t}if("u">typeof Blob&&e instanceof Blob){let t=new Blob([e],{type:e.type});return n.set(e,t),cd(t,e,r,n,i),t}if(e instanceof Error){let t=new e.constructor;return n.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,cd(t,e,r,n,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return n.set(e,t),cd(t,e,r,n,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return n.set(e,t),cd(t,e,r,n,i),t}if(e instanceof String){let t=new String(e.valueOf());return n.set(e,t),cd(t,e,r,n,i),t}if("object"==typeof e&&function(e){switch(cn(e)){case co:case"[object Array]":case"[object ArrayBuffer]":case"[object DataView]":case cs:case"[object Date]":case"[object Float32Array]":case"[object Float64Array
5735]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Map]":case ca:case cl:case"[object RegExp]":case"[object Set]":case ci:case"[object Symbol]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return!0;default:return!1}}(e)){let t=Object.create(Object.getPrototypeOf(e));return n.set(e,t),cd(t,e,r,n,i),t}return e}function cd(e,t,r=e,n,i){let a=[...Object.keys(t),...cr(t)];for(let s=0;s<a.length;s++){let o=a[s],l=Object.getOwnPropertyDescriptor(e,o);(null==l||l.writable)&&(e[o]=cu(t[o],o,r,n,i))}}function ch(e){var t;return t=(t,r,n,i)=>{let a=void 0;if(void 0!==a)return a;if("object"==typeof e){if(cn(e)===cl&&"function"!=typeof e.constructor){let t={};return i.set(e,t),cd(t,e,n,i),t}switch(Object.prototype.toString.call(e)){case ca:case ci:case cs:{let t=new e.constructor(e?.valueOf());return cd(t,e),t}case co:{let t={};return cd(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}},cu(e,void 0,e,new Map,t)}function cp(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===cn(e)}function cf(e){return"object"==typeof e&&null!==e}function cm(){}function cg(e){if("object"!=typeof e||null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;if("[object Object]"!==Object.prototype.toString.call(e)){let t=e[Symbol.toStringTag];return null!=t&&!!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable&&e.toString()===`[object ${t}]`}let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}let cy="error",cb="universal_provider",cw=`wc@2:${cb}:`,cv="https://rpc.walletconnect.org/v1/",cE="generic",cC=`${cv}bundler`,cA="call_status",cx={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var cI=Object.defineProperty,cS=Object.defineProperties,cT=Object.getOwnPropertyDescriptors,cP=Object.getOwnPropertySymbols,cO=Object.prototype.hasOwnProperty,c_=Object.prototype.propertyIsEnumerable,cN=(e,t,r)=>t in e?cI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ck=(e,t)=>{for(var r in t||(t={}))cO.call(t,r)&&cN(e,r,t[r]);if(cP)for(var r of cP(t))c_.call(t,r)&&cN(e,r,t[r]);return e},cR=(e,t)=>cS(e,cT(t));function cM(e,t,r){var n;let i=ed(e);return(null==(n=t.rpcMap)?void 0:n[i.reference])||`${cv}?chainId=${i.namespace}:${i.reference}&projectId=${r}`}function cB(e){return e.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function cj(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>{var r,n;return(null==(r=t?.chains)?void 0:r.length)&&(null==(n=t?.chains)?void 0:n.length)>0}))}function cU(e={},t={}){return function(e,...t){return function(e,...t){let r=t.slice(0,-1),n=t[t.length-1],i=e;for(let e=0;e<r.length;e++)i=function e(t,r,n,i){if(ct(t)&&(t=Object(t)),null==r||"object"!=typeof r)return t;if(i.has(r))return function(e){if(ct(e))return e;if(Array.isArray(e)||cc(e)||e instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(null==t)return Object.assign(Object.create(t),e);let r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){let t=new r(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let t;return(t=e instanceof AggregateError?new r(e.errors,e.message,{cause:e.cause}):new r(e.message,{cause:e.cause})).stack=e.stack,Object.assign(t,e),t}return"u">typeof File&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):"object"==typeof e?Object.assign(Object.create(t),e):e}(i.get(r));if(i.set(r,t),Array.isArray(r)){r=r.slice();for(let e=0;e<r.length;e++)r[e]=r[e]??void 0}let a=[...Object.keys(r),...cr(r)];for(let s=0;s<a.length;s++){let o=a[s];if("__proto__"===o)continue;let l=r[o],c=t[o];if(cp(l)&&(l={...l}),cp(c)&&(c={...c}),"u">typeof ce&&ce.isBuffer(l)&&(l=ch(l)),Array.isArray(l))if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let r=0;r<t.length;r++){let n=t[r];e[n]=c[n]}c=e}else if(function(e){var t;return cf(e)&&null!=e&&"function"!=typeof e&&Number.isSafeInteger(t=e.length)&&t>=0}(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[];let u=n(c,l,o,t,r,i);void 0!==u?t[o]=u:Array.isArray(l)||cf(c)&&cf(l)&&(cg(c)||cg(l)||cc(c)||cc(l))?t[o]=e(c,l,n,i):null==c&&cg(l)?t[o]=e({}
5735,l,n,i):null==c&&cc(l)?t[o]=ch(l):(void 0===c||void 0!==l)&&(t[o]=l)}return t}(i,r[e],n,new Map);return i}(e,...t,cm)}(cj(c$(e)),cj(c$(t)))}function c$(e){var t,r,n,i,a;let s={};if(!ap(e))return s;for(let[o,l]of Object.entries(e)){let e=al(o)?[o]:l.chains,c=l.methods||[],u=l.events||[],d=l.rpcMap||{},h=ac(o);s[h]=cR(ck(ck({},s[h]),l),{chains:eW(e,null==(t=s[h])?void 0:t.chains),methods:eW(c,null==(r=s[h])?void 0:r.methods),events:eW(u,null==(n=s[h])?void 0:n.events)}),(ap(d)||ap((null==(i=s[h])?void 0:i.rpcMap)||{}))&&(s[h].rpcMap=ck(ck({},d),null==(a=s[h])?void 0:a.rpcMap))}return s}function cL(e){return e.includes(":")?e.split(":")[2]:e}function cD(e){let t={};for(let[r,n]of Object.entries(e)){let e=n.methods||[],i=n.events||[],a=n.accounts||[],s=al(r)?[r]:n.chains?n.chains:cB(n.accounts);t[r]={chains:s,methods:e,events:i,accounts:a}}return t}function cF(e){return"number"==typeof e?e:e.includes("0x")?parseInt(e,16):isNaN(Number(e=e.includes(":")?e.split(":")[1]:e))?e:Number(e)}let cH={},cz=e=>cH[e],cW=(e,t)=>{cH[e]=t};var cq=Object.defineProperty,cV=Object.getOwnPropertySymbols,cG=Object.prototype.hasOwnProperty,cK=Object.prototype.propertyIsEnumerable,cZ=(e,t,r)=>t in e?cq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cJ=(e,t)=>{for(var r in t||(t={}))cG.call(t,r)&&cZ(e,r,t[r]);if(cV)for(var r of cV(t))cK.call(t,r)&&cZ(e,r,t[r]);return e};let cY="eip155",cQ=["atomic","flow-control","paymasterService","sessionKeys","auxiliaryFunds"],cX=e=>e&&e.startsWith("0x")?BigInt(e).toString(10):e,c0=e=>e&&e.startsWith("0x")?e:`0x${BigInt(e).toString(16)}`,c1=e=>Object.keys(e).filter(e=>cQ.includes(e)).reduce((t,r)=>(t[r]=c2(e[r]),t),{}),c2=e=>"string"==typeof e&&function(e){try{let t=JSON.parse(e);return"object"==typeof t&&null!==t&&!Array.isArray(t)}catch{return!1}}(e)?JSON.parse(e):e;var c5=Object.defineProperty;class c6{constructor(e){((e,t,r)=>((e,t,r)=>t in e?c5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r))(this,"storage"),this.storage=e}async getItem(e){return await this.storage.getItem(e)}async setItem(e,t){return await this.storage.setItem(e,t)}async removeItem(e){return await this.storage.removeItem(e)}static getStorage(e){return n||(n=new c6(e)),n}}var c3=Object.defineProperty,c4=Object.defineProperties,c8=Object.getOwnPropertyDescriptors,c9=Object.getOwnPropertySymbols,c7=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable,ut=(e,t,r)=>t in e?c3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;async function ur(e,t){let r,n=ed(e.result.capabilities.caip345.caip2),i=e.result.capabilities.caip345.transactionHashes,a=await Promise.allSettled(i.map(e=>un(n.reference,e,t))),s=a.filter(e=>"fulfilled"===e.status).map(e=>e.value).filter(e=>e);a.filter(e=>"rejected"===e.status).forEach(e=>console.warn("Failed to fetch transaction receipt:",e.reason));let o=!s.length||s.some(e=>!e),l=s.every(e=>e?.status==="0x1"),c=s.every(e=>e?.status==="0x0"),u=s.some(e=>e?.status==="0x0");return o?r=100:l?r=200:c?r=500:u&&(r=600),{id:e.result.id,version:e.request.version,atomic:e.request.atomicRequired,chainId:e.request.chainId,capabilities:e.result.capabilities,receipts:s,status:r}}async function un(e,t,r){return await r(parseInt(e)).request((0,aR.formatJsonRpcRequest)("eth_getTransactionReceipt",[t]))}async function ui({sendCalls:e,storage:t}){let r=await t.getItem(cA);await t.setItem(cA,c4(((e,t)=>{for(var r in t||(t={}))c7.call(t,r)&&ut(e,r,t[r]);if(c9)for(var r of c9(t))ue.call(t,r)&&ut(e,r,t[r]);return e})({},r),c8({[e.result.id]:{request:e.request,result:e.result,expiry:eF(86400)}})))}async function ua({resultId:e,storage:t}){let r=await t.getItem(cA);if(r){for(let n in delete r[e],await t.setItem(cA,r),r)eH(r[n].expiry)&&delete r[n];await t.setItem(cA,r)}}async function us({resultId:e,storage:t}){let r=await t.getItem(cA),n=r?.[e];if(n&&!eH(n.expiry))return n;await ua({resultId:e,storage:t})}var uo=Object.defineProperty,ul=Object.defineProperties,uc=Object.getOwnPropertyDescriptors,uu=Object.getOwnPropertySymbols,ud=Object.prototype.hasOwnProperty,uh=Object.prototype.propertyIsEnumerable,up=(e,t,r)=>t in e?uo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uf=(e,t)=>{for(var r in t||(t={}))ud.call(t,r)&&up(e,r,t[r]);if(uu)for(var r of uu(t))uh.call(t,r)&&up(e,r,t[r]);return e},um=(e,t)=>
5735ul(e,uc(t)),ug=(e,t,r)=>up(e,"symbol"!=typeof t?t+"":t,r);class uy{constructor(e){ug(this,"name","eip155"),ug(this,"client"),ug(this,"chainId"),ug(this,"namespace"),ug(this,"httpProviders"),ug(this,"events"),ug(this,"storage"),this.namespace=e.namespace,this.events=cz("events"),this.client=cz("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain()),this.storage=c6.getStorage(this.client.core.storage)}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());case"wallet_getCapabilities":return await this.getCapabilities(e);case"wallet_getCallsStatus":return await this.getCallStatus(e);case"wallet_sendCalls":return await this.sendCalls(e)}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);let r=this.chainId;this.chainId=parseInt(e),this.events.emit(cx.DEFAULT_CHAIN_CHANGED,{currentCaipChainId:`${this.name}:${e}`,previousCaipChainId:`${this.name}:${r}`})}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 Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){let r=t||cM(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);return new ak.F(new l7(r,cz("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 n=parseInt(t.includes(":")?t.split(":")[1]:t);e[n]=this.createHttpProvider(n,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(e){let t=e||this.chainId;return this.httpProviders[t]||(this.httpProviders=um(uf({},this.httpProviders),{[t]:this.createHttpProvider(t)}),this.httpProviders[t])}async handleSwitchChain(e){var t,r;let n=e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0",i=parseInt(n=n.startsWith("0x")?n:`0x${n}`,16);if(this.isChainApproved(i))this.setDefaultChain(`${i}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:n}]},chainId:null==(r=this.namespace.chains)?void 0:r[0]}),this.setDefaultChain(`${i}`);else throw Error(`Failed to switch to chain 'eip155:${i}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}async getCapabilities(e){var t,r,n,i,a;let s,o=null==(r=null==(t=e.request)?void 0:t.params)?void 0:r[0],l=(null==(i=null==(n=e.request)?void 0:n.params)?void 0:i[1])||[];if(!o)throw Error("Missing address parameter in `wallet_getCapabilities` request");let c=this.client.session.get(e.topic),u=(null==(a=c?.sessionProperties)?void 0:a.capabilities)||{},d=l.length>0?l.join(","):`0x${this.chainId.toString(16)}`,h=`${o}${d}`,p=u?.[h];if(p)return p;try{s=((e,t,r)=>{let{sessionProperties:n={},scopedProperties:i={}}=e,a={};if(!ap(i)&&!ap(n))return;let s=c1(n);for(let e of r){let r=cX(e);if(!r)continue;a[c0(r)]=s;let n=i?.[`${cY}:${r}`];if(n){let e=n?.[`${cY}:${r}:${t}`];a[c0(r)]=cJ(cJ({},a[c0(r)]),c1(e||n))}}for(let[e,t]of Object.entries(a))0===Object.keys(t).length&&delete a[e];return Object.keys(a).length>0?a:void 0})(c,o,l)}catch(e){console.warn("Failed to extract capabilities from session",e)}if(s)return s;let f=await this.client.request(e);try{await this.client.session.update(e.topic,{sessionProperties:um(uf({},c.sessionProperties||{}),{capabilities:um(uf({},u||{}),{[h]:f})})})}catch(e){console.warn("Failed to update session with capabilities",e)}return f}async getCallStatus(e){var t,r,n;let i=this.client.session.get(e.topic),a=null==(t=i.sessionProperties)?void 0:t.bundler_name;if(a){let t=this.getBundlerUrl(e.chainId,a);try{return await this.getUserOperationReceipt(t,e)}catch(e){console.warn("Failed to fetch call status from bundler",e,t)}}let s=null==(r=i.sessionProperties)?void 0:r.bundler_url;if(s)try{return await this.getUserOperationReceipt(s,e)}catch(e){console.warn("Failed to fetch call status from custom bundler",e,s)}let o=await us({resultId:null==(n=e.request.params)?void 0:n[0],storage:this.storage});if(o)try{return await ur(o,this.getHttpProvider.bind(this))}catch(e){console.warn("Failed to fetch call status from stored send calls",e,o)}if(this.namespace.methods.includes(e.request.method))return await this.client.request(e);throw Error("Fetching call status not approved by the wallet.")}async getUserOperationReceipt(e,t){var r;let n=new URL(e),i=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify((0,aR.formatJsonRpcRequest)("eth_getUserOperationReceipt",[null==(r=t.request.params)?void 0:r[0]]))});if(!i.ok)throw Error(`Failed to fetch user operation receipt - ${i.status}`);return await i.json()}
5735getBundlerUrl(e,t){return`${cC}?projectId=${this.client.core.projectId}&chainId=${e}&bundler=${t}`}async sendCalls(e){var t,r,n;let i=await this.client.request(e),a=null==(t=e.request.params)?void 0:t[0],s=i?.id,o=i?.capabilities||{},l=null==(r=o?.caip345)?void 0:r.caip2,c=null==(n=o?.caip345)?void 0:n.transactionHashes;return s&&l&&null!=c&&c.length&&await ui({sendCalls:{request:a,result:i},storage:this.storage}),i}}var ub=Object.defineProperty,uw=(e,t,r)=>((e,t,r)=>t in e?ub(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class uv{constructor(e){uw(this,"name",cE),uw(this,"client"),uw(this,"httpProviders"),uw(this,"events"),uw(this,"namespace"),uw(this,"chainId"),this.namespace=e.namespace,this.events=cz("events"),this.client=cz("client"),this.chainId=this.getDefaultChain(),this.name=this.getNamespaceName(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(e.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(e.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(e.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(e.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider(e.chainId).request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t);let r=this.chainId;this.chainId=e,this.events.emit(cx.DEFAULT_CHAIN_CHANGED,{currentCaipChainId:`${this.name}:${e}`,previousCaipChainId:`${this.name}:${r}`})}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}getNamespaceName(){let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return ed(e).namespace}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(){var e,t;let r={};return null==(t=null==(e=this.namespace)?void 0:e.accounts)||t.forEach(e=>{var t,n;let i=ed(e),a=null==(n=null==(t=this.namespace)?void 0:t.rpcMap)?void 0:n[`${i.namespace}:${i.reference}`];r[i.reference]=this.createHttpProvider(e,a)}),r}getHttpProvider(e){let t=ed(e).reference,r=this.httpProviders[t];if(typeof r>"u")throw Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||cM(e,this.namespace,this.client.core.projectId);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);return new ak.F(new l7(r,cz("disableProviderPing")))}}var uE=Object.defineProperty,uC=Object.defineProperties,uA=Object.getOwnPropertyDescriptors,ux=Object.getOwnPropertySymbols,uI=Object.prototype.hasOwnProperty,uS=Object.prototype.propertyIsEnumerable,uT=(e,t,r)=>t in e?uE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uP=(e,t)=>{for(var r in t||(t={}))uI.call(t,r)&&uT(e,r,t[r]);if(ux)for(var r of ux(t))uS.call(t,r)&&uT(e,r,t[r]);return e},uO=(e,t)=>uC(e,uA(t)),u_=(e,t,r)=>uT(e,"symbol"!=typeof t?t+"":t,r);class uN{constructor(e){var t,r;u_(this,"client"),u_(this,"namespaces"),u_(this,"optionalNamespaces"),u_(this,"sessionProperties"),u_(this,"scopedProperties"),u_(this,"events",new i),u_(this,"rpcProviders",{}),u_(this,"session"),u_(this,"providerOpts"),u_(this,"logger"),u_(this,"uri"),u_(this,"disableProviderPing",!1),u_(this,"connectParams"),this.providerOpts=e,this.logger=aN({logger:null!=(t=e.logger)?t:cy,name:null!=(r=this.providerOpts.name)?r:cb}),this.disableProviderPing=e?.disableProviderPing||!1}static async init(e){let t=new uN(e);return await t.initialize(),t}async request(e,t,r){let[n,i]=this.validateChain(t);if(!this.session)throw Error("Please call connect() before request()");return await this.getProvider(n).request({request:uP({},e),chainId:`${n}:${i}`,topic:this.session.topic,expiry:r})}sendAsync(e,t,r,n){let i=new Date().getTime();this.request(e,r,n).then(e=>t(null,(0,aR.formatJsonRpcResult)(i,e))).catch(e=>t(e,void 0))}async enable(){if(!this.client)throw Error("Sign Client not initialized");
5735return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(e=this.session)?void 0:e.topic,reason:eg("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw Error("Sign Client not initialized");if(this.connectParams=e,this.setNamespaces(e),this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}async authenticate(e,t){if(!this.client)throw Error("Sign Client not initialized");this.setNamespaces(e),await this.cleanupPendingPairings();let{uri:r,response:n}=await this.client.authenticate(e,t);r&&(this.uri=r,this.events.emit("display_uri",r));let i=await n();if(this.session=i.session,this.session){let e=cD(this.session.namespaces);this.namespaces=cU(this.namespaces,e),await this.persist("namespaces",this.namespaces),this.onConnect()}return i}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){var t,r;let{uri:n,approval:i}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties,authentication:null==(t=this.connectParams)?void 0:t.authentication,walletPay:null==(r=this.connectParams)?void 0:r.walletPay});n&&(this.uri=n,this.events.emit("display_uri",n));let a=await i();this.session=a;let s=cD(a.namespaces);return this.namespaces=cU(this.namespaces,s),await this.persist("namespaces",this.namespaces),await this.persist("optionalNamespaces",this.optionalNamespaces),this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;let[r,n]=this.validateChain(e),i=this.getProvider(r);i?i.setDefaultChain(n,t):this.session&&this.logger.warn(`Provider for namespace '${r}' not found in setDefaultChain`)}catch(e){if(!/Please call connect/.test(e.message))throw e}}async cleanupPendingPairings(e={}){try{this.logger.info("Cleaning up inactive pairings...");let t=this.client.pairing.getAll();if(!ah(t))return;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}`)}catch(e){this.logger.warn(e,"Failed to cleanup pending pairings")}}abortPairingAttempt(){this.logger.warn("abortPairingAttempt is deprecated. This is now a no-op.")}async checkStorage(){this.namespaces=await this.getFromStore("namespaces")||{},this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.session&&this.createProviders()}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){var e,t;if(this.client=this.providerOpts.client||await lJ.init({core:this.providerOpts.core,logger:this.providerOpts.logger||cy,relayUrl:this.providerOpts.relayUrl||"wss://relay.walletconnect.org",projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.providerOpts.session)try{this.session=this.client.session.get(this.providerOpts.session.topic)}catch(r){throw this.logger.error(r,"Failed to get session"),Error(`The provided session: ${null==(t=null==(e=this.providerOpts)?void 0:e.session)?void 0:t.topic} doesn't exist in the Sign client`)}else{let e=this.client.session.getAll();this.session=e[0]}this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw Error("Sign Client not initialized");if(!this.session)throw Error("Session not initialized. Please call connect() before enable()");let e=[...new Set(Object.keys(this.session.namespaces).map(e=>ac(e)))];cW("client",this.client),cW("events",this.events),cW("disableProviderPing",this.disableProviderPing),e.forEach(e
5735=>{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 n=[];return r.forEach(e=>{let r=t.namespaces[e].accounts;n.push(...r)}),n}(e,this.session);if(t?.length===0)return;let r=cB(t),n=uO(uP({},cU(this.namespaces,this.optionalNamespaces)[e]),{accounts:t,chains:r});"eip155"===e?this.rpcProviders[e]=new uy({namespace:n}):this.rpcProviders[e]=new uv({namespace:n})})}registerEventListeners(){if(typeof this.client>"u")throw Error("Sign Client is not initialized");this.client.on("session_ping",e=>{var t;let{topic:r}=e;r===(null==(t=this.session)?void 0:t.topic)&&this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{var t;let{params:r,topic:n}=e;if(n!==(null==(t=this.session)?void 0:t.topic))return;let{event:i}=r;if("accountsChanged"===i.name){let e=i.data;e&&ah(e)&&this.events.emit("accountsChanged",e.map(cL))}else if("chainChanged"===i.name){let e=r.chainId,t=r.event.data,n=ac(e),i=cF(e)!==cF(t)?`${n}:${cF(t)}`:e;this.onChainChanged({currentCaipChainId:i})}else this.events.emit(i.name,i.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:t})=>{var r,n;if(e!==(null==(r=this.session)?void 0:r.topic))return;let{namespaces:i}=t,a=null==(n=this.client)?void 0:n.session.get(e);this.session=uO(uP({},a),{namespaces:i}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})}),this.client.on("session_delete",async e=>{var t;e.topic===(null==(t=this.session)?void 0:t.topic)&&(await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",uO(uP({},eg("USER_DISCONNECTED")),{data:e.topic})))}),this.on(cx.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(uO(uP({},e),{internal:!0}))})}getProvider(e){return this.rpcProviders[e]||this.rpcProviders[cE]}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:n,scopedProperties:i}=e;this.optionalNamespaces=cU(t,r),this.sessionProperties=n,this.scopedProperties=i}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=>ac(e)).includes(t))throw Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&r)return[t,r];let n=ac(Object.keys(this.namespaces)[0]),i=this.rpcProviders[n].getDefaultChain();return[n,i]}async requestAccounts(){let[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}async onChainChanged({currentCaipChainId:e,previousCaipChainId:t,internal:r=!1}){if(!this.namespaces)return;let[n,i]=this.validateChain(e);if(i){if(this.updateNamespaceChain(n,i),r)this.events.emit("chainChanged",i),this.emitAccountsChangedOnChainChange({namespace:n,currentCaipChainId:e,previousCaipChainId:t});else{let e=this.getProvider(n);e?e.setDefaultChain(i):this.session&&this.logger.warn(`Provider for namespace '${n}' not found during chain change`)}await this.persist("namespaces",this.namespaces)}}emitAccountsChangedOnChainChange({namespace:e,currentCaipChainId:t,previousCaipChainId:r}){var n,i;try{if(r===t)return;let a=null==(i=null==(n=this.session)?void 0:n.namespaces[e])?void 0:i.accounts;if(!a)return;let s=a.filter(e=>e.includes(`${t}:`)).map(cL);if(!ah(s))return;this.events.emit("accountsChanged",s)}catch(e){this.logger.warn(e,"Failed to emit accountsChanged on chain change")}}updateNamespaceChain(e,t){if(!this.namespaces)return;let r=this.namespaces[e]?e:`${e}:${t}`;this.namespaces[r]?this.namespaces[r]&&(this.namespaces[r].defaultChain=t):this.namespaces[r]={chains:[],methods:[],events:[],defaultChain:t}}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.connectParams=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,await this.deleteFromStore("namespaces"),await this.deleteFromStore("optionalNamespaces"),await this.deleteFromStore("sessionProperties"),this.session=void 0,this.cleanupPendingPairings({deletePairings:!0}),await this.cleanupStorage()}async persist(e,t){var r;let n=(null==(r=this.session)?void 0:r.topic)||"";await this.client.core.storage.setItem(`${cw}/${e}${n}`,t)}async getFromStore(e){var t;let r=(null==(t=this.session)?void 0:t.topic)||"";return await this.client.core.storage.getItem(`${cw}/${e}${r}`)}async deleteFromStore(e){var t;let r=(null==(t=this.session)?void 0:t.topic)||"";await this.client.core.storage.removeItem(`${cw}/${e}${r}`)}async cleanupStorage(){var e;try{if((null==(e=this.client)?void 0:e.session.length)>0)return;for(let e of(await this.client.core.storage.getKeys()))e.startsWith(cw)&&await this.client.core.storage.removeItem(e)}catch(e){this.logger.warn(e,"Failed to cleanup storage")}}}},49259:(e,t,r)=>{"use strict";
5735Object.defineProperty(t,"__esModule",{value:!0}),t.containsNodeError=function(e){return e instanceof s.TransactionRejectedRpcError||e instanceof s.InvalidInputRpcError||e instanceof a.RpcRequestError&&e.code===i.ExecutionRevertedError.code},t.getNodeError=function(e,t){let r=(e.details||"").toLowerCase(),a=e instanceof n.BaseError?e.walk(e=>e?.code===i.ExecutionRevertedError.code):e;return a instanceof n.BaseError?new i.ExecutionRevertedError({cause:e,message:a.details}):i.ExecutionRevertedError.nodeMessage.test(r)?new i.ExecutionRevertedError({cause:e,message:e.details}):i.FeeCapTooHighError.nodeMessage.test(r)?new i.FeeCapTooHighError({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.FeeCapTooLowError.nodeMessage.test(r)?new i.FeeCapTooLowError({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.NonceTooHighError.nodeMessage.test(r)?new i.NonceTooHighError({cause:e,nonce:t?.nonce}):i.NonceTooLowError.nodeMessage.test(r)?new i.NonceTooLowError({cause:e,nonce:t?.nonce}):i.NonceMaxValueError.nodeMessage.test(r)?new i.NonceMaxValueError({cause:e,nonce:t?.nonce}):i.InsufficientFundsError.nodeMessage.test(r)?new i.InsufficientFundsError({cause:e}):i.IntrinsicGasTooHighError.nodeMessage.test(r)?new i.IntrinsicGasTooHighError({cause:e,gas:t?.gas}):i.IntrinsicGasTooLowError.nodeMessage.test(r)?new i.IntrinsicGasTooLowError({cause:e,gas:t?.gas}):i.TransactionTypeNotSupportedError.nodeMessage.test(r)?new i.TransactionTypeNotSupportedError({cause:e}):i.TipAboveFeeCapError.nodeMessage.test(r)?new i.TipAboveFeeCapError({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new i.UnknownNodeError({cause:e})};let n=r(45226),i=r(80779),a=r(17208),s=r(69902)},49359:(e,t,r)=>{"use strict";let n;r.d(t,{Y:()=>rE});let i={validateCaipAddress(e){if(e.split(":")?.length!==3)throw Error("Invalid CAIP Address");return e},parseCaipAddress(e){let t=e.split(":");if(3!==t.length)throw Error(`Invalid CAIP-10 address: ${e}`);let[r,n,i]=t;if(!r||!n||!i)throw Error(`Invalid CAIP-10 address: ${e}`);return{chainNamespace:r,chainId:n,address:i}},parseCaipNetworkId(e){let t=e.split(":");if(2!==t.length)throw Error(`Invalid CAIP-2 network id: ${e}`);let[r,n]=t;if(!r||!n)throw Error(`Invalid CAIP-2 network id: ${e}`);return{chainNamespace:r,chainId:n}}};var a,s,o,l,c=r(55036);let u={WC_NAME_SUFFIX:".reown.id",WC_NAME_SUFFIX_LEGACY:".wcn.id",BLOCKCHAIN_API_RPC_URL:"https://rpc.walletconnect.org",PULSE_API_URL:"https://pulse.walletconnect.org",W3M_API_URL:"https://api.web3modal.org",CONNECTOR_ID:{WALLET_CONNECT:"walletConnect",INJECTED:"injected",WALLET_STANDARD:"announced",COINBASE:"coinbaseWallet",COINBASE_SDK:"coinbaseWalletSDK",BASE_ACCOUNT:"baseAccount",SAFE:"safe",LEDGER:"ledger",OKX:"okx",EIP6963:"eip6963",AUTH:"AUTH"},CONNECTOR_NAMES:{AUTH:"Auth"},AUTH_CONNECTOR_SUPPORTED_CHAINS:["eip155","solana"],LIMITS:{PENDING_TRANSACTIONS:99},CHAIN:{EVM:"eip155",SOLANA:"solana",POLKADOT:"polkadot",BITCOIN:"bip122",TON:"ton",TRON:"tron"}
5735,CHAIN_NAME_MAP:{eip155:"EVM Networks",solana:"Solana",polkadot:"Polkadot",bip122:"Bitcoin",cosmos:"Cosmos",sui:"Sui",stacks:"Stacks",ton:"TON",tron:"TRON"},ADAPTER_TYPES:{BITCOIN:"bitcoin",SOLANA:"solana",WAGMI:"wagmi",ETHERS:"ethers",ETHERS5:"ethers5",TON:"ton",TRON:"tron"},USDT_CONTRACT_ADDRESSES:["0xdac17f958d2ee523a2206206994597c13d831ec7","0xc2132d05d31c914a87c6611c10748aeb04b58e8f","0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7","0x919C1c267BC06a7039e03fcc2eF738525769109c","0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e","0x55d398326f99059fF775485246999027B3197955","0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9"],SOLANA_SPL_TOKEN_ADDRESSES:{SOL:"So11111111111111111111111111111111111111112"},NATIVE_IMAGE_IDS_BY_NAMESPACE:{eip155:"ba0ba0cd-17c6-4806-ad93-f9d174f17900",solana:"3e8119e5-2a6f-4818-c50c-1937011d5900",bip122:"0b4838db-0161-4ffe-022d-532bf03dba00"},TOKEN_SYMBOLS_BY_ADDRESS:{"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48":"USDC","0x833589fcd6edb6e08f4c7c32d4f71b54bda02913":"USDC","0x0b2c639c533813f4aa9d7837caf62653d097ff85":"USDC","0xaf88d065e77c8cc2239327c5edb3a432268e5831":"USDC","0x3c499c542cef5e3811e1192ce70d8cc03d5c3359":"USDC","0x2791bca1f2de4661ed88a30c99a7a9449aa84174":"USDC",EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v:"USDC","0xdac17f958d2ee523a2206206994597c13d831ec7":"USDT","0x94b008aa00579c1307b0ef2c499ad98a8ce58e58":"USDT","0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9":"USDT","0xc2132d05d31c914a87c6611c10748aeb04b58e8f":"USDT",Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB:"USDT"},HTTP_STATUS_CODES:{SERVER_ERROR:500,TOO_MANY_REQUESTS:429,SERVICE_UNAVAILABLE:503,FORBIDDEN:403},UNSUPPORTED_NETWORK_NAME:"Unknown Network",SECURE_SITE_SDK_ORIGIN:(void 0!==c&&void 0!==c.env?c.env.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",REMOTE_FEATURES_ALERTS:{MULTI_WALLET_NOT_ENABLED:{DEFAULT:{displayMessage:"Multi-Wallet Not Enabled",debugMessage:"Multi-wallet support is not enabled. Please enable it in your AppKit configuration at cloud.reown.com."},CONNECTIONS_HOOK:{displayMessage:"Multi-Wallet Not Enabled",debugMessage:"Multi-wallet support is not enabled. Please enable it in your AppKit configuration at cloud.reown.com to use the useAppKitConnections hook."},CONNECTION_HOOK:{displayMessage:"Multi-Wallet Not Enabled",debugMessage:"Multi-wallet support is not enabled. Please enable it in your AppKit configuration at cloud.reown.com to use the useAppKitConnection hook."}},HEADLESS_NOT_ENABLED:{DEFAULT:{displayMessage:"",debugMessage:"Headless support is not enabled. Please enable it with the features.headless option in the AppKit configuration and make sure your current plan supports it."}}},IS_DEVELOPMENT:void 0!==c&&!1,DEFAULT_ALLOWED_ANCESTORS:["http://localhost:*","https://localhost:*","http://127.0.0.1:*","https://127.0.0.1:*","https://*.pages.dev","https://*.vercel.app","https://*.ngrok-free.app","https://secure-mobile.walletconnect.com","https://secure-mobile.walletconnect.org"],METMASK_CONNECTOR_NAME:"MetaMask",TRUST_CONNECTOR_NAME:"Trust Wallet",SOLFLARE_CONNECTOR_NAME:"Solflare",PHANTOM_CONNECTOR_NAME:"Phantom",COIN98_CONNECTOR_NAME:"Coin98",MAGIC_EDEN_CONNECTOR_NAME:"Magic Eden",BACKPACK_CONNECTOR_NAME:"Backpack",BITGET_CONNECTOR_NAME:"Bitget Wallet",FRONTIER_CONNECTOR_NAME:"Frontier",XVERSE_CONNECTOR_NAME:"Xverse Wallet",LEATHER_CONNECTOR_NAME:"Leather",OKX_CONNECTOR_NAME:"OKX Wallet",BINANCE_CONNECTOR_NAME:"Binance Wallet",EIP155:"eip155",ADD_CHAIN_METHOD:"wallet_addEthereumChain",EIP6963_ANNOUNCE_EVENT:"eip6963:announceProvider",EIP6963_REQUEST_EVENT:"eip6963:requestProvider",CONNECTOR_RDNS_MAP:{coinbaseWallet:"com.coinbase.wallet",coinbaseWalletSDK:"com.coinbase.wallet"},CONNECTOR_TYPE_EXTERNAL:"EXTERNAL",CONNECTOR_TYPE_WALLET_CONNECT:"WALLET_CONNECT",CONNECTOR_TYPE_INJECTED:"INJECTED",CONNECTOR_TYPE_ANNOUNCED:"ANNOUNCED",CONNECTOR_TYPE_AUTH:"AUTH",CONNECTOR_TYPE_MULTI_CHAIN:"MULTI_CHAIN",CONNECTOR_TYPE_W3M_AUTH:"AUTH"};var d=r(47482),h=r(99347);!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw 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=>
5735"number"!=typeof t[t[e]]),n={};for(let e of r)n[e]=t[e];return e.objectValues(n)},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}(a||(a={})),(s||(s={})).mergeShapes=(e,t)=>({...e,...t});let p=a.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),f=e=>{switch(typeof e){case"undefined":return p.undefined;case"string":return p.string;case"number":return isNaN(e)?p.nan:p.number;case"boolean":return p.boolean;case"function":return p.function;case"bigint":return p.bigint;case"symbol":return p.symbol;case"object":if(Array.isArray(e))return p.array;if(null===e)return p.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return p.promise;if("undefined"!=typeof Map&&e instanceof Map)return p.map;if("undefined"!=typeof Set&&e instanceof Set)return p.set;if("undefined"!=typeof Date&&e instanceof Date)return p.date;return p.object;default:return p.unknown}}
vendor: 4,101 bytes, line 5735
5735,m=a.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"]);class g 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:[]},n=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(n);else if("invalid_return_type"===i.code)n(i.returnTypeError);else if("invalid_arguments"===i.code)n(i.argumentsError);else if(0===i.path.length)r._errors.push(t(i));else{let e=r,n=0;for(;n<i.path.length;){let r=i.path[n];n===i.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(i))):e[r]=e[r]||{_errors:[]},e=e[r],n++}}};return n(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,a.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},r=[];for(let n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}g.create=e=>new g(e);let y=(e,t)=>{let r;switch(e.code){case m.invalid_type:r=e.received===p.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case m.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,a.jsonStringifyReplacer)}`;break;case m.unrecognized_keys:r=`Unrecognized key(s) in object: ${a.joinValues(e.keys,", ")}`;break;case m.invalid_union:r="Invalid input";break;case m.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${a.joinValues(e.options)}`;break;case m.invalid_enum_value:r=`Invalid enum value. Expected ${a.joinValues(e.options)}, received '${e.received}'`;break;case m.invalid_arguments:r="Invalid function arguments";break;case m.invalid_return_type:r="Invalid function return type";break;case m.invalid_date:r="Invalid date";break;case m.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}"`:a.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case m.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 m.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 m.custom:r="Invalid input";break;
5735case m.invalid_intersection_types:r="Intersection results could not be merged";break;case m.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case m.not_finite:r="Number must be finite";break;default:r=t.defaultError,a.assertNever(e)}return{message:r}},b=y;function w(){return b}let v=e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,a=[...r,...i.path||[]],s={...i,path:a},o="";for(let e of n.filter(e=>!!e).slice().reverse())o=e(s,{data:t,defaultError:o}).message;return{...i,path:a,message:i.message||o}};function E(e,t){let r=v({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,w(),y].filter(e=>!!e)});e.common.issues.push(r)}class C{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 n of t){if("aborted"===n.status)return A;"dirty"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t)r.push({key:await e.key,value:await e.value});return C.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:t,value:i}=n;if("aborted"===t.status||"aborted"===i.status)return A;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||n.alwaysSet)&&(r[t.value]=i.value)}return{status:e.value,value:r}}}let A=Object.freeze({status:"aborted"}),x=e=>({status:"dirty",value:e}),I=e=>({status:"valid",value:e}),S=e=>"aborted"===e.status,T=e=>"dirty"===e.status,P=e=>"valid"===e.status,O=e=>"undefined"!=typeof Promise&&e instanceof Promise;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(o||(o={}));class _{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}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}}let N=(e,t)=>{if(P(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new g(e.common.issues);return this._error=t,this._error}}};function k(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=n?n:t.defaultError}:{message:null!=r?r:t.defaultError},description:i}}class R{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 f(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:f(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new C,ctx:{common:e.parent.common,data:e.data,parsedType:f(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(O(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;let n={common:{issues:[],async:null!=(r=null==t?void 0:t.async)&&r,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:f(e)},i=this._parseSync({data:e,path:n.path,parent:n});return N(n,i)}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:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:f(e)},n=this._parse({data:e,path:r.path,parent:r});return N(r,await (O(n)?n:Promise.resolve(n)))}refine(e,t){return this._refinement((r,n)=>{let i=e(r),a=()=>n.addIssue({code:m.custom,..."string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(r):t});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(a(),!1)):!!i||(a(),!1)})}refinement(e,t){return this._refinement((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1))}
5735_refinement(e){return new ey({schema:this,typeName:l.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return eb.create(this,this._def)}nullable(){return ew.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ee.create(this,this._def)}promise(){return eg.create(this,this._def)}or(e){return er.create([this,e],this._def)}and(e){return ea.create(this,e,this._def)}transform(e){return new ey({...k(this._def),schema:this,typeName:l.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new ev({...k(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:l.ZodDefault})}brand(){return new ex({typeName:l.ZodBranded,type:this,...k(this._def)})}catch(e){return new eE({...k(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:l.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return eI.create(this,e)}readonly(){return eS.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let M=/^c[^\s-]{8,}$/i,B=/^[a-z][a-z0-9]*$/,j=/^[0-9A-HJKMNP-TV-Z]{26}$/,U=/^[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,$=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,L=/^(((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}))$/,D=/^(([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})))$/,F=e=>{if(e.precision)if(e.offset)return RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`);else return RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`);if(0===e.precision)if(e.offset)return RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$");else return RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$");return e.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")};class H extends R{_parse(e){let t;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==p.string){let t=this._getOrReturnCtx(e);return E(t,{code:m.invalid_type,expected:p.string,received:t.parsedType}),A}let r=new C;for(let o of this._def.checks)if("min"===o.kind)e.data.length<o.value&&(E(t=this._getOrReturnCtx(e,t),{code:m.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if("max"===o.kind)e.data.length>o.value&&(E(t=this._getOrReturnCtx(e,t),{code:m.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if("length"===o.kind){let n=e.data.length>o.value,i=e.data.length<o.value;(n||i)&&(t=this._getOrReturnCtx(e,t),n?E(t,{code:m.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):i&&E(t,{code:m.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if("email"===o.kind)$.test(e.data)||(E(t=this._getOrReturnCtx(e,t),{validation:"email",code:m.invalid_string,message:o.message}),r.dirty());else if("emoji"===o.kind)n||(n=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),n.test(e.data)||(E(t=this._getOrReturnCtx(e,t),{validation:"emoji",code:m.invalid_string,message:o.message}),r.dirty());else if("uuid"===o.kind)U.test(e.data)||(E(t=this._getOrReturnCtx(e,t),{validation:"uuid",code:m.invalid_string,message:o.message}),r.dirty());else if("cuid"===o.kind)M.test(e.data)||(E(t=this._getOrReturnCtx(e,t),{validation:"cuid",code:m.invalid_string,message:o.message}),r.dirty());else if("cuid2"===o.kind)B.test(e.data)||(E(t=this._getOrReturnCtx(e,t),{validation:"cuid2",code:m.invalid_string,message:o.message}),r.dirty());else if("ulid"===o.kind)j.test(e.data)||(E(t=this._getOrReturnCtx(e,t),{validation:"ulid",code:m.invalid_string,message:o.message}),r.dirty());else if("url"===o.kind)try{new URL(e.data)}catch(n){E(t=this._getOrReturnCtx(e,t),{validation:"url",code:m.invalid_string,message:o.message}),r.dirty()}else if("regex"===o.kind)o.regex.lastIndex=0,o.regex.test(e.data)||(E(t=this._getOrReturnCtx(e,t),{validation:"regex",code:m.invalid_string,message:o.message}),r.dirty());else if("trim"===o.kind)e.data=e.data.trim();else if("includes"===o.kind)e.data.includes(o.value,o.position)||(E(t=this._getOrReturnCtx(e,t),{code:m.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty());else if("toLowerCase"===o.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===o.kind)e.data=e.data.toUpperCase();else if("startsWith"===o.kind)e.data.startsWith(o.value)||(E(t=this._getOrReturnCtx(e,t),{code:m.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty());else if("endsWith"===o.kind)e.data.endsWith(o.value)||(E(t=this._getOrReturnCtx(e,t),{code:m.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty());else if("datetime"===o.kind)F(o).test(e.data)||(E(t=this._getOrReturnCtx(e,t),{code:m.invalid_string,validation:"datetime",message:o.message}),r.dirty());else if("ip"===o.kind){var i,s;i=e.data,!(("v4"===(s=o.version)||!s)&&L.test(i)||("v6"===s||!s)&&D.test(i))&&1&&
5735(E(t=this._getOrReturnCtx(e,t),{validation:"ip",code:m.invalid_string,message:o.message}),r.dirty())}else a.assertNever(o);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:m.invalid_string,...o.errToObj(r)})}_addCheck(e){return new H({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...o.errToObj(e)})}url(e){return this._addCheck({kind:"url",...o.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...o.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...o.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...o.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...o.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...o.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...o.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:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!=(t=null==e?void 0:e.offset)&&t,...o.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...o.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...o.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...o.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...o.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...o.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...o.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...o.errToObj(t)})}nonempty(e){return this.min(1,o.errToObj(e))}trim(){return new H({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new H({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new H({...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}}H.create=e=>{var t;return new H({checks:[],typeName:l.ZodString,coerce:null!=(t=null==e?void 0:e.coerce)&&t,...k(e)})};class z extends R{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==p.number){let t=this._getOrReturnCtx(e);return E(t,{code:m.invalid_type,expected:p.number,received:t.parsedType}),A}let r=new C;for(let n of this._def.checks)"int"===n.kind?a.isInteger(e.data)||(E(t=this._getOrReturnCtx(e,t),{code:m.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty()):"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(E(t=this._getOrReturnCtx(e,t),{code:m.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(E(t=this._getOrReturnCtx(e,t),{code:m.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"multipleOf"===n.kind?0!==function(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n;return parseInt(e.toFixed(i).replace(".",""))%parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}(e.data,n.value)&&(E(t=this._getOrReturnCtx(e,t),{code:m.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(E(t=this._getOrReturnCtx(e,t),{code:m.not_finite,message:n.message}),r.dirty()):a.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,o.toString(t))}gt(e,t){return this.setLimit("min",e,!1,o.toString(t))}lte(e,t){return this.setLimit("max",e,!0,o.toString(t))}lt(e,t){return this.setLimit("max",e,!1,o.toString(t))}setLimit(e,t,r,n){return new z({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:o.toString(n)}]})}_addCheck(e){return new z({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:o.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:o.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:o.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:o.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:o.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:o.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:o.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:o.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:o.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&&a.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;else"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)}}z.create=e=>new z({checks:[],typeName:l.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...k(e)});class W extends R{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==p.bigint){let t=this._getOrReturnCtx(e);return E(t,{code:m.invalid_type,expected:p.bigint,received:t.parsedType}),A}let r=new C;for(let n of this._def.checks)"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(E(t=this._getOrReturnCtx(e,t),{code:m.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(E(t=this._getOrReturnCtx(e,t),{code:m.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(E(t=this._getOrReturnCtx(e,t),{code:m.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):a.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,o.toString(t))}gt(e,t){return this.setLimit("min",e,!1,o.toString(t))}lte(e,t){return this.setLimit("max",e,!0,o.toString(t))}lt(e,t){return this.setLimit("max",e,!1,o.toString(t))}setLimit(e,t,r,n){return new W({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:o.toString(n)}]})}_addCheck(e){return new W({...this._def,checks:[...this._def.checks,e]})}
5735positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:o.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:o.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:o.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:o.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:o.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}}W.create=e=>{var t;return new W({checks:[],typeName:l.ZodBigInt,coerce:null!=(t=null==e?void 0:e.coerce)&&t,...k(e)})};class q extends R{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==p.boolean){let t=this._getOrReturnCtx(e);return E(t,{code:m.invalid_type,expected:p.boolean,received:t.parsedType}),A}return I(e.data)}}q.create=e=>new q({typeName:l.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...k(e)});class V extends R{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==p.date){let t=this._getOrReturnCtx(e);return E(t,{code:m.invalid_type,expected:p.date,received:t.parsedType}),A}if(isNaN(e.data.getTime()))return E(this._getOrReturnCtx(e),{code:m.invalid_date}),A;let r=new C;for(let n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(E(t=this._getOrReturnCtx(e,t),{code:m.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),r.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(E(t=this._getOrReturnCtx(e,t),{code:m.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):a.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new V({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:o.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:o.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}}V.create=e=>new V({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:l.ZodDate,...k(e)});class G extends R{_parse(e){if(this._getType(e)!==p.symbol){let t=this._getOrReturnCtx(e);return E(t,{code:m.invalid_type,expected:p.symbol,received:t.parsedType}),A}return I(e.data)}}G.create=e=>new G({typeName:l.ZodSymbol,...k(e)});class K extends R{_parse(e){if(this._getType(e)!==p.undefined){let t=this._getOrReturnCtx(e);return E(t,{code:m.invalid_type,expected:p.undefined,received:t.parsedType}),A}return I(e.data)}}K.create=e=>new K({typeName:l.ZodUndefined,...k(e)});class Z extends R{_parse(e){if(this._getType(e)!==p.null){let t=this._getOrReturnCtx(e);return E(t,{code:m.invalid_type,expected:p.null,received:t.parsedType}),A}return I(e.data)}}Z.create=e=>new Z({typeName:l.ZodNull,...k(e)});class J extends R{constructor(){super(...arguments),this._any=!0}_parse(e){return I(e.data)}}J.create=e=>new J({typeName:l.ZodAny,...k(e)});class Y extends R{constructor(){super(...arguments),this._unknown=!0}_parse(e){return I(e.data)}}Y.create=e=>new Y({typeName:l.ZodUnknown,...k(e)});class Q extends R{_parse(e){let t=this._getOrReturnCtx(e);return E(t,{code:m.invalid_type,expected:p.never,received:t.parsedType}),A}}Q.create=e=>new Q({typeName:l.ZodNever,...k(e)});class X extends R{_parse(e){if(this._getType(e)!==p.undefined){let t=this._getOrReturnCtx(e);return E(t,{code:m.invalid_type,expected:p.void,received:t.parsedType}),A}return I(e.data)}}X.create=e=>new X({typeName:l.ZodVoid,...k(e)});class ee extends R{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==p.array)return E(t,{code:m.invalid_type,expected:p.array,received:t.parsedType}),A;if(null!==n.exactLength){let e=t.data.length>n.exactLength.value,i=t.data.length<n.exactLength.value;(e||i)&&(E(t,{code:e?m.too_big:m.too_small,minimum:i?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(E(t,{code:m.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(E(t,{code:m.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>n.type._parseAsync(new _(t,e,t.path,r)))).then(e=>C.mergeArray(r,e));let i=[...t.data].map((e,r)=>n.type._parseSync(new _(t,e,t.path,r)));return C.mergeArray(r,i)}
5735get element(){return this._def.type}min(e,t){return new ee({...this._def,minLength:{value:e,message:o.toString(t)}})}max(e,t){return new ee({...this._def,maxLength:{value:e,message:o.toString(t)}})}length(e,t){return new ee({...this._def,exactLength:{value:e,message:o.toString(t)}})}nonempty(e){return this.min(1,e)}}ee.create=(e,t)=>new ee({type:e,minLength:null,maxLength:null,exactLength:null,typeName:l.ZodArray,...k(t)});class et extends R{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=a.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==p.object){let t=this._getOrReturnCtx(e);return E(t,{code:m.invalid_type,expected:p.object,received:t.parsedType}),A}let{status:t,ctx:r}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Q&&"strip"===this._def.unknownKeys))for(let e in r.data)i.includes(e)||a.push(e);let s=[];for(let e of i){let t=n[e],i=r.data[e];s.push({key:{status:"valid",value:e},value:t._parse(new _(r,i,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof Q){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of a)s.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)a.length>0&&(E(r,{code:m.unrecognized_keys,keys:a}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of a){let n=r.data[t];s.push({key:{status:"valid",value:t},value:e._parse(new _(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of s){let r=await t.key;e.push({key:r,value:await t.value,alwaysSet:t.alwaysSet})}return e}).then(e=>C.mergeObjectSync(t,e)):C.mergeObjectSync(t,s)}get shape(){return this._def.shape()}strict(e){return o.errToObj,new et({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{var n,i,a,s;let l=null!=(a=null==(i=(n=this._def).errorMap)?void 0:i.call(n,t,r).message)?a:r.defaultError;return"unrecognized_keys"===t.code?{message:null!=(s=o.errToObj(e).message)?s:l}:{message:l}}}:{}})}strip(){return new et({...this._def,unknownKeys:"strip"})}passthrough(){return new et({...this._def,unknownKeys:"passthrough"})}extend(e){return new et({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new et({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:l.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new et({...this._def,catchall:e})}pick(e){let t={};return a.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(t[r]=this.shape[r])}),new et({...this._def,shape:()=>t})}omit(e){let t={};return a.objectKeys(this.shape).forEach(r=>{e[r]||(t[r]=this.shape[r])}),new et({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof et){let r={};for(let n in t.shape){let i=t.shape[n];r[n]=eb.create(e(i))}return new et({...t._def,shape:()=>r})}if(t instanceof ee)return new ee({...t._def,type:e(t.element)});if(t instanceof eb)return eb.create(e(t.unwrap()));if(t instanceof ew)return ew.create(e(t.unwrap()));if(t instanceof es)return es.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};return a.objectKeys(this.shape).forEach(r=>{let n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}),new et({...this._def,shape:()=>t})}required(e){let t={};return a.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof eb;)e=e._def.innerType;t[r]=e}}),new et({...this._def,shape:()=>t})}keyof(){return ep(a.objectKeys(this.shape))}}et.create=(e,t)=>new et({shape:()=>e,unknownKeys:"strip",catchall:Q.create(),typeName:l.ZodObject,...k(t)}),et.strictCreate=(e,t)=>new et({shape:()=>e,unknownKeys:"strict",catchall:Q.create(),typeName:l.ZodObject,...k(t)}),et.lazycreate=(e,t)=>new et({shape:e,unknownKeys:"strip",catchall:Q.create(),typeName:l.ZodObject,...k(t)});class er extends R{_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 g(e.ctx.common.issues));return E(t,{code:m.invalid_union,unionErrors:r}),A});{let e,n=[];for(let i of r){let r={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=n.map(e=>new g(e));return E(t,{code:m.invalid_union,unionErrors:i}),A}}get options(){return this._def.options}}er.create=(e,t)=>
5735new er({options:e,typeName:l.ZodUnion,...k(t)});let en=e=>{if(e instanceof ed)return en(e.schema);if(e instanceof ey)return en(e.innerType());if(e instanceof eh)return[e.value];if(e instanceof ef)return e.options;if(e instanceof em)return Object.keys(e.enum);else if(e instanceof ev)return en(e._def.innerType);else if(e instanceof K)return[void 0];else if(e instanceof Z)return[null];else return null};class ei extends R{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==p.object)return E(t,{code:m.invalid_type,expected:p.object,received:t.parsedType}),A;let r=this.discriminator,n=t.data[r],i=this.optionsMap.get(n);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(E(t,{code:m.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),A)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let n=new Map;for(let r of t){let t=en(r.shape[e]);if(!t)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(n.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);n.set(i,r)}}return new ei({typeName:l.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...k(r)})}}class ea extends R{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=(e,n)=>{if(S(e)||S(n))return A;let i=function e(t,r){let n=f(t),i=f(r);if(t===r)return{valid:!0,data:t};if(n===p.object&&i===p.object){let n=a.objectKeys(r),i=a.objectKeys(t).filter(e=>-1!==n.indexOf(e)),s={...t,...r};for(let n of i){let i=e(t[n],r[n]);if(!i.valid)return{valid:!1};s[n]=i.data}return{valid:!0,data:s}}if(n===p.array&&i===p.array){if(t.length!==r.length)return{valid:!1};let n=[];for(let i=0;i<t.length;i++){let a=e(t[i],r[i]);if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}if(n===p.date&&i===p.date&&+t==+r)return{valid:!0,data:t};return{valid:!1}}(e.value,n.value);return i.valid?((T(e)||T(n))&&t.dirty(),{status:t.value,value:i.data}):(E(r,{code:m.invalid_intersection_types}),A)};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])=>n(e,t)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ea.create=(e,t,r)=>new ea({left:e,right:t,typeName:l.ZodIntersection,...k(r)});class es extends R{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==p.array)return E(r,{code:m.invalid_type,expected:p.array,received:r.parsedType}),A;if(r.data.length<this._def.items.length)return E(r,{code:m.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),A;!this._def.rest&&r.data.length>this._def.items.length&&(E(r,{code:m.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let n=[...r.data].map((e,t)=>{let n=this._def.items[t]||this._def.rest;return n?n._parse(new _(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(n).then(e=>C.mergeArray(t,e)):C.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new es({...this._def,rest:e})}}es.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new es({items:e,typeName:l.ZodTuple,rest:null,...k(t)})};class eo extends R{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!==p.object)return E(r,{code:m.invalid_type,expected:p.object,received:r.parsedType}),A;let n=[],i=this._def.keyType,a=this._def.valueType;for(let e in r.data)n.push({key:i._parse(new _(r,e,r.path,e)),value:a._parse(new _(r,r.data[e],r.path,e))});return r.common.async?C.mergeObjectAsync(t,n):C.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return new eo(t instanceof R?{keyType:e,valueType:t,typeName:l.ZodRecord,...k(r)}:{keyType:H.create(),valueType:e,typeName:l.ZodRecord,...k(t)})}}class el extends R{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!==p.map)return E(r,{code:m.invalid_type,expected:p.map,received:r.parsedType}),A;let n=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([e,t],a)=>({key:n._parse(new _(r,e,r.path,[a,"key"])),value:i._parse(new _(r,t,r.path,[a,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of a){let n=await r.key,i=await r.value;if("aborted"===n.status||"aborted"===i.status)return A;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of a){let n=r.key,i=r.value;if("aborted"===n.status||"aborted"===i.status)return A;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}}}}el.create=(e,t,r)=>new el({valueType:t,keyType:e,typeName:l.ZodMap,...k(r)});class ec extends R{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==p.set)return E(r,{code:m.invalid_type,expected:p.set,received:r.parsedType}),A;let n=this._def;null!==n.minSize&&r.data.size<n.minSize.value&&(E(r,{code:m.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&r.data.size>n.maxSize.value&&(E(r,{code:m.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let r=new Set;for(let n of e){if("aborted"===n.status)return A;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}let s=[...r.data.values()].map((e,t)=>i._parse(new _(r,e,r.path,t)));return r.common.async?Promise.all(s).then(e=>a(e)):a(s)}min(e,t){return new ec({...this._def,minSize:{value:e,message:o.toString(t)}})}max(e,t){return new ec({...this._def,maxSize:{value:e,message:o.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ec.create=(e,t)=>
5735new ec({valueType:e,minSize:null,maxSize:null,typeName:l.ZodSet,...k(t)});class eu extends R{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==p.function)return E(t,{code:m.invalid_type,expected:p.function,received:t.parsedType}),A;function r(e,r){return v({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,w(),y].filter(e=>!!e),issueData:{code:m.invalid_arguments,argumentsError:r}})}function n(e,r){return v({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,w(),y].filter(e=>!!e),issueData:{code:m.invalid_return_type,returnTypeError:r}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof eg){let e=this;return I(async function(...t){let s=new g([]),o=await e._def.args.parseAsync(t,i).catch(e=>{throw s.addIssue(r(t,e)),s}),l=await Reflect.apply(a,this,o);return await e._def.returns._def.type.parseAsync(l,i).catch(e=>{throw s.addIssue(n(l,e)),s})})}{let e=this;return I(function(...t){let s=e._def.args.safeParse(t,i);if(!s.success)throw new g([r(t,s.error)]);let o=Reflect.apply(a,this,s.data),l=e._def.returns.safeParse(o,i);if(!l.success)throw new g([n(o,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new eu({...this._def,args:es.create(e).rest(Y.create())})}returns(e){return new eu({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new eu({args:e||es.create([]).rest(Y.create()),returns:t||Y.create(),typeName:l.ZodFunction,...k(r)})}}class ed extends R{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})}}ed.create=(e,t)=>new ed({getter:e,typeName:l.ZodLazy,...k(t)});class eh extends R{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return E(t,{received:t.data,code:m.invalid_literal,expected:this._def.value}),A}return{status:"valid",value:e.data}}get value(){return this._def.value}}function ep(e,t){return new ef({values:e,typeName:l.ZodEnum,...k(t)})}eh.create=(e,t)=>new eh({value:e,typeName:l.ZodLiteral,...k(t)});class ef extends R{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return E(t,{expected:a.joinValues(r),received:t.parsedType,code:m.invalid_type}),A}if(-1===this._def.values.indexOf(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return E(t,{received:t.data,code:m.invalid_enum_value,options:r}),A}return I(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(e){return ef.create(e)}exclude(e){return ef.create(this.options.filter(t=>!e.includes(t)))}}ef.create=ep;class em extends R{_parse(e){let t=a.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==p.string&&r.parsedType!==p.number){let e=a.objectValues(t);return E(r,{expected:a.joinValues(e),received:r.parsedType,code:m.invalid_type}),A}if(-1===t.indexOf(e.data)){let e=a.objectValues(t);return E(r,{received:r.data,code:m.invalid_enum_value,options:e}),A}return I(e.data)}get enum(){return this._def.values}}em.create=(e,t)=>new em({values:e,typeName:l.ZodNativeEnum,...k(t)});class eg extends R{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==p.promise&&!1===t.common.async?(E(t,{code:m.invalid_type,expected:p.promise,received:t.parsedType}),A):I((t.parsedType===p.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}eg.create=(e,t)=>new eg({type:e,typeName:l.ZodPromise,...k(t)});class ey extends R{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===l.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:e=>{E(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===n.type){let e=n.transform(r.data,i);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"===n.type){let e=e=>{let t=n.refinement(e,i);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?A:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?A:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}}if("transform"===n.type)if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>P(e)?Promise.resolve(n.transform(e.value,i)).then(e=>({status:t.value,value:e})):e);else{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!P(e))return e;let a=n.transform(e.value,i);if(a instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}a.assertNever(n)}}ey.create=(e,t,r)=>
5735new ey({schema:e,typeName:l.ZodEffects,effect:t,...k(r)}),ey.createWithPreprocess=(e,t,r)=>new ey({schema:t,effect:{type:"preprocess",transform:e},typeName:l.ZodEffects,...k(r)});class eb extends R{_parse(e){return this._getType(e)===p.undefined?I(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eb.create=(e,t)=>new eb({innerType:e,typeName:l.ZodOptional,...k(t)});class ew extends R{_parse(e){return this._getType(e)===p.null?I(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ew.create=(e,t)=>new ew({innerType:e,typeName:l.ZodNullable,...k(t)});class ev extends R{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===p.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ev.create=(e,t)=>new ev({innerType:e,typeName:l.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...k(t)});class eE extends R{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return O(n)?n.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new g(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new g(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}eE.create=(e,t)=>new eE({innerType:e,typeName:l.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...k(t)});class eC extends R{_parse(e){if(this._getType(e)!==p.nan){let t=this._getOrReturnCtx(e);return E(t,{code:m.invalid_type,expected:p.nan,received:t.parsedType}),A}return{status:"valid",value:e.data}}}eC.create=e=>new eC({typeName:l.ZodNaN,...k(e)});let eA=Symbol("zod_brand");class ex extends R{_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}}class eI extends R{_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?A:"dirty"===e.status?(t.dirty(),x(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?A:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new eI({in:e,out:t,typeName:l.ZodPipeline})}}class eS extends R{_parse(e){let t=this._def.innerType._parse(e);return P(t)&&(t.value=Object.freeze(t.value)),t}}eS.create=(e,t)=>new eS({innerType:e,typeName:l.ZodReadonly,...k(t)});let eT=(e,t={},r)=>e?J.create().superRefine((n,i)=>{var a,s;if(!e(n)){let e="function"==typeof t?t(n):"string"==typeof t?{message:t}:t,o=null==(s=null!=(a=e.fatal)?a:r)||s,l="string"==typeof e?{message:e}:e;i.addIssue({code:"custom",...l,fatal:o})}}):J.create(),eP={object:et.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"}(l||(l={}));let eO=H.create,e_=z.create,eN=eC.create,ek=W.create,eR=q.create,eM=V.create,eB=G.create,ej=K.create,eU=Z.create,e$=J.create,eL=Y.create,eD=Q.create,eF=X.create,eH=ee.create,ez=et.create,eW=et.strictCreate,eq=er.create,eV=ei.create,eG=ea.create,eK=es.create,eZ=eo.create,eJ=el.create,eY=ec.create,eQ=eu.create,eX=ed.create,e0=eh.create,e1=ef.create,e2=em.create,e5=eg.create,e6=ey.create,e3=eb.create,e4=ew.create,e8=ey.createWithPreprocess,e9=eI.create;var e7=Object.freeze({__proto__:null,defaultErrorMap:y,setErrorMap:function(e){b=e},getErrorMap:w,makeIssue:v,EMPTY_PATH:[],addIssueToContext:E,ParseStatus:C,INVALID:A,DIRTY:x,OK:I,isAborted:S,isDirty:T,isValid:P,isAsync:O,get util(){return a},get objectUtil(){return s},ZodParsedType:p,getParsedType:f,ZodType:R,ZodString:H,ZodNumber:z,ZodBigInt:W,ZodBoolean:q,ZodD
5735ate:V,ZodSymbol:G,ZodUndefined:K,ZodNull:Z,ZodAny:J,ZodUnknown:Y,ZodNever:Q,ZodVoid:X,ZodArray:ee,ZodObject:et,ZodUnion:er,ZodDiscriminatedUnion:ei,ZodIntersection:ea,ZodTuple:es,ZodRecord:eo,ZodMap:el,ZodSet:ec,ZodFunction:eu,ZodLazy:ed,ZodLiteral:eh,ZodEnum:ef,ZodNativeEnum:em,ZodPromise:eg,ZodEffects:ey,ZodTransformer:ey,ZodOptional:eb,ZodNullable:ew,ZodDefault:ev,ZodCatch:eE,ZodNaN:eC,BRAND:eA,ZodBranded:ex,ZodPipeline:eI,ZodReadonly:eS,custom:eT,Schema:R,ZodSchema:R,late:eP,get ZodFirstPartyTypeKind(){return l},coerce:{string:e=>H.create({...e,coerce:!0}),number:e=>z.create({...e,coerce:!0}),boolean:e=>q.create({...e,coerce:!0}),bigint:e=>W.create({...e,coerce:!0}),date:e=>V.create({...e,coerce:!0})},any:e$,array:eH,bigint:ek,boolean:eR,date:eM,discriminatedUnion:eV,effect:e6,enum:e1,function:eQ,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>eT(t=>t instanceof e,t),intersection:eG,lazy:eX,literal:e0,map:eJ,nan:eN,nativeEnum:e2,never:eD,null:eU,nullable:e4,number:e_,object:ez,oboolean:()=>eR().optional(),onumber:()=>e_().optional(),optional:e3,ostring:()=>eO().optional(),pipeline:e9,preprocess:e8,promise:e5,record:eZ,set:eY,strictObject:eW,string:eO,symbol:eB,transformer:e6,tuple:eK,undefined:ej,union:eq,unknown:eL,void:eF,NEVER:A,ZodIssueCode:m,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:g});let te=e7.object({message:e7.string()});function tt(e){return e7.literal(d.s1[e])}let tr=e7.object({serializedMessage:e7.string().optional(),accountAddress:e7.string(),chainId:e7.string(),notBefore:e7.string().optional(),domain:e7.string(),uri:e7.string(),version:e7.string(),nonce:e7.string(),statement:e7.string().optional(),resources:e7.array(e7.string()).optional(),requestId:e7.string().optional(),issuedAt:e7.string().optional(),expirationTime:e7.string().optional()});e7.object({accessList:e7.array(e7.string()),blockHash:e7.string().nullable(),blockNumber:e7.string().nullable(),chainId:e7.string().or(e7.number()),from:e7.string(),gas:e7.string(),hash:e7.string(),input:e7.string().nullable(),maxFeePerGas:e7.string(),maxPriorityFeePerGas:e7.string(),nonce:e7.string(),r:e7.string(),s:e7.string(),to:e7.string(),transactionIndex:e7.string().nullable(),type:e7.string(),v:e7.string(),value:e7.string()});let tn=e7.object({chainId:e7.string().or(e7.number()),rpcUrl:e7.optional(e7.string())}),ti=e7.object({email:e7.string().email()}),ta=e7.object({otp:e7.string()}),ts=e7.object({uri:e7.string(),preferredAccountType:e7.optional(e7.string()),chainId:e7.optional(e7.string().or(e7.number())),siwxMessage:e7.optional(tr),rpcUrl:e7.optional(e7.string())}),to=e7.object({chainId:e7.optional(e7.string().or(e7.number())),preferredAccountType:e7.optional(e7.string()),socialUri:e7.optional(e7.string()),siwxMessage:e7.optional(tr),rpcUrl:e7.optional(e7.string())}),tl=e7.object({provider:e7.enum(["google","github","apple","facebook","x","discord"])}),tc=e7.object({email:e7.string().email()}),tu=e7.object({otp:e7.string()}),td=e7.object({otp:e7.string()}),th=e7.object({themeMode:e7.optional(e7.enum(["light","dark"])),themeVariables:e7.optional(e7.record(e7.string(),e7.string().or(e7.number()))),w3mThemeVariables:e7.optional(e7.record(e7.string(),e7.string()))}),tp=e7.object({metadata:e7.object({name:e7.string(),description:e7.string(),url:e7.string(),icons:e7.array(e7.string())}).optional(),sdkVersion:e7.string().optional(),sdkType:e7.string().optional(),projectId:e7.string()}),tf=e7.object({type:e7.string()}),tm=e7.object({action:e7.enum(["VERIFY_DEVICE","VERIFY_OTP","CONNECT"])}),tg=e7.object({url:e7.string()}),ty=e7.object({userName:e7.string()}),tb=e7.object({email:e7.string().optional().nullable(),address:e7.string(),chainId:e7.string().or(e7.number()),accounts:e7.array(e7.object({address:e7.string(),type:e7.enum([d.Vl.ACCOUNT_TYPES.EOA,d.Vl.ACCOUNT_TYPES.SMART_ACCOUNT])})).optional(),userName:e7.string().optional().nullable(),preferredAccountType:e7.optional(e7.string()),signature:e7.string().optional(),message:e7.string().optional(),siwxMessage:e7.optional(tr)}),tw=e7.object({action:e7.enum(["VERIFY_PRIMARY_OTP","VERIFY_SECONDARY_OTP"])}),tv=e7.object({email:e7.string().email().optional().nullable(),address:e7.string(),chainId:e7.string().or(e7.number()),smartAccountDeployed:e7.optional(e7.boolean()),accounts:e7.array(e7.object({address:e7.string(),type:e7.enum([d.Vl.ACCOUNT_TYPES.EOA,d.Vl.ACCOUNT_TYPES.SMART_ACCOUNT])})).optional(),preferredAccountType:e7.optional(e7.string()),signature:e7.string().optional(),message:e7.string().optional(),siwxMessage:e7.optional(tr)}),tE=e7.object({uri:e7.string()}),tC=e7.object({isConnected:e7.boolean()}),tA=e7.object({chainId:e7.string().or(e7.number())}),tx=e7.object({chainId:e7.string().or(e7.number())}),tI=e7.object({newEmail:e7.string().email()}),tS=e7.object({smartAccountEnabledNetworks:e7.array(e7.number())});e7.object({address:e7.string(),isDeployed:e7.boolean()});let tT=e7.object({version:e7.string().optional()}),tP=e7.object({type:e7.string(),address:e7.string()}),tO=e7.any(),t_=e7.object({method:e7.literal("eth_accounts")}),tN=e7.object({method:e7.literal("eth_blockNumber")}),tk=e7.object({method:e7.literal("eth_call"),params:e7.array(e7.any())}),tR=e7.object({method:e7.literal("eth_chainId")}),tM=e7.object({method:e7.literal("eth_estimateGas"),params:e7.array(e7.any())}),tB=e7.object({method:e7.literal("eth_feeHistory"),params:e7.array(e7.any())}),tj=e7.object({method:e7.literal("eth_gasPrice")}),tU=e7.object({method:e7.literal("eth_getAccount"),params:e7.array(e7.any())}),t$=e7.object({method:e7.literal("eth_getBalance"),params:e7.array(e7.any())}),tL=e7.object({method:e7.literal("eth_getBlockByHash"),params:e7.array(e7.any())}),tD=e7.object({method:e7.literal("eth_getBlockByNumber"),params:e7.array(e7.any())}),tF=e7.object({method:e7.literal("eth_getBlockReceipts"),params:e7.array(e7.any())}),tH=e7.object({method:e7.literal("eth_getBlockTransactionCountByHash"),params:e7.array(e7.any())}),tz=e7.object({method:e7.literal("eth_getBlockTransactionCountByNumber"),params:e7.array(e7.any())}),tW=e7.object({method:e7.literal("eth_getCode"),params:e7.array(e7.any())}),tq=e7.object({method:e7.literal("eth_getFilterChanges"),params:e7.array(e7.any())}),tV=e7.object({method:e7.literal("eth_getFilterLogs"),params:e7.array(e7.any())}),tG=e7.object({method:e7.literal("eth_getLogs"),params:e7.array(e7.any())}),tK=e7.object({method:e7.literal("eth_getProof"),params:e7.array(e7.any())}),tZ=e7.object({method:e7.literal("eth_getStorageAt"),params:e7.array(e7.any())}),tJ=e7.object({method:e7.literal("eth_getTransactionByBlockHashAndIndex"),params:e7.array(e7.any())}),tY=e7.object({method:e7.literal("eth_getTransactionByBlockNumberAndIndex"),params:e7.array(e7.any())}),tQ=e7.object({method:e7.literal("eth_getTransactionByHash"),params:e7.array(e7.any())}),tX=e7.object({method:e7.literal("eth_getTransactionCount"),params:e7.array(e7.any())}),t0=e7.object({method:e7.literal("eth_getTransactionReceipt"),params:e7.array(e7.any())}),t1=e7.object({method:e7.literal("eth_getUncleCountByBlockHash"),params:e7.array(e7.any())}
5735),t2=e7.object({method:e7.literal("eth_getUncleCountByBlockNumber"),params:e7.array(e7.any())}),t5=e7.object({method:e7.literal("eth_maxPriorityFeePerGas")}),t6=e7.object({method:e7.literal("eth_newBlockFilter")}),t3=e7.object({method:e7.literal("eth_newFilter"),params:e7.array(e7.any())}),t4=e7.object({method:e7.literal("eth_newPendingTransactionFilter")}),t8=e7.object({method:e7.literal("eth_sendRawTransaction"),params:e7.array(e7.any())}),t9=e7.object({method:e7.literal("eth_syncing"),params:e7.array(e7.any())}),t7=e7.object({method:e7.literal("eth_uninstallFilter"),params:e7.array(e7.any())}),re=e7.object({method:e7.literal("personal_sign"),params:e7.array(e7.any())}),rt=e7.object({method:e7.literal("eth_signTypedData_v4"),params:e7.array(e7.any())}),rr=e7.object({method:e7.literal("eth_sendTransaction"),params:e7.array(e7.any())}),rn=e7.object({method:e7.literal("solana_signMessage"),params:e7.object({message:e7.string(),pubkey:e7.string()})}),ri=e7.object({method:e7.literal("solana_signTransaction"),params:e7.object({transaction:e7.string()})}),ra=e7.object({method:e7.literal("solana_signAllTransactions"),params:e7.object({transactions:e7.array(e7.string())})}),rs=e7.object({method:e7.literal("solana_signAndSendTransaction"),params:e7.object({transaction:e7.string(),options:e7.object({skipPreflight:e7.boolean().optional(),preflightCommitment:e7.enum(["processed","confirmed","finalized","recent","single","singleGossip","root","max"]).optional(),maxRetries:e7.number().optional(),minContextSlot:e7.number().optional()}).optional()})}),ro=e7.object({method:e7.literal("wallet_sendCalls"),params:e7.array(e7.object({chainId:e7.string().or(e7.number()).optional(),from:e7.string().optional(),version:e7.string().optional(),capabilities:e7.any().optional(),calls:e7.array(e7.object({to:e7.string().startsWith("0x"),data:e7.string().startsWith("0x").optional(),value:e7.string().optional()}))}))}),rl=e7.object({method:e7.literal("wallet_getCallsStatus"),params:e7.array(e7.string())}),rc=e7.object({method:e7.literal("wallet_getCapabilities"),params:e7.array(e7.string().or(e7.number()).optional()).optional()}),ru=e7.object({method:e7.literal("wallet_grantPermissions"),params:e7.array(e7.any())}),rd=e7.object({method:e7.literal("wallet_revokePermissions"),params:e7.any()}),rh=e7.object({method:e7.literal("wallet_getAssets"),params:e7.any()}),rp=e7.object({token:e7.string()}),rf=e7.object({id:e7.string().optional()}),rm={appEvent:rf.extend({type:tt("APP_SWITCH_NETWORK"),payload:tn}).or(rf.extend({type:tt("APP_CONNECT_EMAIL"),payload:ti})).or(rf.extend({type:tt("APP_CONNECT_DEVICE")})).or(rf.extend({type:tt("APP_CONNECT_OTP"),payload:ta})).or(rf.extend({type:tt("APP_CONNECT_SOCIAL"),payload:ts})).or(rf.extend({type:tt("APP_GET_FARCASTER_URI")})).or(rf.extend({type:tt("APP_CONNECT_FARCASTER")})).or(rf.extend({type:tt("APP_GET_USER"),payload:e7.optional(to)})).or(rf.extend({type:tt("APP_GET_SOCIAL_REDIRECT_URI"),payload:tl})).or(rf.extend({type:tt("APP_SIGN_OUT")})).or(rf.extend({type:tt("APP_IS_CONNECTED"),payload:e7.optional(rp)})).or(rf.extend({type:tt("APP_GET_CHAIN_ID")})).or(rf.extend({type:tt("APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS")})).or(rf.extend({type:tt("APP_INIT_SMART_ACCOUNT")})).or(rf.extend({type:tt("APP_SET_PREFERRED_ACCOUNT"),payload:tf})).or(rf.extend({type:tt("APP_RPC_REQUEST"),payload:re.or(rh).or(t_).or(tN).or(tk).or(tR).or(tM).or(tB).or(tj).or(tU).or(t$).or(tL).or(tD).or(tF).or(tH).or(tz).or(tW).or(tq).or(tV).or(tG).or(tK).or(tZ).or(tJ).or(tY).or(tQ).or(tX).or(t0).or(t1).or(t2).or(t5).or(t6).or(t3).or(t4).or(t8).or(t9).or(t7).or(re).or(rt).or(rr).or(rn).or(ri).or(ra).or(rs).or(rl).or(ro).or(rc).or(ru).or(rd).and(e7.object({chainId:e7.string().or(e7.number()).optional(),chainNamespace:e7.enum(["eip155","solana","polkadot","bip122","cosmos"]).optional(),rpcUrl:e7.string().optional()}))})).or(rf.extend({type:tt("APP_UPDATE_EMAIL"),payload:tc})).or(rf.extend({type:tt("APP_UPDATE_EMAIL_PRIMARY_OTP"),payload:tu})).or(rf.extend({type:tt("APP_UPDATE_EMAIL_SECONDARY_OTP"),payload:td})).or(rf.extend({type:tt("APP_SYNC_THEME"),payload:th})).or(rf.extend({type:tt("APP_SYNC_DAPP_DATA"),payload:tp})).or(rf.extend({type:tt("APP_RELOAD")})).or(rf.extend({type:tt("APP_RPC_ABORT")}
5735)),frameEvent:rf.extend({type:tt("FRAME_SWITCH_NETWORK_ERROR"),payload:te}).or(rf.extend({type:tt("FRAME_SWITCH_NETWORK_SUCCESS"),payload:tx})).or(rf.extend({type:tt("FRAME_CONNECT_EMAIL_SUCCESS"),payload:tm})).or(rf.extend({type:tt("FRAME_CONNECT_EMAIL_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_GET_FARCASTER_URI_SUCCESS"),payload:tg})).or(rf.extend({type:tt("FRAME_GET_FARCASTER_URI_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_CONNECT_FARCASTER_SUCCESS"),payload:ty})).or(rf.extend({type:tt("FRAME_CONNECT_FARCASTER_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_CONNECT_OTP_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_CONNECT_OTP_SUCCESS")})).or(rf.extend({type:tt("FRAME_CONNECT_DEVICE_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_CONNECT_DEVICE_SUCCESS")})).or(rf.extend({type:tt("FRAME_CONNECT_SOCIAL_SUCCESS"),payload:tb})).or(rf.extend({type:tt("FRAME_CONNECT_SOCIAL_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_GET_USER_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_GET_USER_SUCCESS"),payload:tv})).or(rf.extend({type:tt("FRAME_GET_SOCIAL_REDIRECT_URI_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_GET_SOCIAL_REDIRECT_URI_SUCCESS"),payload:tE})).or(rf.extend({type:tt("FRAME_SIGN_OUT_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_SIGN_OUT_SUCCESS")})).or(rf.extend({type:tt("FRAME_IS_CONNECTED_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_IS_CONNECTED_SUCCESS"),payload:tC})).or(rf.extend({type:tt("FRAME_GET_CHAIN_ID_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_GET_CHAIN_ID_SUCCESS"),payload:tA})).or(rf.extend({type:tt("FRAME_RPC_REQUEST_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_RPC_REQUEST_SUCCESS"),payload:tO})).or(rf.extend({type:tt("FRAME_SESSION_UPDATE"),payload:rp})).or(rf.extend({type:tt("FRAME_UPDATE_EMAIL_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_UPDATE_EMAIL_SUCCESS"),payload:tw})).or(rf.extend({type:tt("FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS")})).or(rf.extend({type:tt("FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS"),payload:tI})).or(rf.extend({type:tt("FRAME_SYNC_THEME_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_SYNC_THEME_SUCCESS")})).or(rf.extend({type:tt("FRAME_SYNC_DAPP_DATA_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_SYNC_DAPP_DATA_SUCCESS")})).or(rf.extend({type:tt("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS"),payload:tS})).or(rf.extend({type:tt("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_INIT_SMART_ACCOUNT_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_SET_PREFERRED_ACCOUNT_SUCCESS"),payload:tP})).or(rf.extend({type:tt("FRAME_SET_PREFERRED_ACCOUNT_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_READY"),payload:tT})).or(rf.extend({type:tt("FRAME_RELOAD_ERROR"),payload:te})).or(rf.extend({type:tt("FRAME_RELOAD_SUCCESS")}))};var rg=r(11558);function ry(e,t={}){return"string"==typeof t?.type&&t?.type?.includes(e)}class rb{constructor({projectId:e,isAppClient:t=!1,chainId:r="eip155:1",enableLogger:n=!0,enableCloudAuthAccount:i=!1,rpcUrl:a=u.BLOCKCHAIN_API_RPC_URL}){if(this.iframe=null,this.iframeIsReady=!1,this.initFrame=()=>{let e=document.getElementById("w3m-iframe");this.iframe&&!e&&document.body.appendChild(this.iframe)},this.events={registerFrameEventHandler:(e,t,r)=>{function n({data:r}){if(!ry(d.s1.FRAME_EVENT_KEY,r))return;let i=rm.frameEvent.safeParse(r);if(!i.success)return void console.warn("W3mFrame: invalid frame event",i.error.message);i.data?.id===e&&(t(i.data),window.removeEventListener("message",n))}h.Q.isClient&&(window.addEventListener("message",n),r.addEventListener("abort",()=>{window.removeEventListener("message",n)}))},onFrameEvent:e=>{h.Q.isClient&&window.addEventListener("message",({data:t})=>{if(!ry(d.s1.FRAME_EVENT_KEY,t))return;let r=rm.frameEvent.safeParse(t);r.success?e(r.data):console.warn("W3mFrame: invalid frame event",r.error.message)})},onAppEvent:e=>{h.Q.isClient&&window.addEventListener("message",({data:t})=>{if(!ry(d.s1.APP_EVENT_KEY,t))return;let r=rm.appEvent.safeParse(t);r.success||console.warn("W3mFrame: invalid app event",r.error.message),e(t)})},postAppEvent:e=>{if(h.Q.isClient){if(!this.iframe?.contentWindow)throw Error("W3mFrame: iframe is not set");this.iframe.contentWindow.postMessage(e,"*")}},postFrameEvent:e=>{if(h.Q.isClient){if(!parent)throw Error("W3mFrame: parent is not set");parent.postMessage(e,"*")}}},this.projectId=e,this.frameLoadPromise=new Promise((e,t)=>
5735{this.frameLoadPromiseResolver={resolve:e,reject:t}}),this.rpcUrl=a,t&&(this.frameLoadPromise=new Promise((e,t)=>{this.frameLoadPromiseResolver={resolve:e,reject:t}}),h.Q.isClient)){let t=document.createElement("iframe");t.id="w3m-iframe",t.src=function({projectId:e,chainId:t,enableLogger:r,rpcUrl:n=u.BLOCKCHAIN_API_RPC_URL,enableCloudAuthAccount:i=!1}){let a=new URL(d.hy);a.searchParams.set("projectId",e),a.searchParams.set("chainId",String(t)),a.searchParams.set("version",d.gS),a.searchParams.set("enableLogger",String(r)),a.searchParams.set("rpcUrl",n);let s=rg.o.get("dapp_smart_account_version");return s&&("v6"===s||"v7"===s)&&(console.warn(">> AppKit - Forcing smart account version",s),a.searchParams.set("smartAccountVersion",s)),i&&a.searchParams.set("enableCloudAuthAccount","true"),a.toString()}({projectId:e,chainId:r,enableLogger:n,rpcUrl:this.rpcUrl,enableCloudAuthAccount:i}),t.name="w3m-secure-iframe",t.style.position="fixed",t.style.zIndex="999999",t.style.display="none",t.style.border="none",t.style.animationDelay="0s, 50ms",t.style.borderBottomLeftRadius="clamp(0px, var(--apkt-borderRadius-8), 44px)",t.style.borderBottomRightRadius="clamp(0px, var(--apkt-borderRadius-8), 44px)",this.iframe=t,this.iframe.onerror=()=>{this.frameLoadPromiseResolver?.reject("Unable to load email login dependency")},this.events.onFrameEvent(e=>{"@w3m-frame/READY"===e.type&&(this.iframeIsReady=!0,this.frameLoadPromiseResolver?.resolve(void 0))})}}get networks(){return Object.assign({},...["eip155:1","eip155:5","eip155:11155111","eip155:10","eip155:420","eip155:42161","eip155:421613","eip155:137","eip155:80001","eip155:42220","eip155:1313161554","eip155:1313161555","eip155:56","eip155:97","eip155:43114","eip155:43113","eip155:324","eip155:280","eip155:100","eip155:8453","eip155:84531","eip155:84532","eip155:7777777","eip155:999","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z","solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"].map(e=>({[e]:{rpcUrl:`${this.rpcUrl}/v1/?chainId=${e}&projectId=${this.projectId}`,chainId:e}})))}}var rw=r(43805);class rv{constructor(e){let t=(0,rw.iP)({level:d.OH}),{logger:r,chunkLoggerController:n}=(0,rw.D5)({opts:t});this.logger=(0,rw.U5)(r,this.constructor.name),this.chunkLoggerController=n,"undefined"!=typeof window&&this.chunkLoggerController?.downloadLogsBlobInBrowser&&(window.downloadAppKitLogsBlob||(window.downloadAppKitLogsBlob={}),window.downloadAppKitLogsBlob.sdk=()=>{this.chunkLoggerController?.downloadLogsBlobInBrowser&&this.chunkLoggerController.downloadLogsBlobInBrowser({projectId:e})})}}class rE{constructor({projectId:e,chainId:t,enableLogger:r=!0,onTimeout:n,abortController:i,getActiveCaipNetwork:a,getCaipNetworks:s,enableCloudAuthAccount:o,metadata:l,sdkVersion:c,sdkType:u}){this.openRpcRequests=new Map,this.isInitialized=!1,r&&(this.w3mLogger=new rv(e)),this.abortController=i,this.getActiveCaipNetwork=a,this.getCaipNetworks=s;let d=this.getRpcUrl(t);this.projectId=e,this.sdkVersion=c,this.sdkType=u,this.metadata=l,this.w3mFrame=new rb({projectId:e,isAppClient:!0,chainId:t,enableLogger:r,rpcUrl:d,enableCloudAuthAccount:o}),this.onTimeout=n,this.getLoginEmailUsed()&&this.createFrame()}async createFrame(){this.w3mFrame.initFrame(),this.initPromise=new Promise(e=>{this.w3mFrame.events.onFrameEvent(t=>{t.type===d.s1.FRAME_READY&&setTimeout(()=>{e()},500)})}),await this.initPromise,await this.syncDappData({metadata:this.metadata,projectId:this.projectId,sdkVersion:this.sdkVersion,sdkType:this.sdkType}
5735),await this.getSmartAccountEnabledNetworks(),this.isInitialized=!0,this.initPromise=void 0}async init(){if(!this.isInitialized){if(this.initPromise)return void await this.initPromise;await this.createFrame()}}getLoginEmailUsed(){return!!rg.o.get(d.s1.EMAIL_LOGIN_USED_KEY)}getEmail(){return rg.o.get(d.s1.EMAIL)}getUsername(){return rg.o.get(d.s1.SOCIAL_USERNAME)}async reload(){try{await this.appEvent({type:d.s1.APP_RELOAD})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error reloading iframe"),e}}async connectEmail(e){try{h.Q.checkIfAllowedToTriggerEmail(),await this.init();let t=await this.appEvent({type:d.s1.APP_CONNECT_EMAIL,payload:e});return this.setNewLastEmailLoginTime(),t}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error connecting email"),e}}async connectDevice(){try{return this.appEvent({type:d.s1.APP_CONNECT_DEVICE})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error connecting device"),e}}async connectOtp(e){try{return this.appEvent({type:d.s1.APP_CONNECT_OTP,payload:e})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error connecting otp"),e}}async isConnected(){try{if(!this.getLoginEmailUsed())return{isConnected:!1};let e=await this.appEvent({type:d.s1.APP_IS_CONNECTED});return e?.isConnected||this.deleteAuthLoginCache(),e}catch(e){throw this.deleteAuthLoginCache(),this.w3mLogger?.logger.error({error:e},"Error checking connection"),e}}async getChainId(){try{let e=await this.appEvent({type:d.s1.APP_GET_CHAIN_ID});return this.setLastUsedChainId(e.chainId),e}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error getting chain id"),e}}async getSocialRedirectUri(e){try{return await this.init(),this.appEvent({type:d.s1.APP_GET_SOCIAL_REDIRECT_URI,payload:e})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error getting social redirect uri"),e}}async updateEmail(e){try{let t=await this.appEvent({type:d.s1.APP_UPDATE_EMAIL,payload:e});return this.setNewLastEmailLoginTime(),t}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error updating email"),e}}async updateEmailPrimaryOtp(e){try{return this.appEvent({type:d.s1.APP_UPDATE_EMAIL_PRIMARY_OTP,payload:e})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error updating email primary otp"),e}}async updateEmailSecondaryOtp(e){try{let t=await this.appEvent({type:d.s1.APP_UPDATE_EMAIL_SECONDARY_OTP,payload:e});return this.setLoginSuccess(t.newEmail),t}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error updating email secondary otp"),e}}async syncTheme(e){try{return this.appEvent({type:d.s1.APP_SYNC_THEME,payload:e})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error syncing theme"),e}}async syncDappData(e){try{return this.appEvent({type:d.s1.APP_SYNC_DAPP_DATA,payload:e})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error syncing dapp data"),e}}async getSmartAccountEnabledNetworks(){try{let e=await this.appEvent({type:d.s1.APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS});return this.persistSmartAccountEnabledNetworks(e.smartAccountEnabledNetworks),e}catch(e){throw this.persistSmartAccountEnabledNetworks([]),this.w3mLogger?.logger.error({error:e},"Error getting smart account enabled networks"),e}}async setPreferredAccount(e){try{return this.appEvent({type:d.s1.APP_SET_PREFERRED_ACCOUNT,payload:{type:e}})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error setting preferred account"),e}}async connect(e){if(e?.socialUri)try{await this.init();let t=this.getRpcUrl(e.chainId),r=await this.appEvent({type:d.s1.APP_CONNECT_SOCIAL,payload:{uri:e.socialUri,preferredAccountType:e.preferredAccountType,chainId:e.chainId,siwxMessage:e.siwxMessage,rpcUrl:t}});return r.userName&&this.setSocialLoginSuccess(r.userName),this.setLoginSuccess(r.email),this.setLastUsedChainId(r.chainId),this.user=r,r}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error connecting social"),e}try{let t=e?.chainId||this.getLastUsedChainId()||1,r=await this.getUser({chainId:t,preferredAccountType:e?.preferredAccountType,siwxMessage:e?.siwxMessage,rpcUrl:this.getRpcUrl(t)});
5735return this.setLoginSuccess(r.email),this.setLastUsedChainId(r.chainId),this.user=r,r}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error connecting"),e}}async getUser(e){try{await this.init();let t=e?.chainId||this.getLastUsedChainId()||1,r=await this.appEvent({type:d.s1.APP_GET_USER,payload:{...e,chainId:t,rpcUrl:this.getRpcUrl(t)}});return this.user=r,r}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error connecting"),e}}async connectSocial({uri:e,chainId:t,preferredAccountType:r}){try{await this.init();let n=this.getRpcUrl(t),i=await this.appEvent({type:d.s1.APP_CONNECT_SOCIAL,payload:{uri:e,chainId:t,rpcUrl:n,preferredAccountType:r}});return i.userName&&this.setSocialLoginSuccess(i.userName),i}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error connecting social"),e}}async getFarcasterUri(){try{return await this.init(),await this.appEvent({type:d.s1.APP_GET_FARCASTER_URI})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error getting farcaster uri"),e}}async connectFarcaster(){try{let e=await this.appEvent({type:d.s1.APP_CONNECT_FARCASTER});return e.userName&&this.setSocialLoginSuccess(e.userName),e}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error connecting farcaster"),e}}async switchNetwork({chainId:e}){try{let t=this.getRpcUrl(e),r=await this.appEvent({type:d.s1.APP_SWITCH_NETWORK,payload:{chainId:e,rpcUrl:t}});return this.setLastUsedChainId(r.chainId),r}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error switching network"),e}}async disconnect(){try{return this.deleteAuthLoginCache(),await new Promise(async e=>{let t=setTimeout(()=>{e()},3e3);await this.appEvent({type:d.s1.APP_SIGN_OUT}),clearTimeout(t),e()})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error disconnecting"),e}}async request(e){try{if(d.Vl.GET_CHAIN_ID===e.method)return this.getLastUsedChainId();let t=e.chainNamespace||"eip155",r=this.getActiveCaipNetwork(t)?.id;e.chainNamespace=t,e.chainId=r,e.rpcUrl=this.getRpcUrl(r),this.rpcRequestHandler?.(e);let n=await this.appEvent({type:d.s1.APP_RPC_REQUEST,payload:function e(t){if("bigint"==typeof t)return`0x${t.toString(16)}`;if(Array.isArray(t))return t.map(e);if(null!==t&&"object"==typeof t){let r={};for(let[n,i]of Object.entries(t))r[n]=e(i);return r}return t}(e)});return this.rpcSuccessHandler?.(n,e),n}catch(t){throw this.rpcErrorHandler?.(t,e),this.w3mLogger?.logger.error({error:t},"Error requesting"),t}}onRpcRequest(e){this.rpcRequestHandler=e}onRpcSuccess(e){this.rpcSuccessHandler=e}onRpcError(e){this.rpcErrorHandler=e}onIsConnected(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===d.s1.FRAME_IS_CONNECTED_SUCCESS&&t.payload.isConnected&&e()})}onNotConnected(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===d.s1.FRAME_IS_CONNECTED_ERROR&&e(),t.type!==d.s1.FRAME_IS_CONNECTED_SUCCESS||t.payload.isConnected||e()})}onConnect(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===d.s1.FRAME_GET_USER_SUCCESS&&e(t.payload)})}onSocialConnected(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===d.s1.FRAME_CONNECT_SOCIAL_SUCCESS&&e(t.payload)})}async getCapabilities(){try{return await this.request({method:"wallet_getCapabilities"})||{}}catch{return{}}}onSetPreferredAccount(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===d.s1.FRAME_SET_PREFERRED_ACCOUNT_SUCCESS?e(t.payload):t.type===d.s1.FRAME_SET_PREFERRED_ACCOUNT_ERROR&&e({type:d.Vl.ACCOUNT_TYPES.EOA})})}getAvailableChainIds(){return Object.keys(this.w3mFrame.networks)}async rejectRpcRequests(){try{await Promise.all(Array.from(this.openRpcRequests.values()).map(async({abortController:e,method:t})=>{d.Vl.SAFE_RPC_METHODS.includes(t)||e.abort(),await this.appEvent({type:d.s1.APP_RPC_ABORT})})),this.openRpcRequests.clear()}catch(e){this.w3mLogger?.logger.error({error:e},"Error aborting RPC request")}}async appEvent(e){let t,r;function n(e){return e.replace("@w3m-app/","")}let i=[d.s1.APP_SYNC_DAPP_DATA,d.s1.APP_SYNC_THEME,d.s1.APP_SET_PREFERRED_ACCOUNT],a=n(e.type);return this.w3mFrame.iframeIsReady||i.includes(e.type)||(r=setTimeout(()=>{this.onTimeout?.("iframe_load_failed"),this.abortController.abort()},2e4)),await this.w3mFrame.frameLoadPromise,clearTimeout(r),[d.s1.APP_CONNECT_EMAIL,d.s1.APP_CONNECT_DEVICE,d.s1.APP_CONNECT_OTP,d.s1.APP_CONNECT_SOCIAL,d.s1.APP_GET_SOCIAL_REDIRECT_URI].map(n).includes(a)&&(t=setTimeout(()=>{this.onTimeout?.("iframe_request_timeout"),this.abortController.abort()},12e4)),new Promise((n,i)=>{let s=Math.random().toString(36).substring(7);this.w3mLogger?.logger.info?.({event:e,id:s},"Sending app event"),this.w3mFrame.events.postAppEvent({...e,id:s});let o=new AbortController;"RPC_REQUEST"===a&&this.openRpcRequests.set(s,{...e.payload,abortController:o}),o.signal.addEventListener("abort",()=>{"RPC_REQUEST"===a?i(Error("Request was aborted")):"GET_FARCASTER_URI"!==a&&i(Error("Something went wrong"))});let l=(e,o)=>{e.id===s&&(o?.logger.info?.({framEvent:e,id:s},"Received frame response"),this.openRpcRequests.delete(e.id),e.type===`@w3m-frame/${a}_SUCCESS`?(t&&clearTimeout(t),r&&clearTimeout(r),"payload"in e&&n(e.payload),n(void 0)):e.type===`@w3m-frame/${a}_ERROR`&&(t&&clearTimeout(t),r&&clearTimeout(r),"payload"in e&&i(Error(e.payload?.message||"An error occurred")),i(Error("An error occurred"))))};this.w3mFrame.events.registerFrameEventHandler(s,e=>l(e,this.w3mLogger),this.abortController.signal)}
5735)}setNewLastEmailLoginTime(){rg.o.set(d.s1.LAST_EMAIL_LOGIN_TIME,Date.now().toString())}setSocialLoginSuccess(e){rg.o.set(d.s1.SOCIAL_USERNAME,e)}setLoginSuccess(e){e&&rg.o.set(d.s1.EMAIL,e),rg.o.set(d.s1.EMAIL_LOGIN_USED_KEY,"true"),rg.o.delete(d.s1.LAST_EMAIL_LOGIN_TIME)}deleteAuthLoginCache(){rg.o.delete(d.s1.EMAIL_LOGIN_USED_KEY),rg.o.delete(d.s1.EMAIL),rg.o.delete(d.s1.LAST_USED_CHAIN_KEY),rg.o.delete(d.s1.SOCIAL_USERNAME)}setLastUsedChainId(e){e&&rg.o.set(d.s1.LAST_USED_CHAIN_KEY,String(e))}getLastUsedChainId(){let e=rg.o.get(d.s1.LAST_USED_CHAIN_KEY)??void 0,t=Number(e);return isNaN(t)?e:t}persistSmartAccountEnabledNetworks(e){rg.o.set(d.s1.SMART_ACCOUNT_ENABLED_NETWORKS,e.join(","))}getRpcUrl(e){let t=void 0===e?void 0:"eip155";"string"==typeof e&&(t=e.includes(":")?i.parseCaipNetworkId(e)?.chainNamespace:Number.isInteger(Number(e))?"eip155":"solana");let r=this.getCaipNetworks(t),n=e?r.find(t=>String(t.id)===String(e)||t.caipNetworkId===e):r[0];return n?.rpcUrls.default.http?.[0]}}},49411:(e,t,r)=>{"use strict";r.d(t,{R:()=>s});var n=r(98668);function i(e){let t=[];for(;e;)t.unshift(255&e),e>>=8;return t}let a="0123456789abcdef";function s(e){let t="0x";for(let r of function e(t){if(Array.isArray(t)){let r=[];if(t.forEach(function(t){r=r.concat(e(t))}),r.length<=55)return r.unshift(192+r.length),r;let n=i(r.length);return n.unshift(247+n.length),n.concat(r)}let r=Array.prototype.slice.call((0,n.q5)(t,"object"));if(1===r.length&&r[0]<=127)return r;if(r.length<=55)return r.unshift(128+r.length),r;let a=i(r.length);return a.unshift(183+a.length),a.concat(r)}(e))t+=a[r>>4],t+=a[15&r];return t}},49497:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promiseCache=void 0,t.withDedupe=function(e,{enabled:r=!0,id:n}){if(!r||!n)return e();if(t.promiseCache.get(n))return t.promiseCache.get(n);let i=e().finally(()=>t.promiseCache.delete(n));return t.promiseCache.set(n,i),i},t.promiseCache=new(r(6724)).LruMap(8192)},49821:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSiweMessage=function(e){let{address:t,domain:r,message:a,nonce:s,scheme:o,time:l=new Date}=e;if(r&&a.domain!==r||s&&a.nonce!==s||o&&a.scheme!==o||a.expirationTime&&l>=a.expirationTime||a.notBefore&&l<a.notBefore)return!1;try{if(!a.address||!(0,n.isAddress)(a.address,{strict:!1})||t&&!(0,i.isAddressEqual)(a.address,t))return!1}catch{return!1}return!0};let n=r(63402),i=r(18978)},50029:(e,t,r)=>{"use strict";r.d(t,{k:()=>a});var n=r(44582),i=r(23246);class a extends i._y{#k;#e6;constructor(e,t,r){let i=Object.assign({},null!=r?r:{},{batchMaxCount:1});(0,n.MR)(e&&e.request,"invalid EIP-1193 provider","ethereum",e),super(t,i),this.#e6=null,r&&r.providerInfo&&(this.#e6=r.providerInfo),this.#k=async(t,r)=>{let n={method:t,params:r};this.emit("debug",{action:"sendEip1193Request",payload:n});try{let t=await e.request(n);return this.emit("debug",{action:"receiveEip1193Result",result:t}),t}catch(t){let e=Error(t.message);throw e.code=t.code,e.data=t.data,e.payload=n,this.emit("debug",{action:"receiveEip1193Error",error:e}),e}}}get providerInfo(){return this.#e6}async send(e,t){return await this._start(),await super.send(e,t)}async _send(e){(0,n.MR)(!Array.isArray(e),"EIP-1193 does not support batch request","payload",e);try{let t=await this.#k(e.method,e.params||[]);return[{id:e.id,result:t}]}catch(t){return[{id:e.id,error:{code:t.code,data:t.data,message:t.message}}]}}getRpcError(e,t){switch((t=JSON.parse(JSON.stringify(t))).error.code||-1){case 4001:t.error.message=`ethers-user-denied: ${t.error.message}`;break;case 4200:t.error.message=`ethers-unsupported: ${t.error.message}`}return super.getRpcError(e,t)}async hasSigner(e){null==e&&(e=0);let t=await this.send("eth_accounts",[]);return"number"==typeof e?t.length>e:(e=e.toLowerCase(),0!==t.filter(t=>t.toLowerCase()===e).length)}async getSigner(e){if(null==e&&(e=0),!await this.hasSigner(e))try{await this.#k("eth_requestAccounts",[])}catch(t){let e=t.payload;throw this.getRpcError(e,{id:e.id,error:t})}return await super.getSigner(e)}static async discover(e){if(null==e&&(e={}),e.provider)return new a(e.provider);let t=e.window?e.window:"undefined"!=typeof window?window:null;if(null==t)return null;let r=e.anyProvider;if(r&&t.ethereum)return new a(t.ethereum);if(!("addEventListener"in t&&"dispatchEvent"in t&&"removeEventListener"in t))return null;let i=e.timeout?e.timeout:300;return 0===i?null:await new Promise((s,o)=>{let l=[],c=e=>{l.push(e.detail),r&&u()},u=()=>{if(clearTimeout(d),l.length)if(e&&e.filter){let t=e.filter(l.map(e=>Object.assign({},e.info)));if(null==t)s(null);else if(t instanceof a)s(t);else{let e=null;if(t.uuid&&(e=l.filter(e=>t.uuid===e.info.uuid)[0]),e){let{provider:t,info:r}=e;s(new a(t,void 0,{providerInfo:r}))}else o((0,n.xz)("filter returned unknown info","UNSUPPORTED_OPERATION",{value:t}))}}else{let{provider:e,info:t}=l[0];s(new a(e,void 0,{providerInfo:t}))}else s(null);t.removeEventListener("eip6963:announceProvider",c)},d=setTimeout(()=>{u()},i);
5735t.addEventListener("eip6963:announceProvider",c),t.dispatchEvent(new Event("eip6963:requestProvider"))})}}},50102:(e,t,r)=>{"use strict";r.d(t,{E:()=>i});var n=r(13640);function i(e){return(0,n.q)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},50280:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlRequiredError=void 0;let n=r(45226);class i extends n.BaseError{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}t.UrlRequiredError=i},50498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownSolidityTypeError=t.UnknownTypeError=t.InvalidAbiItemError=void 0;let n=r(86737);class i extends n.BaseError{constructor({signature:e}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}t.InvalidAbiItemError=i;class a extends n.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"})}}t.UnknownTypeError=a;class s extends n.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"})}}t.UnknownSolidityTypeError=s},50517:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createEventFilter=s;let n=r(61794),i=r(27083),a=r(98182);async function s(e,{address:t,args:r,event:o,events:l,fromBlock:c,strict:u,toBlock:d}={}){let h=l??(o?[o]:void 0),p=(0,a.createFilterRequestScope)(e,{method:"eth_newFilter"}),f=[];h&&(f=[h.flatMap(e=>(0,n.encodeEventTopics)({abi:[e],eventName:e.name,args:r}))],o&&(f=f[0]));let m=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof c?(0,i.numberToHex)(c):c,toBlock:"bigint"==typeof d?(0,i.numberToHex)(d):d,...f.length?{topics:f}:{}}]});return{abi:h,args:r,eventName:o?o.name:void 0,fromBlock:c,id:m,request:p(m),strict:!!u,toBlock:d,type:"event"}}},50587:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsName=c;let n=r(91472),i=r(77362),a=r(61145),s=r(57660),o=r(95847),l=r(527);async function c(e,t){let{address:r,blockNumber:c,blockTag:u,coinType:d=60n,gatewayUrls:h,strict:p}=t,{chain:f}=e,m=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!f)throw Error("client chain not configured. universalResolverAddress is required.");return(0,i.getChainContractAddress)({blockNumber:c,chain:f,contract:"ensUniversalResolver"})})();try{let t={address:m,abi:n.universalResolverReverseAbi,args:[r,d,h??[s.localBatchGatewayUrl]],functionName:"reverseWithGateways",blockNumber:c,blockTag:u},i=(0,o.getAction)(e,l.readContract,"readContract"),[a]=await i(t);return a||null}catch(e){if(p)throw e;if((0,a.isNullUniversalResolverError)(e))return null;throw e}}},50626:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObjectEIP712TypedData=void 0,t.isObjectEIP712TypedData=e=>"object"==typeof e&&null!=e&&"domain"in e&&"types"in e&&"message"in e},50908:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.custom=function(e,t={}){let{key:r="custom",methods:i,name:a="Custom Provider",retryDelay:s}=t;return({retryCount:o})=>(0,n.createTransport)({key:r,methods:i,name:a,request:e.request.bind(e),retryCount:t.retryCount??o,retryDelay:s,type:"custom"})};let n=r(3603)},50989:(e,t,r)=>{"use strict";r.d(t,{NBY:()=>n.N,aUf:()=>i,tWt:()=>s,Rn0:()=>o,gTy:()=>l});var n=r(2880);let i=(0,r(21644).x)({id:143,name:"Monad",blockTime:400,nativeCurrency:{name:"Monad",symbol:"MON",decimals:18},rpcUrls:{default:{http:["https://rpc.monad.xyz","https://rpc1.monad.xyz"],webSocket:["wss://rpc.monad.xyz","wss://rpc1.monad.xyz"]}},blockExplorers:{default:{name:"Monadscan",url:"https://monadscan.com",apiUrl:"https://api.etherscan.io/v2/api?chainid=143"},monadvision:{name:"MonadVision",url:"https://monadvision.com"}},testnet:!1,contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:9248132}}});function a(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}let s=a({id:"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",name:"Solana",network:"solana-mainnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!1,chainNamespace:"solana",caipNetworkId:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",deprecatedCaipNetworkId:"solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ"}
5735),o=a({id:"EtWTRABZaYq6iMfeYKouRu166VU2xqa1",name:"Solana Devnet",network:"solana-devnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!0,chainNamespace:"solana",caipNetworkId:"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",deprecatedCaipNetworkId:"solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K"}),l=a({id:"4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z",name:"Solana Testnet",network:"solana-testnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!0,chainNamespace:"solana",caipNetworkId:"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z"});a({id:"000000000019d6689c085ae165831e93",caipNetworkId:"bip122:000000000019d6689c085ae165831e93",chainNamespace:"bip122",name:"Bitcoin",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}}}),a({id:"000000000933ea01ad0ee984209779ba",caipNetworkId:"bip122:000000000933ea01ad0ee984209779ba",chainNamespace:"bip122",name:"Bitcoin Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},testnet:!0}),a({id:"00000008819873e925422c1ff0f99f7c",caipNetworkId:"bip122:00000008819873e925422c1ff0f99f7c",chainNamespace:"bip122",name:"Bitcoin Signet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},testnet:!0}),a({id:"-239",name:"TON",network:"ton-mainnet",nativeCurrency:{name:"TON",symbol:"TON",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Tonscan",url:"https://tonscan.org"}},testnet:!1,chainNamespace:"ton",caipNetworkId:"ton:-239"}),a({id:"-3",name:"TON Testnet",network:"ton-testnet",nativeCurrency:{name:"TON",symbol:"TON",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Tonscan",url:"https://testnet.tonscan.org"}},testnet:!0,chainNamespace:"ton",caipNetworkId:"ton:-3"}),a({id:"0x2b6653dc",name:"TRON",network:"tron-mainnet",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]},chainDefault:{http:["https://api.trongrid.io"]}},blockExplorers:{default:{name:"Tronscan",url:"https://tronscan.org"}},testnet:!1,chainNamespace:"tron",caipNetworkId:"tron:0x2b6653dc"}),a({id:"0x94a9059e",name:"TRON Shasta",network:"tron-shasta",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]},chainDefault:{http:["https://api.shasta.trongrid.io"]}},blockExplorers:{default:{name:"Tronscan",url:"https://shasta.tronscan.org"}},testnet:!0,chainNamespace:"tron",caipNetworkId:"tron:0x94a9059e"}),a({id:"0xcd8690dc",name:"TRON Nile",network:"tron-nile",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]},chainDefault:{http:["https://nile.trongrid.io"]}},blockExplorers:{default:{name:"Tronscan",url:"https://nile.tronscan.org"}},testnet:!0,chainNamespace:"tron",caipNetworkId:"tron:0xcd8690dc"})},51206:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(25609)},51389:(e,t,r)=>{"use strict";r.d(t,{KC:()=>S,KJ:()=>y,L5:()=>T,NW:()=>I,PV:()=>x,YO:()=>m,Yj:()=>A,ai:()=>v,au:()=>P,bz:()=>f,eu:()=>b,g1:()=>C,lq:()=>E,me:()=>w,vA:()=>u,vt:()=>d,zM:()=>g});class n extends TypeError{constructor(e,t){let r,{message:n,explanation:i,...a}=e,{path:s}=e,o=0===s.length?n:`At path: ${s.join(".")} -- ${n}`;super(i??o),null!=i&&(this.cause=o),Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function i(e){return"object"==typeof e&&null!=e}function a(e){return i(e)&&!Array.isArray(e)}function s(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function*o(e,t,r,n){var a;for(let o of(i(a=e)&&"function"==typeof a[Symbol.iterator]||(e=[e]),e)){let e=function(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});let{path:i,branch:a}=t,{type:o}=r,{refinement:l,message:c=`Expected a value of type \`${o}\`${l?` with refinement \`${l}\``:""}, but received: \`${s(n)}\``}=e;return{value:n,type:o,refinement:l,key:i[i.length-1],path:i,branch:a,...e,message:c}}(o,t,r,n);e&&(yield e)}}function*l(e,t,r={}){let{path:n=[],branch:a=[e],coerce:s=!1,mask:o=!1}=r,c={path:n,branch:a,mask:o};s&&(e=t.coercer(e,c));let u="valid";for(let n of t.validator(e,c))n.explanation=r.message,u="not_val
5735id",yield[n,void 0];for(let[d,h,p]of t.entries(e,c))for(let t of l(h,p,{path:void 0===d?n:[...n,d],branch:void 0===d?a:[...a,h],coerce:s,mask:o,message:r.message}))t[0]?(u=null!=t[0].refinement?"not_refined":"not_valid",yield[t[0],void 0]):s&&(h=t[1],void 0===d?e=h:e instanceof Map?e.set(d,h):e instanceof Set?e.add(h):i(e)&&(void 0!==h||d in e)&&(e[d]=h));if("not_valid"!==u)for(let n of t.refiner(e,c))n.explanation=r.message,u="not_refined",yield[n,void 0];"valid"===u&&(yield[void 0,e])}class c{constructor(e){let{type:t,schema:r,validator:n,refiner:i,coercer:a=e=>e,entries:s=function*(){}}=e;this.type=t,this.schema=r,this.entries=s,this.coercer=a,n?this.validator=(e,t)=>o(n(e,t),t,this,e):this.validator=()=>[],i?this.refiner=(e,t)=>o(i(e,t),t,this,e):this.refiner=()=>[]}assert(e,t){return u(e,this,t)}create(e,t){return d(e,this,t)}is(e){var t,r;return t=e,r=this,!h(t,r)[0]}mask(e,t){var r=e,n=this,i=t;let a=h(r,n,{coerce:!0,mask:!0,message:i});if(!a[0])return a[1];throw a[0]}validate(e,t={}){return h(e,this,t)}}function u(e,t,r){let n=h(e,t,{message:r});if(n[0])throw n[0]}function d(e,t,r){let n=h(e,t,{coerce:!0,message:r});if(!n[0])return n[1];throw n[0]}function h(e,t,r={}){let i=l(e,t,r),a=function(e){let{done:t,value:r}=e.next();return t?void 0:r}(i);return a[0]?[new n(a[0],function*(){for(let e of i)e[0]&&(yield e[0])}),void 0]:[void 0,a[1]]}function p(e,t){return new c({type:e,schema:null,validator:t})}function f(){return p("any",()=>!0)}function m(e){return new c({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(let[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${s(e)}`})}function g(){return p("boolean",e=>"boolean"==typeof e)}function y(e){return p("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${s(t)}`)}function b(e){let t=s(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: ${s(r)}`})}function w(e){return new c({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})}function v(){return p("number",e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${s(e)}`)}function E(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 C(e,t){return new c({type:"record",schema:null,*entries(r){if(i(r))for(let n in r){let i=r[n];yield[n,n,e],yield[n,i,t]}},validator:e=>a(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>a(e)?{...e}:e})}function A(){return p("string",e=>"string"==typeof e||`Expected a string, but received: ${s(e)}`)}function x(e){let t=p("never",()=>!1);return new c({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){let n=Math.max(e.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],e[i]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${s(e)}`,coercer:e=>Array.isArray(e)?e.slice():e})}function I(e){let t=Object.keys(e);return new c({type:"type",schema:e,*entries(r){if(i(r))for(let n of t)yield[n,r[n],e[n]]},validator:e=>a(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>a(e)?{...e}:e})}function S(e){let t=e.map(e=>e.type).join(" | ");return new c({type:"union",schema:null,coercer(t,r){for(let n of e){let[e,i]=n.validate(t,{coerce:!0,mask:r.mask});if(!e)return i}return t},validator(r,n){let i=[];for(let t of e){let[...e]=l(r,t,n),[a]=e;if(!a[0])return[];for(let[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${s(r)}`,...i]}})}function T(){return p("unknown",()=>!0)}function P(e,t,r){return new c({...e,coercer:(n,i)=>h(n,t)[0]?e.coercer(n,i):e.coercer(r(n,i),i)})}},51396:(e,t,r)=>{"use strict";r.d(t,{J:()=>c});var n=r(56059),i=r(81767),a=r(26274),s=r(2076);r(27126);let o=(0,s.AH)` 5736 :host { 5737 display: block; 5738 width: inherit; 5739 } 5740`;var l=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let c=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.viewState=a.I.state.view,this.history=a.I.state.history.join(","),this.unsubscribe.push(a.I.subscribeKey("view",()=>{this.history=a.I.state.history.join(","),document.documentElement.style.setProperty("--apkt-duration-dynamic","var(--apkt-durations-lg)")}))}
5740disconnectedCallback(){this.unsubscribe.forEach(e=>e()),document.documentElement.style.setProperty("--apkt-duration-dynamic","0s")}render(){return(0,n.qy)`${this.templatePageContainer()}`}templatePageContainer(){return(0,n.qy)`<w3m-router-container 5741 history=${this.history} 5742 .setView=${()=>{this.viewState=a.I.state.view}} 5743 > 5744 ${this.viewTemplate(this.viewState)} 5745 </w3m-router-container>`}viewTemplate(e){switch(e){case"AccountSettings":return(0,n.qy)`<w3m-account-settings-view></w3m-account-settings-view>`;case"Account":return(0,n.qy)`<w3m-account-view></w3m-account-view>`;case"AllWallets":return(0,n.qy)`<w3m-all-wallets-view></w3m-all-wallets-view>`;case"ApproveTransaction":return(0,n.qy)`<w3m-approve-transaction-view></w3m-approve-transaction-view>`;case"BuyInProgress":return(0,n.qy)`<w3m-buy-in-progress-view></w3m-buy-in-progress-view>`;case"ChooseAccountName":return(0,n.qy)`<w3m-choose-account-name-view></w3m-choose-account-name-view>`;case"Connect":default:return(0,n.qy)`<w3m-connect-view></w3m-connect-view>`;case"Create":return(0,n.qy)`<w3m-connect-view walletGuide="explore"></w3m-connect-view>`;case"ConnectingWalletConnect":return(0,n.qy)`<w3m-connecting-wc-view></w3m-connecting-wc-view>`;case"ConnectingWalletConnectBasic":return(0,n.qy)`<w3m-connecting-wc-basic-view></w3m-connecting-wc-basic-view>`;case"ConnectingExternal":return(0,n.qy)`<w3m-connecting-external-view></w3m-connecting-external-view>`;case"ConnectingSiwe":return(0,n.qy)`<w3m-connecting-siwe-view></w3m-connecting-siwe-view>`;case"ConnectWallets":return(0,n.qy)`<w3m-connect-wallets-view></w3m-connect-wallets-view>`;case"ConnectSocials":return(0,n.qy)`<w3m-connect-socials-view></w3m-connect-socials-view>`;case"ConnectingSocial":return(0,n.qy)`<w3m-connecting-social-view></w3m-connecting-social-view>`;case"DataCapture":return(0,n.qy)`<w3m-data-capture-view></w3m-data-capture-view>`;case"DataCaptureOtpConfirm":return(0,n.qy)`<w3m-data-capture-otp-confirm-view></w3m-data-capture-otp-confirm-view>`;case"Downloads":return(0,n.qy)`<w3m-downloads-view></w3m-downloads-view>`;case"EmailLogin":return(0,n.qy)`<w3m-email-login-view></w3m-email-login-view>`;case"EmailVerifyOtp":return(0,n.qy)`<w3m-email-verify-otp-view></w3m-email-verify-otp-view>`;case"EmailVerifyDevice":return(0,n.qy)`<w3m-email-verify-device-view></w3m-email-verify-device-view>`;case"GetWallet":return(0,n.qy)`<w3m-get-wallet-view></w3m-get-wallet-view>`;case"Networks":return(0,n.qy)`<w3m-networks-view></w3m-networks-view>`;case"SwitchNetwork":return(0,n.qy)`<w3m-network-switch-view></w3m-network-switch-view>`;case"ProfileWallets":return(0,n.qy)`<w3m-profile-wallets-view></w3m-profile-wallets-view>`;case"Transactions":return(0,n.qy)`<w3m-transactions-view></w3m-transactions-view>`;case"OnRampProviders":return(0,n.qy)`<w3m-onramp-providers-view></w3m-onramp-providers-view>`;case"OnRampTokenSelect":return(0,n.qy)`<w3m-onramp-token-select-view></w3m-onramp-token-select-view>`;case"OnRampFiatSelect":return(0,n.qy)`<w3m-onramp-fiat-select-view></w3m-onramp-fiat-select-view>`;case"UpgradeEmailWallet":return(0,n.qy)`<w3m-upgrade-wallet-view></w3m-upgrade-wallet-view>`;case"UpdateEmailWallet":return(0,n.qy)`<w3m-update-email-wallet-view></w3m-update-email-wallet-view>`;case"UpdateEmailPrimaryOtp":return(0,n.qy)`<w3m-update-email-primary-otp-view></w3m-update-email-primary-otp-view>`;case"UpdateEmailSecondaryOtp":return(0,n.qy)`<w3m-update-email-secondary-otp-view></w3m-update-email-secondary-otp-view>`;case"UnsupportedChain":return(0,n.qy)`<w3m-unsupported-chain-view></w3m-unsupported-chain-view>`;case"Swap":return(0,n.qy)`<w3m-swap-view></w3m-swap-view>`;case"SwapSelectToken":return(0,n.qy)`<w3m-swap-select-token-view></w3m-swap-select-token-view>`;case"SwapPreview":return(0,n.qy)`<w3m-swap-preview-view></w3m-swap-preview-view>`;case"WalletSend":return(0,n.qy)`<w3m-wallet-send-view></w3m-wallet-send-view>`;case"WalletSendSelectToken":return(0,n.qy)`<w3m-wallet-send-select-token-view></w3m-wallet-send-select-token-view>`;case"WalletSendPreview":return(0,n.qy)`<w3m-wallet-send-preview-view></w3m-wallet-send-preview-view>`;case"WalletSendConfirmed":return(0,n.qy)`<w3m-send-confirmed-view></w3m-send-confirmed-view>`;case"WhatIsABuy":return(0,n.qy)`<w3m-what-is-a-buy-view></w3m-what-is-a-buy-view>`;case"WalletReceive":return(0,n.qy)`<w3m-wallet-receive-view></w3m-wallet-receive-view>`;case"WalletCompatibleNetworks":return(0,n.qy)`<w3m-wallet-compatible-networks-view></w3m-wallet-compatible-networks-view>`;case"WhatIsAWallet":return(0,n.qy)`<w3m-what-is-a-wallet-view></w3m-what-is-a-wallet-view>`;case"ConnectingMultiChain":return(0,n.qy)`<w3m-connecting-multi-chain-view></w3m-connecting-multi-chain-view>`;case"WhatIsANetwork":return(0,n.qy)`<w3m-what-is-a-network-view></w3m-what-is-a-network-view>`;case"ConnectingFarcaster":return(0,n.qy)`<w3m-connecting-farcaster-view></w3m-connecting-farcaster-view>`;case"SwitchActiveChain":return(0,n.qy)`<w3m-switch-active-chain-view></w3m-switch-active-chain-view>`;case"RegisterAccountName":return(0,n.qy)`<w3m-register-account-name-view></w3m-register-account-name-view>`;case"RegisterAccountNameSuccess":return(0,n.qy)`<w3m-register-account-name-success-view></w3m-register-account-name-success-view>`;case"SmartSessionCreated":return(0,n.qy)`<w3m-smart-session-created-view></w3m-smart-session-created-view>`;case"SmartSessionList":return(0,n.qy)`<w3m-smart-session-list-view></w3m-smart-session-list-view>`;case"SIWXSignMessage":return(0,n.qy)`<w3m-siwx-sign-message-view></w3m-siwx-sign-message-view>`;case"Pay":return(0,n.qy)`<w3m-pay-view></w3m-pay-view>`;case"PayLoading":return(0,n.qy)`<w3m-pay-loading-view></w3m-pay-loading-view>`;case"PayQuote":return(0,n.qy)`<w3m-pay-quote-view></w3m-pay-quote-view>`;case"FundWallet":return(0,n.qy)`<w3m-fund-wallet-view></w3m-fund-wallet-view>`;case"PayWithExchange":return(0,n.qy)`<w3m-deposit-from-exchange-view></w3m-deposit-from-exchange-view>`;case"PayWithExchangeSelectAsset":return(0,n.qy)`<w3m-deposit-from-exchange-select-asset-view></w3m-deposit-from-exchange-select-asset-view>`;case"UsageExceeded":return(0,n.qy)`<w3m-usage-exceeded-view></w3m-usage-exceeded-view>`;case"SmartAccountSettings":return(0,n.qy)`<w3m-smart-account-settings-view></w3m-smart-account-settings-view>`}}};c.styles=[o],l([(0,i.wk)()],c.prototype,"viewState",void 0),l([(0,i.wk)()],c.prototype,"history",void 0),c=l([(0,s.EM)("w3m-router")],c)},51411:(e,t)=>{"use strict";async function r(e,t){let{id:r}=t;await e.request({method:"wallet_showCallsStatus",params:[r]})}
5745Object.defineProperty(t,"__esModule",{value:!0}),t.showCallsStatus=r},51418:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTxpoolStatus=i;let n=r(14972);async function i(e){let{pending:t,queued:r}=await e.request({method:"txpool_status"});return{pending:(0,n.hexToNumber)(t),queued:(0,n.hexToNumber)(r)}}},51513:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeErrorResult=function(e){let{abi:t,data:r,cause:c}=e,u=(0,a.slice)(r,0,4);if("0x"===u)throw new i.AbiDecodingZeroDataError({cause:c});let d=[...t||[],n.solidityError,n.solidityPanic].find(e=>"error"===e.type&&u===(0,s.toFunctionSelector)((0,l.formatAbiItem)(e)));if(!d)throw new i.AbiErrorSignatureNotFoundError(u,{docsPath:"/docs/contract/decodeErrorResult",cause:c});return{abiItem:d,args:"inputs"in d&&d.inputs&&d.inputs.length>0?(0,o.decodeAbiParameters)(d.inputs,(0,a.slice)(r,4)):void 0,errorName:d.name}};let n=r(29414),i=r(82311),a=r(4906),s=r(16936),o=r(29060),l=r(71680)},51636:(e,t,r)=>{"use strict";r.d(t,{W:()=>c});var n=r(91004),i=r(99817),a=r(17052),s=r(32590);let o=(0,n.BX)({themeMode:"dark",themeVariables:{},w3mThemeVariables:void 0}),l={state:o,subscribe:e=>(0,n.B1)(o,()=>e(o)),setThemeMode(e){o.themeMode=e;try{let t=s.a.getAuthConnector();if(t){let r=l.getSnapshot().themeVariables;t.provider.syncTheme({themeMode:e,themeVariables:r,w3mThemeVariables:(0,i.o)(r,e)})}}catch{console.info("Unable to sync theme to auth connector")}},setThemeVariables(e){o.themeVariables={...o.themeVariables,...e};try{let e=s.a.getAuthConnector();if(e){let t=l.getSnapshot().themeVariables;e.provider.syncTheme({themeVariables:t,w3mThemeVariables:(0,i.o)(o.themeVariables,o.themeMode)})}}catch{console.info("Unable to sync theme to auth connector")}},getSnapshot:()=>(0,n.P9)(o)},c=(0,a.X)(l)},51674:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeOverflowError=t.RlpTrailingBytesError=t.RlpListBoundaryExceededError=t.RlpDepthLim
5745itExceededError=t.InvalidHexValueError=t.InvalidHexBooleanError=t.InvalidBytesBooleanError=t.IntegerOutOfRangeError=void 0;let n=r(45226);class i extends n.BaseError{constructor({max:e,min:t,signed:r,size:n,value:i}){super(`Number "${i}" is not in safe ${n?`${8*n}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}t.IntegerOutOfRangeError=i;class a extends n.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.`,{name:"InvalidBytesBooleanError"})}}t.InvalidBytesBooleanError=a;class s extends n.BaseError{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}t.InvalidHexBooleanError=s;class o extends n.BaseError{constructor(e){super(`Hex value "${e}" is an odd length (${e.length}). It must be an even length.`,{name:"InvalidHexValueError"})}}t.InvalidHexValueError=o;class l extends n.BaseError{constructor({limit:e}){super(`RLP depth limit of \`${e}\` exceeded.`,{name:"RlpDepthLimitExceededError"})}}
5745t.RlpDepthLimitExceededError=l;class c extends n.BaseError{constructor({consumed:e,declared:t}){super(`RLP list items consumed \`${e}\` bytes but the list declared a length of \`${t}\`.`,{name:"RlpListBoundaryExceededError"})}}t.RlpListBoundaryExceededError=c;class u extends n.BaseError{constructor({count:e}){super(`RLP payload encodes a single item, but \`${e}\` trailing ${1===e?"byte remains":"bytes remain"}.`,{name:"RlpTrailingBytesError"})}}t.RlpTrailingBytesError=u;class d extends n.BaseError{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}t.SizeOverflowError=d},51735:(e,t,r)=>{"use strict";r.d(t,{E:()=>n});let n={ERROR_CODE_UNRECOGNIZED_CHAIN_ID:4902,ERROR_CODE_DEFAULT:5e3,ERROR_INVALID_CHAIN_ID:32603}},51843:(e,t,r)=>{"use strict";r.d(t,{V:()=>c});var n=r(44582),i=r(10693);let a={};function s(e,t){let r=!1;return t<0&&(r=!0,t*=-1),new c(a,`${r?"":"u"}int${t}`,e,{signed:r,width:t})}function o(e,t){return new c(a,`bytes${t||""}`,e,{size:t})}let l=Symbol.for("_ethers_typed");class c{type;value;#eu;_typedSymbol;constructor(e,t,r,s){null==s&&(s=null),(0,n.gk)(a,e,"Typed"),(0,i.n)(this,{_typedSymbol:l,type:t,value:r}),this.#eu=s,this.format()}format(){if("array"===this.type||"dynamicArray"===this.type)throw Error("");return"tuple"===this.type?`tuple(${this.value.map(e=>e.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return"string"===this.type}get tupleName(){if("tuple"!==this.type)throw TypeError("not a tuple");return this.#eu}get arrayLength(){if("array"!==this.type)throw TypeError("not an array");return!0===this.#eu?-1:!1===this.#eu?this.value.length:null}static from(e,t){return new c(a,e,t)}static uint8(e){return s(e,8)}static uint16(e){return s(e,16)}static uint24(e){return s(e,24)}static uint32(e){return s(e,32)}static uint40(e){return s(e,40)}static uint48(e){return s(e,48)}static uint56(e){return s(e,56)}static uint64(e){return s(e,64)}static uint72(e){return s(e,72)}static uint80(e){return s(e,80)}static uint88(e){return s(e,88)}static uint96(e){return s(e,96)}static uint104(e){return s(e,104)}static uint112(e){return s(e,112)}static uint120(e){return s(e,120)}static uint128(e){return s(e,128)}static uint136(e){return s(e,136)}static uint144(e){return s(e,144)}static uint152(e){return s(e,152)}static uint160(e){return s(e,160)}static uint168(e){return s(e,168)}static uint176(e){return s(e,176)}static uint184(e){return s(e,184)}static uint192(e){return s(e,192)}static uint200(e){return s(e,200)}static uint208(e){return s(e,208)}static uint216(e){return s(e,216)}static uint224(e){return s(e,224)}static uint232(e){return s(e,232)}static uint240(e){return s(e,240)}static uint248(e){return s(e,248)}static uint256(e){return s(e,256)}static uint(e){return s(e,256)}static int8(e){return s(e,-8)}static int16(e){return s(e,-16)}static int24(e){return s(e,-24)}static int32(e){return s(e,-32)}static int40(e){return s(e,-40)}static int48(e){return s(e,-48)}static int56(e){return s(e,-56)}static int64(e){return s(e,-64)}static int72(e){return s(e,-72)}static int80(e){return s(e,-80)}static int88(e){return s(e,-88)}static int96(e){return s(e,-96)}static int104(e){return s(e,-104)}static int112(e){return s(e,-112)}static int120(e){return s(e,-120)}static int128(e){return s(e,-128)}static int136(e){return s(e,-136)}static int144(e){return s(e,-144)}static int152(e){return s(e,-152)}static int160(e){return s(e,-160)}static int168(e){return s(e,-168)}static int176(e){return s(e,-176)}static int184(e){return s(e,-184)}static int192(e){return s(e,-192)}static int200(e){return s(e,-200)}static int208(e){return s(e,-208)}static int216(e){return s(e,-216)}static int224(e){return s(e,-224)}static int232(e){return s(e,-232)}static int240(e){return s(e,-240)}static int248(e){return s(e,-248)}static int256(e){return s(e,-256)}static int(e){return s(e,-256)}static bytes1(e){return o(e,1)}static bytes2(e){return o(e,2)}static bytes3(e){return o(e,3)}static bytes4(e){return o(e,4)}static bytes5(e){return o(e,5)}static bytes6(e){return o(e,6)}static bytes7(e){return o(e,7)}static bytes8(e){return o(e,8)}static bytes9(e){return o(e,9)}static bytes10(e){return o(e,10)}static bytes11(e){return o(e,11)}static bytes12(e){return o(e,12)}static bytes13(e){return o(e,13)}static bytes14(e){return o(e,14)}static bytes15(e){return o(e,15)}static bytes16(e){return o(e,16)}static bytes17(e){return o(e,17)}static bytes18(e){return o(e,18)}static bytes19(e){return o(e,19)}static bytes20(e){return o(e,20)}static bytes21(e){return o(e,21)}static bytes22(e){return o(e,22)}static bytes23(e){return o(e,23)}static bytes24(e){return o(e,24)}static bytes25(e){return o(e,25)}static bytes26(e){return o(e,26)}static bytes27(e){return o(e,27)}static bytes28(e){return o(e,28)}
5745static bytes29(e){return o(e,29)}static bytes30(e){return o(e,30)}static bytes31(e){return o(e,31)}static bytes32(e){return o(e,32)}static address(e){return new c(a,"address",e)}static bool(e){return new c(a,"bool",!!e)}static bytes(e){return new c(a,"bytes",e)}static string(e){return new c(a,"string",e)}static array(e,t){throw Error("not implemented yet")}static tuple(e,t){throw Error("not implemented yet")}static overrides(e){return new c(a,"overrides",Object.assign({},e))}static isTyped(e){return e&&"object"==typeof e&&"_typedSymbol"in e&&e._typedSymbol===l}static dereference(e,t){if(c.isTyped(e)){if(e.type!==t)throw Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}}},51844:(e,t,r)=>{"use strict";r.d(t,{r:()=>o});var n=r(34410),i=r(81366);let a=/^vector<(.+)>$/,s=/^([^:]+)::([^:]+)::([^<]+)(<(.+)>)?/;var o=class e{static parseFromStr(t,r=!1){if("address"===t)return{address:null};if("bool"===t)return{bool:null};if("u8"===t)return{u8:null};if("u16"===t)return{u16:null};if("u32"===t)return{u32:null};else if("u64"===t)return{u64:null};else if("u128"===t)return{u128:null};else if("u256"===t)return{u256:null};else if("signer"===t)return{signer:null};let i=t.match(a);if(i)return{vector:e.parseFromStr(i[1],r)};let o=t.match(s);if(o)return{struct:{address:r?(0,n.t4)(o[1]):o[1],module:o[2],name:o[3],typeParams:void 0===o[5]?[]:e.parseStructTypeArgs(o[5],r)}};throw Error(`Encountered unexpected token when parsing type args for ${t}`)}static parseStructTypeArgs(t,r=!1){return(0,i.sT)(t).map(t=>e.parseFromStr(t,r))}static tagToString(t){if("bool"in t)return"bool";if("u8"in t)return"u8";if("u16"in t)return"u16";if("u32"in t)return"u32";if("u64"in t)return"u64";if("u128"in t)return"u128";if("u256"in t)return"u256";if("address"in t)return"address";if("signer"in t)return"signer";if("vector"in t)return`vector<${e.tagToString(t.vector)}>`;if("struct"in t){let r=t.struct,n=r.typeParams.map(e.tagToString).join(", ");return`${r.address}::${r.module}::${r.name}${n?`<${n}>`:""}`}throw Error("Invalid TypeTag")}}},52131:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(63412),s=r(91392);let o=(0,s.AH)` 5746 :host { 5747 display: block; 5748 background: linear-gradient( 5749 90deg, 5750 ${({tokens:e})=>e.theme.foregroundPrimary} 0%, 5751 ${({tokens:e})=>e.theme.foregroundSecondary} 50%, 5752 ${({tokens:e})=>e.theme.foregroundPrimary} 100% 5753 ); 5754 background-size: 200% 100%; 5755 animation: shimmer 2s linear infinite; 5756 border-radius: ${({borderRadius:e})=>e[1]}; 5757 } 5758 5759 :host([data-rounded='true']) { 5760 border-radius: ${({borderRadius:e})=>e[16]}; 5761 } 5762 5763 @keyframes shimmer { 5764 0% { 5765 background-position: 100% 0; 5766 } 5767 100% { 5768 background-position: -100% 0; 5769 } 5770 } 5771`;var l=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let c=class extends n.WF{constructor(){super(...arguments),this.width="",this.height="",this.variant="default",this.rounded=!1}render(){return this.style.cssText=` 5772 width: ${this.width}; 5773 height: ${this.height}; 5774 `,this.dataset.rounded=this.rounded?"true":"false",(0,n.qy)`<slot></slot>`}};c.styles=[o],l([(0,i.MZ)()],c.prototype,"width",void 0),l([(0,i.MZ)()],c.prototype,"height",void 0),l([(0,i.MZ)()],c.prototype,"variant",void 0),l([(0,i.MZ)({type:Boolean})],c.prototype,"rounded",void 0),c=l([(0,a.E)("wui-shimmer")],c)},52162:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EstimateGasExecutionError=void 0;let n=r(40771),i=r(81005),a=r(45226),s=r(44789);class o extends a.BaseError{constructor(e,{account:t,docsPath:r,chain:a,data:o,gas:l,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:d,nonce:h,to:p,value:f}){super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",(0,s.prettyPrint)({from:t?.address,to:p,value:void 0!==f&&`${(0,n.formatEther)(f)} ${a?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:l,gasPrice:void 0!==c&&`${(0,i.formatGwei)(c)} gwei`,maxFeePerGas:void 0!==u&&`${(0,i.formatGwei)(u)} gwei`,maxPriorityFeePerGas:void 0!==d&&`${(0,i.formatGwei)(d)} gwei`,nonce:h}
5774)].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}t.EstimateGasExecutionError=o},52335:(e,t,r)=>{"use strict";r.d(t,{C:()=>n});let n={validateCaipAddress(e){if(e.split(":")?.length!==3)throw Error("Invalid CAIP Address");return e},parseCaipAddress(e){let t=e.split(":");if(3!==t.length)throw Error(`Invalid CAIP-10 address: ${e}`);let[r,n,i]=t;if(!r||!n||!i)throw Error(`Invalid CAIP-10 address: ${e}`);return{chainNamespace:r,chainId:n,address:i}},parseCaipNetworkId(e){let t=e.split(":");if(2!==t.length)throw Error(`Invalid CAIP-2 network id: ${e}`);let[r,n]=t;if(!r||!n)throw Error(`Invalid CAIP-2 network id: ${e}`);return{chainNamespace:r,chainId:n}}}},52391:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.charCodeMap=void 0,t.assertSize=function(e,t){if(n.size(e)>t)throw new n.SizeOverflowError({givenSize:n.size(e),maxSize:t})},t.assertStartOffset=function(e,t){if("number"==typeof t&&t>0&&t>n.size(e)-1)throw new n.SliceOffsetOutOfBoundsError({offset:t,position:"start",size:n.size(e)})},t.assertEndOffset=function(e,t,r){if("number"==typeof t&&"number"==typeof r&&n.size(e)!==r-t)throw new n.SliceOffsetOutOfBoundsError({offset:r,position:"end",size:n.size(e)})},t.charCodeToBase16=function(e){return e>=t.charCodeMap.zero&&e<=t.charCodeMap.nine?e-t.charCodeMap.zero:e>=t.charCodeMap.A&&e<=t.charCodeMap.F?e-(t.charCodeMap.A-10):e>=t.charCodeMap.a&&e<=t.charCodeMap.f?e-(t.charCodeMap.a-10):void 0},t.pad=function(e,t={}){let{dir:r,size:i=32}=t;if(0===i)return e;if(e.length>i)throw new n.SizeExceedsPaddingSizeError({size:e.length,targetSize:i,type:"Bytes"});let a=new Uint8Array(i);for(let t=0;t<i;t++){let n="right"===r;a[n?t:i-t-1]=e[n?t:e.length-t-1]}return a},t.trim=function(e,t={}){let{dir:r="left"}=t,n=e,i=0;for(let e=0;e<n.length-1;e++)if("0"===n["left"===r?e:n.length-e-1].toString())i++;else break;return"left"===r?n.slice(i):n.slice(0,n.length-i)};let n=r(31837);t.charCodeMap={zero:48,nine:57,A:65,F:70,a:97,f:102}},52462:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWalletClient=function(e){let{key:t="wallet",name:r="Wallet Client",transport:a}=e;return(0,n.createClient)({...e,key:t,name:r,transport:a,type:"walletClient"}).extend(i.walletActions)};let n=r(85583),i=r(13054)},52548:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashTypedData=function(e){let{domain:t={},message:r,primaryType:n}=e,a={EIP712Domain:(0,o.getTypesForEIP712Domain)({domain:t}),...e.types};(0,o.validateTypedData)({domain:t,message:r,primaryType:n,types:a});let u=["0x1901"];return t&&u.push(l({domain:t,types:a})),"EIP712Domain"!==n&&u.push(c({data:r,primaryType:n,types:a})),(0,s.keccak256)((0,i.concat)(u))},t.hashDomain=l,t.hashStruct=c,t.encodeType=u;let n=r(66008),i=r(26504),a=r(27083),s=r(4319),o=r(97857);function l({domain:e,types:t}){return c({data:e,primaryType:"EIP712Domain",types:t})}function c({data:e,primaryType:t,types:r}){let i=function e({data:t,primaryType:r,types:i}){let o=[{type:"bytes32"}],l=[function({primaryType:e,types:t}){let r=(0,a.toHex)(u({primaryType:e,types:t}));return(0,s.keccak256)(r)}({primaryType:r,types:i})];for(let c of i[r]){let[r,u]=function t({types:r,name:i,type:o,value:l}){if(void 0!==r[o])return[{type:"bytes32"},(0,s.keccak256)(e({data:l,primaryType:o,types:r}))];if("bytes"===o)return[{type:"bytes32"},(0,s.keccak256)(l)];if("string"===o)return[{type:"bytes32"},(0,s.keccak256)((0,a.toHex)(l))];if(o.lastIndexOf("]")===o.length-1){let e=o.slice(0,o.lastIndexOf("[")),a=l.map(n=>t({name:i,type:e,types:r,value:n}));return[{type:"bytes32"},(0,s.keccak256)((0,n.encodeAbiParameters)(a.map(([e])=>e),a.map(([,e])=>e)))]}return[{type:o},l]}({types:i,name:c.name,type:c.type,value:t[c.name]});o.push(r),l.push(u)}return(0,n.encodeAbiParameters)(o,l)}({data:e,primaryType:t,types:r});return(0,s.keccak256)(i)}function u({primaryType:e,types:t}){let r="",n=function e({primaryType:t,types:r},n=new Set){let i=t.match(/^\w*/u),a=i?.[0];if(n.has(a)||void 0===r[a])return n;for(let t of(n.add(a),r[a]))e({primaryType:t.type,types:r},n);return n}({primaryType:e,types:t});for(let i of(n.delete(e),[e,...Array.from(n).sort()]))r+=`${i}(${t[i].map(({name:e,type:t})=>`${t} ${e}`).join(",")})`;return r}},52828:(e,t,r)=>{"use strict";
5774Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpc=function(e){return{...e.baseFeePerGas&&{baseFeePerGas:BigInt(e.baseFeePerGas)},...e.blobBaseFee&&{blobBaseFee:BigInt(e.blobBaseFee)},...e.feeRecipient&&{feeRecipient:e.feeRecipient},...e.gasLimit&&{gasLimit:BigInt(e.gasLimit)},...e.number&&{number:BigInt(e.number)},...e.prevRandao&&{prevRandao:BigInt(e.prevRandao)},...e.time&&{time:BigInt(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(i.fromRpc)}}},t.toRpc=function(e){return{..."bigint"==typeof e.baseFeePerGas&&{baseFeePerGas:n.fromNumber(e.baseFeePerGas)},..."bigint"==typeof e.blobBaseFee&&{blobBaseFee:n.fromNumber(e.blobBaseFee)},..."string"==typeof e.feeRecipient&&{feeRecipient:e.feeRecipient},..."bigint"==typeof e.gasLimit&&{gasLimit:n.fromNumber(e.gasLimit)},..."bigint"==typeof e.number&&{number:n.fromNumber(e.number)},..."bigint"==typeof e.prevRandao&&{prevRandao:n.fromNumber(e.prevRandao)},..."bigint"==typeof e.time&&{time:n.fromNumber(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(i.toRpc)}}};let n=r(70259),i=r(40913)},53032:(e,t,r)=>{"use strict";r.d(t,{f:()=>f});var n=r(91004),i=r(36442);let a={convertEVMChainIdToCoinType(e){if(e>=0x80000000)throw Error("Invalid chainId");return(0x80000000|e)>>>0}};var s=r(29092),o=r(17052),l=r(45283),c=r(82376),u=r(36071),d=r(32590),h=r(26274);let p=(0,n.BX)({suggestions:[],loading:!1}),f=(0,o.X)({state:p,subscribe:e=>(0,n.B1)(p,()=>e(p)),subscribeKey:(e,t)=>(0,i.u$)(p,e,t),async resolveName(e){try{return await l.T.lookupEnsName(e)}catch(e){throw Error(e?.reasons?.[0]?.description||"Error resolving name")}},async isNameRegistered(e){try{return await l.T.lookupEnsName(e),!0}catch{return!1}},async getSuggestions(e){try{return p.loading=!0,p.suggestions=[],p.suggestions=(await l.T.getEnsNameSuggestions(e)).suggestions||[],p.suggestions}catch(e){throw Error(f.parseEnsApiError(e,"Error fetching name suggestions"))}finally{p.loading=!1}},async getNamesForAddress(e){try{if(!c.W.state.activeCaipNetwork)return[];let t=s.i.getEnsFromCacheForAddress(e);if(t)return t;let r=await l.T.reverseLookupEnsName({address:e});return s.i.updateEnsCache({address:e,ens:r,timestamp:Date.now()}),r}catch(e){throw Error(f.parseEnsApiError(e,"Error fetching names for address"))}},async registerName(e){let t=c.W.state.activeCaipNetwork,r=c.W.getAccountData(t?.chainNamespace)?.address,n=d.a.getAuthConnector();if(!t)throw Error("Network not found");if(!r||!n)throw Error("Address or auth connector not found");p.loading=!0;try{let n=JSON.stringify({name:e,attributes:{},timestamp:Math.floor(Date.now()/1e3)});h.I.pushTransactionStack({onCancel(){h.I.replace("RegisterAccountName")}});let i=await u.x.signMessage(n);p.loading=!1;let o=t.id;if(!o)throw Error("Network not found");let d=a.convertEVMChainIdToCoinType(Number(o));await l.T.registerEnsName({coinType:d,address:r,signature:i,message:n}),c.W.setAccountProp("profileName",e,t.chainNamespace),s.i.updateEnsCache({address:r,ens:[{name:e,registered_at:new Date().toISOString(),updated_at:void 0,addresses:{},attributes:[]}],timestamp:Date.now()}),h.I.replace("RegisterAccountNameSuccess")}catch(r){let t=f.parseEnsApiError(r,`Error registering name ${e}`);throw h.I.replace("RegisterAccountName"),Error(t)}finally{p.loading=!1}},validateName:e=>/^[a-zA-Z0-9-]{4,}$/u.test(e),parseEnsApiError:(e,t)=>e?.reasons?.[0]?.description||t})},53318:(e,t)=>{"use strict";async function r(e){return await e.request({method:"evm_snapshot"})}Object.defineProperty(t,"__esModule",{value:!0}),t.snapshot=r},53324:(e,t)=>{"use strict";var r,n,i,a,s,o,l,c,u,d,h,p;Object.defineProperty(t,"__esModule",{value:!0}),t.LabelValue=t.StartTimeValue=t.DurationType=t.DetailedExecutionInfoType=t.TransactionListItemType=t.ConflictType=t.TransactionInfoType=t.SettingsInfoType=t.TransactionTokenType=t.TransferDirection=t.TransactionStatus=t.Operation=void 0,function(e){e[e.CALL=0]="CALL",e[e.DELEGATE=1]="DELEGATE"}(r||(t.Operation=r={})),function(e){e.AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",e.AWAITING_EXECUTION="AWAITING_EXECUTION",e.CANCELLED="CANCELLED",e.FAILED="FAILED",e.SUCCESS="SUCCESS"}(n||(t.TransactionStatus=n={}
5774)),function(e){e.INCOMING="INCOMING",e.OUTGOING="OUTGOING",e.UNKNOWN="UNKNOWN"}(i||(t.TransferDirection=i={})),function(e){e.ERC20="ERC20",e.ERC721="ERC721",e.NATIVE_COIN="NATIVE_COIN"}(a||(t.TransactionTokenType=a={})),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"}(s||(t.SettingsInfoType=s={})),function(e){e.TRANSFER="Transfer",e.SETTINGS_CHANGE="SettingsChange",e.CUSTOM="Custom",e.CREATION="Creation",e.SWAP_ORDER="SwapOrder",e.TWAP_ORDER="TwapOrder",e.SWAP_TRANSFER="SwapTransfer",e.NATIVE_STAKING_DEPOSIT="NativeStakingDeposit",e.NATIVE_STAKING_VALIDATORS_EXIT="NativeStakingValidatorsExit",e.NATIVE_STAKING_WITHDRAW="NativeStakingWithdraw"}(o||(t.TransactionInfoType=o={})),function(e){e.NONE="None",e.HAS_NEXT="HasNext",e.END="End"}(l||(t.ConflictType=l={})),function(e){e.TRANSACTION="TRANSACTION",e.LABEL="LABEL",e.CONFLICT_HEADER="CONFLICT_HEADER",e.DATE_LABEL="DATE_LABEL"}(c||(t.TransactionListItemType=c={})),function(e){e.MULTISIG="MULTISIG",e.MODULE="MODULE"}(u||(t.DetailedExecutionInfoType=u={})),function(e){e.AUTO="AUTO",e.LIMIT_DURATION="LIMIT_DURATION"}(d||(t.DurationType=d={})),function(e){e.AT_MINING_TIME="AT_MINING_TIME",e.AT_EPOCH="AT_EPOCH"}(h||(t.StartTimeValue=h={})),function(e){e.Queued="Queued",e.Next="Next"}(p||(t.LabelValue=p={}))},53344:(e,t,r)=>{"use strict";r.d(t,{v:()=>o});let n=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],i=[{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],a=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];var s=r(57873);let o={getERC20Abi:e=>s.o.USDT_CONTRACT_ADDRESSES.includes(e)?a:n,getSwapAbi:()=>i}},53520:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineTransactionRequest=t.rpcTransactionType=void 0,t.formatTransactionRequest=a;let n=r(27083),i=r(87721);function a(e,r){let i={};return void 0!==e.authorizationList&&(i.authorizationList=e.authorizationList.map(e=>({address:e.address,r:e.r?(0,n.numberToHex)(BigInt(e.r)):e.r,s:e.s?(0,n.numberToHex)(BigInt(e.s)):e.s,chainId:(0,n.numberToHex)(e.chainId),nonce:(0,n.numberToHex)(e.nonce),...void 0!==e.yParity?{yParity:(0,n.numberToHex)(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:(0,n.numberToHex)(e.v)}:{}}))),void 0!==e.accessList&&(i.accessList=e.accessList),void 0!==e.blobVersionedHashes&&(i.blobVersionedHashes=e.blobVersionedHashes),void 0!==e.blobs&&("string"!=typeof e.blobs[0]?i.blobs=e.blobs.map(e=>(0,n.bytesToHex)(e)):i.blobs=e.blobs),void 0!==e.data&&(i.data=e.data),e.account&&(i.from=e.account.address),void 0!==e.from&&(i.from=e.from),void 0!==e.gas&&(i.gas=(0,n.numberToHex)(e.gas)),void 0!==e.gasPrice&&(i.gasPrice=(0,n.numberToHex)(e.gasPrice)),void 0!==e.maxFeePerBlobGas&&(i.maxFeePerBlobGas=(0,n.numberToHex)(e.maxFeePerBlobGas)),void 0!==e.maxFeePerGas&&(i.maxFeePerGas=(0,n.numberToHex)(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(i.maxPriorityFeePerGas=(0,n.numberToHex)(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(i.nonce=(0,n.numberToHex)(e.nonce)),void 0!==e.to&&(i.to=e.to),void 0!==e.type&&(i.type=t.rpcTransactionType[e.type]),void 0!==e.value&&(i.value=(0,n.numberToHex)(e.value)),i}t.rpcTransactionType={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"},t.defineTransactionRequest=(0,i.defineFormatter)("transactionRequest",a)},53597:(e,t,r)=>{"use strict";r.d(t,{Ci:()=>s,J8:()=>l,MU:()=>c,f:()=>o});var n=r(60783),i=r(81742),a=r(35261);class s extends i.C{constructor({body:e,cause:t,details:r,headers:i,status:s,url:o}){super("HTTP request failed.",{cause:t,details:r,metaMessages:[s&&`Status: ${s}`,`URL: ${(0,a.ID)(o)}`,e&&`Request body: ${(0,n.A)(e)}
5774`].filter(Boolean),name:"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=i,this.status=s,this.url=o}}class o extends i.C{constructor({maxSize:e,size:t}){super("HTTP response body exceeded the size limit.",{metaMessages:[`Max: ${e} bytes`,`Received: ${t} bytes`],name:"ResponseBodyTooLargeError"}),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e,this.size=t}}i.C;class l extends i.C{constructor({body:e,error:t,url:r}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,a.ID)(r)}`,`Request body: ${(0,n.A)(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{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,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code,this.data=t.data,this.url=r}}i.C;class c extends i.C{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,a.ID)(t)}`,`Request body: ${(0,n.A)(e)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=t}}},53676:(e,t,r)=>{"use strict";let n=r(39945).v4,i=r(26209),a=function(e,t){if(!(this instanceof a))return new a(e,t);t||(t={}),this.options={reviver:void 0!==t.reviver?t.reviver:null,replacer:void 0!==t.replacer?t.replacer:null,generator:void 0!==t.generator?t.generator:function(){return n()},version:void 0!==t.version?t.version:2,notificationIdNull:"boolean"==typeof t.notificationIdNull&&t.notificationIdNull},this.callServer=e};e.exports=a,a.prototype.request=function(e,t,r,n){let a,s=this,o=null,l=Array.isArray(e)&&"function"==typeof t;if(1===this.options.version&&l)throw TypeError("JSON-RPC 1.0 does not support batching");let c=!l&&e&&"object"==typeof e&&"function"==typeof t;if(l||c)n=t,o=e;else{"function"==typeof r&&(n=r,r=void 0);let a="function"==typeof n;try{o=i(e,t,r,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(e){if(a)return n(e);throw e}if(!a)return o}try{a=JSON.stringify(o,this.options.replacer)}catch(e){return n(e)}return this.callServer(a,function(e,t){s._parseResponse(e,t,n)}),o},a.prototype._parseResponse=function(e,t,r){let n;if(e)return void r(e);if(!t)return r();try{n=JSON.parse(t,this.options.reviver)}catch(e){return r(e)}if(3===r.length)if(!Array.isArray(n))return r(null,n.error,n.result);else{let e=function(e){return void 0!==e.error};return r(null,n.filter(e),n.filter(function(t){return!e(t)}))}r(null,n)}},53937:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseError=void 0;let n=r(40699);class i extends Error{static setStaticOptions(e){i.prototype.docsOrigin=e.docsOrigin,i.prototype.showVersion=e.showVersion,i.prototype.version=e.version}constructor(e,t={}){let r=(()=>{if(t.cause instanceof i){if(t.cause.details)return t.cause.details;if(t.cause.shortMessage)return t.cause.shortMessage}return t.cause&&"details"in t.cause&&"string"==typeof t.cause.details?t.cause.details:t.cause?.message?t.cause.message:t.details})(),n=t.cause instanceof i&&t.cause.docsPath||t.docsPath,a=t.docsOrigin??i.prototype.docsOrigin,s=`${a}${n??""}`,o=!!(t.version??i.prototype.showVersion),l=t.version??i.prototype.version;super([e||"An error occurred.",...t.metaMessages?["",...t.metaMessages]:[],...r||n||o?["",r?`Details: ${r}`:void 0,n?`See: ${s}`:void 0,o?`Version: ${l}`:void 0]:[]].filter(e=>"string"==typeof e).join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{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,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{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,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=t.cause,this.details=r,this.docs=s,this.docsOrigin=a,this.docsPath=n,this.shortMessage=e,this.showVersion=o,this.version=l}walk(e){return function e(t,r){return r?.(t)?t:t&&"object"==typeof t&&"cause"in t&&t.cause?e(t.cause,r):r?null:t}(this,e)}}t.BaseError=i,Object.defineProperty(i,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${(0,n.getVersion)()}`}}),i.setStaticOptions(i.defaultStaticOptions)},53938:(e,t,r)=>{"use strict";
5774Object.defineProperty(t,"__esModule",{value:!0}),t.MessageFormatter=void 0;let n=r(84340),i=r(26802);class a{}t.MessageFormatter=a,a.makeRequest=(e,t)=>({id:(0,i.generateRequestId)(),method:e,params:t,env:{sdkVersion:(0,n.getSDKVersion)()}}),a.makeResponse=(e,t,r)=>({id:e,success:!0,version:r,data:t}),a.makeErrorResponse=(e,t,r)=>({id:e,success:!1,error:t,version:r})},53984:(e,t,r)=>{"use strict";r.d(t,{W:()=>y});var n=r(91004),i=r(36442),a=r(33432),s=r(59539),o=r(17052),l=r(79561),c=r(82376),u=r(36071),d=r(32590),h=r(42242),p=r(18627),f=r(95987),m=r(26274);let g=(0,n.BX)({loading:!1,loadingNamespaceMap:new Map,open:!1,shake:!1,namespace:void 0}),y=(0,o.X)({state:g,subscribe:e=>(0,n.B1)(g,()=>e(g)),subscribeKey:(e,t)=>(0,i.u$)(g,e,t),async open(e){let t=e?.namespace,r=c.W.state.activeChain,n=t&&t!==r,i=c.W.getAccountData(e?.namespace)?.caipAddress,o=c.W.state.noAdapters;if(u.x.state.wcBasic?l.N.prefetch({fetchNetworkImages:!1,fetchConnectorImages:!1,fetchWalletRanks:!1}):await l.N.prefetch(),d.a.setFilterByNamespace(e?.namespace),y.setLoading(!0,t),t&&n){let e=c.W.getNetworkData(t)?.caipNetwork||c.W.getRequestedCaipNetworks(t)[0];e&&(o?(await c.W.switchActiveNetwork(e),m.I.push("ConnectingWalletConnectBasic")):s.L.onSwitchNetwork({network:e,ignoreSwitchConfirmation:!0}))}else p.H.state.manualWCControl||o&&!i?a.w.isMobile()?m.I.reset("AllWallets"):m.I.reset("ConnectingWalletConnectBasic"):e?.view?m.I.reset(e.view,e.data):i?m.I.reset("Account"):m.I.reset("Connect");g.open=!0,f.z.set({open:!0}),h.E.sendEvent({type:"track",event:"MODAL_OPEN",properties:{connected:!!i}})},close(){let e=p.H.state.enableEmbedded,t=!!c.W.state.activeCaipAddress;g.open&&h.E.sendEvent({type:"track",event:"MODAL_CLOSE",properties:{connected:t}}),g.open=!1,m.I.reset("Connect"),y.clearLoading(),e?t?m.I.replace("Account"):m.I.push("Connect"):f.z.set({open:!1}),u.x.resetUri()},setLoading(e,t){t&&g.loadingNamespaceMap.set(t,e),g.loading=e,f.z.set({loading:e})},clearLoading(){g.loadingNamespaceMap.clear(),g.loading=!1,f.z.set({loading:!1})},shake(){g.shake||(g.shake=!0,setTimeout(()=>{g.shake=!1},500))}})},54545:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_BASE_URL=void 0,t.DEFAULT_BASE_URL="https://safe-client.safe.global"},55082:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(50626),t),i(r(34721),t),i(r(74624),t),i(r(51206),t)},55085:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.blobsToProofs=function(e){let{kzg:t}=e,r=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),a="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,n.hexToBytes)(e)):e.blobs,s="string"==typeof e.commitments[0]?e.commitments.map(e=>(0,n.hexToBytes)(e)):e.commitments,o=[];for(let e=0;e<a.length;e++){let r=a[e],n=s[e];o.push(Uint8Array.from(t.computeBlobKzgProof(r,n)))}return"bytes"===r?o:o.map(e=>(0,i.bytesToHex)(e))};let n=r(60037),i=r(27083)},55185:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.narrow=function(e){return e}},55284:(e,t,r)=>{"use strict";r.d(t,{J:()=>i});var n=r(80407);let i=e=>e??n.s6},55405:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});let n={getSpacingStyles:(e,t)=>Array.isArray(e)?e[t]?`var(--apkt-spacing-${e[t]})`:void 0:"string"==typeof e?`var(--apkt-spacing-${e})`:void 0,getFormattedDate:e=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(e),formatCurrency(e=0,t={}){let r=Number(e);return isNaN(r)?"$0.00":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2,...t}).format(r)},getHostName(e){try{return new URL(e).hostname}catch(e){return""}},getTruncateString:({string:e,charsStart:t,charsEnd:r,truncate:n})=>e.length<=t+r?e:"end"===n?`${e.substring(0,t)}...`:"start"===n?`...${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,"").replace(/[^a-f0-9]/gu,"").substring(0,6).padEnd(6,"0"),r=this.hexToRgb(t),n=getComputedStyle(document.documentElement).getPropertyValue("--w3m-border-radius-master"),i=100-3*Number(n?.replace("px","")),a=`${i}% ${i}% at 65% 40%`,s=[];for(let e=0;e<5;e+=1){let t=this.tintColor(r,.15*e);s.push(`rgb(${t[0]}, ${t[1]}, ${t[2]})`)}return` 5775 --local-color-1: ${s[0]}; 5776 --local-color-2: ${s[1]}; 5777 --local-color-3: ${s[2]}; 5778 --local-color-4: ${s[3]}; 5779 --local-color-5: ${s[4]}; 5780 --local-radial-circle: ${a} 5781 `},hexToRgb(e){let t=parseInt(e,16);return[t>>16&255,t>>8&255,255&t]},tintColor(e,t){let[r,n,i]=e;return[Math.round(r+(255-r)*t),Math.round(n+(255-n)*t),Math.round(i+(255-i)*t)]},isNumber:e=>/^[0-9]+$/u.test(e),getColorTheme:e=>e?e:"undefined"!=typeof window&&window.matchMedia&&"function"==typeof window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)")?.matches?"dar
5781k":"light":"dark",splitBalance(e){let t=e.split(".");return 2===t.length?[t[0],t[1]]:["0","00"]},roundNumber:(e,t,r)=>e.toString().length>=t?Number(e).toFixed(r):e,cssDurationToNumber:e=>e.endsWith("s")?1e3*Number(e.replace("s","")):e.endsWith("ms")?Number(e.replace("ms","")):0,maskInput({value:e,decimals:t,integers:r}){if("."===(e=e.replace(",",".")))return"0.";let[n="",i]=e.split(".").map(e=>e.replace(/[^0-9]/gu,"")),a=r?n.substring(0,r):n,s=2===a.length?String(Number(a)):a,o="number"==typeof t?i?.substring(0,t):i;return("string"==typeof o&&("number"!=typeof t||t>0)?[s,o].join("."):s)??""},capitalize:e=>e?e.charAt(0).toUpperCase()+e.slice(1):""}},55498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toAmount=function(e,t){return{amount:e,decimals:t,formatted:(0,o.formatUnits)(e,t)}},t.toBaseUnits=function(e,t){if("bigint"==typeof e)return e;let r=e.decimals??t;return(0,l.parseUnits)(e.formatted,u(r))},t.requireTokenDecimals=u,t.resolveAmountDecimals=function(e,t){return"bigint"==typeof e?t:e.decimals??t},t.resolveToken=d,t.findDeclaredToken=h,t.resolveTokenWithDecimals=f,t.pickWriteParameters=function(e){let{account:t,chain:r,gas:n,maxFeePerGas:i,maxPriorityFeePerGas:a,nonce:s}=e;return{account:t,chain:r,gas:n,maxFeePerGas:i,maxPriorityFeePerGas:a,nonce:s}},t.defineCall=function(e){return{...e,data:(0,s.encodeFunctionData)(e),to:e.address}};let n=r(91472),i=r(63402),a=r(18978),s=r(59865),o=r(88344),l=r(1932),c=r(527);function u(e){if(void 0===e)throw Error("Token decimals are required. Pass `amount.decimals` or select a declared token.");return e}function d(e,t){let{decimals:r,token:n}=t,s=h(e,n);if(s)return{address:s.address,decimals:r??s.decimals};if((0,i.isAddress)(n,{strict:!1}))return{address:n,decimals:r??function(e,t){let r=e.tokens,n=e.chain?.id;if(r&&void 0!==n)for(let e of r){let r=p(e,n);if(r&&(0,a.isAddressEqual)(r.address,t))return r.decimals}}(e,n)};throw Error(`Token "${n}" is not a declared ERC-20 token on the client's \`tokens\` array (with an address for the client's chain), and is not a valid address.`)}function h(e,t){let r=e.tokens,n=e.chain?.id;if(!r||void 0===n)return;let s=function(e,t){let r=t.toLowerCase();for(let t of e)if(t.symbol?.toLowerCase()===r)return t}(r,t);if(s)return p(s,n);if((0,i.isAddress)(t,{strict:!1}))for(let e of r){let r=p(e,n);if(r&&(0,a.isAddressEqual)(r.address,t))return r}}function p(e,t){let r=e.addresses[t];if(r)return{address:r,currency:e.currency,decimals:e.decimals,name:e.name,popular:e.popular,symbol:e.symbol}}async function f(e,t){let{address:r,decimals:i}=d(e,t);return void 0!==i?{address:r,decimals:i}:{address:r,decimals:await (0,c.readContract)(e,{abi:n.erc20Abi,address:r,functionName:"decimals"})}}},55634:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let r=0;r<t;r++)this.putBit((e>>>t-r-1&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++}},e.exports=t},55954:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toEventSelector=void 0,t.toEventSelector=r(26929).toSignatureHash},56059:(e,t,r)=>{"use strict";r.d(t,{WF:()=>s,AH:()=>n.AH,qy:()=>i.qy,JW:()=>i.JW,iz:()=>n.iz});var n=r(89500),i=r(80407);let a=globalThis;class s extends n.mN{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=(0,i.XX)(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return i.c0}}s._$litElement$=!0,s.finalized=!0,a.litElementHydrateSupport?.({LitElement:s});let o=a.litElementPolyfillSupport;o?.({LitElement:s}),(a.litElementVersions??=[]).push("4.2.1")},56060:(e,t,r)=>{"use strict";r(5222)},56196:(e,t)=>{"use strict";
5781Object.defineProperty(t,"__esModule",{value:!0}),t.notImplemented=t.bitMask=void 0,t.isBytes=i,t.abytes=a,t.abool=function(e,t){if("boolean"!=typeof t)throw Error(e+" boolean expected, got "+t)},t.numberToHexUnpadded=s,t.hexToNumber=o,t.bytesToHex=u,t.hexToBytes=p,t.bytesToNumberBE=function(e){return o(u(e))},t.bytesToNumberLE=function(e){return a(e),o(u(Uint8Array.from(e).reverse()))},t.numberToBytesBE=f,t.numberToBytesLE=function(e,t){return f(e,t).reverse()},t.numberToVarBytesBE=function(e){return p(s(e))},t.ensureBytes=function(e,t,r){let n;if("string"==typeof t)try{n=p(t)}catch(t){throw Error(e+" must be hex string or Uint8Array, cause: "+t)}else if(i(t))n=Uint8Array.from(t);else throw Error(e+" must be hex string or Uint8Array");let a=n.length;if("number"==typeof r&&a!==r)throw Error(e+" of length "+r+" expected, got "+a);return n},t.concatBytes=m,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r},t.utf8ToBytes=function(e){if("string"!=typeof e)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(e))},t.inRange=y,t.aInRange=function(e,t,r,n){if(!y(t,r,n))throw Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)},t.bitLen=function(e){let t;for(t=0;e>r;e>>=n,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&n},t.bitSet=function(e,t,i){return e|(i?n:r)<<BigInt(t)},t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=b(e),i=b(e),a=0,s=()=>{n.fill(1),i.fill(0),a=0},o=(...e)=>r(i,n,...e),l=(e=b(0))=>{i=o(w([0]),e),n=o(),0!==e.length&&(i=o(w([1]),e),n=o())},c=()=>{if(a++>=1e3)throw Error("drbg: tried 1000 values");let e=0,r=[];for(;e<t;){let t=(n=o()).slice();r.push(t),e+=n.length}return m(...r)};return(e,t)=>{let r;for(s(),l(e);!(r=t(c()));)l();return s(),r}},t.validateObject=function(e,t,r={}){let n=(t,r,n)=>{let i=v[r];if("function"!=typeof i)throw Error("invalid validator function");let a=e[t];if((!n||void 0!==a)&&!i(a,e))throw Error("param "+String(t)+" is invalid. Expected "+r+", got "+a)};for(let[e,r]of Object.entries(t))n(e,r,!1);for(let[e,t]of Object.entries(r))n(e,t,!0);return e},t.memoized=function(e){let t=new WeakMap;return(r,...n)=>{let i=t.get(r);if(void 0!==i)return i;let a=e(r,...n);return t.set(r,a),a}};let r=BigInt(0),n=BigInt(1);function i(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function a(e){if(!i(e))throw Error("Uint8Array expected")}function s(e){let t=e.toString(16);return 1&t.length?"0"+t:t}function o(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return""===e?r:BigInt("0x"+e)}let l="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,c=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function u(e){if(a(e),l)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=c[e[r]];return t}let d={_0:48,_9:57,A:65,F:70,a:97,f:102};function h(e){return e>=d._0&&e<=d._9?e-d._0:e>=d.A&&e<=d.F?e-(d.A-10):e>=d.a&&e<=d.f?e-(d.a-10):void 0}function p(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);if(l)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){let r=h(e.charCodeAt(i)),a=h(e.charCodeAt(i+1));if(void 0===r||void 0===a)throw Error('hex string expected, got non-hex character "'+(e[i]+e[i+1])+'" at index '+i);n[t]=16*r+a}return n}function f(e,t){return p(e.toString(16).padStart(2*t,"0"))}function m(...e){let t=0;for(let r=0;r<e.length;r++){let n=e[r];a(n),t+=n.length}let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let i=e[t];r.set(i,n),n+=i.length}return r}let g=e=>"bigint"==typeof e&&r<=e;function y(e,t,r){return g(e)&&g(t)&&g(r)&&t<=e&&e<r}t.bitMask=e=>(n<<BigInt(e))-n;let b=e=>new Uint8Array(e),w=e=>Uint8Array.from(e),v={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||i(e),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)};t.notImplemented=()=>{throw Error("not implemented")}},56485:(e,t)=>{"use strict";
5781Object.defineProperty(t,"__esModule",{value:!0}),t.filterChains=function(e){let{chains:t,sort:r,testnet:n,token:i}=e,a=Array.isArray(t)?t:Object.values(t),s=[];for(let e of a){var o;"object"==typeof(o=e)&&null!==o&&"id"in o&&"number"==typeof o.id&&"name"in o&&"string"==typeof o.name&&"nativeCurrency"in o&&"rpcUrls"in o&&(!i||e.id in i.addresses)&&(!0!==n||!0===e.testnet)&&(!1!==n||!0!==e.testnet)&&s.push(e)}return"id"===r&&s.sort((e,t)=>e.id-t.id),"name"===r&&s.sort((e,t)=>e.name.localeCompare(t.name)),s}},56595:(e,t,r)=>{"use strict";r.d(t,{Ab:()=>u,Dg:()=>p,JJ:()=>l,Ro:()=>m,ST:()=>o,WZ:()=>f,c4:()=>y,dK:()=>c,nD:()=>b,up:()=>g});var n=r(98668),i=r(44582);let a=BigInt(0),s=BigInt(1);function o(e,t){let r=d(e,"value"),n=BigInt(f(t,"width"));return((0,i.vA)(r>>n===a,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),r>>n-s)?-((~r&(s<<n)-s)+s):r}function l(e,t){let r=u(e,"value"),n=BigInt(f(t,"width")),o=s<<n-s;return r<a?(r=-r,(0,i.vA)(r<=o,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:e}),(~r&(s<<n)-s)+s):((0,i.vA)(r<o,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:e}),r)}function c(e,t){return d(e,"value")&(s<<BigInt(f(t,"bits")))-s}function u(e,t){switch(typeof e){case"bigint":return e;case"number":return(0,i.MR)(Number.isInteger(e),"underflow",t||"value",e),(0,i.MR)(e>=-0x1fffffffffffff&&e<=0x1fffffffffffff,"overflow",t||"value",e),BigInt(e);case"string":try{if(""===e)throw Error("empty string");if("-"===e[0]&&"-"!==e[1])return-BigInt(e.substring(1));return BigInt(e)}catch(r){(0,i.MR)(!1,`invalid BigNumberish string: ${r.message}`,t||"value",e)}}(0,i.MR)(!1,"invalid BigNumberish value",t||"value",e)}function d(e,t){let r=u(e,t);return(0,i.vA)(r>=a,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),r}let h="0123456789abcdef";function p(e){if(e instanceof Uint8Array){let t="0x0";for(let r of e)t+=h[r>>4],t+=h[15&r];return BigInt(t)}return u(e)}function f(e,t){switch(typeof e){case"bigint":return(0,i.MR)(e>=-0x1fffffffffffff&&e<=0x1fffffffffffff,"overflow",t||"value",e),Number(e);case"number":return(0,i.MR)(Number.isInteger(e),"underflow",t||"value",e),(0,i.MR)(e>=-0x1fffffffffffff&&e<=0x1fffffffffffff,"overflow",t||"value",e),e;case"string":try{if(""===e)throw Error("empty string");return f(BigInt(e),t)}catch(r){(0,i.MR)(!1,`invalid numeric string: ${r.message}`,t||"value",e)}}(0,i.MR)(!1,"invalid numeric value",t||"value",e)}function m(e){return f(p(e))}function g(e,t){let r=d(e,"value"),n=r.toString(16);if(null==t)n.length%2&&(n="0"+n);else{let s=f(t,"width");if(0===s&&r===a)return"0x";for((0,i.vA)(2*s>=n.length,`value exceeds width (${s} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:e});n.length<2*s;)n="0"+n}return"0x"+n}function y(e,t){let r=d(e,"value");if(r===a)return new Uint8Array(null!=t?f(t,"width"):0);let n=r.toString(16);if(n.length%2&&(n="0"+n),null!=t){let r=f(t,"width");for(;n.length<2*r;)n="00"+n;(0,i.vA)(2*r===n.length,`value exceeds width (${r} bytes)`,"NUMERIC_FAULT",{operation:"toBeArray",fault:"overflow",value:e})}let s=new Uint8Array(n.length/2);for(let e=0;e<s.length;e++){let t=2*e;s[e]=parseInt(n.substring(t,t+2),16)}return s}function b(e){let t=(0,n.c$)((0,n.f)(e)?e:y(e)).substring(2);for(;t.startsWith("0");)t=t.substring(1);return""===t&&(t="0"),"0x"+t}},56605:(e,t,r)=>{"use strict";r.d(t,{Ag:()=>s,E5:()=>d,Rm:()=>c,SJ:()=>l,UW:()=>u,b2:()=>i,oX:()=>o,v2:()=>n,xw:()=>h});let n=[{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"},{inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],i=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],a=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"}
5781,{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],s=[...a,{name:"resolveWithGateways",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"}]}],o=[...a,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],l=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],c=[{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"}]}],u=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],d=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],h=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}]},56694:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAuthorizationList=function(e){if(!e||0===e.length)return[];let t=[];for(let r of e){let{chainId:e,nonce:a,...s}=r,o=r.address;t.push([e?(0,n.toHex)(e):"0x",o,a?(0,n.toHex)(a):"0x",...(0,i.toYParitySignatureArray)({},s)])}return t};let n=r(27083),i=r(24584)},56724:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.offchainLookupAbiItem=t.offchainLookupSignature=void 0,t.offchainLookup=f,t.ccipRequest=m;let n=r(10989),i=r(920),a=r(17208),s=r(5636),o=r(51513),l=r(66008),c=r(18978),u=r(26504),d=r(80217),h=r(57660),p=r(68508);async function f(e,{blockNumber:r,blockTag:a,data:d,requestOptions:p,to:f}){let{args:g}=(0,o.decodeErrorResult)({data:d,abi:[t.offchainLookupAbiItem]}),[y,b,w,v,E]=g,{ccipRead:C}=e,A=C&&"function"==typeof C?.request?C.request:m;try{if(!(0,c.isAddressEqual)(f,y))throw new i.OffchainLookupSenderMismatchError({sender:y,to:f});let t=b.includes(h.localBatchGatewayUrl)?await (0,h.localBatchGatewayRequest)({data:w,ccipRequest:e=>A({...e,requestOptions:p})}):await A({data:w,requestOptions:p,sender:y,urls:b}),{data:s}=await (0,n.call)(e,{blockNumber:r,blockTag:a,data:(0,u.concat)([v,(0,l.encodeAbiParameters)([{type:"bytes"},{type:"bytes"}],[t,E])]),requestOptions:p,to:f});return s}catch(e){if(p?.signal?.aborted)throw(0,s.getAbortError)(p.signal);if((0,s.isAbortError)(e))throw e;throw new i.OffchainLookupError({callbackSelector:v,cause:e,data:d,extraData:E,sender:y,urls:b})}}async function m({data:e,requestOptions:t,sender:r,urls:n}){let o=Error("An unknown error occurred.");for(let l=0;l<n.length;l++){if(t?.signal?.aborted)throw(0,s.getAbortError)(t.signal);let c=n[l],u=c.includes("{data}")?"GET":"POST",h="POST"===u?{data:e,sender:r}:void 0,f="POST"===u?{"Content-Type":"application/json"}:{};try{let n,s=await fetch(c.replace("{sender}",r.toLowerCase()).replace("{data}",e),{body:JSON.stringify(h),headers:f,method:u,...t?.signal?{signal:t.signal}:{}});if(n=s.headers.get("Content-Type")?.startsWith("application/json")?(await s.json()).data:await s.text(),!s.ok){o=new a.HttpRequestError({body:h,details:n?.error?(0,p.stringify)(n.error):s.statusText,headers:s.headers,status:s.status,url:c});continue}if(!(0,d.isHex)(n)){o=new i.OffchainLookupResponseMalformedError({result:n,url:c});continue}return n}catch(e){if(t?.signal?.aborted)throw(0,s.getAbortError)(t.signal);if((0,s.isAbortError)(e))throw e;o=new a.HttpRequestError({body:h,details:e.message,url:c})}}throw o}t.offchainLookupSignature="0x556f1830",t.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"}]}},57142:(e,t,r)=>{"use strict";
5781Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsResolver=l;let n=r(77362),i=r(27083),a=r(1690),s=r(95847),o=r(527);async function l(e,t){let{blockNumber:r,blockTag:l,name:c}=t,{chain:u}=e,d=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!u)throw Error("client chain not configured. universalResolverAddress is required.");return(0,n.getChainContractAddress)({blockNumber:r,chain:u,contract:"ensUniversalResolver"})})(),h=u?.ensTlds;if(h&&!h.some(e=>c.endsWith(e)))throw Error(`${c} is not a valid ENS TLD (${h?.join(", ")}) for chain "${u.name}" (id: ${u.id}).`);let[p]=await (0,s.getAction)(e,o.readContract,"readContract")({address:d,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,i.toHex)((0,a.packetToBytes)(c))],blockNumber:r,blockTag:l});return p}},57150:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendTransactionSync=E;let n=r(83562),i=r(85926),a=r(45226),s=r(44789),o=r(32036),l=r(81557),c=r(26504),u=r(5449),d=r(48674),h=r(53520),p=r(95847),f=r(6724),m=r(61609),g=r(80517),y=r(6751),b=r(84593),w=r(29018),v=new f.LruMap(128);async function E(e,t){let r,{account:f=e.account,assertChainId:E=!0,chain:C=e.chain,accessList:A,authorizationList:x,blobs:I,data:S,dataSuffix:T="string"==typeof e.dataSuffix?e.dataSuffix:e.dataSuffix?.value,gas:P,gasPrice:O,maxFeePerBlobGas:_,maxFeePerGas:N,maxPriorityFeePerGas:k,nonce:R,pollingInterval:M,throwOnReceiptRevert:B,type:j,value:U,...$}=t,L=t.timeout??Math.max((C?.blockTime??0)*3,5e3);if(void 0===f)throw new i.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransactionSync"});let D=f?(0,n.parseAccount)(f):null;try{(0,m.assertRequest)(t);let n=await (async()=>t.to?t.to:null!==t.to&&x&&x.length>0?await (0,o.recoverAuthorizationAddress)({authorization:x[0]}).catch(()=>{throw new a.BaseError("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if(D?.type==="json-rpc"||null===D){let t;null!==C&&(t=await (0,p.getAction)(e,g.getChainId,"getChainId")({}),E&&(0,l.assertCurrentChain)({currentChainId:t,chain:C}));let r=e.chain?.formatters?.transactionRequest?.format,i=(r||h.formatTransactionRequest)({...(0,d.extract)($,{format:r}),accessList:A,account:D,authorizationList:x,blobs:I,chainId:t,data:T?(0,c.concat)([S??"0x",T]):S,gas:P,gasPrice:O,maxFeePerBlobGas:_,maxFeePerGas:N,maxPriorityFeePerGas:k,nonce:R,to:n,type:j,value:U},"sendTransaction"),a=v.get(e.uid),o=a?"wallet_sendTransaction":"eth_sendTransaction",u=await (async()=>{try{return await e.request({method:o,params:[i]},{retryCount:0})}catch(t){if(!1===a)throw t;if("InvalidInputRpcError"===t.name||"InvalidParamsRpcError"===t.name||"MethodNotFoundRpcError"===t.name||"MethodNotSupportedRpcError"===t.name)return await e.request({method:"wallet_sendTransaction",params:[i]},{retryCount:0}).then(t=>(v.set(e.uid,!0),t)).catch(r=>{if("MethodNotFoundRpcError"===r.name||"MethodNotSupportedRpcError"===r.name)throw v.set(e.uid,!1),t;throw r});throw t}})(),f=await (0,p.getAction)(e,y.waitForTransactionReceipt,"waitForTransactionReceipt")({checkReplacement:!1,hash:u,pollingInterval:M,timeout:L});if(B&&"reverted"===f.status)throw new s.TransactionReceiptRevertedError({receipt:f});return f}if(D?.type==="local"){if(D.nonceManager&&void 0===R){let t=$.chainId,n=await (async()=>"number"==typeof t?t:C?C.id:(0,p.getAction)(e,g.getChainId,"getChainId")({}))();r={address:D.address,chainId:n}}let i=await (0,p.getAction)(e,b.prepareTransactionRequest,"prepareTransactionRequest")({account:D,accessList:A,authorizationList:x,blobs:I,chain:C,data:T?(0,c.concat)([S??"0x",T]):S,gas:P,gasPrice:O,maxFeePerBlobGas:_,maxFeePerGas:N,maxPriorityFeePerGas:k,nonce:R,nonceManager:D.nonceManager,parameters:[...b.defaultParameters,"sidecars"],type:j,value:U,...$,to:n}),a=C?.serializers?.transaction,s=await D.signTransaction(i,{serializer:a});return await (0,p.getAction)(e,w.sendRawTransactionSync,"sendRawTransactionSync")({serializedTransaction:s,throwOnReceiptRevert:B,timeout:t.timeout})}if(D?.type==="smart")throw new i.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new i.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransactionSync",type:D?.type})}catch(e){if(e instanceof i.AccountTypeNotSupportedError)throw e;throw!r||e instanceof s.TransactionReceiptRevertedError||D?.nonceManager?.reset(r),(0,u.getTransactionError)(e,{...t,account:D,chain:t.chain||void 0})}}},57181:(e,t,r)=>{"use strict";
5781Object.defineProperty(t,"__esModule",{value:!0}),t.getAddresses=i;let n=r(24998);async function i(e){return e.account?.type==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(e=>(0,n.checksumAddress)(e))}},57191:(e,t)=>{"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),t.uid=function(e=11){if(!r||n+e>512){r="",n=0;for(let e=0;e<256;e++)r+=(256+256*Math.random()|0).toString(16).substring(1)}return r.substring(n,n+++e)};let n=256},57217:(e,t,r)=>{"use strict";r.d(t,{k:()=>o});var n=r(52335),i=r(53032);function a(e){try{return new URL(e)}catch{return null}}let s={ton:["ton_sendMessage","ton_signData"],solana:["solana_signMessage","solana_signTransaction","solana_requestAccounts","solana_getAccounts","solana_signAllTransactions","solana_signAndSendTransaction"],eip155:["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","wallet_getCallsStatus","wallet_showCallsStatus","wallet_sendCalls","wallet_getCapabilities","wallet_grantPermissions","wallet_revokePermissions","wallet_getAssets"],bip122:["sendTransfer","signMessage","signPsbt","getAccountAddresses"],tron:["tron_signMessage","tron_signTransaction"]},o={RPC_ERROR_CODE:{USER_REJECTED:5e3,USER_REJECTED_METHODS:5002},getMethodsByChainNamespace:e=>s[e]||[],createDefaultNamespace(e){return{methods:this.getMethodsByChainNamespace(e),events:["accountsChanged","chainChanged"],chains:[],rpcMap:{}}},applyNamespaceOverrides(e,t){if(!t)return{...e};let r={...e},n=new Set;if(t.methods&&Object.keys(t.methods).forEach(e=>n.add(e)),t.chains&&Object.keys(t.chains).forEach(e=>n.add(e)),t.events&&Object.keys(t.events).forEach(e=>n.add(e)),t.rpcMap&&Object.keys(t.rpcMap).forEach(e=>{let[t]=e.split(":");t&&n.add(t)}),n.forEach(e=>{r[e]||(r[e]=this.createDefaultNamespace(e))}),t.methods&&Object.entries(t.methods).forEach(([e,t])=>{r[e]&&(r[e].methods=t)}),t.chains&&Object.entries(t.chains).forEach(([e,t])=>{r[e]&&(r[e].chains=t)}),t.events&&Object.entries(t.events).forEach(([e,t])=>{r[e]&&(r[e].events=t)}),t.rpcMap){let e=new Set;Object.entries(t.rpcMap).forEach(([t,n])=>{let[i,a]=t.split(":");i&&a&&r[i]&&(r[i].rpcMap||(r[i].rpcMap={}),e.has(i)||(r[i].rpcMap={},e.add(i)),r[i].rpcMap[a]=n)})}return r},createNamespaces(e,t){let r=e.reduce((e,t)=>{let{id:r,chainNamespace:n,rpcUrls:i}=t,a=i.default.http[0];e[n]||(e[n]=this.createDefaultNamespace(n));let s=`${n}:${r}`,o=e[n];switch(o.chains.push(s),s){case"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":o.chains.push("solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ");break;case"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1":o.chains.push("solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K")}return o?.rpcMap&&a&&(o.rpcMap[r]=a),e},{});return this.applyNamespaceOverrides(r,t)},resolveReownName:async e=>{let t=await i.f.resolveName(e),r=t?.addresses?Object.values(t.addresses):[];return r[0]?.address||!1},getChainsFromNamespaces:(e={})=>Object.values(e).flatMap(e=>Array.from(new Set([...e.chains||[],...e.accounts.map(e=>{let[t,r]=e.split(":");return`${t}:${r}`})]))),isSessionEventData:e=>"object"==typeof e&&null!==e&&"id"in e&&"topic"in e&&"params"in e&&"object"==typeof e.params&&null!==e.params&&"chainId"in e.params&&"event"in e.params&&"object"==typeof e.params.event&&null!==e.params.event,isUserRejectedRequestError(e){try{if("object"==typeof e&&null!==e){let t="number"==typeof e.code,r=t&&e.code===o.RPC_ERROR_CODE.USER_REJECTED_METHODS,n=t&&e.code===o.RPC_ERROR_CODE.USER_REJECTED;return r||n}return!1}catch{return!1}},isOriginAllowed(e,t,r){let n=[...t,...r];if(0===t.length)return!0;let i=a(e);if(!i)return n.some(t=>!t.includes("*")&&t===e);if("localhost"===i.hostname||"127.0.0.1"===i.hostname)return!0;for(let t of n)if(t.includes("*")){if(function(e,t,r){let n,i,a=r,s=a.indexOf("://");-1!==s&&(n=a.slice(0,s),a=a.slice(s+3));let o=a.indexOf("/");-1!==o&&(a=a.slice(0,o));let l=a,c=l.lastIndexOf(":");-1!==c&&(i=l.slice(c+1),l=l.slice(0,c));let u=l.split(".");for(let e of u)if(e.includes("*")&&"*"!==e)return!1;let d=e.protocol.replace(/:$/u,"");if(n&&n!==d||void 0!==i&&"*"!==i&&i!==e.port)return!1;let h=function(e){let t=e.indexOf("://");if(-1===t)return null;let r=e.slice(0,t),n=t+3,i=e.indexOf("/",n);-1===i&&(i=e.length);let a=e.slice(n,i),s=a.lastIndexOf(":");return -1===s?{scheme:r,host:a}:{scheme:r,host:a.slice(0,s),port:a.slice(s+1)}}(t),p=(h?h.host:e.hostname).split(".");if(u.length!==p.length)return!1;for(let e=u.length-1;e>=0;e-=1){let t=u[e],r=p[e];if("*"!==t&&t!==r)return!1}return!0}(i,e,t))return!0}else if(function(e,t){if(t.includes("://")){let r=a(t);return!!r&&r.origin===e}let{host:r,port:n}=function(e){let t=e.split("/"),r=t.length>0&&void 0!==t[0]?t[0]:"",n=r.lastIndexOf(":");return -1===n?{host:r}:{host:r.slice(0,n),port:r.slice(n+1)}}(t),i=e.indexOf("://");if(-1!==i){let t=i+3,a=e.indexOf("/",t);-1===a&&(a=e.length);let s=e.slice(t,a);return void 0!==n?`${r}:${n}`===s:r===s.split(":")[0]}let s=a(e);return!!s&&(void 0!==n?r===s.hostname&&n===(s.port||void 0):r===s.hostname)}(e,t))return!0;return!1},listenWcProvider({universalProvider:e,namespace:t,onConnect:r,onDisconnect:i,onAccountsChanged:a,onChainChanged:s,onDisplayUri:l}){r&&e.on("connect",()=>{r(o.getWalletConnectAccounts(e,t))}),i&&e.on("disconnect",()=>{i()}),a&&e.on("accountsChanged",r=>{try{let i=e.session?.namespaces?.[t]?.accounts||[],s=e.rpcProviders?.[t]?.getDefaultChain(),o=r.map(e=>{let r=i.find(r=>r.includes(`${t}:${s}:${e}`));if(!r)return;let{chainId:a,chainNamespace:o}=n.C.parseCaipAddress(r);return{address:e,chainId:a,chainNamespace:o}}).filter(e=>void 0!==e);o.length>0&&a(o)}catch(e){console.warn("Failed to parse accounts for namespace on accountsChanged event",t,r,e)}}),s&&e.on("chainChanged",e=>{s(e)}),l&&e.on("display_uri",e=>{l(e)})},getWalletConnectAccounts(e,t){let r=new Set,i=e?.session?.namespaces?.[t]?.accounts?.map(e=>n.C.parseCaipAddress(e)).filter(({address:e})=>!r.has(e.toLowerCase())&&(r.add(e.toLowerCase()),!0));return i&&i.length>0?i:[]}}},57300:(e,t,r)=>{"use strict";
5781Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidTypeError=t.InvalidArrayError=t.LengthMismatchError=t.BytesSizeMismatchError=t.ArrayLengthMismatchError=t.ZeroDataError=t.DataSizeTooSmallError=void 0,t.decode=function(e,t,r={}){let{as:n="Array",checksumAddress:i=!1}=r,s="string"==typeof t?a.fromHex(t):t,u=c.create(s);if(0===a.size(s)&&e.length>0)throw new p;if(a.size(s)&&32>a.size(s))throw new h({data:"string"==typeof t?t:o.fromBytes(t),parameters:e,size:a.size(s)});let d=0,f="Array"===n?[]:{};for(let t=0;t<e.length;++t){let r=e[t];u.setPosition(d);let[a,s]=l.decodeParameter(u,r,{checksumAddress:i,staticPosition:0});d+=s,"Array"===n?f.push(a):f[r.name??t]=a}return f},t.encode=function(e,t,r){let{checksumAddress:n=!1}=r??{};if(e.length!==t.length)throw new g({expectedLength:e.length,givenLength:t.length});let i=l.prepareParameters({checksumAddress:n,parameters:e,values:t}),a=l.encode(i);return 0===a.length?"0x":a},t.encodePacked=d,t.format=function(e){return n.formatAbiParameters(e)},t.from=function(e){return Array.isArray(e)&&"string"==typeof e[0]||"string"==typeof e?n.parseAbiParameters(e):e};let n=r(65222),i=r(92898),a=r(31837),s=r(53937),o=r(70259),l=r(82238),c=r(1682),u=r(3063);function d(e,t){if(e.length!==t.length)throw new g({expectedLength:e.length,givenLength:t.length});let r=[];for(let n=0;n<e.length;n++){let i=e[n],a=t[n];r.push(d.encode(i,a))}return o.concat(...r)}(d||(t.encodePacked=d={})).encode=function e(t,r,n=!1){if("address"===t)return i.assert(r),o.padLeft(r.toLowerCase(),32*!!n);if("string"===t)return o.fromString(r);if("bytes"===t)return r;if("bool"===t)return o.padLeft(o.fromBoolean(r),n?32:1);let a=t.match(u.integerRegex);if(a){let[e,t,i="256"]=a,s=Number.parseInt(i,10)/8;return o.fromNumber(r,{size:n?32:s,signed:"int"===t})}let s=t.match(u.bytesRegex);if(s){let[e,t]=s;if(Number.parseInt(t,10)!==(r.length-2)/2)throw new m({expectedSize:Number.parseInt(t,10),value:r});return o.padRight(r,32*!!n)}let l=t.match(u.arrayRegex);if(l&&Array.isArray(r)){let[t,n]=l,i=[];for(let t=0;t<r.length;t++)i.push(e(n,r[t],!0));return 0===i.length?"0x":o.concat(...i)}throw new b(t)};class h extends s.BaseError{constructor({data:e,parameters:t,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${n.formatAbiParameters(t)})`,`Data: ${e} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}t.DataSizeTooSmallError=h;class p extends s.BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}t.ZeroDataError=p;class f extends s.BaseError{constructor({expectedLength:e,givenLength:t,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${e}\`. Given: \`${t}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}t.ArrayLengthMismatchError=f;class m extends s.BaseError{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${o.size(t)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}t.BytesSizeMismatchError=m;class g extends s.BaseError{constructor({expectedLength:e,givenLength:t}){super(`ABI encoding parameters/values length mismatch. 5782Expected length (parameters): ${e} 5783Given length (values): ${t}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}t.LengthMismatchError=g;class y extends s.BaseError{constructor(e){super(`Value \`${e}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}t.InvalidArrayError=y;class b extends s.BaseError{constructor(e){super(`Type \`${e}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}t.InvalidTypeError=b},57568:(e,t,r)=>{"use strict";
5783Object.defineProperty(t,"__esModule",{value:!0}),t.SHA512_IV=t.SHA384_IV=t.SHA224_IV=t.SHA256_IV=t.HashMD=void 0,t.setBigUint64=i,t.Chi=function(e,t,r){return e&t^~e&r},t.Maj=function(e,t,r){return e&t^e&r^t&r};let n=r(92565);function i(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),a=BigInt(0xffffffff),s=Number(r>>i&a),o=Number(r&a),l=4*!!n,c=4*!n;e.setUint32(t+l,s,n),e.setUint32(t+c,o,n)}class a extends n.Hash{constructor(e,t,r,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=i,this.buffer=new Uint8Array(e),this.view=(0,n.createView)(this.buffer)}update(e){(0,n.aexists)(this),e=(0,n.toBytes)(e),(0,n.abytes)(e);let{view:t,buffer:r,blockLen:i}=this,a=e.length;for(let s=0;s<a;){let o=Math.min(i-this.pos,a-s);if(o===i){let t=(0,n.createView)(e);for(;i<=a-s;s+=i)this.process(t,s);continue}r.set(e.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===i&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.aexists)(this),(0,n.aoutput)(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:a,isLE:s}=this,{pos:o}=this;t[o++]=128,(0,n.clean)(this.buffer.subarray(o)),this.padOffset>a-o&&(this.process(r,0),o=0);for(let e=o;e<a;e++)t[e]=0;i(r,a-8,BigInt(8*this.length),s),this.process(r,0);let l=(0,n.createView)(e),c=this.outputLen;if(c%4)throw Error("_sha2: outputLen should be aligned to 32bit");let u=c/4,d=this.get();if(u>d.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<u;e++)l.setUint32(4*e,d[e],s)}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:n,finished:i,destroyed:a,pos:s}=this;return e.destroyed=a,e.finished=i,e.length=n,e.pos=s,n%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}t.HashMD=a,t.SHA256_IV=Uint32Array.from([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),t.SHA224_IV=Uint32Array.from([0xc1059ed8,0x367cd507,0x3070dd17,0xf70e5939,0xffc00b31,0x68581511,0x64f98fa7,0xbefa4fa4]),t.SHA384_IV=Uint32Array.from([0xcbbb9d5d,0xc1059ed8,0x629a292a,0x367cd507,0x9159015a,0x3070dd17,0x152fecd8,0xf70e5939,0x67332667,0xffc00b31,0x8eb44a87,0x68581511,0xdb0c2e0d,0x64f98fa7,0x47b5481d,0xbefa4fa4]),t.SHA512_IV=Uint32Array.from([0x6a09e667,0xf3bcc908,0xbb67ae85,0x84caa73b,0x3c6ef372,0xfe94f82b,0xa54ff53a,0x5f1d36f1,0x510e527f,0xade682d1,0x9b05688c,0x2b3e6c1f,0x1f83d9ab,0xfb41bd6b,0x5be0cd19,0x137e2179])},57660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.localBatchGatewayUrl=void 0,t.localBatchGatewayRequest=l;let n=r(91472),i=r(29414),a=r(22866),s=r(22013),o=r(20155);async function l(e){let{data:r,ccipRequest:c}=e,{args:[u]}=(0,a.decodeFunctionData)({abi:n.batchGatewayAbi,data:r}),d=[],h=[];return await Promise.all(u.map(async(e,r)=>{try{h[r]=e.urls.includes(t.localBatchGatewayUrl)?await l({data:e.data,ccipRequest:c}):await c(e),d[r]=!1}catch(e){var a;d[r]=!0,h[r]="HttpRequestError"===(a=e).name&&a.status?(0,s.encodeErrorResult)({abi:n.batchGatewayAbi,errorName:"HttpError",args:[a.status,a.shortMessage]}):(0,s.encodeErrorResult)({abi:[i.solidityError],errorName:"Error",args:["shortMessage"in a?a.shortMessage:a.message]})}})),(0,o.encodeFunctionResult)({abi:n.batchGatewayAbi,functionName:"query",result:[d,h]})}t.localBatchGatewayUrl="x-batch-gateway:true"},57873:(e,t,r)=>{"use strict";r.d(t,{o:()=>i});var n=r(55036);let i={WC_NAME_SUFFIX:".reown.id",WC_NAME_SUFFIX_LEGACY:".wcn.id",BLOCKCHAIN_API_RPC_URL:"https://rpc.walletconnect.org",PULSE_API_URL:"https://pulse.walletconnect.org",W3M_API_URL:"https://api.web3modal.org",CONNECTOR_ID:{WALLET_CONNECT:"walletConnect",INJECTED:"injected",WALLET_STANDARD:"announced",COINBASE:"coinbaseWallet",COINBASE_SDK:"coinbaseWalletSDK",BASE_ACCOUNT:"baseAccount",SAFE:"safe",LEDGER:"ledger",OKX:"okx",EIP6963:"eip6963",AUTH:"AUTH"},CONNECTOR_NAMES:{AUTH:"Auth"},AUTH_CONNECTOR_SUPPORTED_CHAINS:["eip155","solana"],LIMITS:{PENDING_TRANSACTIONS:99},CHAIN:{EVM:"eip155",SOLANA:"solana",POLKADOT:"polkadot",BITCOIN:"bip122",TON:"ton",TRON:"tron"}
5783,CHAIN_NAME_MAP:{eip155:"EVM Networks",solana:"Solana",polkadot:"Polkadot",bip122:"Bitcoin",cosmos:"Cosmos",sui:"Sui",stacks:"Stacks",ton:"TON",tron:"TRON"},ADAPTER_TYPES:{BITCOIN:"bitcoin",SOLANA:"solana",WAGMI:"wagmi",ETHERS:"ethers",ETHERS5:"ethers5",TON:"ton",TRON:"tron"},USDT_CONTRACT_ADDRESSES:["0xdac17f958d2ee523a2206206994597c13d831ec7","0xc2132d05d31c914a87c6611c10748aeb04b58e8f","0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7","0x919C1c267BC06a7039e03fcc2eF738525769109c","0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e","0x55d398326f99059fF775485246999027B3197955","0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9"],SOLANA_SPL_TOKEN_ADDRESSES:{SOL:"So11111111111111111111111111111111111111112"},NATIVE_IMAGE_IDS_BY_NAMESPACE:{eip155:"ba0ba0cd-17c6-4806-ad93-f9d174f17900",solana:"3e8119e5-2a6f-4818-c50c-1937011d5900",bip122:"0b4838db-0161-4ffe-022d-532bf03dba00"},TOKEN_SYMBOLS_BY_ADDRESS:{"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48":"USDC","0x833589fcd6edb6e08f4c7c32d4f71b54bda02913":"USDC","0x0b2c639c533813f4aa9d7837caf62653d097ff85":"USDC","0xaf88d065e77c8cc2239327c5edb3a432268e5831":"USDC","0x3c499c542cef5e3811e1192ce70d8cc03d5c3359":"USDC","0x2791bca1f2de4661ed88a30c99a7a9449aa84174":"USDC",EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v:"USDC","0xdac17f958d2ee523a2206206994597c13d831ec7":"USDT","0x94b008aa00579c1307b0ef2c499ad98a8ce58e58":"USDT","0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9":"USDT","0xc2132d05d31c914a87c6611c10748aeb04b58e8f":"USDT",Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB:"USDT"},HTTP_STATUS_CODES:{SERVER_ERROR:500,TOO_MANY_REQUESTS:429,SERVICE_UNAVAILABLE:503,FORBIDDEN:403},UNSUPPORTED_NETWORK_NAME:"Unknown Network",SECURE_SITE_SDK_ORIGIN:(void 0!==n&&void 0!==n.env?n.env.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",REMOTE_FEATURES_ALERTS:{MULTI_WALLET_NOT_ENABLED:{DEFAULT:{displayMessage:"Multi-Wallet Not Enabled",debugMessage:"Multi-wallet support is not enabled. Please enable it in your AppKit configuration at cloud.reown.com."},CONNECTIONS_HOOK:{displayMessage:"Multi-Wallet Not Enabled",debugMessage:"Multi-wallet support is not enabled. Please enable it in your AppKit configuration at cloud.reown.com to use the useAppKitConnections hook."},CONNECTION_HOOK:{displayMessage:"Multi-Wallet Not Enabled",debugMessage:"Multi-wallet support is not enabled. Please enable it in your AppKit configuration at cloud.reown.com to use the useAppKitConnection hook."}},HEADLESS_NOT_ENABLED:{DEFAULT:{displayMessage:"",debugMessage:"Headless support is not enabled. Please enable it with the features.headless option in the AppKit configuration and make sure your current plan supports it."}}},IS_DEVELOPMENT:void 0!==n&&!1,DEFAULT_ALLOWED_ANCESTORS:["http://localhost:*","https://localhost:*","http://127.0.0.1:*","https://127.0.0.1:*","https://*.pages.dev","https://*.vercel.app","https://*.ngrok-free.app","https://secure-mobile.walletconnect.com","https://secure-mobile.walletconnect.org"],METMASK_CONNECTOR_NAME:"MetaMask",TRUST_CONNECTOR_NAME:"Trust Wallet",SOLFLARE_CONNECTOR_NAME:"Solflare",PHANTOM_CONNECTOR_NAME:"Phantom",COIN98_CONNECTOR_NAME:"Coin98",MAGIC_EDEN_CONNECTOR_NAME:"Magic Eden",BACKPACK_CONNECTOR_NAME:"Backpack",BITGET_CONNECTOR_NAME:"Bitget Wallet",FRONTIER_CONNECTOR_NAME:"Frontier",XVERSE_CONNECTOR_NAME:"Xverse Wallet",LEATHER_CONNECTOR_NAME:"Leather",OKX_CONNECTOR_NAME:"OKX Wallet",BINANCE_CONNECTOR_NAME:"Binance Wallet",EIP155:"eip155",ADD_CHAIN_METHOD:"wallet_addEthereumChain",EIP6963_ANNOUNCE_EVENT:"eip6963:announceProvider",EIP6963_REQUEST_EVENT:"eip6963:requestProvider",CONNECTOR_RDNS_MAP:{coinbaseWallet:"com.coinbase.wallet",coinbaseWalletSDK:"com.coinbase.wallet"},CONNECTOR_TYPE_EXTERNAL:"EXTERNAL",CONNECTOR_TYPE_WALLET_CONNECT:"WALLET_CONNECT",CONNECTOR_TYPE_INJECTED:"INJECTED",CONNECTOR_TYPE_ANNOUNCED:"ANNOUNCED",CONNECTOR_TYPE_AUTH:"AUTH",CONNECTOR_TYPE_MULTI_CHAIN:"MULTI_CHAIN",CONNECTOR_TYPE_W3M_AUTH:"AUTH"}},57942:(e,t,r)=>{"use strict";r.d(t,{T:()=>n});let n={URLS:{FAQ:"https://walletconnect.com/faq"}}},58089:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiItemWithArgs=function({abiItem:e,args:t,includeFunctionName:r=!0,includeName:i=!1}
5783){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]?(0,n.stringify)(t[r]):t[r]}`).join(", ")})`};let n=r(68508)},58260:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=s;let n=r(95847),i=r(52548),a=r(83712);async function s(e,t){let{address:r,factory:s,factoryData:o,signature:l,message:c,primaryType:u,types:d,domain:h,...p}=t,f=(0,i.hashTypedData)({message:c,primaryType:u,types:d,domain:h});return(0,n.getAction)(e,a.verifyHash,"verifyHash")({address:r,factory:s,factoryData:o,hash:f,signature:l,...p})}},58856:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBatchScheduler=function({fn:e,id:t,shouldSplitBatch:r,wait:a=0,sort:s}){let o=async()=>{let t=c();l();let r=t.map(({args:e})=>e);0!==r.length&&e(r).then(e=>{s&&Array.isArray(e)&&e.sort(s);for(let r=0;r<t.length;r++){let{resolve:n}=t[r];n?.([e[r],e])}}).catch(e=>{for(let r=0;r<t.length;r++){let{reject:n}=t[r];n?.(e)}})},l=()=>i.delete(t),c=()=>i.get(t)||[],u=e=>i.set(t,[...c(),e]);return{flush:l,async schedule(e){let{promise:t,resolve:i,reject:s}=(0,n.withResolvers)();return(r?.([...c().map(({args:e})=>e),e])&&o(),c().length>0)?u({args:e,resolve:i,reject:s}):(u({args:e,resolve:i,reject:s}),setTimeout(o,a)),t}}};let n=r(89560),i=new Map},58886:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Safe=void 0;let a=r(68799),s=r(16493),o=r(25609),l=r(34717),c=r(55082),u=i(r(36414));class d{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(),n=(0,a.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]}),i={call:l.RPC_CALLS.eth_call,params:[{to:r.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(o.Methods.rpcCall,i)).data.slice(0,10).toLowerCase()===s.MAGIC_VALUE}catch(e){return!1}}async check1271SignatureBytes(e,t="0x"){let r=await this.getInfo(),n=(0,a.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]}),i={call:l.RPC_CALLS.eth_call,params:[{to:r.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(o.Methods.rpcCall,i)).data.slice(0,10).toLowerCase()===s.MAGIC_VALUE_BYTES}catch(e){return!1}}calculateMessageHash(e){return(0,a.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),n=Object.keys(e.types).filter(e=>t.every(t=>t.every(({type:t})=>t.replace("[","").replace("]","")!==e)));if(0===n.length||n.length>1)throw Error("Please specify primaryType");r=n[0]}return(0,a.hashTypedData)({message:e.message,domain:{...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,c.isObjectEIP712TypedData)(e)&&(r=async()=>{let r=this.calculateTypedMessageHash(e);return await this.isMessageHashSigned(r,t)}),r)return await r();throw Error("Invalid message type")}async isMessageHashSigned(e,t="0x"){for(let r of[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)])if(await r(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.Safe=d,n([(0,u.default)()],d.prototype,"requestAddressBook",null)},59104:(e,t,r)=>{"use strict";
5783Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureErc8010=void 0,t.SignatureErc8010=r(19559)},59132:(e,t,r)=>{"use strict";r.d(t,{M:()=>s});var n=r(97085),i=r(41906),a=r(56595);function s(e){return{address:(0,n.b)(e.address),nonce:(0,a.Ab)(null!=e.nonce?e.nonce:0),chainId:(0,a.Ab)(null!=e.chainId?e.chainId:0),signature:i.t.from(e.signature)}}},59201:e=>{"use strict";e.exports=function(e){for(var t=[],r=e.length,n=0;n<r;n++){var i=e.charCodeAt(n);if(i>=55296&&i<=56319&&r>n+1){var a=e.charCodeAt(n+1);a>=56320&&a<=57343&&(i=(i-55296)*1024+a-56320+65536,n+=1)}if(i<128){t.push(i);continue}if(i<2048){t.push(i>>6|192),t.push(63&i|128);continue}if(i<55296||i>=57344&&i<65536){t.push(i>>12|224),t.push(i>>6&63|128),t.push(63&i|128);continue}if(i>=65536&&i<=1114111){t.push(i>>18|240),t.push(i>>12&63|128),t.push(i>>6&63|128),t.push(63&i|128);continue}t.push(239,191,189)}return new Uint8Array(t).buffer}},59539:(e,t,r)=>{"use strict";r.d(t,{L:()=>o});var n=r(57873),i=r(82376),a=r(32590),s=r(26274);let o={onSwitchNetwork({network:e,ignoreSwitchConfirmation:t=!1}){let r=i.W.state.activeCaipNetwork,o=i.W.state.activeChain,l=s.I.state.data;if(e.id===r?.id)return;let c=!!i.W.getAccountData(o)?.address,u=!!i.W.getAccountData(e.chainNamespace)?.address,d=e.chainNamespace!==o,h=a.a.getConnectorId(o)===n.o.CONNECTOR_ID.AUTH,p=n.o.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(t=>t===e.chainNamespace);t||h&&p?s.I.push("SwitchNetwork",{...l,network:e}):c&&d&&!u?s.I.push("SwitchActiveChain",{switchToChain:e.chainNamespace,navigateTo:"Connect",navigateWithReplace:!0,network:e}):s.I.push("SwitchNetwork",{...l,network:e})}}},59570:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbi=function(e){let t=[],r=e.length;for(let i=0;i<r;i++){let r=e[i],a=(0,n.formatAbiItem)(r);t.push(a)}return t};let n=r(67017)},59865:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHex=t.isBytes=t.concatHex=t.concatBytes=t.concat=t.getChainContractAddress=t.filterChains=t.extractChain=t.defineChain=t.assertCurrentChain=t.ccipReadTunnel=t.offchainLookupSignature=t.offchainLookupAbiItem=t.offchainLookup=t.ccipFetch=t.ccipRequest=t.buildRequest=t.verifyAuthorization=t.serializeAuthorizationList=t.recoverAuthorizationAddress=t.hashAuthorization=t.isAddressEqual=t.isAddress=t.getCreateAddress=t.getCreate2Address=t.getContractAddress=t.getAddress=t.parseEventLogs=t.getAbiItem=t.formatAbiItemWithArgs=t.formatAbiParams=t.formatAbiItem=t.encodePacked=t.encodeFunctionResult=t.encodeFunctionData=t.encodeEventTopics=t.encodeErrorResult=t.encodeDeployData=t.encodeAbiParameters=t.decodeFunctionResult=t.decodeFunctionData=t.decodeEventLog=t.decodeErrorResult=t.decodeAbiParameters=t.publicKeyToAddress=t.parseAccount=t.parseAbiParameters=t.parseAbiParameter=t.parseAbiItem=t.parseAbi=void 0,t.isHash=t.getAction=t.formatTransactionRequest=t.defineTransactionRequest=t.defineTransactionReceipt=t.transactionType=t.formatTransaction=t.defineTransaction=t.formatLog=t.defineFormatter=t.extract=t.formatBlock=t.defineBlock=t.getTransactionError=t.getNodeError=t.containsNodeError=t.getEstimateGasError=t.getContractError=t.getCallError=t.toRlp=t.toHex=t.stringToHex=t.numberToHex=t.bytesToHex=t.boolToHex=t.toBytes=t.stringToBytes=t.numberToBytes=t.hexToBytes=t.boolToBytes=t.fromRlp=t.hexToString=t.hexToNumber=t.hexToBool=t.hexToBigInt=t.fromHex=t.fromBytes=t.bytesToString=t.bytesToNumber=t.bytesToBool=t.bytesToBigint=t.bytesToBigInt=t.trim=t.sliceHex=t.sliceBytes=t.slice=t.size=t.padHex=t.padBytes=t.pad=void 0,t.serializeTransaction=t.serializeAccessList=t.parseTransaction=t.getTransactionType=t.getSerializedTransactionType=t.assertTransactionLegacy=t.assertTransactionEIP2930=t.assertTransactionEIP1559=t.assertRequest=t.stringify=t.verifyTypedData=t.verifyMessage=t.verifyHash=t.serializeErc8010Signature=t.serializeErc6492Signature=t.recoverTypedDataAddress=t.recoverPublicKey=t.recoverMessageAddress=t.recoverAddress=t.parseErc8010Signature=t.parseErc6492Signature=t.isErc8010Signature=t.isErc6492Signature=t.hashTypedData=t.hashStruct=t.hashMessage=t.getWebSocketRpcClient=t.socketClientCache=t.getSocketRpcClient=t.getHttpRpcClient=t.rpc=t.getSocket=t.integerRegex=t.bytesRegex=t.arrayRegex=t.nonceManager=t.createNonceManager=t.getFunctionSignature=t.toFunctionSignature=t.getFunctionSelector=t.toFunctionSelector=t.toFunctionHash=t.getEventSignature=t.toEventSignature=t.getEventSelector=t.toEventSelector=t.toEventHash=t.sha256=t.ripemd160=t.keccak256=void 0,t.parseUnits=t.parseGwei=t.parseEther=t.formatUnits=t.formatGwei=t.formatEther=t.validateTypedData=t.serializeTypedData=void 0;var n=r(65222);Object.defineProperty(t,"parseAbi",{enumerable:!0,get:function(){return n.parseAbi}}),Object.defineProperty(t,"parseAbiItem",{enumerable:!0,get:function(){return n.parseAbiItem}}),Object.defineProperty(t,"parseAbiParameter",{enumerable:!0,get:function(){return n.parseAbiParameter}}),Object.defineProperty(t,"parseAbiParameters",{enumerable:!0,get:function(){return n.parseAbiParameters}});var i=r(83562);Object.defineProperty(t,"parseAccount",{enumerable:!0,get:function(){return i.parseAccount}});var a=r(79535);Object.defineProperty(t,"publicKeyToAddress",{enumerable:!0,get:function(){return a.publicKeyToAddress}});var s=r(29060);Object.defineProperty(t,"decodeAbiParameters",{enumerable:!0,get:function(){return s.decodeAbiParameters}});var o=r(51513);Object.defineProperty(t,"decodeErrorResult",{enumerable:!0,get:function(){return o.decodeErrorResult}});var l=r(44352);Object.defineProperty(t,"decodeEventLog",{enumerable:!0,get:function(){return l.decodeEventLog}});var c=r(22866);Object.defineProperty(t,"decodeFunctionData",{enumerable:!0,get:function(){return c.decodeFunctionData}});var u=r(72431);Object.defineProperty(t,"decodeFunctionResult",{enumerable:!0,get:function(){return u.decodeFunctionResult}});var d=r(66008);Object.defineProperty(t,"encodeAbiParameters",{enumerable:!0,get:function(){return d.encodeAbiParameters}});var h=r(11985);Object.defineProperty(t,"encodeDeployData",{enumerable:!0,get:function(){return h.encodeDeployData}});var p=r(22013);Object.defineProperty(t,"encodeErrorResult",{enumerable:!0,get:function(){return p.encodeErrorResult}});var f=r(61794);Object.defineProperty(t,"encodeEventTopics",{enumerable:!0,get:function(){return f.encodeEventTopics}});var m=r(25230);Object.defineProperty(t,"encodeFunctionData",{enumerable:!0,get:function(){return m.encodeFunctionData}});var g=r(20155);Object.defineProperty(t,"encodeFunctionResult",{enumerable:!0,get:function(){return g.encodeFunctionResult}});var y=r(61382);Object.defineProperty(t,"encodePacked",{enumerable:!0,get:function(){return y.encodePacked}});var b=r(71680);Object.defineProperty(t,"formatAbiItem",{enumerable:!0,get:function(){return b.formatAbiItem}}),Object.defineProperty(t,"formatAbiParams",{enumerable:!0,get:function(){return b.formatAbiParams}});var w=r(58089);Object.defineProperty(t,"formatAbiItemWithArgs",{enumerable:!0,get:function(){return w.formatAbiItemWithArgs}});var v=r(61569);Object.defineProperty(t,"getAbiItem",{enumerable:!0,get:function(){return v.getAbiItem}});var E=r(4466);Object.defineProperty(t,"parseEventLogs",{enumerable:!0,get:function(){return E.parseEventLogs}});var C=r(24998);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return C.getAddress}});var A=r(7924);Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return A.getContractAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return A.getCreate2Address}}),Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return A.getCreateAddress}});var x=r(63402);Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return x.isAddress}});var I=r(18978);Object.defineProperty(t,"isAddressEqual",{enumerable:!0,get:function(){return I.isAddressEqual}});var S=r(63058);Object.defineProperty(t,"hashAuthorization",{enumerable:!0,get:function(){return S.hashAuthorization}});var T=r(32036);Object.defineProperty(t,"recoverAuthorizationAddress",{enumerable:!0,get:function(){return T.recoverAuthorizationAddress}});var P=r(56694);Object.defineProperty(t,"serializeAuthorizationList",{enumerable:!0,get:function(){return P.serializeAuthorizationList}});var O=r(62917);Object.defineProperty(t,"verifyAuthorization",{enumerable:!0,get:function(){return O.verifyAuthorization}});var _=r(77898);Object.defineProperty(t,"buildRequest",{enumerable:!0,get:function(){return _.buildRequest}});var N=r(56724);Object.defineProperty(t,"ccipRequest",{enumerable:!0,get:function(){return N.ccipRequest}}),Object.defineProperty(t,"ccipFetch",{enumerable:!0,get:function(){return N.ccipRequest}}),Object.defineProperty(t,"offchainLookup",{enumerable:!0,get:function(){return N.offchainLookup}}),Object.defineProperty(t,"offchainLookupAbiItem",{enumerable:!0,get:function(){return N.offchainLookupAbiItem}}),Object.defineProperty(t,"offchainLookupSignature",{enumerable:!0,get:function(){return N.offchainLookupSignature}});var k=r(67122);Object.defineProperty(t,"ccipReadTunnel",{enumerable:!0,get:function(){return k.ccipReadTunnel}});var R=r(81557);Object.defineProperty(t,"assertCurrentChain",{enumerable:!0,get:function(){return R.assertCurrentChain}});var M=r(96923);Object.defineProperty(t,"defineChain",{enumerable:!0,get:function(){return M.defineChain}});var B=r(5075);Object.defineProperty(t,"extractChain",{enumerable:!0,get:function(){return B.extractChain}});var j=r(56485);Object.defineProperty(t,"filterChains",{enumerable:!0,get:function(){return j.filterChains}});var U=r(77362);Object.defineProperty(t,"getChainContractAddress",{enumerable:!0,get:function(){return U.getChainContractAddress}});var $=r(26504);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return $.concat}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return $.concatBytes}}),Object.defineProperty(t,"concatHex",{enumerable:!0,get:function(){return $.concatHex}});var L=r(93939);Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return L.isBytes}});var D=r(80217);Object.defineProperty(t,"isHex",{enumerable:!0,get:function(){return D.isHex}});var F=r(3669);Object.defineProperty(t,"pad",{enumerable:!0,get:function(){return F.pad}}),Object.defineProperty(t,"padBytes",{enumerable:!0,get:function(){return F.padBytes}}),Object.defineProperty(t,"padHex",{enumerable:!0,get:function(){return F.padHex}});var H=r(29813);Object.defineProperty(t,"size",{enumerable:!0,get:function(){return H.size}});var z=r(4906);Object.defineProperty(t,"slice",{enumerable:!0,get:function(){return z.slice}}),Object.defineProperty(t,"sliceBytes",{enumerable:!0,get:function(){return z.sliceBytes}}),Object.defineProperty(t,"sliceHex",{enumerable:!0,get:function(){return z.sliceHex}});var W=r(62704);Object.defineProperty(t,"trim",{enumerable:!0,get:function(){return W.trim}});var q=r(3562);Object.defineProperty(t,"bytesToBigInt",{enumerable:!0,get:function(){return q.bytesToBigInt}}),Object.defineProperty(t,"bytesToBigint",{enumerable:!0,get:function(){return q.bytesToBigInt}}),Object.defineProperty(t,"bytesToBool",{enumerable:!0,get:function(){return q.bytesToBool}}),Object.defineProperty(t,"bytesToNumber",{enumerable:!0,get:function(){return q.bytesToNumber}}),Object.defineProperty(t,"bytesToString",{enumerable:!0,get:function(){return q.bytesToString}}),Object.defineProperty(t,"fromBytes",{enumerable:!0,get:function(){return q.fromBytes}});var V=r(14972);Object.defineProperty(t,"fromHex",{enumerable:!0,get:function(){return V.fromHex}}),Object.defineProperty(t,"hexToBigInt",{enumerable:!0,get:function(){return V.hexToBigInt}}),Object.defineProperty(t,"hexToBool",{enumerable:!0,get:function(){return V.hexToBool}}),Object.defineProperty(t,"hexToNumber",{enumerable:!0,get:function(){return V.hexToNumber}}),Object.defineProperty(t,"hexToString",{enumerable:!0,get:function(){return V.hexToString}});var G=r(36603);Object.defineProperty(t,"fromRlp",{enumerable:!0,get:function(){return G.fromRlp}});var K=r(60037);Object.defineProperty(t,"boolToBytes",{enumerable:!0,get:function(){return K.boolToBytes}}),Object.defineProperty(t,"hexToBytes",{enumerable:!0,get:function(){return K.hexToBytes}}),Object.defineProperty(t,"numberToBytes",{enumerable:!0,get:function(){return K.numberToBytes}}),Object.defineProperty(t,"stringToBytes",{enumerable:!0,get:function(){return K.str
5783ingToBytes}}),Object.defineProperty(t,"toBytes",{enumerable:!0,get:function(){return K.toBytes}});var Z=r(27083);Object.defineProperty(t,"boolToHex",{enumerable:!0,get:function(){return Z.boolToHex}}),Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return Z.bytesToHex}}),Object.defineProperty(t,"numberToHex",{enumerable:!0,get:function(){return Z.numberToHex}}),Object.defineProperty(t,"stringToHex",{enumerable:!0,get:function(){return Z.stringToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return Z.toHex}});var J=r(36504);Object.defineProperty(t,"toRlp",{enumerable:!0,get:function(){return J.toRlp}});var Y=r(28455);Object.defineProperty(t,"getCallError",{enumerable:!0,get:function(){return Y.getCallError}});var Q=r(38297);Object.defineProperty(t,"getContractError",{enumerable:!0,get:function(){return Q.getContractError}});var X=r(62280);Object.defineProperty(t,"getEstimateGasError",{enumerable:!0,get:function(){return X.getEstimateGasError}});var ee=r(49259);Object.defineProperty(t,"containsNodeError",{enumerable:!0,get:function(){return ee.containsNodeError}}),Object.defineProperty(t,"getNodeError",{enumerable:!0,get:function(){return ee.getNodeError}});var et=r(5449);Object.defineProperty(t,"getTransactionError",{enumerable:!0,get:function(){return et.getTransactionError}});var er=r(12366);Object.defineProperty(t,"defineBlock",{enumerable:!0,get:function(){return er.defineBlock}}),Object.defineProperty(t,"formatBlock",{enumerable:!0,get:function(){return er.formatBlock}});var en=r(48674);Object.defineProperty(t,"extract",{enumerable:!0,get:function(){return en.extract}});var ei=r(87721);Object.defineProperty(t,"defineFormatter",{enumerable:!0,get:function(){return ei.defineFormatter}});var ea=r(10205);Object.defineProperty(t,"formatLog",{enumerable:!0,get:function(){return ea.formatLog}});var es=r(93771);Object.defineProperty(t,"defineTransaction",{enumerable:!0,get:function(){return es.defineTransaction}}),Object.defineProperty(t,"formatTransaction",{enumerable:!0,get:function(){return es.formatTransaction}}),Object.defineProperty(t,"transactionType",{enumerable:!0,get:function(){return es.transactionType}});var eo=r(63178);Object.defineProperty(t,"defineTransactionReceipt",{enumerable:!0,get:function(){return eo.defineTransactionReceipt}});var el=r(53520);Object.defineProperty(t,"defineTransactionRequest",{enumerable:!0,get:function(){return el.defineTransactionRequest}}),Object.defineProperty(t,"formatTransactionRequest",{enumerable:!0,get:function(){return el.formatTransactionRequest}});var ec=r(95847);Object.defineProperty(t,"getAction",{enumerable:!0,get:function(){return ec.getAction}});var eu=r(85244);Object.defineProperty(t,"isHash",{enumerable:!0,get:function(){return eu.isHash}});var ed=r(4319);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return ed.keccak256}});var eh=r(72636);Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return eh.ripemd160}});var ep=r(73023);Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return ep.sha256}});var ef=r(28939);Object.defineProperty(t,"toEventHash",{enumerable:!0,get:function(){return ef.toEventHash}});var em=r(55954);Object.defineProperty(t,"toEventSelector",{enumerable:!0,get:function(){return em.toEventSelector}}),Object.defineProperty(t,"getEventSelector",{enumerable:!0,get:function(){return em.toEventSelector}});var eg=r(72079);Object.defineProperty(t,"toEventSignature",{enumerable:!0,get:function(){return eg.toEventSignature}}),Object.defineProperty(t,"getEventSignature",{enumerable:!0,get:function(){return eg.toEventSignature}});var ey=r(21813);Object.defineProperty(t,"toFunctionHash",{enumerable:!0,get:function(){return ey.toFunctionHash}});var eb=r(16936);Object.defineProperty(t,"toFunctionSelector",{enumerable:!0,get:function(){return eb.toFunctionSelector}}),Object.defineProperty(t,"getFunctionSelector",{enumerable:!0,get:function(){return eb.toFunctionSelector}});var ew=r(17617);Object.defineProperty(t,"toFunctionSignature",{enumerable:!0,get:function(){return ew.toFunctionSignature}}),Object.defineProperty(t,"getFunctionSignature",{enumerable:!0,get:function(){return ew.toFunctionSignature}});var ev=r(37357);Object.defineProperty(t,"createNonceManager",{enumerable:!0,get:function(){return ev.createNonceManager}}),Object.defineProperty(t,"nonceManager",{enumerable:!0,get:function(){return ev.nonceManager}});var eE=r(46398);Object.defineProperty(t,"arrayRegex",{enumerable:!0,get:function(){return eE.arrayRegex}}),Object.defineProperty(t,"bytesRegex",{enumerable:!0,get:function(){return eE.bytesRegex}}),Object.defineProperty(t,"integerRegex",{enumerable:!0,get:function(){return eE.integerRegex}});var eC=r(64321);Object.defineProperty(t,"getSocket",{enumerable:!0,get:function(){return eC.getSocket}}),Object.defineProperty(t,"rpc",{enumerable:!0,get:function(){return eC.rpc}});var eA=r(11139);Object.defineProperty(t,"getHttpRpcClient",{enumerable:!0,get:function(){return eA.getHttpRpcClient}});var ex=r(92918);Object.defineProperty(t,"getSocketRpcClient",{enumerable:!0,get:function(){return ex.getSocketRpcClient}}),Object.defineProperty(t,"socketClientCache",{enumerable:!0,get:function(){return ex.socketClientCache}});var eI=r(45274);Object.defineProperty(t,"getWebSocketRpcClient",{enumerable:!0,get:function(){return eI.getWebSocketRpcClient}});var eS=r(39091);Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return eS.hashMessage}});var eT=r(52548);Object.defineProperty(t,"hashStruct",{enumerable:!0,get:function(){return eT.hashStruct}}),Object.defineProperty(t,"hashTypedData",{enumerable:!0,get:function(){return eT.hashTypedData}
5783});var eP=r(12949);Object.defineProperty(t,"isErc6492Signature",{enumerable:!0,get:function(){return eP.isErc6492Signature}});var eO=r(3797);Object.defineProperty(t,"isErc8010Signature",{enumerable:!0,get:function(){return eO.isErc8010Signature}});var e_=r(31650);Object.defineProperty(t,"parseErc6492Signature",{enumerable:!0,get:function(){return e_.parseErc6492Signature}});var eN=r(84462);Object.defineProperty(t,"parseErc8010Signature",{enumerable:!0,get:function(){return eN.parseErc8010Signature}});var ek=r(41636);Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return ek.recoverAddress}});var eR=r(3053);Object.defineProperty(t,"recoverMessageAddress",{enumerable:!0,get:function(){return eR.recoverMessageAddress}});var eM=r(19068);Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return eM.recoverPublicKey}});var eB=r(97236);Object.defineProperty(t,"recoverTypedDataAddress",{enumerable:!0,get:function(){return eB.recoverTypedDataAddress}});var ej=r(98787);Object.defineProperty(t,"serializeErc6492Signature",{enumerable:!0,get:function(){return ej.serializeErc6492Signature}});var eU=r(67003);Object.defineProperty(t,"serializeErc8010Signature",{enumerable:!0,get:function(){return eU.serializeErc8010Signature}});var e$=r(85021);Object.defineProperty(t,"verifyHash",{enumerable:!0,get:function(){return e$.verifyHash}});var eL=r(23704);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return eL.verifyMessage}});var eD=r(92723);Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return eD.verifyTypedData}});var eF=r(68508);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return eF.stringify}});var eH=r(61609);Object.defineProperty(t,"assertRequest",{enumerable:!0,get:function(){return eH.assertRequest}});var ez=r(27756);Object.defineProperty(t,"assertTransactionEIP1559",{enumerable:!0,get:function(){return ez.assertTransactionEIP1559}}),Object.defineProperty(t,"assertTransactionEIP2930",{enumerable:!0,get:function(){return ez.assertTransactionEIP2930}}),Object.defineProperty(t,"assertTransactionLegacy",{enumerable:!0,get:function(){return ez.assertTransactionLegacy}});var eW=r(73324);Object.defineProperty(t,"getSerializedTransactionType",{enumerable:!0,get:function(){return eW.getSerializedTransactionType}});var eq=r(75638);Object.defineProperty(t,"getTransactionType",{enumerable:!0,get:function(){return eq.getTransactionType}});var eV=r(77951);Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return eV.parseTransaction}});var eG=r(66498);Object.defineProperty(t,"serializeAccessList",{enumerable:!0,get:function(){return eG.serializeAccessList}});var eK=r(24584);Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return eK.serializeTransaction}});var eZ=r(97857);Object.defineProperty(t,"serializeTypedData",{enumerable:!0,get:function(){return eZ.serializeTypedData}}),Object.defineProperty(t,"validateTypedData",{enumerable:!0,get:function(){return eZ.validateTypedData}});var eJ=r(40771);Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return eJ.formatEther}});var eY=r(81005);Object.defineProperty(t,"formatGwei",{enumerable:!0,get:function(){return eY.formatGwei}});var eQ=r(88344);Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return eQ.formatUnits}});var eX=r(76711);Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return eX.parseEther}});var e0=r(1145);Object.defineProperty(t,"parseGwei",{enumerable:!0,get:function(){return e0.parseGwei}});var e1=r(1932);Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return e1.parseUnits}})},60020:(e,t,r)=>{let n=r(17129),i=r(21823);function a(e){this.mode=n.KANJI,this.data=e}a.getBitsLength=function(e){return 13*e},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.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)r-=49472;else throw Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r=(r>>>8&255)*192+(255&r),e.put(r,13)}},e.exports=a},60037:(e,t,r)=>{"use strict";
5783Object.defineProperty(t,"__esModule",{value:!0}),t.toBytes=function(e,t={}){return"number"==typeof e||"bigint"==typeof e?p(e,t):"boolean"==typeof e?c(e,t):(0,i.isHex)(e)?h(e,t):f(e,t)},t.boolToBytes=c,t.hexToBytes=h,t.numberToBytes=p,t.stringToBytes=f;let n=r(45226),i=r(80217),a=r(3669),s=r(14972),o=r(27083),l=new TextEncoder;function c(e,t={}){let r=new Uint8Array(1);return(r[0]=Number(e),"number"==typeof t.size)?((0,s.assertSize)(r,{size:t.size}),(0,a.pad)(r,{size:t.size})):r}let u={zero:48,nine:57,A:65,F:70,a:97,f:102};function d(e){return e>=u.zero&&e<=u.nine?e-u.zero:e>=u.A&&e<=u.F?e-(u.A-10):e>=u.a&&e<=u.f?e-(u.a-10):void 0}function h(e,t={}){let r=e;t.size&&((0,s.assertSize)(r,{size:t.size}),r=(0,a.pad)(r,{dir:"right",size:t.size}));let i=r.slice(2);i.length%2&&(i=`0${i}`);let o=i.length/2,l=new Uint8Array(o);for(let e=0,t=0;e<o;e++){let r=d(i.charCodeAt(t++)),a=d(i.charCodeAt(t++));if(void 0===r||void 0===a)throw new n.BaseError(`Invalid byte sequence ("${i[t-2]}${i[t-1]}" in "${i}").`);l[e]=16*r+a}return l}function p(e,t){return h((0,o.numberToHex)(e,t))}function f(e,t={}){let r=l.encode(e);return"number"==typeof t.size?((0,s.assertSize)(r,{size:t.size}),(0,a.pad)(r,{dir:"right",size:t.size})):r}},60149:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendTransaction=w;let n=r(83562),i=r(85926),a=r(45226),s=r(32036),o=r(81557),l=r(26504),c=r(5449),u=r(48674),d=r(53520),h=r(95847),p=r(6724),f=r(61609),m=r(80517),g=r(84593),y=r(37833),b=new p.LruMap(128);async function w(e,t){let r,{account:p=e.account,assertChainId:w=!0,chain:v=e.chain,accessList:E,authorizationList:C,blobs:A,data:x,dataSuffix:I="string"==typeof e.dataSuffix?e.dataSuffix:e.dataSuffix?.value,gas:S,gasPrice:T,maxFeePerBlobGas:P,maxFeePerGas:O,maxPriorityFeePerGas:_,nonce:N,type:k,value:R,...M}=t;if(void 0===p)throw new i.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});let B=p?(0,n.parseAccount)(p):null;try{(0,f.assertRequest)(t);let n=await (async()=>t.to?t.to:null!==t.to&&C&&C.length>0?await (0,s.recoverAuthorizationAddress)({authorization:C[0]}).catch(()=>{throw new a.BaseError("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if(B?.type==="json-rpc"||null===B){let t;null!==v&&(t=await (0,h.getAction)(e,m.getChainId,"getChainId")({}),w&&(0,o.assertCurrentChain)({currentChainId:t,chain:v}));let r=e.chain?.formatters?.transactionRequest?.format,i=(r||d.formatTransactionRequest)({...(0,u.extract)(M,{format:r}),accessList:E,account:B,authorizationList:C,blobs:A,chainId:t,data:I?(0,l.concat)([x??"0x",I]):x,gas:S,gasPrice:T,maxFeePerBlobGas:P,maxFeePerGas:O,maxPriorityFeePerGas:_,nonce:N,to:n,type:k,value:R},"sendTransaction"),a=b.get(e.uid);try{return await e.request({method:a?"wallet_sendTransaction":"eth_sendTransaction",params:[i]},{retryCount:0})}catch(t){if(!1===a)throw t;if("InvalidInputRpcError"===t.name||"InvalidParamsRpcError"===t.name||"MethodNotFoundRpcError"===t.name||"MethodNotSupportedRpcError"===t.name)return await e.request({method:"wallet_sendTransaction",params:[i]},{retryCount:0}).then(t=>(b.set(e.uid,!0),t)).catch(r=>{if("MethodNotFoundRpcError"===r.name||"MethodNotSupportedRpcError"===r.name)throw b.set(e.uid,!1),t;throw r});throw t}}if(B?.type==="local"){if(B.nonceManager&&void 0===N){let t=M.chainId,n=await (async()=>"number"==typeof t?t:v?v.id:(0,h.getAction)(e,m.getChainId,"getChainId")({}))();r={address:B.address,chainId:n}}let t=await (0,h.getAction)(e,g.prepareTransactionRequest,"prepareTransactionRequest")({account:B,accessList:E,authorizationList:C,blobs:A,chain:v,data:I?(0,l.concat)([x??"0x",I]):x,gas:S,gasPrice:T,maxFeePerBlobGas:P,maxFeePerGas:O,maxPriorityFeePerGas:_,nonce:N,nonceManager:B.nonceManager,parameters:[...g.defaultParameters,"sidecars"],type:k,value:R,...M,to:n}),i=v?.serializers?.transaction,a=await B.signTransaction(t,{serializer:i});return await (0,h.getAction)(e,y.sendRawTransaction,"sendRawTransaction")({serializedTransaction:a})}if(B?.type==="smart")throw new i.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new i.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransaction",type:B?.type})}catch(e){if(e instanceof i.AccountTypeNotSupportedError)throw e;throw r&&B?.nonceManager?.reset(r),(0,c.getTransactionError)(e,{...t,account:B,chain:t.chain||void 0})}}},60209:(e,t,r)=>{"use strict";r.d(t,{sc:()=>n});let n=r(84410).sc},60469:(e,t,r)=>{"use strict";
5783Object.defineProperty(t,"__esModule",{value:!0}),t.createCursor=function(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(i);return r.bytes=e,r.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r};let n=r(71545),i={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 n.RecursiveReadLimitExceededError({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new n.PositionOutOfBoundsError({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new n.NegativeOffsetError({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 n.NegativeOffsetError({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++}}},60563:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionReceipt=a;let n=r(44789),i=r(63178);async function a(e,{hash:t}){let r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!r)throw new n.TransactionReceiptNotFoundError({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||i.formatTransactionReceipt)(r,"getTransactionReceipt")}},60654:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postEndpoint=function(e,t,r){let a=i(e,t,null==r?void 0:r.path,null==r?void 0:r.query);return(0,n.fetchData)(a,"POST",null==r?void 0:r.body,null==r?void 0:r.headers,null==r?void 0:r.credentials)},t.putEndpoint=function(e,t,r){let a=i(e,t,null==r?void 0:r.path,null==r?void 0:r.query);return(0,n.fetchData)(a,"PUT",null==r?void 0:r.body,null==r?void 0:r.headers,null==r?void 0:r.credentials)},t.deleteEndpoint=function(e,t,r){let a=i(e,t,null==r?void 0:r.path,null==r?void 0:r.query);
5783return(0,n.fetchData)(a,"DELETE",null==r?void 0:r.body,null==r?void 0:r.headers,null==r?void 0:r.credentials)},t.getEndpoint=function(e,t,r,a){if(a)return(0,n.getData)(a,void 0,null==r?void 0:r.credentials);let s=i(e,t,null==r?void 0:r.path,null==r?void 0:r.query);return(0,n.getData)(s,null==r?void 0:r.headers,null==r?void 0:r.credentials)};let n=r(71812);function i(e,t,r,i){let a=(0,n.insertParams)(t,r),s=(0,n.stringifyQuery)(i);return`${e}${a}${s}`}},60780:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBlockFilter=i;let n=r(98182);async function i(e){let t=(0,n.createFilterRequestScope)(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}}},60783:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(e,t,r)=>JSON.stringify(e,(e,r)=>{let n="bigint"==typeof r?r.toString():r;return"function"==typeof t?t(e,n):n},r)},60852:(e,t,r)=>{"use strict";t.U=void 0;var n=r(78369);Object.defineProperty(t,"U",{enumerable:!0,get:function(){return n.SafeAppProvider}})},60899:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineKzg=function({blobToKzgCommitment:e,computeBlobKzgProof:t}){return{blobToKzgCommitment:e,computeBlobKzgProof:t}}},61145:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNullUniversalResolverError=function(e){if(!(e instanceof n.BaseError))return!1;let t=e.walk(e=>e instanceof i.ContractFunctionRevertedError);return t instanceof i.ContractFunctionRevertedError&&(t.data?.errorName==="HttpError"||t.data?.errorName==="ResolverError"||t.data?.errorName==="ResolverNotContract"||t.data?.errorName==="ResolverNotFound"||t.data?.errorName==="ReverseAddressMismatch"||t.data?.errorName==="UnsupportedResolverProfile")};let n=r(45226),i=r(81701)},61318:(e,t)=>{"use strict";async function r(e,t){await e.request({method:`${e.mode}_setRpcUrl`,params:[t]})}Object.defineProperty(t,"__esModule",{value:!0}),t.setRpcUrl=r},61382:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodePacked=function(e,t){if(e.length!==t.length)throw new n.AbiEncodingLengthMismatchError({expectedLength:e.length,givenLength:t.length});let r=[];for(let u=0;u<e.length;u++){let d=e[u],h=t[u];r.push(function e(t,r,u=!1){if("address"===t){if(!(0,a.isAddress)(r))throw new i.InvalidAddressError({address:r});return(0,o.pad)(r.toLowerCase(),{size:u?32:null})}if("string"===t)return(0,l.stringToHex)(r);if("bytes"===t)return r;if("bool"===t)return(0,o.pad)((0,l.boolToHex)(r),{size:u?32:1});let d=t.match(c.integerRegex);if(d){let[e,t,n="256"]=d,i=Number.parseInt(n,10)/8;return(0,l.numberToHex)(r,{size:u?32:i,signed:"int"===t})}let h=t.match(c.bytesRegex);if(h){let[e,t]=h;if(Number.parseInt(t,10)!==(r.length-2)/2)throw new n.BytesSizeMismatchError({expectedSize:Number.parseInt(t,10),givenSize:(r.length-2)/2});return(0,o.pad)(r,{dir:"right",size:u?32:null})}let p=t.match(c.arrayRegex);if(p&&Array.isArray(r)){let[t,n]=p,i=[];for(let t=0;t<r.length;t++)i.push(e(n,r[t],!0));return 0===i.length?"0x":(0,s.concatHex)(i)}throw new n.UnsupportedPackedAbiType(t)}(d,h))}return(0,s.concatHex)(r)};let n=r(82311),i=r(9301),a=r(63402),s=r(26504),o=r(3669),l=r(27083),c=r(46398)},61438:(e,t,r)=>{"use strict";r.d(t,{W:()=>p});var n=r(91004),i=r(47482),a=r(89188),s=r(17052),o=r(45283),l=r(82376),c=r(42242),u=r(18627),d=r(82875);let h=(0,n.BX)({transactions:[],transactionsByYear:{},lastNetworkInView:void 0,loading:!1,empty:!1,next:void 0}),p=(0,s.X)({state:h,subscribe:e=>(0,n.B1)(h,()=>e(h)),setLastNetworkInView(e){h.lastNetworkInView=e},async fetchTransactions(e){if(!e)throw Error("Transactions can't be fetched without an accountAddress");h.loading=!0;try{let t=await o.T.fetchTransactions({account:e,cursor:h.next,chainId:l.W.state.activeCaipNetwork?.caipNetworkId}),r=p.filterSpamTransactions(t.data),n=p.filterByConnectedChain(r),i=[...h.transactions,...n];h.loading=!1,h.transactions=i,h.transactionsByYear=p.groupTransactionsByYearAndMonth(h.transactionsByYear,n),h.empty=0===i.length,h.next=t.next?t.next:void 0}catch(r){let t=l.W.state.activeChain;c.E.sendEvent({type:"track",event:"ERROR_FETCH_TRANSACTIONS",properties:{address:e,projectId:u.H.state.projectId,cursor:h.next,isSmartAccount:(0,a.lj)(t)===i.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}),d.P.showError("Failed to fetch transactions"),h.loading=!1,h.empty=!0,h.next=void 0}},groupTransactionsByYearAndMonth:(e={},t=[])=>(t.forEach(t=>{let r=new Date(t.metadata.minedAt).getFullYear(),n=new Date(t.metadata.minedAt).getMonth(),i=e[r]??{},a=(i[n]??[]).filter(e=>e.id!==t.id);e[r]={...i,[n]:[...a,t].sort((e,t)=>
5783new Date(t.metadata.minedAt).getTime()-new Date(e.metadata.minedAt).getTime())}}),e),filterSpamTransactions:e=>e.filter(e=>!e.transfers?.every(e=>e.nft_info?.flags.is_spam===!0)),filterByConnectedChain(e){let t=l.W.state.activeCaipNetwork?.caipNetworkId;return e.filter(e=>e.metadata.chain===t)},clearCursor(){h.next=void 0},resetTransactions(){h.transactions=[],h.transactionsByYear={},h.lastNetworkInView=void 0,h.loading=!1,h.empty=!1,h.next=void 0}},"API_ERROR")},61569:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAbiItem=function(e){let t,{abi:r,args:a=[],name:u}=e,d=(0,i.isHex)(u,{strict:!1}),h=r.filter(e=>d?"function"===e.type?(0,o.toFunctionSelector)(e)===u:"event"===e.type&&(0,s.toEventSelector)(e)===u:"name"in e&&e.name===u);if(0!==h.length){if(1===h.length)return h[0];for(let e of h){if("inputs"in e){if(!a||0===a.length){if(!e.inputs||0===e.inputs.length)return e;continue}if(e.inputs&&0!==e.inputs.length&&e.inputs.length===a.length&&a.every((t,r)=>{let n="inputs"in e&&e.inputs[r];return!!n&&l(t,n)})){if(t&&"inputs"in t&&t.inputs){let r=c(e.inputs,t.inputs,a);if(r)throw new n.AbiItemAmbiguityError({abiItem:e,type:r[0]},{abiItem:t,type:r[1]})}t=e}}}return t||h[0]}},t.isArgOfType=l,t.getAmbiguousTypes=c;let n=r(82311),i=r(80217),a=r(63402),s=r(55954),o=r(16936);function l(e,t){let r=typeof e,n=t.type;switch(n){case"address":return(0,a.isAddress)(e,{strict:!1});case"bool":return"boolean"===r;case"function":case"string":return"string"===r;default:if("tuple"===n&&"components"in t)return Object.values(t.components).every((t,n)=>"object"===r&&l(Object.values(e)[n],t));if(/^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(n))return"number"===r||"bigint"===r;if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n))return"string"===r||e instanceof Uint8Array;
5783if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n))return Array.isArray(e)&&e.every(e=>l(e,{...t,type:n.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}function c(e,t,r){for(let n in e){let i=e[n],s=t[n];if("tuple"===i.type&&"tuple"===s.type&&"components"in i&&"components"in s)return c(i.components,s.components,r[n]);let o=[i.type,s.type];if(o.includes("address")&&o.includes("bytes20")||(o.includes("address")&&o.includes("string")||o.includes("address")&&o.includes("bytes"))&&(0,a.isAddress)(r[n],{strict:!1}))return o}}},61580:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.withTimeout=function(e,{errorInstance:t=Error("timed out"),timeout:r,signal:i}){return new Promise((a,s)=>{(async()=>{let o,l=new AbortController;try{r>0&&(o=setTimeout(()=>{i?l.abort():s(t)},r)),a(await e({signal:l?.signal||null}))}catch(e){if(l?.signal.aborted&&(0,n.isAbortError)(e))return void s(t);s(e)}finally{clearTimeout(o)}})()})};let n=r(5636)},61609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertRequest=function(e){let{account:t,maxFeePerGas:r,maxPriorityFeePerGas:l,to:c}=e,u=t?(0,n.parseAccount)(t):void 0;if(u&&!(0,o.isAddress)(u.address))throw new a.InvalidAddressError({address:u.address});if(c&&!(0,o.isAddress)(c))throw new a.InvalidAddressError({address:c});if(r&&r>i.maxUint256)throw new s.FeeCapTooHighError({maxFeePerGas:r});if(l&&r&&l>r)throw new s.TipAboveFeeCapError({maxFeePerGas:r,maxPriorityFeePerGas:l})};let n=r(83562),i=r(97446),a=r(9301),s=r(80779),o=r(63402)},61794:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeEventTopics=function(e){let{abi:t,eventName:r,args:i}=e,a=t[0];if(r){let e=(0,u.getAbiItem)({abi:t,name:r});if(!e)throw new n.AbiEventNotFoundError(r,{docsPath:d});a=e}if("event"!==a.type)throw new n.AbiEventNotFoundError(void 0,{docsPath:d});let s=[];if(i&&"inputs"in a){let e=a.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&&(s=e?.map((e,r)=>Array.isArray(t[r])?t[r].map((n,i)=>h({param:e,value:t[r][i]})):void 0!==t[r]&&null!==t[r]?h({param:e,value:t[r]}):null)??[])}if(a.anonymous)return s;let l=(0,c.formatAbiItem)(a);return[(0,o.toEventSelector)(l),...s]};let n=r(82311),i=r(44311),a=r(60037),s=r(4319),o=r(55954),l=r(66008),c=r(71680),u=r(61569),d="/docs/contract/encodeEventTopics";function h({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,s.keccak256)((0,a.toBytes)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new i.FilterTypeNotSupportedError(e.type);return(0,l.encodeAbiParameters)([e],[t])}},62252:(e,t,r)=>{"use strict";r(62982)},62277:(e,t)=>{"use strict";async function r(e,{hash:t}){await e.request({method:`${e.mode}_dropTransaction`,params:[t]})}Object.defineProperty(t,"__esModule",{value:!0}),t.dropTransaction=r},62280:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEstimateGasError=function(e,{docsPath:t,...r}){let s=(()=>{let t=(0,a.getNodeError)(e,r);return t instanceof i.UnknownNodeError?e:t})();return new n.EstimateGasExecutionError(s,{docsPath:t,...r})};let n=r(52162),i=r(80779),a=r(49259)},62297:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderRpcError=void 0;class r extends Error{constructor(e,t){super(t),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e,this.details=t}}t.ProviderRpcError=r},62332:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BundleFailedError=void 0;let n=r(45226);class i extends n.BaseError{constructor(e){super(`Call bundle failed with status: ${e.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=e}}t.BundleFailedError=i},62389:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getStorageAt=i;let n=r(73506);async function i(e,{address:t,blockHash:r,blockNumber:i,blockTag:a="latest",requireCanonical:s,slot:o}){let l=(0,n.formatBlockParameter)({blockHash:r,blockNumber:i,blockTag:a,requireCanonical:s});return await e.request({method:"eth_getStorageAt",params:[t,o,l]})}},62457:(e,t,r)=>{"use strict";r.d(t,{LU:()=>n,R7:()=>i});let n={core:{backgroundAccentPrimary:"#0988F0",backgroundAccentCertified:"#C7B994",backgroundWalletKit:"#FFB800",backgroundAppKit:"#FF573B",backgroundCloud:"#0988F0",backgroundDocumentation:"#008847",backgroundSuccess:"rgba(48, 164, 107, 0.20)",backgroundError:"rgba(223, 74, 52, 0.20)",backgroundWarning:"rgba(243, 161, 63, 0.20)",textAccentPrimary:"#0988F0",textAccentCertified:"#C7B994",textWalletKit:"#FFB800",textAppKit:"#FF573B",textCloud:"#0988F0",textDocumentation:"#008847",textSuccess:"#30A46B",textError:"#DF4A34",textWarning:"#F3A13F",borderAccentPrimary:"#0988F0",borderSecondary:"#C7B994",borderSuccess:"#30A46B",borderError:"#DF4A34",borderWarning:"#F3A13F",foregroundAccent010:"rgba(9, 136, 240, 0.1)",foregroundAccent020:"rgba(9, 136, 240, 0.2)",foregroundAccent040:"rgba(9, 136, 240, 0.4)",foregroundAccent060:"rgba(9, 136, 240, 0.6)",foregroundSecondary020:"rgba(199, 185, 148, 0.2)",foregroundSecondary040:"rgba(199, 185, 148, 0.4)",foregroundSecondary060:"rgba(199, 185, 148, 0.6)",iconAccentPrimary:"#0988F0",iconAccentCertified:"#C7B994",iconSuccess:"#30A46B",iconError:"#DF4A34",iconWarning:"#F3A13F",glass010:"rgba(255, 255, 255, 0.1)",zIndex:"9999"},dark:{overlay:"rgba(0, 0, 0, 0.50)",backgroundPrimary:"#202020",backgroundInvert:"#FFFFFF",textPrimary:"#FFFFFF",textSecondary:"#9A9A9A",textTertiary:"#BBBBBB",textInvert:"#202020",borderPrimary:"#2A2A2A",borderPrimaryDark:"#363636",borderSecondary:"#4F4F4F",foregroundPrimary:"#252525",foregroundSecondary:"#2A2A2A",foregroundTertiary:"#363636",iconDefault:"#9A9A9A",iconInverse:"#FFFFFF"},light:{overlay:"rgba(230 , 230, 230, 0.5)",backgroundPrimary:"#FFFFFF",borderPrimaryDark:"#E9E9E9",backgroundInvert:"#202020",textPrimary:"#202020",textSecondary:"#9A9A9A",textTertiary:"#6C6C6C",textInvert:"#FFFFFF",borderPrimary:"#E9E9E9",borderSecondary:"#D0D0D0",foregroundPrimary:"#F3F3F3",foregroundSecondary:"#E9E9E9",foregroundTertiary:"#D0D0D0",iconDefault:"#9A9A9A",iconInverse:"#202020"}},i={colors:{black:"#202020",white:"#FFFFFF",white010:"rgba(255, 255, 255, 0.1)",accent010:"rgba(9, 136, 240, 0.1)",accent020:"rgba(9, 136, 240, 0.2)",accent030:"rgba(9, 136, 240, 0.3)",accent040:"rgba(9, 136, 240, 0.4)",accent050:"rgba(9, 136, 240, 0.5)",accent060:"rgba(9, 136, 240, 0.6)",accent070:"rgba(9, 136, 240, 0.7)",accent080:"rgba(9, 136, 240, 0.8)",accent090:"rgba(9, 136, 240, 0.9)",accent100:"rgba(9, 136, 240, 1.0)",accentSecondary010:"rgba(199, 185, 148, 0.1)",accentSecondary020:"rgba(199, 185, 148, 0.2)",accentSecondary030:"rgba(199, 185, 148, 0.3)",accentSecondary040:"rgba(199, 185, 148, 0.4)",accentSecondary050:"rgba(199, 185, 148, 0.5)",accentSecondary060:"rgba(199, 185, 148, 0.6)",accentSecondary070:"rgba(199, 185, 148, 0.7)",accentSecondary080:"rgba(199, 185, 148, 0.8)",accentSecondary090:"rgba(199, 185, 148, 0.9)",accentSecondary100:"rgba(199, 185, 148, 1.0)",productWalletKit:"#FFB800",productAppKit:"#FF573B",productCloud:"#0988F0",productDocumentation:"#008847",neutrals050:"#F6F6F6",neutrals100:"#F3F3F3",neutrals200:"#E9E9E9",neutrals300:"#D0D0D0",neutrals400:"#BBB",neutrals500:"#9A9A9A",neutrals600:"#6C6C6C",neutrals700:"#4F4F4F",neutrals800:"#363636",neutrals900:"#2A2A2A",neutrals1000:"#252525",semanticSuccess010:"rgba(48, 164, 107, 0.1)",semanticSuccess020:"rgba(48, 164, 107, 0.2)",semanticSuccess030:"rgba(48, 164, 107, 0.3)",semanticSuccess040:"rgba(48, 164, 107, 0.4)",semanticSuccess050:"rgba(48, 164, 107, 0.5)",semanticSuccess060:"rgba(48, 164, 107, 0.6)",semanticSuccess070:"rgba(48, 164, 107, 0.7)",semanticSuccess080:"rgba(48, 164, 107, 0.8)",semanticSuccess090:"rgba(48, 164, 107, 0.9)",semanticSuccess100:"rgba(48, 164, 107, 1.0)",semanticError010:"rgba(223, 74, 52, 0.1)",semanticError020:"rgba(223, 74, 52, 0.2)",semanticError030:"rgba(223, 74, 52, 0.3)",semanticError040:"rgba(223, 74, 52, 0.4)",semanticError050:"rgba(223, 74, 52, 0.5)",semanticError060:"rgba(223, 74, 52, 0.6)",semanticError070:"rgba(223, 74, 52, 0.7)",semanticError080:"rgba(223, 74, 52, 0.8)",semanticError090:"rgba(223, 74, 52, 0.9)",semanticError100:"rgba(223, 74, 52, 1.0)",semanticWarning010:"rgba(243, 161, 63, 0.1)",semanticWarning020:"rgba(243, 161, 63, 0.2)",semanticWarning030:"rgba(243, 161, 63, 0.3)",semanticWarning040:"rgba(243, 161, 63, 0.4)",semanticWarning050:"rgba(243, 161, 63, 0.5)",semanticWarning060:"rgba(243, 161, 63, 0.6)",semanticWarning070:"rgba(243, 161, 63, 0.7)",semanticWarning080:"rgba(243, 161, 63, 0.8)",semanticWarning090:"rgba(243, 161, 63, 0.9)",semanticWarning100:"rgba(243, 161, 63, 1.0)"},fontFamily:{regular:"KHTeka",mono:"KHTekaMono"},fontWeight:{regular:"400",medium:"500"},textSize:{h1:"50px",h2:"44px",h3:"38px",h4:"32px",h5:"26px",h6:"20px",large:"16px",medium:"14px",small:"12px"},typography:{"h1-regular-mono":{lineHeight:"50px",letterSpacing:"-3px"},"h1-regular":{lineHeight:"50px",letterSpacing:"-1px"},"h1-medium":{lineHeight:"50px",letterSpacing:"-0.84px"},"h2-regular-mono":{lineHeight:"44px",letterSpacing:"-2.64px"},"h2-regular":{lineHeight:"44px",letterSpacing:"-0.88px"},"h2-medium":{lineHeight:"44px",letterSpacing:"-0.88px"},"h3-regular-mono":{lineHeight:"38px",letterSpacing:"-2.28px"},"h3-regular":{lineHeight:"38px",letterSpacing:"-0.76px"},"h3-medium":{lineHeight:"38px",letterSpacing:"-0.76px"},"h4-regular-mono":{lineHeight:"32px",letterSpacing:"-1.92px"},"h4-regular":{lineHeight:"32px",letterSpacing:"-0.32px"},"h4-medium":{lineHeight:"32px",letterSpacing:"-0.32px"},"h5-regular-mono":{lineHeight:"26px",letterSpacing:"-1.56px"},"h5-regular":{lineHeight:"26px",letterSpacing:"-0.26px"},"h5-medium":{lineHeight:"26px",letterSpacing:"-0.26px"},"h6-regular-mono":{lineHeight:"20px",letterSpacing:"-1.2px"},"h6-regular":{lineHeight:"20px",letterSpacing:"-0.6px"},"h6-medium":{lineHeight:"20px",letterSpacing:"-0.6px"},"lg-regular-mono":{lineHeight:"16px",letterSpacing:"-0.96px"},"lg-regular":{lineHeight:"18px",letterSpacing:"-0.16px"},"lg-medium":{lineHeight:"18px",letterSpacing:"-0.16px"},"md-regular-mono":{lineHeight:"14px",letterSpacing:"-0.84px"},"md-regular":{lineHeight:"16px",letterSpacing:"-0.14px"},"md-medium":{lineHeight:"16px",letterSpacing:"-0.14px"},"sm-regular-mono":{lineHeight:"12px",letterSpacing:"-0.72px"},"sm-regular":{lineHeight:"14px",letterSpacing:"-0.12px"},"sm-medium":{lineHeight:"14px",letterSpacing:"-0.12px"}},tokens:{core:n.core,theme:n.dark},borderRadius:{1:"4px",2:"8px",10:"10px",3:"12px",4:"16px",6:"24px",5:"20px",8:"32px",16:"64px",20:"80px",32:"128px",64:"256px",128:"512px",round:"9999px"},spacing:{0:"0px","01":"2px",1:"4px",2:"8px",3:"12px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",12:"48px",14:"56px",16:"64px",20:"80px",32:"128px",64:"256px"},durations:{xl:"400ms",lg:"200ms",md:"125ms",sm:"75ms"}
5783,easings:{"ease-out-power-2":"cubic-bezier(0.23, 0.09, 0.08, 1.13)","ease-out-power-1":"cubic-bezier(0.12, 0.04, 0.2, 1.06)","ease-in-power-2":"cubic-bezier(0.92, -0.13, 0.77, 0.91)","ease-in-power-1":"cubic-bezier(0.88, -0.06, 0.8, 0.96)","ease-inout-power-2":"cubic-bezier(0.77, 0.09, 0.23, 1.13)","ease-inout-power-1":"cubic-bezier(0.88, 0.04, 0.12, 1.06)"}}},62561:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTupleRegex=t.integerRegex=t.bytesRegex=void 0,t.execTyped=function(e,t){let r=e.exec(t);return r?.groups},t.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,t.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)?$/,t.isTupleRegex=/^\(.+?\).*?$/},62704:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trim=function(e,{dir:t="left"}={}){let r="string"==typeof e?e.replace("0x",""):e,n=0;for(let e=0;e<r.length-1;e++)if("0"===r["left"===t?e:r.length-e-1].toString())n++;else break;return(r="left"===t?r.slice(n):r.slice(0,r.length-n),"string"==typeof e)?(1===r.length&&"right"===t&&(r=`${r}0`),`0x${r.length%2==1?`0${r}`:r}`):r}},62736:(e,t,r)=>{"use strict";var n=r(56059),i=r(18627),a=r(42242),s=r(89188),o=r(82376),l=r(26274),c=r(2076);r(6647),r(48029),r(9266),r(66803);var u=r(47482);let d=(0,n.AH)``,h=class extends n.WF{render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=i.H.state;return e||t?(0,n.qy)` 5784 <wui-flex 5785 .padding=${["4","3","3","3"]} 5786 flexDirection="column" 5787 alignItems="center" 5788 justifyContent="center" 5789 gap="3" 5790 > 5791 <wui-text color="secondary" variant="md-regular" align="center"> 5792 We work with the best providers to give you the lowest fees and best support. More options 5793 coming soon! 5794 </wui-text> 5795 5796 ${this.howDoesItWorkTemplate()} 5797 </wui-flex> 5798 `:null}howDoesItWorkTemplate(){return(0,n.qy)` <wui-link @click=${this.onWhatIsBuy.bind(this)}> 5799 <wui-icon size="xs" color="accent-primary" slot="iconLeft" name="helpCircle"></wui-icon> 5800 How does it work? 5801 </wui-link>`}onWhatIsBuy(){a.E.sendEvent({type:"track",event:"SELECT_WHAT_IS_A_BUY",properties:{isSmartAccount:(0,s.lj)(o.W.state.activeChain)===u.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}),l.I.push("WhatIsABuy")}};h.styles=[d],h=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}([(0,c.EM)("w3m-onramp-providers-footer")],h)},62866:(e,t)=>{"use strict";async function r(e,{address:t}){await e.request({method:`${e.mode}_setCoinbase`,params:[t]})}Object.defineProperty(t,"__esModule",{value:!0}),t.setCoinbase=r},62917:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyAuthorization=s;let n=r(24998),i=r(18978),a=r(32036);async function s({address:e,authorization:t,signature:r}){return(0,i.isAddressEqual)((0,n.getAddress)(e),await (0,a.recoverAuthorizationAddress)({authorization:t,signature:r}))}},62923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendCallsSync=s;let n=r(95847),i=r(32508),a=r(42678);async function s(e,t){let{chain:r=e.chain}=t,s=t.timeout??Math.max((r?.blockTime??0)*3,5e3),o=await (0,n.getAction)(e,i.sendCalls,"sendCalls")(t);return await (0,n.getAction)(e,a.waitForCallsStatus,"waitForCallsStatus")({...t,id:o.id,timeout:s})}},62965:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatProof=function(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?(0,n.hexToNumber)(e.nonce):void 0,storageProof:e.storageProof?e.storageProof.map(e=>({...e,value:BigInt(e.value)})):void 0}};let n=r(59865)},62982:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767);r(79909),r(83627);var a=r(46756),s=r(63412),o=r(91392);let l=(0,o.AH)` 5802 :host { 5803 display: flex; 5804 justify-content: center;
5805 align-items: center; 5806 gap: ${({spacing:e})=>e[1]}; 5807 text-transform: uppercase; 5808 white-space: nowrap; 5809 } 5810 5811 :host([data-variant='accent']) { 5812 background-color: ${({tokens:e})=>e.core.foregroundAccent010}; 5813 color: ${({tokens:e})=>e.core.textAccentPrimary}; 5814 } 5815 5816 :host([data-variant='info']) { 5817 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 5818 color: ${({tokens:e})=>e.theme.textSecondary}; 5819 } 5820 5821 :host([data-variant='success']) { 5822 background-color: ${({tokens:e})=>e.core.backgroundSuccess}; 5823 color: ${({tokens:e})=>e.core.textSuccess}; 5824 } 5825 5826 :host([data-variant='warning']) { 5827 background-color: ${({tokens:e})=>e.core.backgroundWarning}; 5828 color: ${({tokens:e})=>e.core.textWarning}; 5829 } 5830 5831 :host([data-variant='error']) { 5832 background-color: ${({tokens:e})=>e.core.backgroundError}; 5833 color: ${({tokens:e})=>e.core.textError}; 5834 } 5835 5836 :host([data-variant='certified']) { 5837 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 5838 color: ${({tokens:e})=>e.theme.textSecondary}; 5839 } 5840 5841 :host([data-size='md']) { 5842 height: 30px; 5843 padding: 0 ${({spacing:e})=>e[2]}; 5844 border-radius: ${({borderRadius:e})=>e[2]}; 5845 } 5846 5847 :host([data-size='sm']) { 5848 height: 20px; 5849 padding: 0 ${({spacing:e})=>e[1]}; 5850 border-radius: ${({borderRadius:e})=>e[1]}; 5851 } 5852`;var c=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let u=class extends n.WF{constructor(){super(...arguments),this.variant="accent",this.size="md",this.icon=void 0}render(){this.dataset.variant=this.variant,this.dataset.size=this.size;let e="md"===this.size?"md-medium":"sm-medium",t="md"===this.size?"md":"sm";return(0,n.qy)` 5853 ${this.icon?(0,n.qy)`<wui-icon size=${t} name=${this.icon}></wui-icon>`:null} 5854 <wui-text 5855 display="inline" 5856 data-variant=${this.variant} 5857 variant=${e} 5858 color="inherit" 5859 > 5860 <slot></slot> 5861 </wui-text> 5862 `}};u.styles=[a.W5,l],c([(0,i.MZ)()],u.prototype,"variant",void 0),c([(0,i.MZ)()],u.prototype,"size",void 0),c([(0,i.MZ)()],u.prototype,"icon",void 0),u=c([(0,s.E)("wui-tag")],u)},63058:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashAuthorization=function(e){let{chainId:t,nonce:r,to:l}=e,c=e.contractAddress??e.address,u=(0,o.keccak256)((0,n.concatHex)(["0x05",(0,s.toRlp)([t?(0,a.numberToHex)(t):"0x",c,r?(0,a.numberToHex)(r):"0x"])]));return"bytes"===l?(0,i.hexToBytes)(u):u};let n=r(26504),i=r(60037),a=r(27083),s=r(36504),o=r(4319)},63178:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineTransactionReceipt=t.receiptStatuses=void 0,t.formatTransactionReceipt=o;let n=r(14972),i=r(87721),a=r(10205),s=r(93771);function o(e,r){let i={...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,a.formatLog)(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,n.hexToNumber)(e.transactionIndex):null,status:e.status?t.receiptStatuses[e.status]:null,type:e.type?s.transactionType[e.type]||e.type:null};return e.blobGasPrice&&(i.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(i.blobGasUsed=BigInt(e.blobGasUsed)),i}t.receiptStatuses={"0x0":"reverted","0x1":"success"},t.defineTransactionReceipt=(0,i.defineFormatter)("transactionReceipt",o)},63266:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashSignature=function(e){return(0,i.keccak256)((0,n.toBytes)(e))};let n=r(60037),i=r(4319)},63342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.poll=function(e,{emitOnBegin:t,initialWaitTime:r,interval:i}){let a=!0,s=()=>a=!1;return(async()=>{let o;
5862t&&(o=await e({unpoll:s}));let l=await r?.(o)??i;await (0,n.wait)(l);let c=async()=>{a&&(await e({unpoll:s}),await (0,n.wait)(i),c())};c()})(),s};let n=r(73206)},63386:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toBig=t.shrSL=t.shrSH=t.rotrSL=t.rotrSH=t.rotrBL=t.rotrBH=t.rotr32L=t.rotr32H=t.rotlSL=t.rotlSH=t.rotlBL=t.rotlBH=t.add5L=t.add5H=t.add4L=t.add4H=t.add3L=t.add3H=void 0,t.add=w,t.fromBig=i,t.split=a;let r=BigInt(0x100000000-1),n=BigInt(32);function i(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function a(e,t=!1){let r=e.length,n=new Uint32Array(r),s=new Uint32Array(r);for(let a=0;a<r;a++){let{h:r,l:o}=i(e[a],t);[n[a],s[a]]=[r,o]}return[n,s]}let s=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0);t.toBig=s;let o=(e,t,r)=>e>>>r;t.shrSH=o;let l=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=l;let c=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=c;let u=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=u;let d=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=d;let h=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=h;let p=(e,t)=>t;t.rotr32H=p;let f=(e,t)=>e;t.rotr32L=f;let m=(e,t,r)=>e<<r|t>>>32-r;t.rotlSH=m;let g=(e,t,r)=>t<<r|e>>>32-r;t.rotlSL=g;let y=(e,t,r)=>t<<r-32|e>>>64-r;t.rotlBH=y;let b=(e,t,r)=>e<<r-32|t>>>64-r;function w(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/0x100000000|0)|0,l:0|i}}t.rotlBL=b;let v=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=v;let E=(e,t,r,n)=>t+r+n+(e/0x100000000|0)|0;t.add3H=E;let C=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=C;let A=(e,t,r,n,i)=>t+r+n+i+(e/0x100000000|0)|0;t.add4H=A;let x=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);t.add5L=x;let I=(e,t,r,n,i,a)=>t+r+n+i+a+(e/0x100000000|0)|0;t.add5H=I,t.default={fromBig:i,split:a,toBig:s,shrSH:o,shrSL:l,rotrSH:c,rotrSL:u,rotrBH:d,rotrBL:h,rotr32H:p,rotr32L:f,rotlSH:m,rotlSL:g,rotlBH:y,rotlBL:b,add:w,add3L:v,add3H:E,add4L:C,add4H:A,add5H:I,add5L:x}},63402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAddressCache=void 0,t.isAddress=function(e,r){let{strict:n=!0}=r??{},s=`${e}.${n}`;if(t.isAddressCache.has(s))return t.isAddressCache.get(s);let o=!!a.test(e)&&(e.toLowerCase()===e||!n||(0,i.checksumAddress)(e)===e);return t.isAddressCache.set(s,o),o};let n=r(6724),i=r(24998),a=/^0x[a-fA-F0-9]{40}$/;t.isAddressCache=new n.LruMap(8192)},63412:(e,t,r)=>{"use strict";function n(e){return function(t){return"function"==typeof t?(customElements.get(e)||customElements.define(e,t),t):function(e,t){let{kind:r,elements:n}=t;return{kind:r,elements:n,finisher(t){customElements.get(e)||customElements.define(e,t)}}}(e,t)}}r.d(t,{E:()=>n})},63416:(e,t,r)=>{let n=r(17129),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 a(e){this.mode=n.ALPHANUMERIC,this.data=e}a.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.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)},e.exports=a},63884:(e,t,r)=>{"use strict";r.d(t,{y:()=>o});var n=r(57873),i=r(18627),a=r(26274),s=r(25588);let o={getTabsByNamespace:e=>e&&e===n.o.CHAIN.EVM?i.H.state.remoteFeatures?.activity===!1?s.o.ACCOUNT_TABS.filter(e=>"Activity"!==e.label):s.o.ACCOUNT_TABS:[],isValidReownName:e=>/^[a-zA-Z0-9]+$/gu.test(e),isValidEmail:e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/gu.test(e),validateReownName:e=>e.replace(/\^/gu,"").toLowerCase().replace(/[^a-zA-Z0-9]/gu,""),hasFooter(){let e=a.I.state.view;if(s.o.VIEWS_WITH_LEGAL_FOOTER.includes(e)){let{termsConditionsUrl:e,privacyPolicyUrl:t}=i.H.state,r=i.H.state.features?.legalCheckbox;return(!!e||!!t)&&!r}return s.o.VIEWS_WITH_DEFAULT_FOOTER.includes(e)}}},64057:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.simulateBlocks=w;let n=r(52828),i=r(83562),a=r(82311),s=r(81701),o=r(80779),l=r(72431),c=r(25230),u=r(26504),d=r(27083),h=r(38297),p=r(49259),f=r(12366),m=r(10205),g=r(53520),y=r(21672),b=r(61609);async function w(e,t){let{blockNumber:r,blockTag:w=e.experimental_blockTag??"latest",blocks:v,returnFullTransactions:E,traceTransfers:C,validation:A}=t;try{let t=[];for(let e of v){let r=e.blockOverrides?n.toRpc(e.blockOverrides):void 0,a=e.calls.map(e=>{let t=e.account?(0,i.parseAccount)(e.account):void 0,r=e.abi?(0,c.encodeFunctionData)(e):e.data,n={...e,account:t,data:e.dataSuffix?(0,u.concat)([r||"0x",e.dataSuffix]):r,from:e.from??t?.address};return(0,b.assertRequest)(n),(0,g.formatTransactionRequest)(n)}),s=e.stateOverrides?(0,y.serializeStateOverride)(e.stateOverrides):void 0;t.push({blockOverrides:r,calls:a,stateOverrides:s})}let o="bigint"==typeof r?(0,d.numberToHex)(r):void 0;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:t,returnFullTransactions:E,traceTransfers:C,validation:A},o||w]})).map((e,t)=>({...(0,f.formatBlock)(e),calls:e.calls.map((e,r)=>{let{abi:n,args:i,functionName:o,to:c}=v[t].calls[r],u=e.error?.data??e.returnData,d=BigInt(e.gasUsed),p=e.logs?.map(e=>(0,m.formatLog)(e)),f="0x1"===e.status?"success":"failure",g=n&&"success"===f&&"0x"!==u?(0,l.decodeFunctionResult)({abi:n,data:u,functionName:o}):null,y=(()=>{let e;if("success"!==f&&("0x"===u?e=new a.AbiDecodingZeroDataError:u&&(e=new s.RawContractError({data:u})),e))return(0,h.getContractError)(e,{abi:n??[],address:c??"0x",args:i,functionName:o??"<unknown>"})})();return{data:u,gasUsed:d,logs:p,status:f,..."success"===f?{result:g}:{error:y}}})}))}catch(t){let e=(0,p.getNodeError)(t,{});if(e instanceof o.UnknownNodeError)throw t;throw e}}},64321:(e,t,r)=>{"use strict";
5862Object.defineProperty(t,"__esModule",{value:!0}),t.rpc=void 0,t.getSocket=a;let n=r(11139),i=r(45274);async function a(e){let t=await (0,i.getWebSocketRpcClient)(e);return Object.assign(t.socket,{requests:t.requests,subscriptions:t.subscriptions})}t.rpc={http:(e,t)=>(0,n.getHttpRpcClient)(e).request(t),webSocket:function(e,{body:t,onError:r,onResponse:n}){return e.request({body:t,onError:r,onResponse:n}),e},webSocketAsync:async function(e,{body:t,timeout:r=1e4}){return e.requestAsync({body:t,timeout:r})}}},64598:(e,t,r)=>{let n=r(35532),i=r(188),a=r(2122),s=r(19941);function o(e,t,r,a,s){let o=[].slice.call(arguments,1),l=o.length,c="function"==typeof o[l-1];if(!c&&!n())throw Error("Callback required as last argument");if(c){if(l<2)throw Error("Too few arguments provided");2===l?(s=r,r=t,t=a=void 0):3===l&&(t.getContext&&void 0===s?(s=a,a=void 0):(s=a,a=r,r=t,t=void 0))}else{if(l<1)throw Error("Too few arguments provided");return 1===l?(r=t,t=a=void 0):2!==l||t.getContext||(a=r,r=t,t=void 0),new Promise(function(n,s){try{let s=i.create(r,a);n(e(s,t,a))}catch(e){s(e)}})}try{let n=i.create(r,a);s(null,e(n,t,a))}catch(e){s(e)}}t.create=i.create,t.toCanvas=o.bind(null,a.render),t.toDataURL=o.bind(null,a.renderToDataURL),t.toString=o.bind(null,function(e,t,r){return s.render(e,r)})},64751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toBlobSidecars=function(e){let{data:t,kzg:r,to:s}=e,o=e.blobs??(0,a.toBlobs)({data:t,to:s}),l=e.commitments??(0,n.blobsToCommitments)({blobs:o,kzg:r,to:s}),c=e.proofs??(0,i.blobsToProofs)({blobs:o,commitments:l,kzg:r,to:s}),u=[];for(let e=0;e<o.length;e++)u.push({blob:o[e],commitment:l[e],proof:c[e]});return u};let n=r(80076),i=r(55085),a=r(95672)},65026:(e,t)=>{"use strict";async function r(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}Object.defineProperty(t,"__esModule",{value:!0}),t.requestPermissions=r},65222:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CircularReferenceError=t.InvalidParenthesisError=t.UnknownSignatureError=t.InvalidSignatureError=t.InvalidStructSignatureError=t.InvalidAbiParameterError=t.InvalidAbiParametersError=t.InvalidParameterError=t.SolidityProtectedKeywordError=t.InvalidModifierError=t.InvalidFunctionModifierError=t.InvalidAbiTypeParameterError=t.UnknownSolidityTypeError=t.InvalidAbiItemError=t.UnknownTypeError=t.parseAbiParameters=t.parseAbiParameter=t.parseAbiItem=t.parseAbi=t.formatAbiParameters=t.formatAbiParameter=t.formatAbiItem=t.formatAbi=t.narrow=t.BaseError=void 0;var n=r(86737);Object.defineProperty(t,"BaseError",{enumerable:!0,get:function(){return n.BaseError}});var i=r(55185);Object.defineProperty(t,"narrow",{enumerable:!0,get:function(){return i.narrow}});var a=r(59570);Object.defineProperty(t,"formatAbi",{enumerable:!0,get:function(){return a.formatAbi}});var s=r(67017);Object.defineProperty(t,"formatAbiItem",{enumerable:!0,get:function(){return s.formatAbiItem}});var o=r(35545);Object.defineProperty(t,"formatAbiParameter",{enumerable:!0,get:function(){return o.formatAbiParameter}});var l=r(21918);Object.defineProperty(t,"formatAbiParameters",{enumerable:!0,get:function(){return l.formatAbiParameters}});var c=r(93040);Object.defineProperty(t,"parseAbi",{enumerable:!0,get:function(){return c.parseAbi}});var u=r(67687);Object.defineProperty(t,"parseAbiItem",{enumerable:!0,get:function(){return u.parseAbiItem}});var d=r(27259);Object.defineProperty(t,"parseAbiParameter",{enumerable:!0,get:function(){return d.parseAbiParameter}});var h=r(22016);Object.defineProperty(t,"parseAbiParameters",{enumerable:!0,get:function(){return h.parseAbiParameters}});var p=r(50498);Object.defineProperty(t,"UnknownTypeError",{enumerable:!0,get:function(){return p.UnknownTypeError}}),Object.defineProperty(t,"InvalidAbiItemError",{enumerable:!0,get:function(){return p.InvalidAbiItemError}}),Object.defineProperty(t,"UnknownSolidityTypeError",{enumerable:!0,get:function(){return p.UnknownSolidityTypeError}});var f=r(46836);Object.defineProperty(t,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return f.InvalidAbiTypeParameterError}}),Object.defineProperty(t,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return f.InvalidFunctionModifierError}}),Object.defineProperty(t,"InvalidModifierError",{enumerable:!0,get:function(){return f.InvalidModifierError}}),Object.defineProperty(t,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return f.SolidityProtectedKeywordError}}),Object.defineProperty(t,"InvalidParameterError",{enumerable:!0,get:function(){return f.InvalidParameterError}}),Object.defineProperty(t,"InvalidAbiParametersError",{enumerable:!0,get:function(){return f.InvalidAbiParametersError}}),Object.defineProperty(t,"InvalidAbiParameterError",{enumerable:!0,get:function(){return f.InvalidAbiParameterError}});var m=r(48065);Object.defineProperty(t,"InvalidStructSignatureError",{enumerable:!0,get:function(){return m.InvalidStructSignatureError}}),Object.defineProperty(t,"InvalidSignatureError",{enumerable:!0,get:function(){return m.InvalidSignatureError}}),Object.defineProperty(t,"UnknownSignatureError",{enumerable:!0,get:function(){return m.UnknownSignatureError}});var g=r(17683);Object.defineProperty(t,"InvalidParenthesisError",{enumerable:!0,get:function(){return g.InvalidParenthesisError}});var y=r(27712);Object.defineProperty(t,"CircularReferenceError",{enumerable:!0,get:function(){return y.CircularReferenceError}})},65253:(e,t)=>{"use strict";
5862Object.defineProperty(t,"__esModule",{value:!0}),t.extraEntropy=void 0,t.setExtraEntropy=function(e){t.extraEntropy=e},t.extraEntropy=!1},65341:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checksum=void 0,t.clear=function(){for(let e of Object.values(n))e.clear()};let n={checksum:new(r(24465)).LruMap(8192)};t.checksum=n.checksum},65467:(e,t,r)=>{"use strict";r.d(t,{o:()=>d});var n=r(81742),i=r(53597),a=r(6755),s=r(35261);let o=new(r(1771)).A(8192);var l=r(34110),c=r(60783),u=r(96312);function d({key:e,methods:t,name:r,request:d,retryCount:h=3,retryDelay:p=150,timeout:f,type:m},g){return{config:{key:e,methods:t,name:r,request:d,retryCount:h,retryDelay:p,timeout:f,type:m},request:function(e,t={}){return async(r,u={})=>{let{dedupe:d=!1,methods:h,retryDelay:p=150,retryCount:f=3,signal:m,uid:g}={...t,...u},{method:y}=r;if(h?.exclude?.includes(y)||h?.include&&!h.include.includes(y))throw new a.ab(Error("method not supported"),{method:y});if(m?.aborted)throw(0,s.TY)(m);let b=d?function(e,t=0){let r=0xdeadbeef^t,n=0x41c6ce57^t;for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);r=Math.imul(r^i,0x9e3779b1),n=Math.imul(n^i,0x5f356495)}return r=Math.imul(r^r>>>16,0x85ebca6b)^Math.imul(n^n>>>16,0xc2b2ae35),(0x100000000*(2097151&(n=Math.imul(n^n>>>16,0x85ebca6b)^Math.imul(r^r>>>16,0xc2b2ae35)))+(r>>>0)).toString(36)}(`${g}.${(0,c.A)(r)}`):void 0;return function(e,{enabled:t=!0,id:r}){if(!t||!r)return e();if(o.get(r))return o.get(r);let n=e().finally(()=>o.delete(r));return o.set(r,n),n}(()=>(0,l.b)(async()=>{try{return await e(r,m?{signal:m}:void 0)}catch(e){if(m?.aborted)throw(0,s.TY)(m);if((0,s.zf)(e))throw e;switch(e.code){case a.XU.code:throw new a.XU(e);case a.CL.code:throw new a.CL(e);case a.Gi.code:throw new a.Gi(e,{method:r.method});case a.D5.code:throw new a.D5(e);case a.bq.code:throw new a.bq(e);case a.Di.code:throw new a.Di(e);case a.hA.code:throw new a.hA(e);case a.qZ.code:throw new a.qZ(e);case a.YW.code:throw new a.YW(e);case a.ab.code:throw new a.ab(e,{method:r.method});case a.s0.code:throw new a.s0(e);case a.xQ.code:throw new a.xQ(e);case a.vx.code:throw new a.vx(e);case a.sV.code:throw new a.sV(e);case a.Sf.code:throw new a.Sf(e);case a.RV.code:throw new a.RV(e);case a.xq.code:throw new a.xq(e);case a.ch.code:throw new a.ch(e);case a.L5.code:throw new a.L5(e);case a.WT.code:throw new a.WT(e);case a.hl.code:throw new a.hl(e);case a.cg.code:throw new a.cg(e);case a.uL.code:throw new a.uL(e);case a.G1.code:throw new a.G1(e);case a.jz.code:throw new a.jz(e);case 5e3:throw new a.vx(e);case a.nR.code:throw new a.nR(e);default:if(e instanceof n.C)throw e;throw new a.MI(e)}}},{delay:({count:e,error:t})=>{if(t&&t instanceof i.Ci){let e=t?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*Number.parseInt(e,10)}return~~(1<<e)*p},retryCount:f,signal:m,shouldRetry:({error:e})=>{var t;return t=e,!(0,s.zf)(t)&&("code"in t&&"number"==typeof t.code?-1===t.code||t.code===a.s0.code||t.code===a.bq.code||429===t.code:!(t instanceof i.Ci)||!t.status||403===t.status||408===t.status||413===t.status||429===t.status||500===t.status||502===t.status||503===t.status||504===t.status||!1)}}),{enabled:d,id:b})}}(d,{methods:t,retryCount:h,retryDelay:p,uid:(0,u.L)()}),value:g}}},65507:(e,t,r)=>{"use strict";var n=r(56059);r(79909),r(83627),r(6077);var i=r(46756),a=r(63412),s=r(91392);let o=(0,s.AH)` 5863 .reown-logo { 5864 height: 24px; 5865 } 5866 5867 a { 5868 text-decoration: none; 5869 cursor: pointer; 5870 color: ${({tokens:e})=>e.theme.textSecondary}; 5871 } 5872 5873 a:hover { 5874 opacity: 0.9; 5875 } 5876`,l=class extends n.WF{render(){return(0,n.qy)` 5877 <a 5878 data-testid="ux-branding-reown" 5879 href=${"https://reown.com"} 5880 rel="noreferrer" 5881 target="_blank" 5882 style="text-decoration: none;" 5883 > 5884 <wui-flex 5885 justifyContent="center" 5886 alignItems="center" 5887 gap="1" 5888 .padding=${["01","0","3","0"]} 5889 > 5890 <wui-text variant="sm-regular" color="inherit"> UX by </wui-text> 5891 <wui-icon name="reown" size="inherit" class="reown-logo"></wui-icon> 5892 </wui-flex> 5893 </a> 5894 `}};l.styles=[i.W5,i.fD,o],l=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}([(0,a.E)("wui-ux-by-reown")],l)},65770:(e,t,r)=>{"use strict";r.d(t,{s:()=>E});var n=r(18693),i=r(26531),a=r(40537),s=r(2022),o=r(14319);let l=(e,t)=>
vendor: 14,363 bytes, line 5894
5894(e+(e>=0?t:-t)/m)/t;function c(e){if(!["compact","recovered","der"].includes(e))throw Error('Signature format must be "compact", "recovered", or "der"');return e}function u(e,t){let r={};for(let n of Object.keys(t))r[n]=void 0===e[n]?t[n]:e[n];return(0,a.d6)(r.lowS,"lowS"),(0,a.d6)(r.prehash,"prehash"),void 0!==r.format&&c(r.format),r}class d extends Error{constructor(e=""){super(e)}}let h={Err:d,_tlv:{encode:(e,t)=>{let{Err:r}=h;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(1&t.length)throw new r("tlv.encode: unpadded data");let n=t.length/2,i=(0,a.zW)(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");let s=n>127?(0,a.zW)(i.length/2|128):"";return(0,a.zW)(e)+s+i+t},decode(e,t){let{Err:r}=h,n=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[n++]!==e)throw new r("tlv.decode: wrong tlv");let i=t[n++],a=0;if(128&i){let e=127&i;if(!e)throw new r("tlv.decode(long): indefinite length not supported");if(e>4)throw new r("tlv.decode(long): byte length is too big");let s=t.subarray(n,n+e);if(s.length!==e)throw new r("tlv.decode: length bytes not complete");if(0===s[0])throw new r("tlv.decode(long): zero leftmost byte");for(let e of s)a=a<<8|e;if(n+=e,a<128)throw new r("tlv.decode(long): not minimal encoding")}else a=i;let s=t.subarray(n,n+a);if(s.length!==a)throw new r("tlv.decode: wrong value length");return{v:s,l:t.subarray(n+a)}}},_int:{encode(e){let{Err:t}=h;if(e<p)throw new t("integer: negative integers are not allowed");let r=(0,a.zW)(e);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=h;if(128&e[0])throw new t("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return(0,a.Ph)(e)}},toSig(e){let{Err:t,_int:r,_tlv:n}=h,i=(0,a.qj)("signature",e),{v:s,l:o}=n.decode(48,i);if(o.length)throw new t("invalid signature: left bytes after parsing");let{v:l,l:c}=n.decode(2,s),{v:u,l:d}=n.decode(2,c);if(d.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(l),s:r.decode(u)}},hexFromSig(e){let{_tlv:t,_int:r}=h,n=t.encode(2,r.encode(e.r)),i=t.encode(2,r.encode(e.s));return t.encode(48,n+i)}},p=BigInt(0),f=BigInt(1),m=BigInt(2),g=BigInt(3),y=BigInt(4);function b(e,t){let r,{BYTES:n}=e;if("bigint"==typeof t)r=t;else{let i=(0,a.qj)("private key",t);try{r=e.fromBytes(i)}catch(e){throw Error(`invalid private key: expected ui8a of size ${n}, got ${typeof t}`)}}if(!e.isValidNot0(r))throw Error("invalid private key: out of range [1..N-1]");return r}function w(e){return Uint8Array.of(e?2:3)}function v(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function E(e,t){let r=t=>(function(e){let{CURVE:t,curveOpts:r,hash:d,ecdsaOpts:E}=function(e){let{CURVE:t,curveOpts:r}=function(e){let t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},r=e.Fp,n=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(e=>Math.ceil(e/2)))):void 0,i={Fp:r,Fn:(0,o.D0)(t.n,{BITS:e.nBitLength,allowedLengths:n,modFromBytes:e.wrapPrivateKey}),allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes};return{CURVE:t,curveOpts:i}}(e),n={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:r,hash:e.hash,ecdsaOpts:n}}(e),C=function(e,t,r={}){(0,i.sd)(t),(0,a.DS)(r,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});let s=r.randomBytes||i.po,l=r.hmac||((e,...r)=>(0,n.w)(t,e,(0,i.Id)(...r))),{Fp:d,Fn:g}=e,{ORDER:y,BITS:E}=g,{keygen:C,getPublicKey:A,getSharedSecret:x,utils:I,lengths:S}=function(e,t={}){let{Fn:r}=e,n=t.randomBytes||i.po,s=Object.assign(v(e.Fp,r),{seed:(0,o.Tp)(r.ORDER)});function l(e){try{return!!b(r,e)}catch(e){return!1}}function c(e=n(s.seed)){return(0,o.qy)((0,a.eV)(e,s.seed,"seed"),r.ORDER)}function u(t,n=!0){return e.BASE.multiply(b(r,t)).toBytes(n)}function d(t){if("bigint"==typeof t)return!1;if(t instanceof e)return!0;let{secretKey:n,publicKey:i,publicKeyUncompressed:o}=s;if(r.allowedLengths||n===i)return;let l=(0,a.qj)("key",t).length;return l===i||l===o}return Object.freeze({getPublicKey:u,getSharedSecret:function(t,n,i=!0){if(!0===d(t))throw Error("first arg must be private key");if(!1===d(n))throw Error("second arg must be public key");let a=b(r,t);return e.fromHex(n).multiply(a).toBytes(i)},keygen:function(e){let t=c(e);return{secretKey:t,publicKey:u(t)}},Point:e,utils:{isValidSecretKey:l,isValidPublicKey:function(t,r){let{publicKey:n,publicKeyUncompressed:i}=s;try{let a=t.length;if(!0===r&&a!==n||!1===r&&a!==i)return!1;return!!e.fromBytes(t)}catch(e){return!1}},randomSecretKey:c,isValidPrivateKey:l,randomPrivateKey:c,normPrivateKeyToScalar:e=>b(r,e),precompute:(t=8,r=e.BASE)=>r.precompute(t,!1)},lengths:s})}(e,r),T={prehash:!1,lowS:"boolean"==typeof r.lowS&&r.lowS,format:void 0,extraEntropy:!1},P="compact";function O(e,t){if(!g.isValidNot0(t))throw Error(`invalid signature ${e}: out of range 1..Point.Fn.ORDER`);return t}class _{constructor(e,t,r){this.r=O("r",e),this.s=O("s",t),null!=r&&(this.recovery=r),Object.freeze(this)}static fromBytes(e,t=P){let r;if(!function(e,t){c(t);let r=S.signature;(0,a.eV)(e,"compact"===t?r:"recovered"===t?r+1:void 0,`${t} signature`)}(e,t),"der"===t){let{r:t,s:r}=h.toSig((0,a.eV)(e));return new _(t,r)}"recovered"===t&&(r=e[0],t="compact",e=e.subarray(1));let n=g.BYTES,i=e.subarray(0,n),s=e.subarray(n,2*n);return new _(g.fromBytes(i),g.fromBytes(s),r)}static fromHex(e,t){return this.fromBytes((0,i.aT)(e),t)}addRecoveryBit(e){return new _(this.r,this.s,e)}recoverPublicKey(t){let r=d.ORDER,{r:n,s,recovery:o}=this;if(null==o||![0,1,2,3].includes(o))throw Error("recovery id invalid");if(y*m<r&&o>1)throw Error("recovery id is ambiguous for h>1 curve");let l=2===o||3===o?n+y:n;if(!d.isValid(l))throw Error("recovery id 2 or 3 invalid");let c=d.toBytes(l),u=e.fromBytes((0,i.Id)(w((1&o)==0),c)),h=g.inv(l),p=k((0,a.qj)("msgHash",t)),f=g.create(-p*h),b=g.create(s*h),v=e.BASE.multiplyUnsafe(f).add(u.multiplyUnsafe(b));if(v.is0())throw Error("point at infinify");return v.assertValidity(),v}hasHighS(){return this.s>y>>f}toBytes(e=P){if(c(e),"der"===e)return(0,i.aT)(h.hexFromSig(this));let t=g.toBytes(this.r),r=g.toBytes(this.s);if("recovered"===e){if(null==this.recovery)throw Error("recovery bit must be present");return(0,i.Id)(Uint8Array.of(this.recovery),t,r)}return(0,i.Id)(t,r)}toHex(e){return(0,i.My)(this.toBytes(e))}assertValidity(){}static fromCompact(e){return _.fromBytes((0,a.qj)("sig",e),"compact")}static fromDER(e){return _.fromBytes((0,a.qj)("sig",e),"der")}normalizeS(){return this.hasHighS()?new _(this.r,g.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return(0,i.My)(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return(0,i.My)(this.toBytes("compact"))}}let N=r.bits2int||function(e){if(e.length>8192)throw Error("input is too large");let t=(0,a.Ph)(e),r=8*e.length-E;return r>0?t>>BigInt(r):t},k=r.bits2int_modN||function(e){return g.create(N(e))},R=(0,a.OG)(E);function M(e){return(0,a.aK)("num < 2^"+E,e,p,R),g.toBytes(e)}function B(e,r){return(0,a.eV)(e,void 0,"message"),r?(0,a.eV)(t(e),void 0,"prehashed message"):e}return Object.freeze({keygen:C,getPublicKey:A,getSharedSecret:x,utils:I,lengths:S,Point:e,sign:function(r,n,o={}){let{seed:c,k2sig:d}=function(t,r,n){if(["recovered","canonical"].some(e=>e in n))throw Error("sign() legacy options not supported");let{lowS:o,prehash:l,extraEntropy:c}=u(n,T),d=k(t=B(t,l)),h=b(g,r),m=[M(h),M(d)];if(null!=c&&!1!==c){let e=!0===c?s(S.secretKey):c;m.push((0,a.qj)("extraEntropy",e))}return{seed:(0,i.Id)(...m),k2sig:function(t){let r=N(t);if(!g.isValidNot0(r))return;let n=g.inv(r),i=e.BASE.multiply(r).toAffine(),a=g.create(i.x);if(a===p)return;let s=g.create(n*g.create(d+a*h));if(s===p)return;let l=2*(i.x!==a)|Number(i.y&f),c=s;return o&&s>y>>f&&(c=g.neg(s),l^=1),new _(a,c,l)}}}(r=(0,a.qj)("message",r),n,o);return(0,a.fg)(t.outputLen,g.BYTES,l)(c,d)},verify:function(t,r,n,s={}){let{lowS:o,prehash:l,format:c}=u(s,T);if(n=(0,a.qj)("publicKey",n),r=B((0,a.qj)("message",r),l),"strict"in s)throw Error("options.strict was renamed to lowS");let d=void 0===c?function(e){let t,r="string"==typeof e||(0,i.aY)(e),n=!r&&null!==e&&"object"==typeof e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!r&&!n)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(n)t=new _(e.r,e.s);else if(r){try{t=_.fromBytes((0,a.qj)("sig",e),"der")}catch(e){if(!(e instanceof h.Err))throw e}if(!t)try{t=_.fromBytes((0,a.qj)("sig",e),"compact")}catch(e){return!1}}return!!t&&t}(t):_.fromBytes((0,a.qj)("sig",t),c);if(!1===d)return!1;try{let t=e.fromBytes(n);if(o&&d.hasHighS())return!1;let{r:i,s:a}=d,s=k(r),l=g.inv(a),c=g.create(s*l),u=g.create(i*l),h=e.BASE.multiplyUnsafe(c).add(t.multiplyUnsafe(u));if(h.is0())return!1;return g.create(h.x)===i}catch(e){return!1}},recoverPublicKey:function(e,t,r={}){let{prehash:n}=u(r,T);return t=B(t,n),_.fromBytes(e,"recovered").recoverPublicKey(t).toBytes()},Signature:_,hash:t})}(function(e,t={}){let r=(0,s.UT)("weierstrass",e,t),{Fp:n,Fn:o}=r,c=r.CURVE,{h:u,n:d}=c;(0,a.DS)(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});let{endo:h}=t;if(h&&(!n.is0(c.a)||"bigint"!=typeof h.beta||!Array.isArray(h.basises)))throw Error('invalid endo: expected "beta": bigint and "basises": array');let m=v(n,o);function E(){if(!n.isOdd)throw Error("compression is not supported: Field does not have .isOdd()")}let C=t.toBytes||function(e,t,r){let{x:s,y:o}=t.toAffine(),l=n.toBytes(s);if((0,a.d6)(r,"isCompressed"),!r)return(0,i.Id)(Uint8Array.of(4),l,n.toBytes(o));{E();let e=!n.isOdd(o);return(0,i.Id)(w(e),l)}},A=t.fromBytes||function(e){(0,a.eV)(e,void 0,"Point");let{publicKey:t,publicKeyUncompressed:r}=m,i=e.length,s=e[0],o=e.subarray(1);if(i===t&&(2===s||3===s)){let e,t=n.fromBytes(o);if(!n.isValid(t))throw Error("bad point: is not on curve, wrong x");let r=x(t);try{e=n.sqrt(r)}catch(e){throw Error("bad point: is not on curve, sqrt error"+(e instanceof Error?": "+e.message:""))}return E(),(1&s)==1!==n.isOdd(e)&&(e=n.neg(e)),{x:t,y:e}}if(i===r&&4===s){let e=n.BYTES,t=n.fromBytes(o.subarray(0,e)),r=n.fromBytes(o.subarray(e,2*e));if(!I(t,r))throw Error("bad point: is not on curve");return{x:t,y:r}}throw Error(`bad point: got length ${i}, expected compressed=${t} or uncompressed=${r}`)};function x(e){let t=n.sqr(e),r=n.mul(t,e);return n.add(n.add(r,n.mul(e,c.a)),c.b)}function I(e,t){let r=n.sqr(t),i=x(e);return n.eql(r,i)}if(!I(c.Gx,c.Gy))throw Error("bad curve params: generator point");let S=n.mul(n.pow(c.a,g),y),T=n.mul(n.sqr(c.b),BigInt(27));if(n.is0(n.add(S,T)))throw Error("bad curve params: a or b");function P(e,t,r=!1){if(!n.isValid(t)||r&&n.is0(t))throw Error(`bad point coordinate ${e}`);return t}function O(e){if(!(e instanceof M))throw Error("ProjectivePoint expected")}function _(e){if(!h||!h.basises)throw Error("no endo");return function(e,t,r){let[[n,i],[s,o]]=t,c=l(o*e,r),u=l(-i*e,r),d=e-c*n-u*s,h=-c*i-u*o,m=d<p,g=h<p;m&&(d=-d),g&&(h=-h);let y=(0,a.OG)(Math.ceil((0,a.dJ)(r)/2))+f;if(d<p||d>=y||h<p||h>=y)throw Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:m,k1:d,k2neg:g,k2:h}}(e,h.basises,o.ORDER)}let N=(0,a.x)((e,t)=>{let{X:r,Y:i,Z:a}=e;if(n.eql(a,n.ONE))return{x:r,y:i};let s=e.is0();null==t&&(t=s?n.ONE:n.inv(a));let o=n.mul(r,t),l=n.mul(i,t),c=n.mul(a,t);if(s)return{x:n.ZERO,y:n.ZERO};if(!n.eql(c,n.ONE))throw Error("invZ was invalid");return{x:o,y:l}}),k=(0,a.x)(e=>{if(e.is0()){if(t.allowInfinityPoint&&!n.is0(e.Y))return;throw Error("bad point: ZERO")}let{x:r,y:i}=e.toAffine();if(!n.isValid(r)||!n.isValid(i))throw Error("bad point: x or y not field elements");if(!I(r,i))throw Error("bad point: equation left != right");if(!e.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});function R(e,t,r,i,a){return r=new M(n.mul(r.X,e),r.Y,r.Z),t=(0,s.u0)(i,t),r=(0,s.u0)(a,r),t.add(r)}class M{constructor(e,t,r){this.X=P("x",e),this.Y=P("y",t,!0),this.Z=P("z",r),Object.freeze(this)}static CURVE(){return c}static fromAffine(e){let{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw Error("invalid affine point");if(e instanceof M)throw Error("projective point not allowed");return n.is0(t)&&n.is0(r)?M.ZERO:new M(t,r,n.ONE)}static fromBytes(e){let t=M.fromAffine(A((0,a.eV)(e,void 0,"point")));return t.assertValidity(),t}static fromHex(e){return M.fromBytes((0,a.qj)("pointHex",e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return j.createCache(this,e),t||this.multiply(g),this}assertValidity(){k(this)}hasEvenY(){let{y:e}=this.toAffine();if(!n.isOdd)throw Error("Field doesn't support isOdd");return!n.isOdd(e)}equals(e){O(e);let{X:t,Y:r,Z:i}=this,{X:a,Y:s,Z:o}=e,l=n.eql(n.mul(t,o),n.mul(a,i)),c=n.eql(n.mul(r,o),n.mul(s,i));return l&&c}negate(){return new M(this.X,n.neg(this.Y),this.Z)}double(){let{a:e,b:t}=c,r=n.mul(t,g),{X:i,Y:a,Z:s}=this,o=n.ZERO,l=n.ZERO,u=n.ZERO,d=n.mul(i,i),h=n.mul(a,a),p=n.mul(s,s),f=n.mul(i,a);return f=n.add(f,f),u=n.mul(i,s),u=n.add(u,u),o=n.mul(e,u),l=n.mul(r,p),l=n.add(o,l),o=n.sub(h,l),l=n.add(h,l),l=n.mul(o,l),o=n.mul(f,o),u=n.mul(r,u),p=n.mul(e,p),f=n.sub(d,p),f=n.mul(e,f),f=n.add(f,u),u=n.add(d,d),d=n.add(u,d),d=n.add(d,p),d=n.mul(d,f),l=n.add(l,d),p=n.mul(a,s),p=n.add(p,p),d=n.mul(p,f),o=n.sub(o,d),u=n.mul(p,h),u=n.add(u,u),new M(o,l,u=n.add(u,u))}add(e){O(e);let{X:t,Y:r,Z:i}=this,{X:a,Y:s,Z:o}=e,l=n.ZERO,u=n.ZERO,d=n.ZERO,h=c.a,p=n.mul(c.b,g),f=n.mul(t,a),m=n.mul(r,s),y=n.mul(i,o),b=n.add(t,r),w=n.add(a,s);b=n.mul(b,w),w=n.add(f,m),b=n.sub(b,w),w=n.add(t,i);let v=n.add(a,o);return w=n.mul(w,v),v=n.add(f,y),w=n.sub(w,v),v=n.add(r,i),l=n.add(s,o),v=n.mul(v,l),l=n.add(m,y),v=n.sub(v,l),d=n.mul(h,w),l=n.mul(p,y),d=n.add(l,d),l=n.sub(m,d),d=n.add(m,d),u=n.mul(l,d),m=n.add(f,f),m=n.add(m,f),y=n.mul(h,y),w=n.mul(p,w),m=n.add(m,y),y=n.sub(f,y),y=n.mul(h,y),w=n.add(w,y),f=n.mul(m,w
5894),u=n.add(u,f),f=n.mul(v,w),l=n.mul(b,l),l=n.sub(l,f),f=n.mul(b,m),d=n.mul(v,d),new M(l,u,d=n.add(d,f))}subtract(e){return this.add(e.negate())}is0(){return this.equals(M.ZERO)}multiply(e){let r,n,{endo:i}=t;if(!o.isValidNot0(e))throw Error("invalid scalar: out of range");let a=e=>j.cached(this,e,e=>(0,s.Ak)(M,e));if(i){let{k1neg:t,k1:s,k2neg:o,k2:l}=_(e),{p:c,f:u}=a(s),{p:d,f:h}=a(l);n=u.add(h),r=R(i.beta,c,d,t,o)}else{let{p:t,f:i}=a(e);r=t,n=i}return(0,s.Ak)(M,[r,n])[0]}multiplyUnsafe(e){let{endo:r}=t;if(!o.isValid(e))throw Error("invalid scalar: out of range");if(e===p||this.is0())return M.ZERO;if(e===f)return this;if(j.hasCache(this))return this.multiply(e);if(!r)return j.unsafe(this,e);{let{k1neg:t,k1:n,k2neg:i,k2:a}=_(e),{p1:o,p2:l}=(0,s.fH)(M,this,n,a);return R(r.beta,o,l,t,i)}}multiplyAndAddUnsafe(e,t,r){let n=this.multiplyUnsafe(t).add(e.multiplyUnsafe(r));return n.is0()?void 0:n}toAffine(e){return N(this,e)}isTorsionFree(){let{isTorsionFree:e}=t;return u===f||(e?e(M,this):j.unsafe(this,d).is0())}clearCofactor(){let{clearCofactor:e}=t;return u===f?this:e?e(M,this):this.multiplyUnsafe(u)}isSmallOrder(){return this.multiplyUnsafe(u).is0()}toBytes(e=!0){return(0,a.d6)(e,"isCompressed"),this.assertValidity(),C(M,this,e)}toHex(e=!0){return(0,i.My)(this.toBytes(e))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(e=!0){return this.toBytes(e)}_setWindowSize(e){this.precompute(e)}static normalizeZ(e){return(0,s.Ak)(M,e)}static msm(e,t){return(0,s.Xf)(M,o,e,t)}static fromPrivateKey(e){return M.BASE.multiply(b(o,e))}}M.BASE=new M(c.Gx,c.Gy,n.ONE),M.ZERO=new M(n.ZERO,n.ONE,n.ZERO),M.Fp=n,M.Fn=o;let B=o.BITS,j=new s.hT(M,t.endo?Math.ceil(B/2):B);return M.BASE.precompute(8),M}(t,r),d,E),A=C.Point;return Object.assign({},C,{ProjectivePoint:A,CURVE:Object.assign({},e,(0,o.LH)(A.Fn.ORDER,A.Fn.BITS))})})({...e,hash:t});return{...r(t),create:r}}},65910:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(33028).A)("clock-3",[["path",{d:"M12 6v6h4",key:"135r8i"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},66008:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeAbiParameters=function(e,t){if(e.length!==t.length)throw new n.AbiEncodingLengthMismatchError({expectedLength:e.length,givenLength:t.length});return f(function({params:e,values:t}){let r=[];for(let g=0;g<e.length;g++)r.push(function e({param:t,value:r}){let g=m(t.type);if(g){let[i,a]=g;return function(t,{length:r,param:i}){let a=null===r;if(!Array.isArray(t))throw new n.InvalidArrayError(t);if(!a&&t.length!==r)throw new n.AbiEncodingArrayLengthMismatchError({expectedLength:r,givenLength:t.length,type:`${i.type}[${r}]`});let s=0===t.length&&function e(t){let{type:r}=t;if("string"===r||"bytes"===r||r.endsWith("[]"))return!0;if("tuple"===r)return t.components.some(e);let n=m(r);return!!n&&e({...t,type:n[1]})}(i),o=[];for(let r=0;r<t.length;r++){let n=e({param:i,value:t[r]});n.dynamic&&(s=!0),o.push(n)}if(a||s){let e=f(o);if(a){let t=(0,h.numberToHex)(o.length,{size:32});return{dynamic:!0,encoded:(0,l.concatHex)([t,e])}}if(s)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,l.concatHex)(o.map(({encoded:e})=>e))}}(r,{length:i,param:{...t,type:a}})}if("tuple"===t.type)return function(t,{param:r}){let n=!1,i=[];for(let a=0;a<r.components.length;a++){let s=r.components[a],o=Array.isArray(t)?a:s.name,l=e({param:s,value:t[o]});i.push(l),l.dynamic&&(n=!0)}return{dynamic:n,encoded:n?f(i):(0,l.concatHex)(i.map(({encoded:e})=>e))}}(r,{param:t});if("address"===t.type){var y=r;if(!(0,o.isAddress)(y))throw new i.InvalidAddressError({address:y});return{dynamic:!1,encoded:(0,c.padHex)(y.toLowerCase())}}if("bool"===t.type){var b=r;if("boolean"!=typeof b)throw new a.BaseError(`Invalid boolean value: "${b}" (type: ${typeof b}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:(0,c.padHex)((0,h.boolToHex)(b))}}if(t.type.startsWith("uint")||t.type.startsWith("int")){let e=t.type.startsWith("int"),[,,n="256"]=p.integerRegex.exec(t.type)??[];return function(e,{signed:t,size:r=256}){if("number"==typeof r){let n=2n**(BigInt(r)-(t?1n:0n))-1n,i=t?-n-1n:0n;if(e>n||e<i)throw new s.IntegerOutOfRangeError({max:n.toString(),min:i.toString(),signed:t,size:r/8,value:e.toString()})}return{dynamic:!1,encoded:(0,h.numberToHex)(e,{size:32,signed:t})}}(r,{signed:e,size:Number(n)})}if(t.type.startsWith("bytes"))return function(e,{param:t}){let[,r]=t.type.split("bytes"),i=(0,u.size)(e);if(!r){let t=e;
5894return i%32!=0&&(t=(0,c.padHex)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,l.concatHex)([(0,c.padHex)((0,h.numberToHex)(i,{size:32})),t])}}if(i!==Number.parseInt(r,10))throw new n.AbiEncodingBytesSizeMismatchError({expectedSize:Number.parseInt(r,10),value:e});return{dynamic:!1,encoded:(0,c.padHex)(e,{dir:"right"})}}(r,{param:t});if("string"===t.type){var w=r;let e=(0,h.stringToHex)(w),t=Math.ceil((0,u.size)(e)/32),n=[];for(let r=0;r<t;r++)n.push((0,c.padHex)((0,d.slice)(e,32*r,(r+1)*32),{dir:"right"}));return{dynamic:!0,encoded:(0,l.concatHex)([(0,c.padHex)((0,h.numberToHex)((0,u.size)(e),{size:32})),...n])}}throw new n.InvalidAbiEncodingTypeError(t.type,{docsPath:"/docs/contract/encodeAbiParameters"})}({param:e[g],value:t[g]}));return r}({params:e,values:t}))},t.getArrayComponents=m;let n=r(82311),i=r(9301),a=r(45226),s=r(51674),o=r(63402),l=r(26504),c=r(3669),u=r(29813),d=r(4906),h=r(27083),p=r(46398);function f(e){let t=0;for(let r=0;r<e.length;r++){let{dynamic:n,encoded:i}=e[r];n?t+=32:t+=(0,u.size)(i)}let r=[],n=[],i=0;for(let a=0;a<e.length;a++){let{dynamic:s,encoded:o}=e[a];s?(r.push((0,h.numberToHex)(t+i,{size:32})),n.push(o),i+=(0,u.size)(o)):r.push(o)}return(0,l.concatHex)([...r,...n])}function m(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}},66353:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aggregate3Signature=void 0,t.aggregate3Signature="0x82ad56cb"},66498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAccessList=function(e){if(!e||0===e.length)return[];let t=[];for(let r=0;r<e.length;r++){let{address:s,storageKeys:o}=e[r];for(let e=0;e<o.length;e++)if(o[e].length-2!=64)throw new i.InvalidStorageKeySizeError({storageKey:o[e]});if(!(0,a.isAddress)(s,{strict:!1}))throw new n.InvalidAddressError({address:s});
5894t.push([s,o])}return t};let n=r(9301),i=r(44789),a=r(63402)},66620:(e,t,r)=>{"use strict";r.d(t,{j:()=>n});let n="0x0000000000000000000000000000000000000000"},66629:(e,t)=>{"use strict";async function r(e){return BigInt(await e.request({method:"eth_gasPrice"}))}Object.defineProperty(t,"__esModule",{value:!0}),t.getGasPrice=r},66803:(e,t,r)=>{"use strict";r(83627)},66883:(e,t,r)=>{"use strict";r.d(t,{AE:()=>i,Ez:()=>a,K3:()=>f,Kd:()=>u,PQ:()=>o,UF:()=>h,Y6:()=>s,Y8:()=>l,fk:()=>c,kW:()=>d,m7:()=>n,o7:()=>m,z4:()=>p});class n extends Error{constructor(e,t){super(e),this.error=t}}class i extends n{constructor(){super(...arguments),this.name="WalletNotReadyError"}}class a extends n{constructor(){super(...arguments),this.name="WalletConfigError"}}class s extends n{constructor(){super(...arguments),this.name="WalletConnectionError"}}class o extends n{constructor(){super(...arguments),this.name="WalletDisconnectedError"}}class l extends n{constructor(){super(...arguments),this.name="WalletDisconnectionError"}}class c extends n{constructor(){super(...arguments),this.name="WalletAccountError"}}class u extends n{constructor(){super(...arguments),this.name="WalletPublicKeyError"}}class d extends n{constructor(){super(...arguments),this.name="WalletNotConnectedError"}}class h extends n{constructor(){super(...arguments),this.name="WalletSendTransactionError"}}class p extends n{constructor(){super(...arguments),this.name="WalletSignTransactionError"}}class f extends n{constructor(){super(...arguments),this.name="WalletSignMessageError"}}class m extends n{constructor(){super(...arguments),this.name="WalletSignInError"}}},66889:(e,t,r)=>{"use strict";r.d(t,{w:()=>i});var n=r(77009);function i(e){return(0,n.M)({...e,state:!0,attribute:!1})}},67003:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeErc8010Signature=function(e){let{address:t,data:r,signature:a,to:s="hex"}=e,o=n.SignatureErc8010.wrap({authorization:{address:e.authorization.address,chainId:e.authorization.chainId,nonce:BigInt(e.authorization.nonce),r:BigInt(e.authorization.r),s:BigInt(e.authorization.s),yParity:e.authorization.yParity},data:r,signature:a,to:t});return"hex"===s?o:(0,i.hexToBytes)(o)};let n=r(59104),i=r(60037)},67017:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiItem=function(e){return"function"===e.type?`function ${e.name}(${(0,n.formatAbiParameters)(e.inputs)})${e.stateMutability&&"nonpayable"!==e.stateMutability?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${(0,n.formatAbiParameters)(e.outputs)})`:""}`:"event"===e.type?`event ${e.name}(${(0,n.formatAbiParameters)(e.inputs)})`:"error"===e.type?`error ${e.name}(${(0,n.formatAbiParameters)(e.inputs)})`:"constructor"===e.type?`constructor(${(0,n.formatAbiParameters)(e.inputs)})${"payable"===e.stateMutability?" payable":""}`:"fallback"===e.type?`fallback() external${"payable"===e.stateMutability?" payable":""}`:"receive() external payable"};let n=r(21918)},67088:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(11150),s=r(26274),o=r(53984),l=r(2076);let c=(0,n.AH)` 5895 :host { 5896 width: 100%; 5897 display: block; 5898 } 5899`;var u=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let d=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.text="",this.open=a.I.state.open,this.unsubscribe.push(s.I.subscribeKey("view",()=>{a.I.hide()}),o.W.subscribeKey("open",e=>{e||a.I.hide()}),a.I.subscribeKey("open",e=>{this.open=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),a.I.hide()}render(){return(0,n.qy)` 5900 <div 5901 @pointermove=${this.onMouseEnter.bind(this)} 5902 @pointerleave=${this.onMouseLeave.bind(this)} 5903 > 5904 ${this.renderChildren()} 5905 </div> 5906 `}renderChildren(){return(0,n.qy)`<slot></slot> `}onMouseEnter(){let e=this.getBoundingClientRect();if(!this.open){let t=document.querySelector("w3m-modal"),r={width:e.width,height:e.height,left:e.left,top:e.top};if(t){let n=t.getBoundingClientRect();r.left=e.left-(window.innerWidth-n.width)/2,r.top=e.top-(window.innerHeight-n.height)/2}a.I.showTooltip({message:this.text,triggerRect:r,variant:"shade"})}}onMouseLeave(e){this.contains(e.relatedTarget)||a.I.hide()}};d.styles=[c],u([(0,i.MZ)()],d.prototype,"text",void 0),u([(0,i.wk)()],d.prototype,"open",void 0),d=u([(0,l.EM
5906)("w3m-tooltip-trigger")],d)},67122:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ccipReadTunnel=function({batchGateways:e,ccipRequest:t=c.ccipRequest}){return{async request({data:r,sender:c,urls:d}){if(d.includes(u.localBatchGatewayUrl))return t({data:r,sender:c,urls:e});{let[u,h]=(0,o.decodeFunctionResult)({abi:n.batchGatewayAbi,functionName:"query",data:await t({data:(0,l.encodeFunctionData)({abi:n.batchGatewayAbi,functionName:"query",args:[[{sender:c,data:r,urls:d}]]}),sender:c,urls:e})});if(u[0]){let e;try{let t=(0,s.decodeErrorResult)({abi:[...n.batchGatewayAbi,i.solidityError],data:h[0]});if("HttpError"===t.errorName)e=new a.HttpRequestError({body:{message:t.args[1]},status:t.args[0],url:d.join(" | ")});else{let r=t.args[0];r&&(e=Error(r))}}catch{}throw e??Error("An unknown error occurred.")}return h[0]}}}};let n=r(91472),i=r(29414),a=r(17208),s=r(51513),o=r(72431),l=r(25230),c=r(56724),u=r(57660)},67535:(e,t,r)=>{"use strict";r.d(t,{NZ:()=>Q});var n=r(51843),i=r(92391),a=r(22890),s=r(10693),o=r(44582),l=r(98668),c=r(56595),u=r(76859),d=r(28302),h=r(4586);class p{fragment;name;signature;topic;args;constructor(e,t,r){let n=e.name,i=e.format();(0,s.n)(this,{fragment:e,name:n,signature:i,topic:t,args:r})}}class f{fragment;name;args;signature;selector;value;constructor(e,t,r,n){let i=e.name,a=e.format();(0,s.n)(this,{fragment:e,name:i,args:r,signature:a,selector:t,value:n})}}class m{fragment;name;args;signature;selector;constructor(e,t,r){let n=e.name,i=e.format();(0,s.n)(this,{fragment:e,name:n,args:r,signature:i,selector:t})}}class g{hash;_isIndexed;static isIndexed(e){return!!(e&&e._isIndexed)}constructor(e){(0,s.n)(this,{hash:e,_isIndexed:!0})}}let y={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},b={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:e=>{let t="unknown panic code";return e>=0&&e<=255&&y[e.toString()]&&(t=y[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${t})`}}};class w{fragments;deploy;fallback;receive;#e3;#e4;#e8;#e9;constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,this.#e8=new Map,this.#e3=new Map,this.#e4=new Map;let r=[];for(let e of t)try{r.push(h.FK.from(e))}catch(t){console.log(`[Warning] Invalid Fragment ${JSON.stringify(e)}:`,t.message)}(0,s.n)(this,{fragments:Object.freeze(r)});let n=null,i=!1;this.#e9=this.getAbiCoder(),this.fragments.forEach((e,t)=>{let r;switch(e.type){case"constructor":if(this.deploy)return void console.log("duplicate definition - constructor");(0,s.n)(this,{deploy:e});return;case"fallback":0===e.inputs.length?i=!0:((0,o.MR)(!n||e.payable!==n.payable,"conflicting fallback fragments",`fragments[${t}]`,e),i=(n=e).payable);return;case"function":r=this.#e8;break;case"event":r=this.#e4;break;case"error":r=this.#e3;break;default:return}let a=e.format();r.has(a)||r.set(a,e)}),this.deploy||(0,s.n)(this,{deploy:h.Pw.from("constructor()")}),(0,s.n)(this,{fallback:n,receive:i})}format(e){let t=e?"minimal":"full";return this.fragments.map(e=>e.format(t))}formatJson(){return JSON.stringify(this.fragments.map(e=>e.format("json")).map(e=>JSON.parse(e)))}getAbiCoder(){return u.y.defaultAbiCoder()}#e7(e,t,r){if((0,l.Lo)(e)){let t=e.toLowerCase();for(let e of this.#e8.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){let i=[];for(let[t,r]of this.#e8)t.split("(")[0]===e&&i.push(r);if(t){let e=t.length>0?t[t.length-1]:null,r=t.length,a=!0;n.V.isTyped(e)&&"overrides"===e.type&&(a=!1,r--);for(let e=i.length-1;e>=0;e--){let t=i[e].inputs.length;t===r||a&&t===r-1||i.splice(e,1)}for(let e=i.length-1;e>=0;e--){let r=i[e].inputs;for(let a=0;a<t.length;a++)if(n.V.isTyped(t[a])){if(a>=r.length){if("overrides"===t[a].type)continue;i.splice(e,1);break}if(t[a].type!==r[a].baseType){i.splice(e,1);break}}}}if(1===i.length&&t&&t.length!==i[0].inputs.length){let e=t[t.length-1];(null==e||Array.isArray(e)||"object"!=typeof e)&&i.splice(0,1)}if(0===i.length)return null;if(i.length>1&&r){let t=i.map(e=>JSON.stringify(e.format())).join(", ");(0,o.MR)(!1,`ambiguous function description (i.e. matches ${t})`,"key",e)}return i[0]}let i=this.#e8.get(h.hc.from(e).format());return i||null}getFunctionName(e){let t=this.#e7(e,null,!1);return(0,o.MR)(t,"no matching function","key",e),t.name}hasFunction(e){return!!this.#e7(e,null,!1)}getFunction(e,t){return this.#e7(e,t||null,!0)}forEachFunction(e){let t=Array.from(this.#e8.keys());t.sort((e,t)=>
5906e.localeCompare(t));for(let r=0;r<t.length;r++){let n=t[r];e(this.#e8.get(n),r)}}#te(e,t,r){if((0,l.Lo)(e)){let t=e.toLowerCase();for(let e of this.#e4.values())if(t===e.topicHash)return e;return null}if(-1===e.indexOf("(")){let i=[];for(let[t,r]of this.#e4)t.split("(")[0]===e&&i.push(r);if(t){for(let e=i.length-1;e>=0;e--)i[e].inputs.length<t.length&&i.splice(e,1);for(let e=i.length-1;e>=0;e--){let r=i[e].inputs;for(let a=0;a<t.length;a++)if(n.V.isTyped(t[a])&&t[a].type!==r[a].baseType){i.splice(e,1);break}}}if(0===i.length)return null;if(i.length>1&&r){let t=i.map(e=>JSON.stringify(e.format())).join(", ");(0,o.MR)(!1,`ambiguous event description (i.e. matches ${t})`,"key",e)}return i[0]}let i=this.#e4.get(h.Zp.from(e).format());return i||null}getEventName(e){let t=this.#te(e,null,!1);return(0,o.MR)(t,"no matching event","key",e),t.name}hasEvent(e){return!!this.#te(e,null,!1)}getEvent(e,t){return this.#te(e,t||null,!0)}forEachEvent(e){let t=Array.from(this.#e4.keys());t.sort((e,t)=>e.localeCompare(t));for(let r=0;r<t.length;r++){let n=t[r];e(this.#e4.get(n),r)}}getError(e,t){if((0,l.Lo)(e)){let t=e.toLowerCase();if(b[t])return h.bp.from(b[t].signature);for(let e of this.#e3.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){let t=[];for(let[r,n]of this.#e3)r.split("(")[0]===e&&t.push(n);if(0===t.length)return"Error"===e?h.bp.from("error Error(string)"):"Panic"===e?h.bp.from("error Panic(uint256)"):null;if(t.length>1){let r=t.map(e=>JSON.stringify(e.format())).join(", ");(0,o.MR)(!1,`ambiguous error description (i.e. ${r})`,"name",e)}return t[0]}if("Error(string)"===(e=h.bp.from(e).format()))return h.bp.from("error Error(string)");if("Panic(uint256)"===e)return h.bp.from("error Panic(uint256)");let r=this.#e3.get(e);return r||null}forEachError(e){let t=Array.from(this.#e3.keys());t.sort((e,t)=>e.localeCompare(t));for(let r=0;r<t.length;r++){let n=t[r];e(this.#e3.get(n),r)}}_decodeParams(e,t){return this.#e9.decode(e,t)}_encodeParams(e,t){return this.#e9.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){if("string"==typeof e){let t=this.getError(e);(0,o.MR)(t,"unknown error","fragment",e),e=t}return(0,o.MR)((0,l.ZG)(t,0,4)===e.selector,`data signature does not match error ${e.name}.`,"data",t),this._decodeParams(e.inputs,(0,l.ZG)(t,4))}encodeErrorResult(e,t){if("string"==typeof e){let t=this.getError(e);(0,o.MR)(t,"unknown error","fragment",e),e=t}return(0,l.xW)([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionData(e,t){if("string"==typeof e){let t=this.getFunction(e);(0,o.MR)(t,"unknown function","fragment",e),e=t}return(0,o.MR)((0,l.ZG)(t,0,4)===e.selector,`data signature does not match function ${e.name}.`,"data",t),this._decodeParams(e.inputs,(0,l.ZG)(t,4))}encodeFunctionData(e,t){if("string"==typeof e){let t=this.getFunction(e);(0,o.MR)(t,"unknown function","fragment",e),e=t}return(0,l.xW)([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionResult(e,t){if("string"==typeof e){let t=this.getFunction(e);(0,o.MR)(t,"unknown function","fragment",e),e=t}let r="invalid length for result data",n=(0,l.Lm)(t);if(n.length%32==0)try{return this.#e9.decode(e.outputs,n)}catch(e){r="could not decode result data"}(0,o.vA)(!1,r,"BAD_DATA",{value:(0,l.c$)(n),info:{method:e.name,signature:e.format()}})}makeError(e,t){let r=(0,l.q5)(e,"data"),n=u.y.getBuiltinCallException("call",t,r);if(n.message.startsWith("execution reverted (unknown custom error)")){let e=(0,l.c$)(r.slice(0,4)),t=this.getError(e);
5906if(t)try{let e=this.#e9.decode(t.inputs,r.slice(4));n.revert={name:t.name,signature:t.format(),args:e},n.reason=n.revert.signature,n.message=`execution reverted: ${n.reason}`}catch(e){n.message="execution reverted (coult not decode custom error)"}}let i=this.parseTransaction(t);return i&&(n.invocation={method:i.name,signature:i.signature,args:i.args}),n}encodeFunctionResult(e,t){if("string"==typeof e){let t=this.getFunction(e);(0,o.MR)(t,"unknown function","fragment",e),e=t}return(0,l.c$)(this.#e9.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){if("string"==typeof e){let t=this.getEvent(e);(0,o.MR)(t,"unknown event","eventFragment",e),e=t}(0,o.vA)(t.length<=e.inputs.length,`too many arguments for ${e.format()}`,"UNEXPECTED_ARGUMENT",{count:t.length,expectedCount:e.inputs.length});let r=[];e.anonymous||r.push(e.topicHash);let n=(e,t)=>"string"===e.type?(0,a.id)(t):"bytes"===e.type?(0,i.S)((0,l.c$)(t)):("bool"===e.type&&"boolean"==typeof t?t=t?"0x01":"0x00":e.type.match(/^u?int/)?t=(0,c.up)(t):e.type.match(/^bytes/)?t=(0,l.X_)(t,32):"address"===e.type&&this.#e9.encode(["address"],[t]),(0,l.nx)((0,l.c$)(t),32));for(t.forEach((t,i)=>{let a=e.inputs[i];if(!a.indexed)return void(0,o.MR)(null==t,"cannot filter non-indexed parameters; must be null","contract."+a.name,t);null==t?r.push(null):"array"===a.baseType||"tuple"===a.baseType?(0,o.MR)(!1,"filtering with tuples or arrays not supported","contract."+a.name,t):Array.isArray(t)?r.push(t.map(e=>n(a,e))):r.push(n(a,t))});r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){if("string"==typeof e){let t=this.getEvent(e);(0,o.MR)(t,"unknown event","eventFragment",e),e=t}let r=[],n=[],s=[];return e.anonymous||r.push(e.topicHash),(0,o.MR)(t.length===e.inputs.length,"event arguments/values mismatch","values",t),e.inputs.forEach((e,o)=>{let l=t[o];if(e.indexed)if("string"===e.type)r.push((0,a.id)(l));else if("bytes"===e.type)r.push((0,i.S)(l));else if("tuple"===e.baseType||"array"===e.baseType)throw Error("not implemented");else r.push(this.#e9.encode([e.type],[l]));else n.push(e),s.push(l)}),{data:this.#e9.encode(n,s),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e){let t=this.getEvent(e);(0,o.MR)(t,"unknown event","eventFragment",e),e=t}if(null!=r&&!e.anonymous){let t=e.topicHash;(0,o.MR)((0,l.Lo)(r[0],32)&&r[0].toLowerCase()===t,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}let n=[],i=[],a=[];e.inputs.forEach((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(h.aX.from({type:"bytes32",name:e.name})),a.push(!0)):(n.push(e),a.push(!1)):(i.push(e),a.push(!1))});let s=null!=r?this.#e9.decode(n,(0,l.xW)(r)):null,c=this.#e9.decode(i,t,!0),u=[],p=[],f=0,m=0;return e.inputs.forEach((e,t)=>{let r=null;if(e.indexed)if(null==s)r=new g(null);else if(a[t])r=new g(s[m++]);else try{r=s[m++]}catch(e){r=e}else try{r=c[f++]}catch(e){r=e}u.push(r),p.push(e.name||null)}),d.Q7.fromItems(u,p)}parseTransaction(e){let t=(0,l.q5)(e.data,"tx.data"),r=(0,c.Ab)(null!=e.value?e.value:0,"tx.value"),n=this.getFunction((0,l.c$)(t.slice(0,4)));if(!n)return null;let i=this.#e9.decode(n.inputs,t.slice(4));return new f(n,n.selector,i,r)}parseCallResult(e){throw Error("@TODO")}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new p(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){let t=(0,l.c$)(e),r=this.getError((0,l.ZG)(t,0,4));if(!r)return null;let n=this.#e9.decode(r.inputs,(0,l.ZG)(t,4));return new m(r,r.selector,n)}static from(e){return e instanceof w?e:new w("string"==typeof e?JSON.parse(e):"function"==typeof e.formatJson?e.formatJson():"function"==typeof e.format?e.format("json"):e)}}var v=r(94622),E=r(47148),C=r(31101);class A extends E.tG{interface;fragment;args;constructor(e,t,r){super(e,e.provider);let n=t.decodeEventLog(r,e.data,e.topics);(0,s.n)(this,{args:n,fragment:r,interface:t})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class x extends E.tG{error;constructor(e,t){super(e,e.provider),(0,s.n)(this,{error:t})}}
5906class I extends E.z5{#tt;constructor(e,t,r){super(r,t),this.#tt=e}get logs(){return super.logs.map(e=>{let t=e.topics.length?this.#tt.getEvent(e.topics[0]):null;if(t)try{return new A(e,this.#tt,t)}catch(t){return new x(e,t)}return e})}}class S extends E.uI{#tt;constructor(e,t,r){super(r,t),this.#tt=e}async wait(e,t){let r=await super.wait(e,t);return null==r?null:new I(this.#tt,this.provider,r)}}class T extends C.z{log;constructor(e,t,r,n){super(e,t,r),(0,s.n)(this,{log:n})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class P extends T{constructor(e,t,r,n,i){super(e,t,r,new A(i,e.interface,n));let a=e.interface.decodeEventLog(n,this.log.data,this.log.topics);(0,s.n)(this,{args:a,fragment:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}let O=BigInt(0);function _(e){return e&&"function"==typeof e.call}function N(e){return e&&"function"==typeof e.estimateGas}function k(e){return e&&"function"==typeof e.resolveName}function R(e){return e&&"function"==typeof e.sendTransaction}function M(e){if(null!=e){if(k(e))return e;if(e.provider)return e.provider}}class B{#J;fragment;constructor(e,t,r){if((0,s.n)(this,{fragment:t}),t.inputs.length<r.length)throw Error("too many arguments");let n=j(e.runner,"resolveName"),i=k(n)?n:null;this.#J=async function(){let n=await Promise.all(t.inputs.map((e,t)=>null==r[t]?null:e.walkAsync(r[t],(e,t)=>"address"===e?Array.isArray(t)?Promise.all(t.map(e=>(0,v.tG)(e,i))):(0,v.tG)(t,i):t)));return e.interface.encodeFilterTopics(t,n)}()}getTopicFilter(){return this.#J}}function j(e,t){return null==e?null:"function"==typeof e[t]?e:e.provider&&"function"==typeof e.provider[t]?e.provider:null}function U(e){return null==e?null:e.provider||null}async function $(e,t){let r=n.V.dereference(e,"overrides");(0,o.MR)("object"==typeof r,"invalid overrides parameter","overrides",e);let i=(0,E.VS)(r);return(0,o.MR)(null==i.to||(t||[]).indexOf("to")>=0,"cannot override to","overrides.to",i.to),(0,o.MR)(null==i.data||(t||[]).indexOf("data")>=0,"cannot override data","overrides.data",i.data),i.from&&(i.from=i.from),i}async function L(e,t,r){let i=j(e,"resolveName"),a=k(i)?i:null;return await Promise.all(t.map((e,t)=>e.walkAsync(r[t],(e,t)=>(t=n.V.dereference(t,e),"address"===e)?(0,v.tG)(t,a):t)))}let D=Symbol.for("_ethersInternal_contract"),F=new WeakMap;function H(e){return F.get(e[D])}async function z(e,t){let r,n=null;if(Array.isArray(t)){let n=function(t){if((0,l.Lo)(t,32))return t;let r=e.interface.getEvent(t);return(0,o.MR)(r,"unknown fragment","name",t),r.topicHash};r=t.map(e=>null==e?null:Array.isArray(e)?e.map(n):n(e))}else if("*"===t)r=[null];else if("string"==typeof t)(0,l.Lo)(t,32)?r=[t]:(n=e.interface.getEvent(t),(0,o.MR)(n,"unknown fragment","event",t),r=[n.topicHash]);else t&&"object"==typeof t&&"getTopicFilter"in t&&"function"==typeof t.getTopicFilter&&t.fragment?r=await t.getTopicFilter():"fragment"in t?r=[(n=t.fragment).topicHash]:(0,o.MR)(!1,"unknown event name","event",t);return{fragment:n,tag:(r=r.map(e=>{if(null==e)return null;if(Array.isArray(e)){let t=Array.from(new Set(e.map(e=>e.toLowerCase())).values());return 1===t.length?t[0]:(t.sort(),t)}return e.toLowerCase()})).map(e=>null==e?"null":Array.isArray(e)?e.join("|"):e).join("&"),topics:r}}async function W(e,t){let{subs:r}=H(e);return r.get((await z(e,t)).tag)||null}async function q(e,t,r){let n=U(e.runner);(0,o.vA)(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:t});let{fragment:i,tag:a,topics:s}=await z(e,r),{addr:l,subs:c}=H(e),u=c.get(a);if(!u){let t={address:l||e,topics:s},o=t=>{let n=i;if(null==n)try{n=e.interface.getEvent(t.topics[0])}catch(e){}if(n){let a=n,s=i?e.interface.decodeEventLog(i,t.data,t.topics):[];K(e,r,s,n=>new P(e,n,r,a,t))}else K(e,r,[],n=>new T(e,n,r,t))},d=[];u={tag:a,listeners:[],start:()=>{d.length||d.push(n.on(t,o))},stop:async()=>{if(0==d.length)return;let e=d;d=[],await Promise.all(e),n.off(t,o)}},c.set(a,u)}return u}let V=Promise.resolve();async function G(e,t,r,n){await V;let i=await W(e,t);if(!i)return!1;let a=i.listeners.length;return i.listeners=i.listeners.filter(({listener:t,once:i})=>{let a=Array.from(r);n&&a.push(n(i?null:t));try{t.call(e,...a)}catch(e){}return!i}),0===i.listeners.length&&(i.stop(),H(e).subs.delete(i.tag)),a>0}async function K(e,t,r,n){try{await V}catch(e){}let i=G(e,t,r,n);return V=i,await i}let Z=["then"];class J{target;interface;runner;filters;[D];fallback;constructor(e,t,r,n){var i;let a;
5906(0,o.MR)("string"==typeof e||(0,v.$C)(e),"invalid value for Contract target","target",e),null==r&&(r=null);let u=w.from(t);(0,s.n)(this,{target:e,runner:r,interface:u}),Object.defineProperty(this,D,{value:{}});let d=null,h=null;if(n){let e=U(r);h=new S(this.interface,e,n)}let p=new Map;if("string"==typeof e)if((0,l.Lo)(e))d=e,a=Promise.resolve(e);else{let t=j(r,"resolveName");if(!k(t))throw(0,o.xz)("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});a=t.resolveName(e).then(t=>{if(null==t)throw(0,o.xz)("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return H(this).addr=t,t})}else a=e.getAddress().then(e=>{if(null==e)throw Error("TODO");return H(this).addr=e,e});i={addrPromise:a,addr:d,deployTx:h,subs:p},F.set(this[D],i);let f=new Proxy({},{get:(e,t,r)=>{if("symbol"==typeof t||Z.indexOf(t)>=0)return Reflect.get(e,t,r);try{return this.getEvent(t)}catch(e){if(!(0,o.bJ)(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,t)=>Z.indexOf(t)>=0?Reflect.has(e,t):Reflect.has(e,t)||this.interface.hasEvent(String(t))});return(0,s.n)(this,{filters:f}),(0,s.n)(this,{fallback:u.receive||u.fallback?function(e){let t=async function(t){let r=await $(t,["data"]);r.to=await e.getAddress(),r.from&&(r.from=await (0,v.tG)(r.from,M(e.runner)));let n=e.interface,i=(0,c.Ab)(r.value||O,"overrides.value")===O,a="0x"===(r.data||"0x");!n.fallback||n.fallback.payable||!n.receive||a||i||(0,o.MR)(!1,"cannot send data to receive or send value to non-payable fallback","overrides",t),(0,o.MR)(n.fallback||a,"cannot send data to receive-only contract","overrides.data",r.data);let s=n.receive||n.fallback&&n.fallback.payable;return(0,o.MR)(s||i,"cannot send value to non-payable fallback","overrides.value",r.value),(0,o.MR)(n.fallback||a,"cannot send data to receive-only contract","overrides.data",r.data),r},r=async function(r){let n=j(e.runner,"call");(0,o.vA)(_(n),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});let i=await t(r);try{return await n.call(i)}catch(t){if((0,o.E)(t)&&t.data)throw e.interface.makeError(t.data,i);throw t}},n=async function(r){let n=e.runner;(0,o.vA)(R(n),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});let i=await n.sendTransaction(await t(r)),a=U(e.runner);return new S(e.interface,a,i)},i=async function(r){let n=j(e.runner,"estimateGas");return(0,o.vA)(N(n),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await n.estimateGas(await t(r))},a=async e=>await n(e);return(0,s.n)(a,{_contract:e,estimateGas:i,populateTransaction:t,send:n,staticCall:r}),a}(this):null}),new Proxy(this,{get:(e,t,r)=>{if("symbol"==typeof t||t in e||Z.indexOf(t)>=0)return Reflect.get(e,t,r);try{return e.getFunction(t)}catch(e){if(!(0,o.bJ)(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,t)=>"symbol"==typeof t||t in e||Z.indexOf(t)>=0?Reflect.has(e,t):e.interface.hasFunction(t)})}connect(e){return new J(this.target,this.interface,e)}attach(e){return new J(e,this.interface,this.runner)}async getAddress(){return await H(this).addrPromise}async getDeployedCode(){let e=U(this.runner);(0,o.vA)(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});let t=await e.getCode(await this.getAddress());return"0x"===t?null:t}async waitForDeployment(){let e=this.deploymentTransaction();
5906if(e)return await e.wait(),this;if(null!=await this.getDeployedCode())return this;let t=U(this.runner);return(0,o.vA)(null!=t,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((e,r)=>{let n=async()=>{try{let r=await this.getDeployedCode();if(null!=r)return e(this);t.once("block",n)}catch(e){r(e)}};n()})}deploymentTransaction(){return H(this).deployTx}getFunction(e){return"string"!=typeof e&&(e=e.format()),function(e,t){let r=function(...r){let n=e.interface.getFunction(t,r);return(0,o.vA)(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:r}}),n},n=async function(...t){let n=r(...t),i={};if(n.inputs.length+1===t.length&&(i=await $(t.pop())).from&&(i.from=await (0,v.tG)(i.from,M(e.runner))),n.inputs.length!==t.length)throw Error("internal error: fragment inputs doesn't match arguments; should not happen");let a=await L(e.runner,n.inputs,t);return Object.assign({},i,await (0,s.k)({to:e.getAddress(),data:e.interface.encodeFunctionData(n,a)}))},i=async function(...e){let t=await c(...e);return 1===t.length?t[0]:t},a=async function(...t){let r=e.runner;(0,o.vA)(R(r),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});let i=await r.sendTransaction(await n(...t)),a=U(e.runner);return new S(e.interface,a,i)},l=async function(...t){let r=j(e.runner,"estimateGas");return(0,o.vA)(N(r),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await r.estimateGas(await n(...t))},c=async function(...t){let i=j(e.runner,"call");(0,o.vA)(_(i),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});let a=await n(...t),s="0x";try{s=await i.call(a)}catch(t){if((0,o.E)(t)&&t.data)throw e.interface.makeError(t.data,a);throw t}let l=r(...t);return e.interface.decodeFunctionResult(l,s)},u=async(...e)=>r(...e).constant?await i(...e):await a(...e);return(0,s.n)(u,{name:e.interface.getFunctionName(t),_contract:e,_key:t,getFragment:r,estimateGas:l,populateTransaction:n,send:a,staticCall:i,staticCallResult:c}),Object.defineProperty(u,"fragment",{configurable:!1,enumerable:!0,get:()=>{let r=e.interface.getFunction(t);return(0,o.vA)(r,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),r}}),u}(this,e)}getEvent(e){"string"!=typeof e&&(e=e.format());var t=this,r=e;let n=function(...e){let n=t.interface.getEvent(r,e);return(0,o.vA)(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:r,args:e}}),n},i=function(...e){return new B(t,n(...e),e)};return(0,s.n)(i,{name:t.interface.getEventName(r),_contract:t,_key:r,getFragment:n}),Object.defineProperty(i,"fragment",{configurable:!1,enumerable:!0,get:()=>{let e=t.interface.getEvent(r);return(0,o.vA)(e,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:r}}),e}}),i}async queryTransaction(e){throw Error("@TODO")}async queryFilter(e,t,r){null==t&&(t=0),null==r&&(r="latest");let{addr:n,addrPromise:i}=H(this),a=n||await i,{fragment:s,topics:l}=await z(this,e),c={address:a,topics:l,fromBlock:t,toBlock:r},u=U(this.runner);return(0,o.vA)(u,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await u.getLogs(c)).map(e=>{let t=s;if(null==t)try{t=this.interface.getEvent(e.topics[0])}catch(e){}if(t)try{return new A(e,this.interface,t)}catch(t){return new x(e,t)}return new E.tG(e,u)})}async on(e,t){let r=await q(this,"on",e);return r.listeners.push({listener:t,once:!1}),r.start(),this}async once(e,t){let r=await q(this,"once",e);return r.listeners.push({listener:t,once:!0}),r.start(),this}async emit(e,...t){return await K(this,e,t,null)}async listenerCount(e){if(e){let t=await W(this,e);return t?t.listeners.length:0}let{subs:t}=H(this),r=0;for(let{listeners:e}of t.values())r+=e.length;return r}async listeners(e){if(e){let t=await W(this,e);return t?t.listeners.map(({listener:e})=>e):[]}let{subs:t}=H(this),r=[];for(let{listeners:e}of t.values())r=r.concat(e.map(({listener:e})=>e));return r}async off(e,t){let r=await W(this,e);if(!r)return this;if(t){let e=r.listeners.map(({listener:e})=>e).indexOf(t);e>=0&&r.listeners.splice(e,1)}return(null==t||0===r.listeners.length)&&(r.stop(),H(this).subs.delete(r.tag)),this}async removeAllListeners(e){if(e){let t=await W(this,e);if(!t)return this;t.stop(),H(this).subs.delete(t.tag)}else{let{subs:e}=H(this);for(let{tag:t,stop:r}of e.values())r(),e.delete(t)}return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return await this.off(e,t)}static buildClass(e){class t extends J{constructor(t,r=null){super(t,e,r)}}return t}static from(e,t,r){return null==r&&(r=null),new this(e,t,r)}}function Y(){return J}class Q extends Y(){}},67687:(e,t,r)=>{"use strict";
5906Object.defineProperty(t,"__esModule",{value:!0}),t.parseAbiItem=function(e){let t;if("string"==typeof e)t=(0,s.parseSignature)(e);else{let r=(0,a.parseStructs)(e),n=e.length;for(let a=0;a<n;a++){let n=e[a];if(!(0,i.isStructSignature)(n)){t=(0,s.parseSignature)(n,r);break}}}if(!t)throw new n.InvalidAbiItemError({signature:e});return t};let n=r(50498),i=r(25065),a=r(8912),s=r(20295)},68495:(e,t,r)=>{"use strict";r.d(t,{k:()=>a});var n=r(20801);let i=(e,t)=>{let r=e instanceof Map?e:new Map(e.entries()),n=t instanceof Map?t:new Map(t.entries());if(r.size!==n.size)return!1;for(let[e,t]of r)if(!n.has(e)||!Object.is(t,n.get(e)))return!1;return!0};function a(e){let t=n.useRef(void 0);return r=>{let n=e(r);return!function(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;if(Symbol.iterator in e&&Symbol.iterator in t){if("entries"in e&&"entries"in t)return i(e,t);let r=e[Symbol.iterator](),n=t[Symbol.iterator](),a=r.next(),s=n.next();for(;!a.done&&!s.done;){if(!Object.is(a.value,s.value))return!1;a=r.next(),s=n.next()}return!!a.done&&!!s.done}return i({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}(t.current,n)?t.current=n:t.current}}},68508:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=void 0,t.stringify=(e,t,r)=>JSON.stringify(e,(e,r)=>{let n="bigint"==typeof r?r.toString():r;return"function"==typeof t?t(e,n):n},r)},68799:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.maxInt8=t.universalSignatureValidatorByteCode=t.erc6492SignatureValidatorByteCode=t.deploylessCallViaFactoryBytecode=t.deploylessCallViaBytecodeBytecode=t.zeroHash=t.zeroAddress=t.ethAddress=t.multicall3Abi=t.universalSignatureValidatorAbi=t.erc6492SignatureValidatorAbi=t.erc4626Abi=t.erc1155Abi=t.erc721Abi=t.erc20Abi_bytes32=t.erc20Abi=t.webSocket=t.http=t.shouldThrow=t.fallback=t.custom=t.createTransport=t.walletActions=t.testActions=t.publicActions=t.createWalletClient=t.createTestClient=t.createPublicClient=t.rpcSchema=t.createClient=t.WaitForCallsStatusTimeoutError=t.getContract=t.UnknownTypeError=t.UnknownSignatureError=t.SolidityProtectedKeywordError=t.parseAbiParameters=t.parseAbiParameter=t.parseAbiItem=t.parseAbi=t.InvalidStructSignatureError=t.InvalidSignatureError=t.InvalidParenthesisError=t.InvalidParameterError=t.InvalidModifierError=t.InvalidFunctionModifierError=t.InvalidAbiTypeParameterError=t.InvalidAbiParametersError=t.InvalidAbiParameterError=t.InvalidAbiItemError=t.CircularReferenceError=void 0,t.maxUint152=t.maxUint144=t.maxUint136=t.maxUint128=t.maxUint120=t.maxUint112=t.maxUint104=t.maxUint96=t.maxUint88=t.maxUint80=t.maxUint72=t.maxUint64=t.maxUint56=t.maxUint48=t.maxUint40=t.maxUint32=t.maxUint24=t.maxUint16=t.maxUint8=t.maxInt256=t.maxInt248=t.maxInt240=t.maxInt232=t.maxInt224=t.maxInt216=t.maxInt208=t.maxInt200=t.maxInt192=t.maxInt184=t.maxInt176=t.maxInt168=t.maxInt160=t.maxInt152=t.maxInt144=t.maxInt136=t.maxInt128=t.maxInt120=t.maxInt112=t.maxInt104=t.maxInt96=t.maxInt88=t.maxInt80=t.maxInt72=t.maxInt64=t.maxInt56=t.maxInt48=t.maxInt40=t.maxInt32=t.maxInt24=t.maxInt16=void 0,t.AbiConstructorNotFoundError=t.weiUnits=t.gweiUnits=t.etherUnits=t.presignMessagePrefix=t.minInt256=t.minInt248=t.minInt240=t.minInt232=t.minInt224=t.minInt216=t.minInt208=t.minInt200=t.minInt192=t.minInt184=t.minInt176=t.minInt168=t.minInt160=t.minInt152=t.minInt144=t.minInt136=t.minInt128=t.minInt120=t.minInt112=t.minInt104=t.minInt96=t.minInt88=t.minInt80=t.minInt72=t.minInt64=t.minInt56=t.minInt48=t.minInt40=t.minInt32=t.minInt24=t.minInt16=t.minInt8=t.maxUint256=t.maxUint248=t.maxUint240=t.maxUint232=t.maxUint224=t.maxUint216=t.maxUint208=t.maxUint200=t.maxUint192=t.maxUint184=t.maxUint176=t.maxUint168=t.maxUint160=void 0,t.SizeOverflowError=t.RlpTrailingBytesError=t.RlpListBoundaryExceededError=t.RlpDepthLim
5906itExceededError=t.InvalidHexValueError=t.InvalidHexBooleanError=t.InvalidBytesBooleanError=t.IntegerOutOfRangeError=t.SliceOffsetOutOfBoundsError=t.SizeExceedsPaddingSizeError=t.RawContractError=t.CounterfactualDeploymentFailedError=t.ContractFunctionZeroDataError=t.ContractFunctionRevertedError=t.ContractFunctionExecutionError=t.CallExecutionError=t.InvalidChainIdError=t.ClientChainNotConfiguredError=t.ChainNotFoundError=t.ChainMismatchError=t.ChainDoesNotSupportContract=t.BundleFailedError=t.BlockNotFoundError=t.setErrorConfig=t.BaseError=t.InvalidAddressError=t.UnsupportedPackedAbiType=t.InvalidDefinitionTypeError=t.InvalidArrayError=t.InvalidAbiEncodingTypeError=t.InvalidAbiDecodingTypeError=t.DecodeLogTopicsMismatch=t.DecodeLogDataMismatch=t.BytesSizeMismatchError=t.AbiFunctionSignatureNotFoundError=t.AbiFunctionOutputsNotFoundError=t.AbiFunctionNotFoundError=t.AbiEventSignatureNotFoundError=t.AbiEventSignatureEmptyTopicsError=t.AbiEventNotFoundError=t.AbiErrorSignatureNotFoundError=t.AbiErrorNotFoundError=t.AbiErrorInputsNotFoundError=t.AbiEncodingLengthMismatchError=t.AbiEncodingBytesSizeMismatchError=t.AbiEncodingArrayLengthMismatchError=t.AbiDecodingZeroDataError=t.AbiDecodingDataSizeTooSmallError=t.AbiDecodingDataSizeInvalidError=t.AbiConstructorParamsNotFoundError=void 0,t.UnknownBundleIdError=t.UnauthorizedProviderError=t.TransactionRejectedRpcError=t.SwitchChainError=t.RpcError=t.ResourceUnavailableRpcError=t.ResourceNotFoundRpcError=t.ProviderRpcError=t.ProviderDisconnectedError=t.ParseRpcError=t.MethodNotSupportedRpcError=t.MethodNotFoundRpcError=t.LimitExceededRpcError=t.JsonRpcVersionUnsupportedError=t.InvalidRequestRpcError=t.InvalidParamsRpcError=t.InvalidInputRpcError=t.InternalRpcError=t.DuplicateIdError=t.ChainDisconnectedError=t.BundleTooLargeError=t.AtomicReadyWalletRejectedUpgradeError=t.AtomicityNotSupportedError=t.WebSocketRequestError=t.TimeoutError=t.SocketClosedError=t.RpcRequestError=t.ResponseBodyTooLargeError=t.HttpRequestError=t.UnknownNodeError=t.TransactionTypeNotSupportedError=t.TipAboveFeeCapError=t.NonceTooLowError=t.NonceTooHighError=t.NonceMaxValueError=t.IntrinsicGasTooLowError=t.IntrinsicGasTooHighError=t.InsufficientFundsError=t.FeeCapTooLowError=t.FeeCapTooHighError=t.ExecutionRevertedError=t.FilterTypeNotSupportedError=t.MaxFeePerGasTooLowError=t.Eip1559FeesNotSupportedError=t.BaseFeeScalarError=t.EstimateGasExecutionError=t.EnsInvalidChainIdError=t.EnsAvatarUriResolutionError=t.EnsAvatarUnsupportedNamespaceError=t.EnsAvatarInvalidNftUriError=void 0,t.commitmentsToVersionedHashes=t.blobsToProofs=t.blobsToCommitments=t.isAddressEqual=t.isAddress=t.getCreateAddress=t.getCreate2Address=t.getContractAddress=t.getAddress=t.checksumAddress=t.prepareEncodeFunctionData=t.parseEventLogs=t.getAbiItem=t.encodePacked=t.encodeFunctionResult=t.encodeFunctionData=t.encodeEventTopics=t.encodeErrorResult=t.encodeDeployData=t.encodeAbiParameters=t.decodeFunctionResult=t.decodeFunctionData=t.decodeEventLog=t.decodeErrorResult=t.decodeDeployData=t.decodeAbiParameters=t.EIP1193ProviderRpcError=t.InvalidDecimalNumberError=t.InvalidStructTypeError=t.InvalidPrimaryTypeError=t.InvalidDomainError=t.UrlRequiredError=t.WaitForTransactionReceiptTimeoutError=t.TransactionReceiptNotFoundError=t.TransactionNotFoundError=t.TransactionExecutionError=t.InvalidYParityError=t.InvalidStorageKeySizeError=t.InvalidSerializedTransactionTypeError=t.InvalidSerializedTransactionError=t.InvalidSerializableTransactionError=t.InvalidLegacyVError=t.FeeConflictError=t.StateAssignmentConflictError=t.AccountStateConflictError=t.UserRejectedRequestError=t.UnsupportedProviderMethodError=t.UnsupportedNonOptionalCapabilityError=t.UnsupportedChainIdError=t.UnknownRpcError=void 0,t.toHex=t.stringToHex=t.numberToHex=t.bytesToHex=t.boolToHex=t.toBytes=t.stringToBytes=t.numberToBytes=t.hexToBytes=t.boolToBytes=t.fromRlp=t.hexToString=t.hexToNumber=t.hexToBool=t.hexToBigInt=t.fromHex=t.fromBytes=t.bytesToString=t.bytesToNumber=t.bytesToBool=t.bytesToBigInt=t.trim=t.sliceHex=t.sliceBytes=t.slice=t.size=t.padHex=t.padBytes=t.pad=t.isHex=t.isBytes=t.concatHex=t.concatBytes=t.concat=t.getChainContractAddress=t.extractChain=t.extendSchema=t.defineChain=t.assertCurrentChain=t.ccipReadTunnel=t.offchainLookupSignature=t.offchainLookupAbiItem=t.offchainLookup=t.ccipFetch=t.ccipRequest=t.toBlobs=t.toBlobSidecars=t.sidecarsToVersionedHashes=t.fromBlobs=t.commitmentToVersionedHash=void 0,t.parseErc8010Signature=t.parseErc6492Signature=t.parseCompactSignature=t.hexToCompactSignature=t.isErc8010Signature=t.isErc6492Signature=t.hashTypedData=t.hashStruct=t.hashDomain=t.hashMessage=t.compactSignatureToSignature=t.withTimeout=t.withRetry=t.withCache=t.nonceManager=t.createNonceManager=t.setupKzg=t.defineKzg=t.getFunctionSignature=t.toFunctionSignature=t.getFunctionSelector=t.toFunctionSelector=t.toFunctionHash=t.getEventSignature=t.toEventSignature=t.getEventSelector=t.toEventSelector=t.toEventHash=t.sha256=t.ripemd160=t.keccak256=t.isHash=t.rpcTransactionType=t.formatTransactionRequest=t.defineTransactionRequest=t.formatTransactionReceipt=t.defineTransactionReceipt=t.transactionType=t.formatTransaction=t.defineTransaction=t.formatLog=t.formatBlock=t.defineBlock=t.getContractError=t.toCoinType=t.namehash=t.labelhash=t.toRlp=t.hexToRlp=t.bytesToRlp=void 0,t.parseUnits=t.parseGwei=t.parseEther=t.formatUnits=t.formatGwei=t.formatEther=t.validateTypedData=t.serializeTypedData=t.getTypesForEIP712Domain=t.domainSeparator=t.serializeTransaction=t.serializeAccessList=t.parseTransaction=t.getTransactionType=t.getSerializedTransactionType=t.assertTransactionLegacy=t.assertTransactionEIP2930=t.assertTransactionEIP1559=t.assertRequest=t.stringify=t.verifyTypedData=t.verifyMessage=t.verifyHash=t.toPrefixedMessage=t.signatureToCompactSignature=t.serializeSignature=t.signatureToHex=t.serializeErc8010Signature=t.serializeErc6492Signature=t.serializeCompactSignature=t.compactSignatureToHex=t.recoverTypedDataAddress=t.recoverTransactionAddress=t.recoverPublicKey=t.recoverMessageAddress=t.recoverAddress=t.parseSignature=t.hexToSignature=void 0;var n=r(65222);Object.defineProperty(t,"CircularReferenceError",{enumerable:!0,get:function(){return n.CircularReferenceError}}),Object.defineProperty(t,"InvalidAbiItemError",{enumerable:!0,get:function(){return n.InvalidAbiItemError}}),Object.defineProperty(t,"InvalidAbiParameterError",{enumerable:!0,get:function(){return n.InvalidAbiParameterError}}),Object.defineProperty(t,"InvalidAbiParametersError",{enumerable:!0,get:function(){return n.InvalidAbiParametersError}}),Object.defineProperty(t,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return n.InvalidAbiTypeParameterError}}),Object.defineProperty(t,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return n.InvalidFunctionModifierError}}),Object.defineProperty(t,"InvalidModifierError",{enumerable:!0,get:function(){return n.InvalidModifierError}}),Object.defineProperty(t,"InvalidParameterError",{enumerable:!0,get:function(){return n.InvalidParameterError}}),Object.defineProperty(t,"InvalidParenthesisError",{enumerable:!0,get:function(){return n.InvalidParenthesisError}}),Object.defineProperty(t,"InvalidSignatureError",{enumerable:!0,get:function(){return n.InvalidSignatureError}}),Object.defineProperty(t,"InvalidStructSignatureError",{enumerable:!0,get:function(){return n.InvalidStructSignatureError}}),Object.defineProperty(t,"parseAbi",{enumerable:!0,get:function(){return n.parseAbi}}),Object.defineProperty(t,"parseAbiItem",{enumerable:!0,get:function(){return n.parseAbiItem}}),Object.defineProperty(t,"parseAbiParameter",{enumerable:!0,get:function(){return n.parseAbiParameter}}),Object.defineProperty(t,"parseAbiParameters",{enumerable:!0,get:function(){return n.parseAbiParameters}}),Object.defineProperty(t,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return n.SolidityProtectedKeywordError}}),Object.defineProperty(t,"UnknownSignatureError",{enumerable:!0,get:function(){return n.UnknownSignatureError}}),Object.defineProperty(t,"UnknownTypeError",{enumerable:!0,get:function(){return n.UnknownTypeError}});var i=r(89381);Object.defineProperty(t,"getContract",{enumerable:!0,get:function(){return i.getContract}});var a=r(42678);Object.defineProperty(t,"WaitForCallsStatusTimeoutError",{enumerable:!0,get:function(){return a.WaitForCallsStatusTimeoutError}});var s=r(85583);Object.defineProperty(t,"createClient",{enumerable:!0,get:function(){return s.createClient}}),Object.defineProperty(t,"rpcSchema",{enumerable:!0,get:function(){return s.rpcSchema}});var o=r(2310);Object.defineProperty(t,"createPublicClient",{enumerable:!0,get:function(){return o.createPublicClient}});var l=r(83271);Object.defineProperty(t,"createTestClient",{enumerable:!0,get:function(){return l.createTestClient}});var c=r(52462);Object.defineProperty(t,"createWalletClient",{enumerable:!0,get:function(){return c.createWalletClient}});var u=r(77794);Object.defineProperty(t,"publicActions",{enumerable:!0,get:function(){return u.publicActions}});var d=r(89507);Object.defineProperty(t,"testActions",{enumerable:!0,get:function(){return d.testActions}});var h=r(13054);Object.defineProperty(t,"walletActions",{enumerable:!0,get:function(){return h.walletActions}});var p=r(3603);Object.defineProperty(t,"createTransport",{enumerable:!0,get:function(){return p.createTransport}});var f=r(50908);Object.defineProperty(t,"custom",{enumerable:!0,get:function(){return f.custom}});var m=r(18957);Object.defineProperty(t,"fallback",{enumerable:!0,get:function(){return m.fallback}}),Object.defineProperty(t,"shouldThrow",{enumerable:!0,get:function(){return m.shouldThrow}});var g=r(4075);Object.defineProperty(t,"http",{enumerable:!0,get:function(){return g.http}});var y=r(44066);Object.defineProperty(t,"webSocket",{enumerable:!0,get:function(){return y.webSocket}});var b=r(91472);Object.defineProperty(t,"erc20Abi",{enumerable:!0,get:function(){return b.erc20Abi}}),Object.defineProperty(t,"erc20Abi_bytes32",{enumerable:!0,get:function(){return b.erc20Abi_bytes32}}
5906),Object.defineProperty(t,"erc721Abi",{enumerable:!0,get:function(){return b.erc721Abi}}),Object.defineProperty(t,"erc1155Abi",{enumerable:!0,get:function(){return b.erc1155Abi}}),Object.defineProperty(t,"erc4626Abi",{enumerable:!0,get:function(){return b.erc4626Abi}}),Object.defineProperty(t,"erc6492SignatureValidatorAbi",{enumerable:!0,get:function(){return b.erc6492SignatureValidatorAbi}}),Object.defineProperty(t,"universalSignatureValidatorAbi",{enumerable:!0,get:function(){return b.erc6492SignatureValidatorAbi}}),Object.defineProperty(t,"multicall3Abi",{enumerable:!0,get:function(){return b.multicall3Abi}});var w=r(87089);Object.defineProperty(t,"ethAddress",{enumerable:!0,get:function(){return w.ethAddress}}),Object.defineProperty(t,"zeroAddress",{enumerable:!0,get:function(){return w.zeroAddress}});var v=r(94034);Object.defineProperty(t,"zeroHash",{enumerable:!0,get:function(){return v.zeroHash}});var E=r(13894);Object.defineProperty(t,"deploylessCallViaBytecodeBytecode",{enumerable:!0,get:function(){return E.deploylessCallViaBytecodeBytecode}}),Object.defineProperty(t,"deploylessCallViaFactoryBytecode",{enumerable:!0,get:function(){return E.deploylessCallViaFactoryBytecode}}),Object.defineProperty(t,"erc6492SignatureValidatorByteCode",{enumerable:!0,get:function(){return E.erc6492SignatureValidatorByteCode}}),Object.defineProperty(t,"universalSignatureValidatorByteCode",{enumerable:!0,get:function(){return E.erc6492SignatureValidatorByteCode}});var C=r(97446);Object.defineProperty(t,"maxInt8",{enumerable:!0,get:function(){return C.maxInt8}}),Object.defineProperty(t,"maxInt16",{enumerable:!0,get:function(){return C.maxInt16}}),Object.defineProperty(t,"maxInt24",{enumerable:!0,get:function(){return C.maxInt24}}),Object.defineProperty(t,"maxInt32",{enumerable:!0,get:function(){return C.maxInt32}}),Object.defineProperty(t,"maxInt40",{enumerable:!0,get:function(){return C.maxInt40}}),Object.defineProperty(t,"maxInt48",{enumerable:!0,get:function(){return C.maxInt48}}),Object.defineProperty(t,"maxInt56",{enumerable:!0,get:function(){return C.maxInt56}}),Object.defineProperty(t,"maxInt64",{enumerable:!0,get:function(){return C.maxInt64}}),Object.defineProperty(t,"maxInt72",{enumerable:!0,get:function(){return C.maxInt72}}),Object.defineProperty(t,"maxInt80",{enumerable:!0,get:function(){return C.maxInt80}}),Object.defineProperty(t,"maxInt88",{enumerable:!0,get:function(){return C.maxInt88}}),Object.defineProperty(t,"maxInt96",{enumerable:!0,get:function(){return C.maxInt96}}),Object.defineProperty(t,"maxInt104",{enumerable:!0,get:function(){return C.maxInt104}}),Object.defineProperty(t,"maxInt112",{enumerable:!0,get:function(){return C.maxInt112}}),Object.defineProperty(t,"maxInt120",{enumerable:!0,get:function(){return C.maxInt120}}),Object.defineProperty(t,"maxInt128",{enumerable:!0,get:function(){return C.maxInt128}}),Object.defineProperty(t,"maxInt136",{enumerable:!0,get:function(){return C.maxInt136}}),Object.defineProperty(t,"maxInt144",{enumerable:!0,get:function(){return C.maxInt144}}),Object.defineProperty(t,"maxInt152",{enumerable:!0,get:function(){return C.maxInt152}}),Object.defineProperty(t,"maxInt160",{enumerable:!0,get:function(){return C.maxInt160}}),Object.defineProperty(t,"maxInt168",{enumerable:!0,get:function(){return C.maxInt168}}),Object.defineProperty(t,"maxInt176",{enumerable:!0,get:function(){return C.maxInt176}}),Object.defineProperty(t,"maxInt184",{enumerable:!0,get:function(){return C.maxInt184}}),Object.defineProperty(t,"maxInt192",{enumerable:!0,get:function(){return C.maxInt192}}),Object.defineProperty(t,"maxInt200",{enumerable:!0,get:function(){return C.maxInt200}}),Object.defineProperty(t,"maxInt208",{enumerable:!0,get:function(){return C.maxInt208}}),Object.defineProperty(t,"maxInt216",{enumerable:!0,get:function(){return C.maxInt216}}),Object.defineProperty(t,"maxInt224",{enumerable:!0,get:function(){return C.maxInt224}}),Object.defineProperty(t,"maxInt232",{enumerable:!0,get:function(){return C.maxInt232}}),Object.defineProperty(t,"maxInt240",{enumerable:!0,get:function(){return C.maxInt240}}),Object.defineProperty(t,"maxInt248",{enumerable:!0,get:function(){return C.maxInt248}}),Object.defineProperty(t,"maxInt256",{enumerable:!0,get:function(){return C.maxInt256}}),Object.defineProperty(t,"maxUint8",{enumerable:!0,get:function(){return C.maxUint8}}),Object.defineProperty(t,"maxUint16",{enumerable:!0,get:function(){return C.maxUint16}}),Object.defineProperty(t,"maxUint24",{enumerable:!0,get:function(){return C.maxUint24}}
5906),Object.defineProperty(t,"maxUint32",{enumerable:!0,get:function(){return C.maxUint32}}),Object.defineProperty(t,"maxUint40",{enumerable:!0,get:function(){return C.maxUint40}}),Object.defineProperty(t,"maxUint48",{enumerable:!0,get:function(){return C.maxUint48}}),Object.defineProperty(t,"maxUint56",{enumerable:!0,get:function(){return C.maxUint56}}),Object.defineProperty(t,"maxUint64",{enumerable:!0,get:function(){return C.maxUint64}}),Object.defineProperty(t,"maxUint72",{enumerable:!0,get:function(){return C.maxUint72}}),Object.defineProperty(t,"maxUint80",{enumerable:!0,get:function(){return C.maxUint80}}),Object.defineProperty(t,"maxUint88",{enumerable:!0,get:function(){return C.maxUint88}}),Object.defineProperty(t,"maxUint96",{enumerable:!0,get:function(){return C.maxUint96}}),Object.defineProperty(t,"maxUint104",{enumerable:!0,get:function(){return C.maxUint104}}),Object.defineProperty(t,"maxUint112",{enumerable:!0,get:function(){return C.maxUint112}}),Object.defineProperty(t,"maxUint120",{enumerable:!0,get:function(){return C.maxUint120}}),Object.defineProperty(t,"maxUint128",{enumerable:!0,get:function(){return C.maxUint128}}),Object.defineProperty(t,"maxUint136",{enumerable:!0,get:function(){return C.maxUint136}}),Object.defineProperty(t,"maxUint144",{enumerable:!0,get:function(){return C.maxUint144}}),Object.defineProperty(t,"maxUint152",{enumerable:!0,get:function(){return C.maxUint152}}),Object.defineProperty(t,"maxUint160",{enumerable:!0,get:function(){return C.maxUint160}}),Object.defineProperty(t,"maxUint168",{enumerable:!0,get:function(){return C.maxUint168}}),Object.defineProperty(t,"maxUint176",{enumerable:!0,get:function(){return C.maxUint176}}),Object.defineProperty(t,"maxUint184",{enumerable:!0,get:function(){return C.maxUint184}}),Object.defineProperty(t,"maxUint192",{enumerable:!0,get:function(){return C.maxUint192}}),Object.defineProperty(t,"maxUint200",{enumerable:!0,get:function(){return C.maxUint200}}),Object.defineProperty(t,"maxUint208",{enumerable:!0,get:function(){return C.maxUint208}}),Object.defineProperty(t,"maxUint216",{enumerable:!0,get:function(){return C.maxUint216}}),Object.defineProperty(t,"maxUint224",{enumerable:!0,get:function(){return C.maxUint224}}),Object.defineProperty(t,"maxUint232",{enumerable:!0,get:function(){return C.maxUint232}}),Object.defineProperty(t,"maxUint240",{enumerable:!0,get:function(){return C.maxUint240}}),Object.defineProperty(t,"maxUint248",{enumerable:!0,get:function(){return C.maxUint248}}),Object.defineProperty(t,"maxUint256",{enumerable:!0,get:function(){return C.maxUint256}}),Object.defineProperty(t,"minInt8",{enumerable:!0,get:function(){return C.minInt8}}),Object.defineProperty(t,"minInt16",{enumerable:!0,get:function(){return C.minInt16}}),Object.defineProperty(t,"minInt24",{enumerable:!0,get:function(){return C.minInt24}}),Object.defineProperty(t,"minInt32",{enumerable:!0,get:function(){return C.minInt32}}),Object.defineProperty(t,"minInt40",{enumerable:!0,get:function(){return C.minInt40}}),Object.defineProperty(t,"minInt48",{enumerable:!0,get:function(){return C.minInt48}}),Object.defineProperty(t,"minInt56",{enumerable:!0,get:function(){return C.minInt56}}),Object.defineProperty(t,"minInt64",{enumerable:!0,get:function(){return C.minInt64}}),Object.defineProperty(t,"minInt72",{enumerable:!0,get:function(){return C.minInt72}}),Object.defineProperty(t,"minInt80",{enumerable:!0,get:function(){return C.minInt80}}),Object.defineProperty(t,"minInt88",{enumerable:!0,get:function(){return C.minInt88}}),Object.defineProperty(t,"minInt96",{enumerable:!0,get:function(){return C.minInt96}}),Object.defineProperty(t,"minInt104",{enumerable:!0,get:function(){return C.minInt104}}),Object.defineProperty(t,"minInt112",{enumerable:!0,get:function(){return C.minInt112}}),Object.defineProperty(t,"minInt120",{enumerable:!0,get:function(){return C.minInt120}}),Object.defineProperty(t,"minInt128",{enumerable:!0,get:function(){return C.minInt128}}),Object.defineProperty(t,"minInt136",{enumerable:!0,get:function(){return C.minInt136}}),Object.defineProperty(t,"minInt144",{enumerable:!0,get:function(){return C.minInt144}}),Object.defineProperty(t,"minInt152",{enumerable:!0,get:function(){return C.minInt152}}),Object.defineProperty(t,"minInt160",{enumerable:!0,get:function(){return C.minInt160}}),Object.defineProperty(t,"minInt168",{enumerable:!0,get:function(){return C.minInt168}}),Object.defineProperty(t,"minInt176",{enumerable:!0,get:function(){return C.minInt176}}),Object.defineProperty(t,"minInt184",{enumerable:!0,get:function(){return C.minInt184}}),Object.defineProperty(t,"minInt192",{enumerable:!0,get:function(){return C.minInt192}}),Object.defineProperty(t,"minInt200",{enumerable:!0,get:function(){return C.minInt200}}),Object.defineProperty(t,"minInt208",{enumerable:!0,get:function(){return C.minInt208}}),Object.defineProperty(t,"minInt216",{enumerable:!0,get:function(){return C.minInt216}}),Object.defineProperty(t,"minInt224",{enumerable:!0,get:function(){return C.minInt224}}),Object.defineProperty(t,"minInt232",{enumerable:!0,get:function(){return C.minInt232}}),Object.defineProperty(t,"minInt240",{enumerable:!0,get:function(){return C.minInt240}}),Object.defineProperty(t,"minInt248",{enumerable:!0,get:function(){return C.minInt248}}),Object.defineProperty(t,"minInt256",{enumerable:!0,get:function(){return C.minInt256}});var A=r(44915);Object.defineProperty(t,"presignMessagePrefix",{enumerable:!0,get:function(){return A.presignMessagePrefix}});var x=r(9949);Object.defineProperty(t,"etherUnits",{enumerable:!0,get:function(){return x.etherUnits}}),Object.defineProperty(t,"gweiUnits",{enumerable:!0,get:function(){return x.gweiUnits}}),Object.defineProperty(t,"weiUnits",{enumerable:!0,get:function(){return x.weiUnits}});var I=r(82311);Object.defineProperty(t,"AbiConstructorNotFoundError",{enumerable:!0,get:function(){return I.AbiConstructorNotFoundError}}),Object.defineProperty(t,"AbiConstructorParamsNotFoundError",{enumerable:!0,get:function(){return I.AbiConstructorParamsNotFoundError}}),Object.defineProperty(t,"AbiDecodingDataSizeInvalidError",{enumerable:!0,get:function(){return I.AbiDecodingDataSizeInvalidError}}),Object.defineProperty(t,"AbiDecodingDataSizeTooSmallError",{enumerable:!0,get:function(){return I.AbiDecodingDataSizeTooSmallError}}),Object.defineProperty(t,"AbiDecodingZeroDataError",{enumerable:!0,get:function(){return I.AbiDecodingZeroDataError}}
5906),Object.defineProperty(t,"AbiEncodingArrayLengthMismatchError",{enumerable:!0,get:function(){return I.AbiEncodingArrayLengthMismatchError}}),Object.defineProperty(t,"AbiEncodingBytesSizeMismatchError",{enumerable:!0,get:function(){return I.AbiEncodingBytesSizeMismatchError}}),Object.defineProperty(t,"AbiEncodingLengthMismatchError",{enumerable:!0,get:function(){return I.AbiEncodingLengthMismatchError}}),Object.defineProperty(t,"AbiErrorInputsNotFoundError",{enumerable:!0,get:function(){return I.AbiErrorInputsNotFoundError}}),Object.defineProperty(t,"AbiErrorNotFoundError",{enumerable:!0,get:function(){return I.AbiErrorNotFoundError}}),Object.defineProperty(t,"AbiErrorSignatureNotFoundError",{enumerable:!0,get:function(){return I.AbiErrorSignatureNotFoundError}}),Object.defineProperty(t,"AbiEventNotFoundError",{enumerable:!0,get:function(){return I.AbiEventNotFoundError}}),Object.defineProperty(t,"AbiEventSignatureEmptyTopicsError",{enumerable:!0,get:function(){return I.AbiEventSignatureEmptyTopicsError}}),Object.defineProperty(t,"AbiEventSignatureNotFoundError",{enumerable:!0,get:function(){return I.AbiEventSignatureNotFoundError}}),Object.defineProperty(t,"AbiFunctionNotFoundError",{enumerable:!0,get:function(){return I.AbiFunctionNotFoundError}}),Object.defineProperty(t,"AbiFunctionOutputsNotFoundError",{enumerable:!0,get:function(){return I.AbiFunctionOutputsNotFoundError}}),Object.defineProperty(t,"AbiFunctionSignatureNotFoundError",{enumerable:!0,get:function(){return I.AbiFunctionSignatureNotFoundError}}),Object.defineProperty(t,"BytesSizeMismatchError",{enumerable:!0,get:function(){return I.BytesSizeMismatchError}}),Object.defineProperty(t,"DecodeLogDataMismatch",{enumerable:!0,get:function(){return I.DecodeLogDataMismatch}}),Object.defineProperty(t,"DecodeLogTopicsMismatch",{enumerable:!0,get:function(){return I.DecodeLogTopicsMismatch}}),Object.defineProperty(t,"InvalidAbiDecodingTypeError",{enumerable:!0,get:function(){return I.InvalidAbiDecodingTypeError}}),Object.defineProperty(t,"InvalidAbiEncodingTypeError",{enumerable:!0,get:function(){return I.InvalidAbiEncodingTypeError}}),Object.defineProperty(t,"InvalidArrayError",{enumerable:!0,get:function(){return I.InvalidArrayError}}),Object.defineProperty(t,"InvalidDefinitionTypeError",{enumerable:!0,get:function(){return I.InvalidDefinitionTypeError}}),Object.defineProperty(t,"UnsupportedPackedAbiType",{enumerable:!0,get:function(){return I.UnsupportedPackedAbiType}});var S=r(9301);Object.defineProperty(t,"InvalidAddressError",{enumerable:!0,get:function(){return S.InvalidAddressError}});var T=r(45226);Object.defineProperty(t,"BaseError",{enumerable:!0,get:function(){return T.BaseError}}),Object.defineProperty(t,"setErrorConfig",{enumerable:!0,get:function(){return T.setErrorConfig}});var P=r(99112);Object.defineProperty(t,"BlockNotFoundError",{enumerable:!0,get:function(){return P.BlockNotFoundError}});var O=r(62332);Object.defineProperty(t,"BundleFailedError",{enumerable:!0,get:function(){return O.BundleFailedError}});var _=r(34844);Object.defineProperty(t,"ChainDoesNotSupportContract",{enumerable:!0,get:function(){return _.ChainDoesNotSupportContract}}),Object.defineProperty(t,"ChainMismatchError",{enumerable:!0,get:function(){return _.ChainMismatchError}}),Object.defineProperty(t,"ChainNotFoundError",{enumerable:!0,get:function(){return _.ChainNotFoundError}}),Object.defineProperty(t,"ClientChainNotConfiguredError",{enumerable:!0,get:function(){return _.ClientChainNotConfiguredError}}),Object.defineProperty(t,"InvalidChainIdError",{enumerable:!0,get:function(){return _.InvalidChainIdError}});var N=r(81701);Object.defineProperty(t,"CallExecutionError",{enumerable:!0,get:function(){return N.CallExecutionError}}),Object.defineProperty(t,"ContractFunctionExecutionError",{enumerable:!0,get:function(){return N.ContractFunctionExecutionError}}),Object.defineProperty(t,"ContractFunctionRevertedError",{enumerable:!0,get:function(){return N.ContractFunctionRevertedError}}),Object.defineProperty(t,"ContractFunctionZeroDataError",{enumerable:!0,get:function(){return N.ContractFunctionZeroDataError}}),Object.defineProperty(t,"CounterfactualDeploymentFailedError",{enumerable:!0,get:function(){return N.CounterfactualDeploymentFailedError}}),Object.defineProperty(t,"RawContractError",{enumerable:!0,get:function(){return N.RawContractError}});var k=r(1107);Object.defineProperty(t,"SizeExceedsPaddingSizeError",{enumerable:!0,get:function(){return k.SizeExceedsPaddingSizeError}}),Object.defineProperty(t,"SliceOffsetOutOfBoundsError",{enumerable:!0,get:function(){return k.SliceOffsetOutOfBoundsError}});var R=r(51674);Object.defineProperty(t,"IntegerOutOfRangeError",{enumerable:!0,get:function(){return R.IntegerOutOfRangeError}}),Object.defineProperty(t,"InvalidBytesBooleanError",{enumerable:!0,get:function(){return R.InvalidBytesBooleanError}}),Object.defineProperty(t,"InvalidHexBooleanError",{enumerable:!0,get:function(){return R.InvalidHexBooleanError}}),Object.defineProperty(t,"InvalidHexValueError",{enumerable:!0,get:function(){return R.InvalidHexValueError}}
5906),Object.defineProperty(t,"RlpDepthLimitExceededError",{enumerable:!0,get:function(){return R.RlpDepthLimitExceededError}}),Object.defineProperty(t,"RlpListBoundaryExceededError",{enumerable:!0,get:function(){return R.RlpListBoundaryExceededError}}),Object.defineProperty(t,"RlpTrailingBytesError",{enumerable:!0,get:function(){return R.RlpTrailingBytesError}}),Object.defineProperty(t,"SizeOverflowError",{enumerable:!0,get:function(){return R.SizeOverflowError}});var M=r(78869);Object.defineProperty(t,"EnsAvatarInvalidNftUriError",{enumerable:!0,get:function(){return M.EnsAvatarInvalidNftUriError}}),Object.defineProperty(t,"EnsAvatarUnsupportedNamespaceError",{enumerable:!0,get:function(){return M.EnsAvatarUnsupportedNamespaceError}}),Object.defineProperty(t,"EnsAvatarUriResolutionError",{enumerable:!0,get:function(){return M.EnsAvatarUriResolutionError}}),Object.defineProperty(t,"EnsInvalidChainIdError",{enumerable:!0,get:function(){return M.EnsInvalidChainIdError}});var B=r(52162);Object.defineProperty(t,"EstimateGasExecutionError",{enumerable:!0,get:function(){return B.EstimateGasExecutionError}});var j=r(75445);Object.defineProperty(t,"BaseFeeScalarError",{enumerable:!0,get:function(){return j.BaseFeeScalarError}}),Object.defineProperty(t,"Eip1559FeesNotSupportedError",{enumerable:!0,get:function(){return j.Eip1559FeesNotSupportedError}}),Object.defineProperty(t,"MaxFeePerGasTooLowError",{enumerable:!0,get:function(){return j.MaxFeePerGasTooLowError}});var U=r(44311);Object.defineProperty(t,"FilterTypeNotSupportedError",{enumerable:!0,get:function(){return U.FilterTypeNotSupportedError}});var $=r(80779);Object.defineProperty(t,"ExecutionRevertedError",{enumerable:!0,get:function(){return $.ExecutionRevertedError}}),Object.defineProperty(t,"FeeCapTooHighError",{enumerable:!0,get:function(){return $.FeeCapTooHighError}}),Object.defineProperty(t,"FeeCapTooLowError",{enumerable:!0,get:function(){return $.FeeCapTooLowError}}),Object.defineProperty(t,"InsufficientFundsError",{enumerable:!0,get:function(){return $.InsufficientFundsError}}),Object.defineProperty(t,"IntrinsicGasTooHighError",{enumerable:!0,get:function(){return $.IntrinsicGasTooHighError}}),Object.defineProperty(t,"IntrinsicGasTooLowError",{enumerable:!0,get:function(){return $.IntrinsicGasTooLowError}}),Object.defineProperty(t,"NonceMaxValueError",{enumerable:!0,get:function(){return $.NonceMaxValueError}}),Object.defineProperty(t,"NonceTooHighError",{enumerable:!0,get:function(){return $.NonceTooHighError}}),Object.defineProperty(t,"NonceTooLowError",{enumerable:!0,get:function(){return $.NonceTooLowError}}),Object.defineProperty(t,"TipAboveFeeCapError",{enumerable:!0,get:function(){return $.TipAboveFeeCapError}}),Object.defineProperty(t,"TransactionTypeNotSupportedError",{enumerable:!0,get:function(){return $.TransactionTypeNotSupportedError}}),Object.defineProperty(t,"UnknownNodeError",{enumerable:!0,get:function(){return $.UnknownNodeError}});var L=r(17208);Object.defineProperty(t,"HttpRequestError",{enumerable:!0,get:function(){return L.HttpRequestError}}),Object.defineProperty(t,"ResponseBodyTooLargeError",{enumerable:!0,get:function(){return L.ResponseBodyTooLargeError}}),Object.defineProperty(t,"RpcRequestError",{enumerable:!0,get:function(){return L.RpcRequestError}}),Object.defineProperty(t,"SocketClosedError",{enumerable:!0,get:function(){return L.SocketClosedError}}),Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return L.TimeoutError}}),Object.defineProperty(t,"WebSocketRequestError",{enumerable:!0,get:function(){return L.WebSocketRequestError}});var D=r(69902);Object.defineProperty(t,"AtomicityNotSupportedError",{enumerable:!0,get:function(){return D.AtomicityNotSupportedError}}),Object.defineProperty(t,"AtomicReadyWalletRejectedUpgradeError",{enumerable:!0,get:function(){return D.AtomicReadyWalletRejectedUpgradeError}}),Object.defineProperty(t,"BundleTooLargeError",{enumerable:!0,get:function(){return D.BundleTooLargeError}}),Object.defineProperty(t,"ChainDisconnectedError",{enumerable:!0,get:function(){return D.ChainDisconnectedError}}),Object.defineProperty(t,"DuplicateIdError",{enumerable:!0,get:function(){return D.DuplicateIdError}}),Object.defineProperty(t,"InternalRpcError",{enumerable:!0,get:function(){return D.InternalRpcError}}),Object.defineProperty(t,"InvalidInputRpcError",{enumerable:!0,get:function(){return D.InvalidInputRpcError}}),Object.defineProperty(t,"InvalidParamsRpcError",{enumerable:!0,get:function(){return D.InvalidParamsRpcError}}),Object.defineProperty(t,"InvalidRequestRpcError",{enumerable:!0,get:function(){return D.InvalidRequestRpcError}}),Object.defineProperty(t,"JsonRpcVersionUnsupportedError",{enumerable:!0,get:function(){return D.JsonRpcVersionUnsupportedError}}),Object.defineProperty(t,"LimitExceededRpcError",{enumerable:!0,get:function(){return D.LimitExceededRpcError}}),Object.defineProperty(t,"MethodNotFoundRpcError",{enumerable:!0,get:function(){return D.MethodNotFoundRpcError}}),Object.defineProperty(t,"MethodNotSupportedRpcError",{enumerable:!0,get:function(){return D.MethodNotSupportedRpcError}}),Object.defineProperty(t,"ParseRpcError",{enumerable:!0,get:function(){return D.ParseRpcError}}),Object.defineProperty(t,"ProviderDisconnectedError",{enumerable:!0,get:function(){return D.ProviderDisconnectedError}}),Object.defineProperty(t,"ProviderRpcError",{enumerable:!0,get:function(){return D.ProviderRpcError}}),Object.defineProperty(t,"ResourceNotFoundRpcError",{enumerable:!0,get:function(){return D.ResourceNotFoundRpcError}}),Object.defineProperty(t,"ResourceUnavailableRpcError",{enumerable:!0,get:function(){return D.ResourceUnavailableRpcError}}),Object.defineProperty(t,"RpcError",{enumerable:!0,get:function(){return D.RpcError}}),Object.defineProperty(t,"SwitchChainError",{enumerable:!0,get:function(){return D.SwitchChainError}}),Object.defineProperty(t,"TransactionRejectedRpcError",{enumerable:!0,get:function(){return D.TransactionRejectedRpcError}}),Object.defineProperty(t,"UnauthorizedProviderError",{enumerable:!0,get:function(){return D.UnauthorizedProviderError}}),Object.defineProperty(t,"UnknownBundleIdError",{enumerable:!0,get:function(){return D.UnknownBundleIdError}}),Object.defineProperty(t,"UnknownRpcError",{enumerable:!0,get:function(){return D.UnknownRpcError}}),Object.defineProperty(t,"UnsupportedChainIdError",{enumerable:!0,get:function(){return D.UnsupportedChainIdError}}),Object.defineProperty(t,"UnsupportedNonOptionalCapabilityError",{enumerable:!0,get:function(){return D.UnsupportedNonOptionalCapabilityError}}),Object.defineProperty(t,"UnsupportedProviderMethodError",{enumerable:!0,get:function(){return D.UnsupportedProviderMethodError}}),Object.defineProperty(t,"UserRejectedRequestError",{enumerable:!0,get:function(){return D.UserRejectedRequestError}});var F=r(37412);Object.defineProperty(t,"AccountStateConflictError",{enumerable:!0,get:function(){return F.AccountStateConflictError}}
5906),Object.defineProperty(t,"StateAssignmentConflictError",{enumerable:!0,get:function(){return F.StateAssignmentConflictError}});var H=r(44789);Object.defineProperty(t,"FeeConflictError",{enumerable:!0,get:function(){return H.FeeConflictError}}),Object.defineProperty(t,"InvalidLegacyVError",{enumerable:!0,get:function(){return H.InvalidLegacyVError}}),Object.defineProperty(t,"InvalidSerializableTransactionError",{enumerable:!0,get:function(){return H.InvalidSerializableTransactionError}}),Object.defineProperty(t,"InvalidSerializedTransactionError",{enumerable:!0,get:function(){return H.InvalidSerializedTransactionError}}),Object.defineProperty(t,"InvalidSerializedTransactionTypeError",{enumerable:!0,get:function(){return H.InvalidSerializedTransactionTypeError}}),Object.defineProperty(t,"InvalidStorageKeySizeError",{enumerable:!0,get:function(){return H.InvalidStorageKeySizeError}}),Object.defineProperty(t,"InvalidYParityError",{enumerable:!0,get:function(){return H.InvalidYParityError}}),Object.defineProperty(t,"TransactionExecutionError",{enumerable:!0,get:function(){return H.TransactionExecutionError}}),Object.defineProperty(t,"TransactionNotFoundError",{enumerable:!0,get:function(){return H.TransactionNotFoundError}}),Object.defineProperty(t,"TransactionReceiptNotFoundError",{enumerable:!0,get:function(){return H.TransactionReceiptNotFoundError}}),Object.defineProperty(t,"WaitForTransactionReceiptTimeoutError",{enumerable:!0,get:function(){return H.WaitForTransactionReceiptTimeoutError}});var z=r(50280);Object.defineProperty(t,"UrlRequiredError",{enumerable:!0,get:function(){return z.UrlRequiredError}});var W=r(31941);Object.defineProperty(t,"InvalidDomainError",{enumerable:!0,get:function(){return W.InvalidDomainError}}),Object.defineProperty(t,"InvalidPrimaryTypeError",{enumerable:!0,get:function(){return W.InvalidPrimaryTypeError}}),Object.defineProperty(t,"InvalidStructTypeError",{enumerable:!0,get:function(){return W.InvalidStructTypeError}});var q=r(83289);Object.defineProperty(t,"InvalidDecimalNumberError",{enumerable:!0,get:function(){return q.InvalidDecimalNumberError}});var V=r(62297);Object.defineProperty(t,"EIP1193ProviderRpcError",{enumerable:!0,get:function(){return V.ProviderRpcError}});var G=r(29060);Object.defineProperty(t,"decodeAbiParameters",{enumerable:!0,get:function(){return G.decodeAbiParameters}});var K=r(40549);Object.defineProperty(t,"decodeDeployData",{enumerable:!0,get:function(){return K.decodeDeployData}});var Z=r(51513);Object.defineProperty(t,"decodeErrorResult",{enumerable:!0,get:function(){return Z.decodeErrorResult}});var J=r(44352);Object.defineProperty(t,"decodeEventLog",{enumerable:!0,get:function(){return J.decodeEventLog}});var Y=r(22866);Object.defineProperty(t,"decodeFunctionData",{enumerable:!0,get:function(){return Y.decodeFunctionData}});var Q=r(72431);Object.defineProperty(t,"decodeFunctionResult",{enumerable:!0,get:function(){return Q.decodeFunctionResult}});var X=r(66008);Object.defineProperty(t,"encodeAbiParameters",{enumerable:!0,get:function(){return X.encodeAbiParameters}});var ee=r(11985);Object.defineProperty(t,"encodeDeployData",{enumerable:!0,get:function(){return ee.encodeDeployData}});var et=r(22013);Object.defineProperty(t,"encodeErrorResult",{enumerable:!0,get:function(){return et.encodeErrorResult}});var er=r(61794);Object.defineProperty(t,"encodeEventTopics",{enumerable:!0,get:function(){return er.encodeEventTopics}});var en=r(25230);Object.defineProperty(t,"encodeFunctionData",{enumerable:!0,get:function(){return en.encodeFunctionData}});var ei=r(20155);Object.defineProperty(t,"encodeFunctionResult",{enumerable:!0,get:function(){return ei.encodeFunctionResult}});var ea=r(61382);Object.defineProperty(t,"encodePacked",{enumerable:!0,get:function(){return ea.encodePacked}});var es=r(61569);Object.defineProperty(t,"getAbiItem",{enumerable:!0,get:function(){return es.getAbiItem}});var eo=r(4466);Object.defineProperty(t,"parseEventLogs",{enumerable:!0,get:function(){return eo.parseEventLogs}});var el=r(16105);Object.defineProperty(t,"prepareEncodeFunctionData",{enumerable:!0,get:function(){return el.prepareEncodeFunctionData}});var ec=r(24998);Object.defineProperty(t,"checksumAddress",{enumerable:!0,get:function(){return ec.checksumAddress}}),Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return ec.getAddress}});var eu=r(7924);Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return eu.getContractAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return eu.getCreate2Address}}),Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return eu.getCreateAddress}});var ed=r(63402);Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return ed.isAddress}});var eh=r(18978);Object.defineProperty(t,"isAddressEqual",{enumerable:!0,get:function(){return eh.isAddressEqual}});var ep=r(80076);Object.defineProperty(t,"blobsToCommitments",{enumerable:!0,get:function(){return ep.blobsToCommitments}});var ef=r(55085);Object.defineProperty(t,"blobsToProofs",{enumerable:!0,get:function(){return ef.blobsToProofs}});var em=r(32309);Object.defineProperty(t,"commitmentsToVersionedHashes",{enumerable:!0,get:function(){return em.commitmentsToVersionedHashes}});var eg=r(69546);Object.defineProperty(t,"commitmentToVersionedHash",{enumerable:!0,get:function(){return eg.commitmentToVersionedHash}});var ey=r(30087);Object.defineProperty(t,"fromBlobs",{enumerable:!0,get:function(){return ey.fromBlobs}});var eb=r(83545);Object.defineProperty(t,"sidecarsToVersionedHashes",{enumerable:!0,get:function(){return eb.sidecarsToVersionedHashes}});var ew=r(64751);Object.defineProperty(t,"toBlobSidecars",{enumerable:!0,get:function(){return ew.toBlobSidecars}});var ev=r(95672);Object.defineProperty(t,"toBlobs",{enumerable:!0,get:function(){return ev.toBlobs}});var eE=r(56724);Object.defineProperty(t,"ccipRequest",{enumerable:!0,get:function(){return eE.ccipRequest}}),Object.defineProperty(t,"ccipFetch",{enumerable:!0,get:function(){return eE.ccipRequest}}),Object.defineProperty(t,"offchainLookup",{enumerable:!0,get:function(){return eE.offchainLookup}}),Object.defineProperty(t,"offchainLookupAbiItem",{enumerable:!0,get:function(){return eE.offchainLookupAbiItem}}),Object.defineProperty(t,"offchainLookupSignature",{enumerable:!0,get:function(){return eE.offchainLookupSignature}});var eC=r(67122);Object.defineProperty(t,"ccipReadTunnel",{enumerable:!0,get:function(){return eC.ccipReadTunnel}});var eA=r(81557);Object.defineProperty(t,"assertCurrentChain",{enumerable:!0,get:function(){return eA.assertCurrentChain}});var ex=r(96923);Object.defineProperty(t,"defineChain",{enumerable:!0,get:function(){return ex.defineChain}}),Object.defineProperty(t,"extendSchema",{enumerable:!0,get:function(){return ex.extendSchema}});var eI=r(5075);Object.defineProperty(t,"extractChain",{enumerable:!0,get:function(){return eI.extractChain}});var eS=r(77362);Object.defineProperty(t,"getChainContractAddress",{enumerable:!0,get:function(){return eS.getChainContractAddress}});var eT=r(26504);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return eT.concat}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return eT.concatBytes}}),Object.defineProperty(t,"concatHex",{enumerable:!0,get:function(){return eT.concatHex}});var eP=r(93939);Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return eP.isBytes}});var eO=r(80217);Object.defineProperty(t,"isHex",{enumerable:!0,get:function(){return eO.isHex}});var e_=r(3669);Object.defineProperty(t,"pad",{enumerable:!0,get:function(){return e_.pad}}),Object.defineProperty(t,"padBytes",{enumerable:!0,get:function(){return e_.padBytes}}),Object.defineProperty(t,"padHex",{enumerable:!0,get:function(){return e_.padHex}});var eN=r(29813);Object.defineProperty(t,"size",{enumerable:!0,get:function(){return eN.size}}
5906);var ek=r(4906);Object.defineProperty(t,"slice",{enumerable:!0,get:function(){return ek.slice}}),Object.defineProperty(t,"sliceBytes",{enumerable:!0,get:function(){return ek.sliceBytes}}),Object.defineProperty(t,"sliceHex",{enumerable:!0,get:function(){return ek.sliceHex}});var eR=r(62704);Object.defineProperty(t,"trim",{enumerable:!0,get:function(){return eR.trim}});var eM=r(3562);Object.defineProperty(t,"bytesToBigInt",{enumerable:!0,get:function(){return eM.bytesToBigInt}}),Object.defineProperty(t,"bytesToBool",{enumerable:!0,get:function(){return eM.bytesToBool}}),Object.defineProperty(t,"bytesToNumber",{enumerable:!0,get:function(){return eM.bytesToNumber}}),Object.defineProperty(t,"bytesToString",{enumerable:!0,get:function(){return eM.bytesToString}}),Object.defineProperty(t,"fromBytes",{enumerable:!0,get:function(){return eM.fromBytes}});var eB=r(14972);Object.defineProperty(t,"fromHex",{enumerable:!0,get:function(){return eB.fromHex}}),Object.defineProperty(t,"hexToBigInt",{enumerable:!0,get:function(){return eB.hexToBigInt}}),Object.defineProperty(t,"hexToBool",{enumerable:!0,get:function(){return eB.hexToBool}}),Object.defineProperty(t,"hexToNumber",{enumerable:!0,get:function(){return eB.hexToNumber}}),Object.defineProperty(t,"hexToString",{enumerable:!0,get:function(){return eB.hexToString}});var ej=r(36603);Object.defineProperty(t,"fromRlp",{enumerable:!0,get:function(){return ej.fromRlp}});var eU=r(60037);Object.defineProperty(t,"boolToBytes",{enumerable:!0,get:function(){return eU.boolToBytes}}),Object.defineProperty(t,"hexToBytes",{enumerable:!0,get:function(){return eU.hexToBytes}}),Object.defineProperty(t,"numberToBytes",{enumerable:!0,get:function(){return eU.numberToBytes}}),Object.defineProperty(t,"stringToBytes",{enumerable:!0,get:function(){return eU.stringToBytes}}),Object.defineProperty(t,"toBytes",{enumerable:!0,get:function(){return eU.toBytes}});var e$=r(27083);Object.defineProperty(t,"boolToHex",{enumerable:!0,get:function(){return e$.boolToHex}}),Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return e$.bytesToHex}}),Object.defineProperty(t,"numberToHex",{enumerable:!0,get:function(){return e$.numberToHex}}),Object.defineProperty(t,"stringToHex",{enumerable:!0,get:function(){return e$.stringToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return e$.toHex}});var eL=r(36504);Object.defineProperty(t,"bytesToRlp",{enumerable:!0,get:function(){return eL.bytesToRlp}}),Object.defineProperty(t,"hexToRlp",{enumerable:!0,get:function(){return eL.hexToRlp}}),Object.defineProperty(t,"toRlp",{enumerable:!0,get:function(){return eL.toRlp}});var eD=r(17456);Object.defineProperty(t,"labelhash",{enumerable:!0,get:function(){return eD.labelhash}});var eF=r(2205);Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return eF.namehash}});var eH=r(75954);Object.defineProperty(t,"toCoinType",{enumerable:!0,get:function(){return eH.toCoinType}});var ez=r(38297);Object.defineProperty(t,"getContractError",{enumerable:!0,get:function(){return ez.getContractError}});var eW=r(12366);Object.defineProperty(t,"defineBlock",{enumerable:!0,get:function(){return eW.defineBlock}}),Object.defineProperty(t,"formatBlock",{enumerable:!0,get:function(){return eW.formatBlock}});var eq=r(10205);Object.defineProperty(t,"formatLog",{enumerable:!0,get:function(){return eq.formatLog}});var eV=r(93771);Object.defineProperty(t,"defineTransaction",{enumerable:!0,get:function(){return eV.defineTransaction}}),Object.defineProperty(t,"formatTransaction",{enumerable:!0,get:function(){return eV.formatTransaction}}),Object.defineProperty(t,"transactionType",{enumerable:!0,get:function(){return eV.transactionType}});var eG=r(63178);Object.defineProperty(t,"defineTransactionReceipt",{enumerable:!0,get:function(){return eG.defineTransactionReceipt}}),Object.defineProperty(t,"formatTransactionReceipt",{enumerable:!0,get:function(){return eG.formatTransactionReceipt}});var eK=r(53520);Object.defineProperty(t,"defineTransactionRequest",{enumerable:!0,get:function(){return eK.defineTransactionRequest}}),Object.defineProperty(t,"formatTransactionRequest",{enumerable:!0,get:function(){return eK.formatTransactionRequest}}),Object.defineProperty(t,"rpcTransactionType",{enumerable:!0,get:function(){return eK.rpcTransactionType}});var eZ=r(85244);Object.defineProperty(t,"isHash",{enumerable:!0,get:function(){return eZ.isHash}});var eJ=r(4319);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return eJ.keccak256}});var eY=r(72636);Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return eY.ripemd160}});var eQ=r(73023);Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return eQ.sha256}});var eX=r(28939);Object.defineProperty(t,"toEventHash",{enumerable:!0,get:function(){return eX.toEventHash}});var e0=r(55954);Object.defineProperty(t,"toEventSelector",{enumerable:!0,get:function(){return e0.toEventSelector}}),Object.defineProperty(t,"getEventSelector",{enumerable:!0,get:function(){return e0.toEventSelector}});var e1=r(72079);Object.defineProperty(t,"toEventSignature",{enumerable:!0,get:function(){return e1.toEventSignature}}),Object.defineProperty(t,"getEventSignature",{enumerable:!0,get:function(){return e1.toEventSignature}});var e2=r(21813);Object.defineProperty(t,"toFunctionHash",{enumerable:!0,get:function(){return e2.toFunctionHash}});var e5=r(16936);Object.defineProperty(t,"toFunctionSelector",{enumerable:!0,get:function(){return e5.toFunctionSelector}}),Object.defineProperty(t,"getFunctionSelector",{enumerable:!0,get:function(){return e5.toFunctionSelector}});var e6=r(17617);Object.defineProperty(t,"toFunctionSignature",{enumerable:!0,get:function(){return e6.toFunctionSignature}}),Object.defineProperty(t,"getFunctionSignature",{enumerable:!0,get:function(){return e6.toFunctionSignature}});var e3=r(60899);Object.defineProperty(t,"defineKzg",{enumerable:!0,get:function(){return e3.defineKzg}});var e4=r(87081);Object.defineProperty(t,"setupKzg",{enumerable:!0,get:function(){return e4.setupKzg}});var e8=r(37357);Object.defineProperty(t,"createNonceManager",{enumerable:!0,get:function(){return e8.createNonceManager}}),Object.defineProperty(t,"nonceManager",{enumerable:!0,get:function(){return e8.nonceManager}});var e9=r(1953);Object.defineProperty(t,"withCache",{enumerable:!0,get:function(){return e9.withCache}});var e7=r(15573);Object.defineProperty(t,"withRetry",{enumerable:!0,get:function(){return e7.withRetry}});var te=r(61580);Object.defineProperty(t,"withTimeout",{enumerable:!0,get:function(){return te.withTimeout}});var tt=r(8054);Object.defineProperty(t,"compactSignatureToSignature",{enumerable:!0,get:function(){return tt.compactSignatureToSignature}});var tr=r(39091);Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return tr.hashMessage}});var tn=r(52548);Object.defineProperty(t,"hashDomain",{enumerable:!0,get:function(){return tn.hashDomain}}),Object.defineProperty(t,"hashStruct",{enumerable:!0,get:function(){return tn.hashStruct}}),Object.defineProperty(t,"hashTypedData",{enumerable:!0,get:function(){return tn.hashTypedData}
5906});var ti=r(12949);Object.defineProperty(t,"isErc6492Signature",{enumerable:!0,get:function(){return ti.isErc6492Signature}});var ta=r(3797);Object.defineProperty(t,"isErc8010Signature",{enumerable:!0,get:function(){return ta.isErc8010Signature}});var ts=r(86262);Object.defineProperty(t,"hexToCompactSignature",{enumerable:!0,get:function(){return ts.parseCompactSignature}}),Object.defineProperty(t,"parseCompactSignature",{enumerable:!0,get:function(){return ts.parseCompactSignature}});var to=r(31650);Object.defineProperty(t,"parseErc6492Signature",{enumerable:!0,get:function(){return to.parseErc6492Signature}});var tl=r(84462);Object.defineProperty(t,"parseErc8010Signature",{enumerable:!0,get:function(){return tl.parseErc8010Signature}});var tc=r(37171);Object.defineProperty(t,"hexToSignature",{enumerable:!0,get:function(){return tc.parseSignature}}),Object.defineProperty(t,"parseSignature",{enumerable:!0,get:function(){return tc.parseSignature}});var tu=r(41636);Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return tu.recoverAddress}});var td=r(3053);Object.defineProperty(t,"recoverMessageAddress",{enumerable:!0,get:function(){return td.recoverMessageAddress}});var th=r(19068);Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return th.recoverPublicKey}});var tp=r(35848);Object.defineProperty(t,"recoverTransactionAddress",{enumerable:!0,get:function(){return tp.recoverTransactionAddress}});var tf=r(97236);Object.defineProperty(t,"recoverTypedDataAddress",{enumerable:!0,get:function(){return tf.recoverTypedDataAddress}});var tm=r(32115);Object.defineProperty(t,"compactSignatureToHex",{enumerable:!0,get:function(){return tm.serializeCompactSignature}}),Object.defineProperty(t,"serializeCompactSignature",{enumerable:!0,get:function(){return tm.serializeCompactSignature}});var tg=r(98787);Object.defineProperty(t,"serializeErc6492Signature",{enumerable:!0,get:function(){return tg.serializeErc6492Signature}});var ty=r(67003);Object.defineProperty(t,"serializeErc8010Signature",{enumerable:!0,get:function(){return ty.serializeErc8010Signature}});var tb=r(27872);Object.defineProperty(t,"signatureToHex",{enumerable:!0,get:function(){return tb.serializeSignature}}),Object.defineProperty(t,"serializeSignature",{enumerable:!0,get:function(){return tb.serializeSignature}});var tw=r(75882);Object.defineProperty(t,"signatureToCompactSignature",{enumerable:!0,get:function(){return tw.signatureToCompactSignature}});var tv=r(21799);Object.defineProperty(t,"toPrefixedMessage",{enumerable:!0,get:function(){return tv.toPrefixedMessage}});var tE=r(85021);Object.defineProperty(t,"verifyHash",{enumerable:!0,get:function(){return tE.verifyHash}});var tC=r(23704);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return tC.verifyMessage}});var tA=r(92723);Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return tA.verifyTypedData}});var tx=r(68508);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return tx.stringify}});var tI=r(61609);Object.defineProperty(t,"assertRequest",{enumerable:!0,get:function(){return tI.assertRequest}});var tS=r(27756);Object.defineProperty(t,"assertTransactionEIP1559",{enumerable:!0,get:function(){return tS.assertTransactionEIP1559}}),Object.defineProperty(t,"assertTransactionEIP2930",{enumerable:!0,get:function(){return tS.assertTransactionEIP2930}}),Object.defineProperty(t,"assertTransactionLegacy",{enumerable:!0,get:function(){return tS.assertTransactionLegacy}});var tT=r(73324);Object.defineProperty(t,"getSerializedTransactionType",{enumerable:!0,get:function(){return tT.getSerializedTransactionType}});var tP=r(75638);Object.defineProperty(t,"getTransactionType",{enumerable:!0,get:function(){return tP.getTransactionType}});var tO=r(77951);Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return tO.parseTransaction}});var t_=r(66498);Object.defineProperty(t,"serializeAccessList",{enumerable:!0,get:function(){return t_.serializeAccessList}});var tN=r(24584);Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return tN.serializeTransaction}});var tk=r(97857);Object.defineProperty(t,"domainSeparator",{enumerable:!0,get:function(){return tk.domainSeparator}}),Object.defineProperty(t,"getTypesForEIP712Domain",{enumerable:!0,get:function(){return tk.getTypesForEIP712Domain}}),Object.defineProperty(t,"serializeTypedData",{enumerable:!0,get:function(){return tk.serializeTypedData}
5906}),Object.defineProperty(t,"validateTypedData",{enumerable:!0,get:function(){return tk.validateTypedData}});var tR=r(40771);Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return tR.formatEther}});var tM=r(81005);Object.defineProperty(t,"formatGwei",{enumerable:!0,get:function(){return tM.formatGwei}});var tB=r(88344);Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return tB.formatUnits}});var tj=r(76711);Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return tj.parseEther}});var tU=r(1145);Object.defineProperty(t,"parseGwei",{enumerable:!0,get:function(){return tU.parseGwei}});var t$=r(1932);Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return t$.parseUnits}})},68936:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMetadata=s;let n=r(91472),i=r(527),a=r(55498);async function s(e,t){let{token:r,...s}=t,{address:o}=(0,a.resolveToken)(e,{token:r}),l=(0,a.findDeclaredToken)(e,r),[c,u,d]=await Promise.all([l?.decimals??(0,i.readContract)(e,{...s,abi:n.erc20Abi,address:o,functionName:"decimals"}),l?.name??(0,i.readContract)(e,{...s,abi:n.erc20Abi,address:o,functionName:"name"}),l?.symbol??(0,i.readContract)(e,{...s,abi:n.erc20Abi,address:o,functionName:"symbol"})]);return{decimals:c,name:u,symbol:d}}},69542:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(12488),s=r(18627),o=r(2076),l=r(55284),c=r(99736);r(79909),r(83627);var u=r(46756),d=r(63412),h=r(91392);let p=(0,h.AH)` 5907 label { 5908 display: inline-flex; 5909 align-items: center; 5910 cursor: pointer; 5911 user-select: none; 5912 column-gap: ${({spacing:e})=>e[2]}; 5913 } 5914 5915 label > input[type='checkbox'] { 5916 height: 0; 5917 width: 0; 5918 opacity: 0; 5919 position: absolute; 5920 } 5921 5922 label > span { 5923 display: flex; 5924 align-items: center; 5925 justify-content: center; 5926 height: 100%; 5927 width: 100%; 5928 border: 1px solid ${({colors:e})=>e.neutrals400}; 5929 color: ${({colors:e})=>e.white}; 5930 background-color: transparent; 5931 will-change: border-color, background-color; 5932 } 5933 5934 label > span > wui-icon { 5935 opacity: 0; 5936 will-change: opacity; 5937 } 5938 5939 label > input[type='checkbox']:checked + span > wui-icon { 5940 color: ${({colors:e})=>e.white}; 5941 } 5942 5943 label > input[type='checkbox']:not(:checked) > span > wui-icon { 5944 color: ${({colors:e})=>e.neutrals900}; 5945 } 5946 5947 label > input[type='checkbox']:checked + span > wui-icon { 5948 opacity: 1; 5949 } 5950 5951 /* -- Sizes --------------------------------------------------- */ 5952 label[data-size='lg'] > span { 5953 width: 24px; 5954 height: 24px; 5955 min-width: 24px; 5956 min-height: 24px; 5957 border-radius: ${({borderRadius:e})=>e[10]}; 5958 } 5959 5960 label[data-size='md'] > span { 5961 width: 20px; 5962 height: 20px; 5963 min-width: 20px; 5964 min-height: 20px; 5965 border-radius: ${({borderRadius:e})=>e[2]}; 5966 } 5967 5968 label[data-size='sm'] > span { 5969 width: 16px; 5970 height: 16px; 5971 min-width: 16px; 5972 min-height: 16px; 5973 border-radius: ${({borderRadius:e})=>e[1]}; 5974 } 5975 5976 /* -- Focus states --------------------------------------------------- */ 5977 label > input[type='checkbox']:focus-visible + span, 5978 label > input[type='checkbox']:focus + span { 5979 border: 1px solid ${({tokens:e})=>e.core.borderAccentPrimary}; 5980 box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2); 5981 } 5982 5983 /* -- Checked states --------------------------------------------------- */ 5984 label > input[type='checkbox']:checked + span { 5985 background-color: ${({tokens:e})=>e.core.iconAccentPrimary}; 5986 border: 1px solid transparent; 5987 } 5988 5989 /* -- Hover states --------------------------------------------------- */ 5990 input[type='checkbox']:not(:checked):not(:disabled) + span:hover { 5991 border: 1px solid ${({colors:e})=>e.neutrals700}; 5992 background-color: ${({colors:e})=>e.neutrals800}; 5993 box-shadow: none; 5994 } 5995 5996 input[type='checkbox']:checked:not(:disabled) + span:hover { 5997 border: 1px solid transparent; 5998 background-color: ${({colors:e})=>e.accent080}; 5999 box-shadow: none; 6000 } 6001 6002 /* -- Disabled state --------------------------------------------------- */ 6003 label > input[type='checkbox']:checked:disabled + span { 6004 border: 1px solid transparent; 6005 opacity: 0.3; 6006 } 6007 6008 label > input[type='checkbox']:not(:checked):disabled + span { 6009 border: 1px solid ${({colors:e})=>e.neutrals700}; 6010 } 6011 6012 label:has(input[type='checkbox']:disabled) { 6013 cursor: auto; 6014 } 6015 6016 label > input[type='checkbox']:disabled + span {
6017 cursor: not-allowed; 6018 } 6019`;var f=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let m={lg:"md",md:"sm",sm:"sm"},g=class extends n.WF{constructor(){super(...arguments),this.inputElementRef=(0,c._)(),this.checked=void 0,this.disabled=!1,this.size="md"}render(){let e=m[this.size];return(0,n.qy)` 6020 <label data-size=${this.size}> 6021 <input 6022 ${(0,c.K)(this.inputElementRef)} 6023 ?checked=${(0,l.J)(this.checked)} 6024 ?disabled=${this.disabled} 6025 type="checkbox" 6026 @change=${this.dispatchChangeEvent} 6027 /> 6028 <span> 6029 <wui-icon name="checkmarkBold" size=${e}></wui-icon> 6030 </span> 6031 <slot></slot> 6032 </label> 6033 `}dispatchChangeEvent(){this.dispatchEvent(new CustomEvent("checkboxChange",{detail:this.inputElementRef.value?.checked,bubbles:!0,composed:!0}))}};g.styles=[u.W5,p],f([(0,i.MZ)({type:Boolean})],g.prototype,"checked",void 0),f([(0,i.MZ)({type:Boolean})],g.prototype,"disabled",void 0),f([(0,i.MZ)()],g.prototype,"size",void 0),g=f([(0,d.E)("wui-checkbox")],g),r(66803);let y=(0,o.AH)` 6034 :host { 6035 display: flex; 6036 align-items: center; 6037 justify-content: center; 6038 } 6039 wui-checkbox { 6040 padding: ${({spacing:e})=>e["3"]}; 6041 } 6042 a { 6043 text-decoration: none; 6044 color: ${({tokens:e})=>e.theme.textSecondary}; 6045 font-weight: 500; 6046 } 6047`;var b=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let w=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.checked=a.o.state.isLegalCheckboxChecked,this.unsubscribe.push(a.o.subscribeKey("isLegalCheckboxChecked",e=>{this.checked=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=s.H.state,r=s.H.state.features?.legalCheckbox;return(e||t)&&r?(0,n.qy)` 6048 <wui-checkbox 6049 ?checked=${this.checked} 6050 @checkboxChange=${this.onCheckboxChange.bind(this)} 6051 data-testid="wui-checkbox" 6052 > 6053 <wui-text color="secondary" variant="sm-regular" align="left"> 6054 I agree to our ${this.termsTemplate()} ${this.andTemplate()} ${this.privacyTemplate()} 6055 </wui-text> 6056 </wui-checkbox> 6057 `:null}andTemplate(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=s.H.state;return e&&t?"and":""}termsTemplate(){let{termsConditionsUrl:e}=s.H.state;return e?(0,n.qy)`<a rel="noreferrer" target="_blank" href=${e}>terms of service</a>`:null}privacyTemplate(){let{privacyPolicyUrl:e}=s.H.state;return e?(0,n.qy)`<a rel="noreferrer" target="_blank" href=${e}>privacy policy</a>`:null}onCheckboxChange(){a.o.setIsLegalCheckboxChecked(!this.checked)}};w.styles=[y],b([(0,i.wk)()],w.prototype,"checked",void 0),w=b([(0,o.EM)("w3m-legal-checkbox")],w)},69546:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.commitmentToVersionedHash=function(e){let{commitment:t,version:r=1}=e,a=e.to??("string"==typeof t?"hex":"bytes"),s=(0,i.sha256)(t,"bytes");return s.set([r],0),"bytes"===a?s:(0,n.bytesToHex)(s)};let n=r(27083),i=r(73023)},69705:(e,t,r)=>{"use strict";r.d(t,{a:()=>i});var n=r(56059);let i=(0,n.JW)`<svg viewBox="0 0 48 54" fill="none"> 6058 <path 6059 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" 6060 /> 6061</svg>`},69756:(e,t,r)=>{"use strict";
6061Object.defineProperty(t,"__esModule",{value:!0}),t.signTypedData=s;let n=r(83562),i=r(85926),a=r(97857);async function s(e,t){let{account:r=e.account,domain:s,message:o,primaryType:l}=t;if(!r)throw new i.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});let c=(0,n.parseAccount)(r),u={EIP712Domain:(0,a.getTypesForEIP712Domain)({domain:s}),...t.types};if((0,a.validateTypedData)({domain:s,message:o,primaryType:l,types:u}),c.signTypedData)return c.signTypedData({domain:s,message:o,primaryType:l,types:u});let d=(0,a.serializeTypedData)({domain:s,message:o,primaryType:l,types:u});return e.request({method:"eth_signTypedData_v4",params:[c.address,d]},{retryCount:0})}},69760:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(e){if(e.length>=255)throw TypeError("Alphabet too long");let t=new Uint8Array(256);for(let e=0;e<t.length;e++)t[e]=255;for(let r=0;r<e.length;r++){let n=e.charAt(r),i=n.charCodeAt(0);if(255!==t[i])throw TypeError(n+" is ambiguous");t[i]=r}let r=e.length,n=e.charAt(0),i=Math.log(r)/Math.log(256),a=Math.log(256)/Math.log(r);function s(e){if("string"!=typeof e)throw TypeError("Expected String");if(0===e.length)return new Uint8Array;let a=0,s=0,o=0;for(;e[a]===n;)s++,a++;let l=(e.length-a)*i+1>>>0,c=new Uint8Array(l);for(;a<e.length;){let n=e.charCodeAt(a);if(n>255)return;let i=t[n];if(255===i)return;let s=0;for(let e=l-1;(0!==i||s<o)&&-1!==e;e--,s++)i+=r*c[e]>>>0,c[e]=i%256>>>0,i=i/256>>>0;if(0!==i)throw Error("Non-zero carry");o=s,a++}let u=l-o;for(;u!==l&&0===c[u];)u++;let d=new Uint8Array(s+(l-u)),h=s;for(;u!==l;)d[h++]=c[u++];return d}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 TypeError("Expected Uint8Array");if(0===t.length)return"";let i=0,s=0,o=0,l=t.length;for(;o!==l&&0===t[o];)o++,i++;let c=(l-o)*a+1>>>0,u=new Uint8Array(c);for(;o!==l;){let e=t[o],n=0;for(let t=c-1;(0!==e||n<s)&&-1!==t;t--,n++)e+=256*u[t]>>>0,u[t]=e%r>>>0,e=e/r>>>0;if(0!==e)throw Error("Non-zero carry");s=n,o++}let d=c-s;for(;d!==c&&0===u[d];)d++;let h=n.repeat(i);for(;d<c;++d)h+=e.charAt(u[d]);return h},decodeUnsafe:s,decode:function(e){let t=s(e);if(t)return t;throw Error("Non-base"+r+" character")}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},69902:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownRpcError=t.WalletConnectSessionSettlementError=t.AtomicityNotSupportedError=t.AtomicReadyWalletRejectedUpgradeError=t.BundleTooLargeError=t.UnknownBundleIdError=t.DuplicateIdError=t.UnsupportedChainIdError=t.UnsupportedNonOptionalCapabilityError=t.SwitchChainError=t.ChainDisconnectedError=t.ProviderDisconnectedError=t.UnsupportedProviderMethodError=t.UnauthorizedProviderError=t.UserRejectedRequestError=t.JsonRpcVersionUnsupportedError=t.LimitExceededRpcError=t.MethodNotSupportedRpcError=t.TransactionRejectedRpcError=t.ResourceUnavailableRpcError=t.ResourceNotFoundRpcError=t.InvalidInputRpcError=t.InternalRpcError=t.InvalidParamsRpcError=t.MethodNotFoundRpcError=t.InvalidRequestRpcError=t.ParseRpcError=t.ProviderRpcError=t.RpcError=void 0;let n=r(45226),i=r(17208);class a extends n.BaseError{constructor(e,{code:t,docsPath:r,metaMessages:n,name:a,shortMessage:s}){super(s,{cause:e,docsPath:r,metaMessages:n||e?.metaMessages,name:a||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=a||e.name,this.code=e instanceof i.RpcRequestError?e.code:t??-1}}t.RpcError=a;class s extends a{constructor(e,t){super(e,t),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}t.ProviderRpcError=s;class o extends a{constructor(e){super(e,{code:o.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}t.ParseRpcError=o,Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class l extends a{constructor(e){super(e,{code:l.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}t.InvalidRequestRpcError=l,Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class c extends a{constructor(e,{method:t}={}){super(e,{code:c.code,name:"MethodNotFoundRpcError",shortMessage:`The method${t?` "${t}"`:""} does not exist / is not available.`})}}t.MethodNotFoundRpcError=c,Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class u extends a{constructor(e){super(e,{code:u.code,name:"InvalidParamsRpcError",shortMessage:"Invalid parameters were provided to the RPC method.\nDouble check you have provided the correct parameters."})}}t.InvalidParamsRpcError=u,Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class d extends a{constructor(e){super(e,{code:d.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}t.InternalRpcError=d,Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});
6061class h extends a{constructor(e){super(e,{code:h.code,name:"InvalidInputRpcError",shortMessage:"Missing or invalid parameters.\nDouble check you have provided the correct parameters."})}}t.InvalidInputRpcError=h,Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class p extends a{constructor(e){super(e,{code:p.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}t.ResourceNotFoundRpcError=p,Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class f extends a{constructor(e){super(e,{code:f.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}t.ResourceUnavailableRpcError=f,Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class m extends a{constructor(e){super(e,{code:m.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}t.TransactionRejectedRpcError=m,Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class g extends a{constructor(e,{method:t}={}){super(e,{code:g.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${t?` "${t}"`:""} is not supported.`})}}t.MethodNotSupportedRpcError=g,Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class y extends a{constructor(e){super(e,{code:y.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}t.LimitExceededRpcError=y,Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class b extends a{constructor(e){super(e,{code:b.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}t.JsonRpcVersionUnsupportedError=b,Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class w extends s{constructor(e){super(e,{code:w.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}t.UserRejectedRequestError=w,Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class v extends s{constructor(e){super(e,{code:v.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}t.UnauthorizedProviderError=v,Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class E extends s{constructor(e,{method:t}={}){super(e,{code:E.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${t?` " ${t}"`:""}.`})}}t.UnsupportedProviderMethodError=E,Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class C extends s{constructor(e){super(e,{code:C.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}t.ProviderDisconnectedError=C,Object.defineProperty(C,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class A extends s{constructor(e){super(e,{code:A.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}t.ChainDisconnectedError=A,Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class x extends s{constructor(e){super(e,{code:x.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}t.SwitchChainError=x,Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class I extends s{constructor(e){super(e,{code:I.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}t.UnsupportedNonOptionalCapabilityError=I,Object.defineProperty(I,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class S extends s{constructor(e){super(e,{code:S.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}t.UnsupportedChainIdError=S,Object.defineProperty(S,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class T extends s{constructor(e){super(e,{code:T.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}t.DuplicateIdError=T,Object.defineProperty(T,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class P extends s{constructor(e){super(e,{code:P.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}t.UnknownBundleIdError=P,Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class O extends s{constructor(e){super(e,{code:O.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}t.BundleTooLargeError=O,Object.defineProperty(O,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class _ extends s{constructor(e){super(e,{code:_.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}t.AtomicReadyWalletRejectedUpgradeError=_,Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750}
6061);class N extends s{constructor(e){super(e,{code:N.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}t.AtomicityNotSupportedError=N,Object.defineProperty(N,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class k extends s{constructor(e){super(e,{code:k.code,name:"WalletConnectSessionSettlementError",shortMessage:"WalletConnect session settlement failed."})}}t.WalletConnectSessionSettlementError=k,Object.defineProperty(k,"code",{enumerable:!0,configurable:!0,writable:!0,value:7e3});class R extends a{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}t.UnknownRpcError=R},69940:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.NativeStakingStatus=t.ConfirmationViewTypes=void 0,function(e){e.GENERIC="GENERIC",e.COW_SWAP_ORDER="COW_SWAP_ORDER",e.COW_SWAP_TWAP_ORDER="COW_SWAP_TWAP_ORDER",e.KILN_NATIVE_STAKING_DEPOSIT="KILN_NATIVE_STAKING_DEPOSIT",e.KILN_NATIVE_STAKING_VALIDATORS_EXIT="KILN_NATIVE_STAKING_VALIDATORS_EXIT",e.KILN_NATIVE_STAKING_WITHDRAW="KILN_NATIVE_STAKING_WITHDRAW"}(r||(t.ConfirmationViewTypes=r={})),function(e){e.NOT_STAKED="NOT_STAKED",e.ACTIVATING="ACTIVATING",e.DEPOSIT_IN_PROGRESS="DEPOSIT_IN_PROGRESS",e.ACTIVE="ACTIVE",e.EXIT_REQUESTED="EXIT_REQUESTED",e.EXITING="EXITING",e.EXITED="EXITED",e.SLASHED="SLASHED"}(n||(t.NativeStakingStatus=n={}))},70200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBlock=s;let n=r(99112),i=r(27083),a=r(12366);async function s(e,{blockHash:t,blockNumber:r,blockTag:o=e.experimental_blockTag??"latest",includeTransactions:l}={}){let c=l??!1,u=void 0!==r?(0,i.numberToHex)(r):void 0,d=null;if(!(d=t?await e.request({method:"eth_getBlockByHash",params:[t,c]},{dedupe:!0}):await e.request({method:"eth_getBlockByNumber",params:[u||o,c]},{dedupe:!!u})))throw new n.BlockNotFoundError({blockHash:t,blockNumber:r});return(e.chain?.formatters?.block?.format||a.formatBlock)(d,"getBlock")}},70259:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeExceedsPaddingSizeError=t.SliceOffsetOutOfBoundsError=t.SizeOverflowError=t.InvalidLengthError=t.InvalidHexValueError=t.InvalidHexTypeError=t.InvalidHexBooleanError=t.IntegerOutOfRangeError=void 0,t.assert=d,t.concat=function(...e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`},t.from=function(e){return e instanceof Uint8Array?h(e):Array.isArray(e)?h(new Uint8Array(e)):e},t.fromBoolean=function(e,t={}){let r=`0x${Number(e)}`;return"number"==typeof t.size?(o.assertSize(r,t.size),p(r,t.size)):r},t.fromBytes=h,t.fromNumber=function(e,t={}){let r,{signed:n,size:i}=t,a=BigInt(e);i?r=n?(1n<<8n*BigInt(i)-1n)-1n:2n**(8n*BigInt(i))-1n:"number"==typeof e&&(r=BigInt(Number.MAX_SAFE_INTEGER));let s="bigint"==typeof r&&n?-r-1n:0;if(r&&a>r||a<s){let t="bigint"==typeof e?"n":"";throw new y({max:r?`${r}${t}`:void 0,min:`${s}${t}`,signed:n,size:i,value:`${e}${t}`})}let o=(n&&a<0?BigInt.asUintN(8*i,BigInt(a)):a).toString(16),l=`0x${o}`;return i?p(l,i):l},t.fromString=function(e,t={}){return h(c.encode(e),t)},t.isEqual=function(e,t){return(0,n.equalBytes)(i.fromHex(e),i.fromHex(t))},t.padLeft=p,t.padRight=f,t.random=function(e){return h(i.random(e))},t.slice=function(e,t,r,n={}){let{strict:i}=n;o.assertStartOffset(e,t);let a=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return i&&o.assertEndOffset(a,t,r),a},t.size=function(e){return Math.ceil((e.length-2)/2)},t.trimLeft=m,t.trimRight=function(e){return o.trim(e,{dir:"right"})},t.toBigInt=g,t.toBoolean=function(e,t={}){t.size&&o.assertSize(e,t.size);let r=m(e);if("0x"===r)return!1;if("0x1"===r)return!0;throw new b(e)},t.toBytes=function(e,t={}){return i.fromHex(e,t)},t.toNumber=function(e,t={}){let{signed:r,size:n}=t;return r||n?Number(g(e,t)):Number(e)},t.toString=function(e,t={}){let{size:r}=t,n=i.fromHex(e);return r&&(s.assertSize(n,r),n=i.trimRight(n)),new TextDecoder().decode(n)},t.validate=function(e,t={}){let{strict:r=!1}=t;try{return d(e,{strict:r}),!0}catch{return!1}};let n=r(56196),i=r(31837),a=r(53937),s=r(52391),o=r(38693),l=r(71720),c=new TextEncoder,u=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function d(e,t={}){let{strict:r=!1}=t;if(!e||"string"!=typeof e)throw new w(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e)||!e.startsWith("0x"))throw new v(e)}function h(e,t={}){let r="";for(let t=0;t<e.length;t++)r+=u[e[t]];let n=`0x${r}`;
6061return"number"==typeof t.size?(o.assertSize(n,t.size),f(n,t.size)):n}function p(e,t){return o.pad(e,{dir:"left",size:t})}function f(e,t){return o.pad(e,{dir:"right",size:t})}function m(e){return o.trim(e,{dir:"left"})}function g(e,t={}){let{signed:r}=t;t.size&&o.assertSize(e,t.size);let n=BigInt(e);if(!r)return n;let i=(1n<<8n*BigInt((e.length-2)/2))-1n;return n<=i>>1n?n:n-i-1n}class y extends a.BaseError{constructor({max:e,min:t,signed:r,size:n,value:i}){super(`Number \`${i}\` is not in safe${n?` ${8*n}-bit`:""}${r?" signed":" unsigned"} integer range ${e?`(\`${t}\` to \`${e}\`)`:`(above \`${t}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}t.IntegerOutOfRangeError=y;class b extends a.BaseError{constructor(e){super(`Hex value \`"${e}"\` is not a valid boolean.`,{metaMessages:['The hex value must be `"0x0"` (false) or `"0x1"` (true).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexBooleanError"})}}t.InvalidHexBooleanError=b;class w extends a.BaseError{constructor(e){super(`Value \`${"object"==typeof e?l.stringify(e):e}\` of type \`${typeof e}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}t.InvalidHexTypeError=w;class v extends a.BaseError{constructor(e){super(`Value \`${e}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}t.InvalidHexValueError=v;class E extends a.BaseError{constructor(e){super(`Hex value \`"${e}"\` is an odd length (${e.length-2} nibbles).`,{metaMessages:["It must be an even length."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidLengthError"})}}t.InvalidLengthError=E;class C extends a.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:"Hex.SizeOverflowError"})}}t.SizeOverflowError=C;class A extends a.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:"Hex.SliceOffsetOutOfBoundsError"})}}t.SliceOffsetOutOfBoundsError=A;class x extends a.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:"Hex.SizeExceedsPaddingSizeError"})}}t.SizeExceedsPaddingSizeError=x},70313:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeSignature=function(e){let t=!0,r="",n=0,a="",s=!1;for(let i=0;i<e.length;i++){let o=e[i];if(["(",")",","].includes(o)&&(t=!0),"("===o&&n++,")"===o&&n--,t){if(0===n){if(" "===o&&["event","function","error",""].includes(a))a="";else if(a+=o,")"===o){s=!0;break}continue}if(" "===o){","!==e[i-1]&&","!==r&&",("!==r&&(r="",t=!1);continue}a+=o,r+=o}}if(!s)throw new i.BaseError("Unable to normalize signature.");return a},t.isArgOfType=function e(t,r){let i=typeof t,a=r.type;switch(a){case"address":return n.validate(t,{strict:!1});case"bool":return"boolean"===i;case"function":case"string":return"string"===i;default:if("tuple"===a&&"components"in r)return Object.values(r.components).every((r,n)=>e(Object.values(t)[n],r));if(/^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(a))return"number"===i||"bigint"===i;if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(a))return"string"===i||t instanceof Uint8Array;
6061if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(a))return Array.isArray(t)&&t.every(t=>e(t,{...r,type:a.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}},t.getAmbiguousTypes=function e(t,r,i){for(let a in t){let s=t[a],o=r[a];if("tuple"===s.type&&"tuple"===o.type&&"components"in s&&"components"in o)return e(s.components,o.components,i[a]);let l=[s.type,o.type];if(l.includes("address")&&l.includes("bytes20")||(l.includes("address")&&l.includes("string")||l.includes("address")&&l.includes("bytes"))&&n.validate(i[a],{strict:!1}))return l}};let n=r(92898),i=r(53937)},70485:(e,t,r)=>{"use strict";r.d(t,{Y:()=>s,w:()=>a});var n=r(13048),i=r(57873);let a={UNIVERSAL_PROVIDER_RELAY_URL:"wss://relay.walletconnect.org",HASH_PREFIX:"SPL Name Service",ROOT_DOMAIN_ACCOUNT:new n.PublicKey("58PwtjSDuFHuUkYjH9BYnnQKHfwo9reZhC2zMJv9JPkx"),NAME_PROGRAM_ID:new n.PublicKey("namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX"),REVERSE_LOOKUP_CLASS:new n.PublicKey("33m47vH6Eav6jr5Ry86XjhRft2jRBLDnDgPSHoquXi2Z"),DEFAULT_CHAIN:{id:"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",caipNetworkId:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",name:"Solana",chainNamespace:i.o.CHAIN.SOLANA,nativeCurrency:{name:"Solana",decimals:9,symbol:"SOL"},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},rpcUrls:{default:{http:[`${i.o.BLOCKCHAIN_API_RPC_URL}/v1`]}}},CHAIN_IDS:{Mainnet:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",Devnet:"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",Testnet:"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z",Deprecated_Mainnet:"solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ",Deprecated_Devnet:"solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K"},LAMPORTS_PER_SOL:1e9},s={UNIT_PRICE_MICRO_LAMPORTS:2e7,UNIT_LIMIT_TRANSFER_ONLY:3e5,UNIT_LIMIT_WITH_ATA_CREATION:4e5}},71016:(e,t,r)=>{"use strict";let n;r.d(t,{Z:()=>y});var i=r(56605),a=r(95613),s=r(57873),o=r(52335),l=r(45283),c=r(82376),u=r(36071),d=r(32590);let h={createBalance(e,t){let r={name:e.metadata.name||"",symbol:e.metadata.symbol||"",decimals:e.metadata.decimals||0,value:e.metadata.value||0,price:e.metadata.price||0,iconUrl:e.metadata.iconUrl||""};return{name:r.name,symbol:r.symbol,chainId:t,address:"native"===e.address?void 0:this.convertAddressToCAIP10Address(e.address,t),value:r.value,price:r.price,quantity:{decimals:r.decimals.toString(),numeric:this.convertHexToBalance({hex:e.balance,decimals:r.decimals})},iconUrl:r.iconUrl}},convertHexToBalance:({hex:e,decimals:t})=>(0,a.J)(BigInt(e),t),convertAddressToCAIP10Address:(e,t)=>`${t}:${e}`,createCAIP2ChainId:(e,t)=>`${t}:${parseInt(e,16)}`,getChainIdHexFromCAIP2ChainId(e){let t=e.split(":");if(t.length<2||!t[1])return"0x0";let r=parseInt(t[1],10);return isNaN(r)?"0x0":`0x${r.toString(16)}`},isWalletGetAssetsResponse(e){return"object"==typeof e&&null!==e&&Object.values(e).every(e=>Array.isArray(e)&&e.every(e=>this.isValidAsset(e)))},isValidAsset:e=>"object"==typeof e&&null!==e&&"string"==typeof e.address&&"string"==typeof e.balance&&("ERC20"===e.type||"NATIVE"===e.type)&&"object"==typeof e.metadata&&null!==e.metadata&&"string"==typeof e.metadata.name&&"string"==typeof e.metadata.symbol&&"number"==typeof e.metadata.decimals&&"number"==typeof e.metadata.price&&"string"==typeof e.metadata.iconUrl};var p=r(29092),f=r(18627);async function m(){if(!n){let{createPublicClient:e,http:t,defineChain:i}=await Promise.all([r.e(2896),r.e(7529),r.e(4140)]).then(r.bind(r,94140));n={createPublicClient:e,http:t,defineChain:i}}return n}let g={getBlockchainApiRpcUrl(e,t){let r=new URL("https://rpc.walletconnect.org/v1/");return r.searchParams.set("chainId",e),r.searchParams.set("projectId",t),r.toString()},async getViemChain(e){let{defineChain:t}=await m(),{chainId:r}=o.C.parseCaipNetworkId(e.caipNetworkId);return t({...e,id:Number(r)})},async createViemPublicClient(e){let{createPublicClient:t,http:r}=await m(),n=f.H.state.projectId,i=await g.getViemChain(e);if(!i)throw Error(`Chain ${e.caipNetworkId} not found in viem/chains`);return t({chain:i,transport:r(g.getBlockchainApiRpcUrl(e.caipNetworkId,n))})}},y={async getMyTokensWithBalance(e={forceUpdate:void 0,caipNetwork:c.W.state.activeCaipNetwork,address:c.W.getAccountData()?.address}){let{forceUpdate:t,caipNetwork:r,address:n}=e,i=d.a.getConnectorId("eip155")===s.o.CONNECTOR_ID.AUTH;if(!n)return[];let a=r?`${r.caipNetworkId}:${n}`:n,o=p.i.getBalanceCacheForCaipAddress(a);if(o)return o.balances;if(r&&r.chainNamespace===s.o.CHAIN.EVM&&i){let e=await this.getEIP155Balances(n,r);if(e)return this.filterLowQualityTokens(e)}let u=await l.T.getBalance(n,r?.caipNetworkId,t);return this.filterLowQualityTokens(u.balances)},async getEIP155Balances(e,t){try{let r=h.getChainIdHexFromCAIP2ChainId(t.caipNetworkId),n=await u.x.getCapabilities(e);if(!n?.[r]?.assetDiscovery?.supported)return null;let i=await u.x.walletGetAssets({account:e,chainFilter:[r]});if(!h.isWalletGetAssetsResponse(i))return null;let a=(i[r]||[]).map(e=>h.createBalance(e,t.caipNetworkId));return p.i.updateBalanceCache({caipAddress:`${t.caipNetworkId}:${e}`,balance:{balances:a},timestamp:Date.now()}),a}catch(e){return null}},filterLowQualityTokens:e=>e.filter(e=>"0"!==e.quantity.decimals),async fetchERC20Balance({caipAddress:e,assetAddress:t,caipNetwork:r}){let n=await g.createViemPublicClient(r),{address:s}=o.C.parseCaipAddress(e),[{result:l},{result:c},{result:u},{result:d}]=await n.multicall({contracts:[{address:t,functionName:"name",args:[],abi:i.xw},{address:t,functionName:"symbol",args:[],abi:i.xw},{address:t,functionName:"balanceOf",args:[s],abi:i.xw},{address:t,functionName:"decimals",args:[],abi:i.xw}]});
6061return{name:l,symbol:c,decimals:d,balance:u&&d?(0,a.J)(u,d):"0"}}}},71114:(e,t)=>{"use strict";async function r(e){return"ganache"===e.mode?await e.request({method:"eth_mining"}):await e.request({method:`${e.mode}_getAutomine`})}Object.defineProperty(t,"__esModule",{value:!0}),t.getAutomine=r},71545:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecursiveReadLimitExceededError=t.PositionOutOfBoundsError=t.NegativeOffsetError=void 0;let n=r(45226);class i extends n.BaseError{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}t.NegativeOffsetError=i;class a extends n.BaseError{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}t.PositionOutOfBoundsError=a;class s extends n.BaseError{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}t.RecursiveReadLimitExceededError=s},71618:(e,t,r)=>{"use strict";r.d(t,{Ai:()=>h,Hq:()=>d,JR:()=>f,OC:()=>p,tz:()=>u});let n=Symbol(),i=Symbol(),a=Object.getPrototypeOf,s=new WeakMap,o=e=>e&&(s.has(e)?s.get(e):a(e)===Object.prototype||a(e)===Array.prototype),l=e=>"object"==typeof e&&null!==e,c=e=>e[i]||e,u=(e,t,r,s)=>{if(!o(e))return e;let l=s&&s.get(e);if(!l){let t=c(e);l=Object.values(Object.getOwnPropertyDescriptors(t)).some(e=>!e.configurable&&!e.writable)?[t,(e=>{if(Array.isArray(e))return Array.from(e);let t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(e=>{e.configurable=!0}),Object.create(a(e),t)})(t)]:[t],null==s||s.set(e,l)}let[d,h]=l,p=r&&r.get(d);return(!p||!!h!==p[1].f)&&((p=((e,t)=>{let r={f:t},a=!1,s=(t,n)=>{if(!a){let i=r.a.get(e);if(i||(i={},r.a.set(e,i)),"w"===t)i.w=!0;else{let e=i[t];e||(e=new Set,i[t]=e),e.add(n)}}},o={get:(t,n)=>n===i?e:(s("k",n),u(Reflect.get(t,n),r.a,r.c,r.t)),has:(t,i)=>i===n?(a=!0,r.a.delete(e),!0):(s("h",i),Reflect.has(t,i)),getOwnPropertyDescriptor:(e,t)=>(s("o",t),Reflect.getOwnPropertyDescriptor(e,t)),ownKeys:e=>(s("w"),Reflect.ownKeys(e))};
6061return t&&(o.set=o.deleteProperty=()=>!1),[o,r]})(d,!!h))[1].p=new Proxy(h||d,p[0]),r&&r.set(d,p)),p[1].a=t,p[1].c=r,p[1].t=s,p[1].p},d=(e,t,r,n,i=Object.is)=>{if(i(e,t))return!1;if(!l(e)||!l(t))return!0;let a=r.get(c(e));if(!a)return!0;if(n){if(n.get(e)===t)return!1;n.set(e,t)}let s=null;for(let r of a.h||[])if(s=Reflect.has(e,r)!==Reflect.has(t,r))return s;if(!0===a.w){if(s=((e,t)=>{let r=Reflect.ownKeys(e),n=Reflect.ownKeys(t);return r.length!==n.length||r.some((e,t)=>e!==n[t])})(e,t))return s}else for(let r of a.o||[]){let n=!!Reflect.getOwnPropertyDescriptor(e,r);if(s=!!Reflect.getOwnPropertyDescriptor(t,r)!==n)return s}for(let o of a.k||[])if(s=d(e[o],t[o],r,n,i))return s;if(null===s)throw Error("invalid used");return s},h=e=>o(e)&&e[i]||null,p=(e,t=!0)=>{s.set(e,t)},f=(e,t,r)=>{let n=[],i=new WeakSet,a=(e,s)=>{var o,u,d;if(i.has(e))return;l(e)&&i.add(e);let h=l(e)&&t.get(c(e));if(h){if(null==(o=h.h)||o.forEach(e=>{let t=`:has(${String(e)})`;n.push(s?[...s,t]:[t])}),!0===h.w){let e=":ownKeys";n.push(s?[...s,e]:[e])}else null==(u=h.o)||u.forEach(e=>{let t=`:hasOwn(${String(e)})`;n.push(s?[...s,t]:[t])});null==(d=h.k)||d.forEach(t=>{(!r||"value"in(Object.getOwnPropertyDescriptor(e,t)||{}))&&a(e[t],s?[...s,t]:[t])})}else s&&n.push(s)};return a(e),n}},71680:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiItem=function(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new n.InvalidDefinitionTypeError(e.type);return`${e.name}(${i(e.inputs,{includeName:t})})`},t.formatAbiParams=i;let n=r(82311);function i(e,{includeName:t=!1}={}){return e?e.map(e=>(function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${i(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")})(e,{includeName:t})).join(t?", ":","):""}},71720:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canonicalize=function e(t){if(null===t||"boolean"==typeof t||"string"==typeof t)return JSON.stringify(t);if("number"==typeof t){if(!Number.isFinite(t))throw TypeError("Cannot canonicalize non-finite number");return Object.is(t,-0)?"0":JSON.stringify(t)}if("bigint"==typeof t)throw TypeError("Cannot canonicalize bigint");if(Array.isArray(t))return`[${t.map(t=>e(t)).join(",")}]`;if("object"==typeof t){let r=Object.keys(t).sort().reduce((r,n)=>{let i=t[n];return void 0!==i&&r.push(`${JSON.stringify(n)}:${e(i)}`),r},[]);return`{${r.join(",")}}`}},t.parse=function(e,t){return JSON.parse(e,(e,n)=>"string"==typeof n&&n.endsWith(r)?BigInt(n.slice(0,-r.length)):"function"==typeof t?t(e,n):n)},t.stringify=function(e,t,n){return JSON.stringify(e,(e,n)=>"function"==typeof t?t(e,n):"bigint"==typeof n?n.toString()+r:n,n)};let r="#__bigint"},71812:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,a){function s(e){try{l(n.next(e))}catch(e){a(e)}}function o(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,o)}l((n=n.apply(e,t||[])).next())})};function n(e){return r(this,void 0,void 0,function*(){var t,r;let n;try{n=yield e.json()}catch(e){n={}}if(!e.ok)throw Error("object"==typeof(r=n)&&null!==r&&("code"in r||"statusCode"in r)&&"message"in r?`CGW error - ${null!=(t=n.code)?t:n.statusCode}: ${n.message}`:`CGW error - status ${e.statusText}`);return n})}Object.defineProperty(t,"__esModule",{value:!0}),t.insertParams=function(e,t){return t?Object.keys(t).reduce((e,r)=>{var n;return n=String(t[r]),e.replace(RegExp(`\\{${r}\\}`,"g"),n)},e):e},t.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}`:""},t.fetchData=function(e,t,i,a,s){return r(this,void 0,void 0,function*(){let r={method:null!=t?t:"POST",headers:Object.assign({"Content-Type":"application/json"},a)};return s&&(r.credentials=s),null!=i&&(r.body="string"==typeof i?i:JSON.stringify(i)),n((yield fetch(e,r)))})},t.getData=function(e,t,i){return r(this,void 0,void 0,function*(){let r={method:"GET"};return t&&(r.headers=Object.assign(Object.assign({},t),{"Content-Type":"application/json"})),i&&(r.credentials=i),n((yield fetch(e,r)))})}},72079:(e,t,r)=>{"use strict";
6061Object.defineProperty(t,"__esModule",{value:!0}),t.toEventSignature=void 0;var n=r(13745);Object.defineProperty(t,"toEventSignature",{enumerable:!0,get:function(){return n.toSignature}})},72356:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.maxBytesPerTransaction=t.bytesPerBlob=t.fieldElementsPerBlob=t.bytesPerFieldElement=void 0,t.bytesPerFieldElement=32,t.fieldElementsPerBlob=4096,t.bytesPerBlob=t.bytesPerFieldElement*t.fieldElementsPerBlob,t.maxBytesPerTransaction=6*t.bytesPerBlob-1-6*t.fieldElementsPerBlob},72431:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeFunctionResult=function(e){let{abi:t,args:r,functionName:o,data:l}=e,c=t[0];if(o){let e=(0,a.getAbiItem)({abi:t,args:r,name:o});if(!e)throw new n.AbiFunctionNotFoundError(o,{docsPath:s});c=e}if("function"!==c.type)throw new n.AbiFunctionNotFoundError(void 0,{docsPath:s});if(!c.outputs)throw new n.AbiFunctionOutputsNotFoundError(c.name,{docsPath:s});let u=(0,i.decodeAbiParameters)(c.outputs,l);return u&&u.length>1?u:u&&1===u.length?u[0]:void 0};let n=r(82311),i=r(29060),a=r(61569),s="/docs/contract/decodeFunctionResult"},72600:(e,t,r)=>{"use strict";r.d(t,{bI:()=>u});var n=r(84410),i=r(65770),a=r(14319);let s={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},o={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},l=BigInt(2),c=(0,a.D0)(s.p,{sqrt:function(e){let t=s.p,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),u=BigInt(23),d=BigInt(44),h=BigInt(88),p=e*e*e%t,f=p*p*e%t,m=(0,a.zH)(f,r,t)*f%t,g=(0,a.zH)(m,r,t)*f%t,y=(0,a.zH)(g,l,t)*p%t,b=(0,a.zH)(y,i,t)*y%t,w=(0,a.zH)(b,o,t)*b%t,v=(0,a.zH)(w,d,t)*w%t,E=(0,a.zH)(v,h,t)*v%t,C=(0,a.zH)(E,d,t)*w%t,A=(0,a.zH)(C,r,t)*f%t,x=(0,a.zH)(A,u,t)*b%t,I=(0,a.zH)(x,n,t)*p%t,S=(0,a.zH)(I,l,t);if(!c.eql(c.sqr(S),e))throw Error("Cannot find square root");return S}}),u=(0,i.s)({...s,Fp:c,lowS:!0,endo:o},n.sc)},72636:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=function(e,t){let r=(0,n.ripemd160)((0,i.isHex)(e,{strict:!1})?(0,a.toBytes)(e):e);return"bytes"===(t||"hex")?r:(0,s.toHex)(r)};let n=r(90228),i=r(80217),a=r(60037),s=r(27083)},72916:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Eth=void 0;let n=r(34717),i=r(25609),a={defaultBlockParam:(e="latest")=>e,returnFullTxObjectParam:(e=!1)=>e,blockNumberToHex:e=>Number.isInteger(e)?`0x${e.toString(16)}`:e};class s{constructor(e){this.communicator=e,this.call=this.buildRequest({call:n.RPC_CALLS.eth_call,formatters:[null,a.defaultBlockParam]}),this.getBalance=this.buildRequest({call:n.RPC_CALLS.eth_getBalance,formatters:[null,a.defaultBlockParam]}),this.getCode=this.buildRequest({call:n.RPC_CALLS.eth_getCode,formatters:[null,a.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:n.RPC_CALLS.eth_getStorageAt,formatters:[null,a.blockNumberToHex,a.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:n.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:n.RPC_CALLS.eth_getBlockByHash,formatters:[null,a.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:n.RPC_CALLS.eth_getBlockByNumber,formatters:[a.blockNumberToHex,a.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:n.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:n.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:n.RPC_CALLS.eth_getTransactionCount,formatters:[null,a.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:n.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=e=>this.buildRequest({call:n.RPC_CALLS.eth_estimateGas})([e]),this.setSafeSettings=this.buildRequest({call:n.RPC_CALLS.safe_setSettings})}buildRequest(e){let{call:t,formatters:r}=e;return async e=>(r&&Array.isArray(e)&&r.forEach((t,r)=>{t&&(e[r]=t(e[r]))}),(await this.communicator.send(i.Methods.rpcCall,{call:t,params:e||[]})).data)}}t.Eth=s},73023:(e,t,r)=>{"use strict";
6061Object.defineProperty(t,"__esModule",{value:!0}),t.sha256=function(e,t){let r=(0,n.sha256)((0,i.isHex)(e,{strict:!1})?(0,a.toBytes)(e):e);return"bytes"===(t||"hex")?r:(0,s.toHex)(r)};let n=r(97527),i=r(80217),a=r(60037),s=r(27083)},73206:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wait=i;let n=r(5636);async function i(e,{signal:t}={}){return new Promise((r,i)=>{if(t?.aborted)return void i((0,n.getAbortError)(t));let a=()=>t?.removeEventListener("abort",o),s=setTimeout(()=>{a(),r()},e),o=()=>{clearTimeout(s),a(),i((0,n.getAbortError)(t))};t?.addEventListener("abort",o,{once:!0})})}},73324:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSerializedTransactionType=function(e){let t=(0,i.sliceHex)(e,0,1);if("0x04"===t)return"eip7702";if("0x03"===t)return"eip4844";if("0x02"===t)return"eip1559";if("0x01"===t)return"eip2930";if("0x"!==t&&(0,a.hexToNumber)(t)>=192)return"legacy";throw new n.InvalidSerializedTransactionTypeError({serializedType:t})};let n=r(44789),i=r(4906),a=r(14972)},73497:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDelegation=o;let n=r(24998),i=r(29813),a=r(4906),s=r(34942);async function o(e,{address:t,blockNumber:r,blockTag:o="latest"}){let l=await (0,s.getCode)(e,{address:t,...void 0!==r?{blockNumber:r}:{blockTag:o}});if(l&&23===(0,i.size)(l)&&l.startsWith("0xef0100"))return(0,n.getAddress)((0,a.slice)(l,3,23))}},73506:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatBlockParameter=function(e){let{blockHash:t,blockNumber:r,blockTag:a,requireCanonical:s}=e;if(void 0!==s&&!t)throw new n.BaseError("`requireCanonical` can only be provided when `blockHash` is set.");return t?s?{blockHash:t,requireCanonical:s}:{blockHash:t}:"bigint"==typeof r?(0,i.numberToHex)(r):a??"latest"};let n=r(45226),i=r(27083)},73562:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(33028).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},73592:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidVersionedHashVersionError=t.InvalidVersionedHashSizeError=t.EmptyBlobError=t.BlobSizeTooLargeError=void 0;let n=r(19775),i=r(45226);class a extends i.BaseError{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}t.BlobSizeTooLargeError=a;class s extends i.BaseError{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}t.EmptyBlobError=s;class o extends i.BaseError{constructor({hash:e,size:t}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${t}`],name:"InvalidVersionedHashSizeError"})}}t.InvalidVersionedHashSizeError=o;class l extends i.BaseError{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:[`Expected: ${n.versionedHashVersionKzg}`,`Received: ${t}`],name:"InvalidVersionedHashVersionError"})}}t.InvalidVersionedHashVersionError=l},73626:(e,t,r)=>{"use strict";r.d(t,{R:()=>g});var n=r(78923),i=r(45400),a=r(6755),s=r(15447),o=r(65467);function l(e,t={}){let{key:r="fallback",name:n="Fallback",rank:i=!1,shouldThrow:a=c,retryCount:u,retryDelay:d}=t;return({chain:t,pollingInterval:l=4e3,timeout:c,...h})=>{let p=e,f=()=>{},m=(0,o.o)({key:r,name:n,async request({method:e,params:r}){let n,i=async(s=0)=>{let o=p[s]({...h,chain:t,retryCount:0,timeout:c});try{let t=await o.request({method:e,params:r});return f({method:e,params:r,response:t,transport:o,status:"success"}),t}catch(l){if(f({error:l,method:e,params:r,transport:o,status:"error"}),a(l)||s===p.length-1||!(n??=p.slice(s+1).some(r=>{let{include:n,exclude:i}=r({chain:t}).config.methods||{};return n?n.includes(e):!i||!i.includes(e)})))throw l;return i(s+1)}};return i()},retryCount:u,retryDelay:d,type:"fallback"},{onResponse:e=>f=e,transports:p.map(e=>e({chain:t,retryCount:0}))});if(i){let e="object"==typeof i?i:{};!function({chain:e,interval:t=4e3,onTransports:r,ping:n,sampleCount:i=10,timeout:a=1e3,transports:o,weights:l={}}){let{stability:c=.7,latency:u=.3}=l,d=[],h=async()=>{let l=await Promise.all(o.map(async t=>{let r,i,s=t({chain:e,retryCount:0,timeout:a}),o=Date.now();try{await (n?n({transport:s}):s.request({method:"net_listening"})),i=1}catch{i=0}finally{r=Date.now()}return{latency:r-o,success:i}}));d.push(l),d.length>i&&d.shift();let p=Math.max(...d.map(e=>Math.max(...e.map(({latency:e})=>e))));r(o.map((e,t)=>{let r=d.map(e=>e[t].latency),n=r.reduce((e,t)=>
6061e+t,0)/r.length,i=d.map(e=>e[t].success),a=i.reduce((e,t)=>e+t,0)/i.length;return 0===a?[0,t]:[u*(1-n/p)+c*a,t]}).sort((e,t)=>t[0]-e[0]).map(([,e])=>o[e])),await (0,s.u)(t),h()};h()}({chain:t,interval:e.interval??l,onTransports:e=>p=e,ping:e.ping,sampleCount:e.sampleCount,timeout:e.timeout,transports:p,weights:e.weights})}return m}}function c(e){return!!("code"in e&&"number"==typeof e.code&&(e.code===a.YW.code||e.code===a.vx.code||e.code===a.nR.code||i.A7.nodeMessage.test(e.message)||5e3===e.code))}var u=r(57873),d=r(29092),h=r(82376),p=r(91753);function f(e,t){let r=new URL("https://rpc.walletconnect.org/v1/");return r.searchParams.set("chainId",e),r.searchParams.set("projectId",t),r.toString()}let m=["near:mainnet","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","eip155:1101","eip155:56","eip155:42161","eip155:7777777","eip155:59144","eip155:324","solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1","eip155:5000","solana:4sgjmw1sunhzsxgspuhpqldx6wiyjntz","eip155:80084","eip155:5003","eip155:100","eip155:8453","eip155:42220","eip155:1313161555","eip155:17000","eip155:1","eip155:300","eip155:1313161554","eip155:1329","eip155:84532","eip155:421614","eip155:11155111","eip155:8217","eip155:43114","solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z","eip155:999999999","eip155:11155420","eip155:80002","eip155:97","eip155:43113","eip155:137","eip155:10","eip155:1301","eip155:80094","eip155:80069","eip155:560048","eip155:31","eip155:2818","eip155:57054","eip155:911867","eip155:534351","eip155:1112","eip155:534352","eip155:1111","eip155:146","eip155:130","eip155:1284","eip155:30","eip155:2810","eip155:55931","bip122:000000000019d6689c085ae165831e93","bip122:000000000933ea01ad0ee984209779ba","tron:0x2b6653dc","tron:0xcd8690dc"],g={extendRpcUrlWithProjectId(e,t){let r=!1;try{r="rpc.walletconnect.org"===new URL(e).host}catch(e){r=!1}if(r){let r=new URL(e);return r.searchParams.has("projectId")||r.searchParams.set("projectId",t),r.toString()}return e},isCaipNetwork:e=>"chainNamespace"in e&&"caipNetworkId"in e,getChainNamespace(e){return this.isCaipNetwork(e)?e.chainNamespace:u.o.CHAIN.EVM},getCaipNetworkId(e){return this.isCaipNetwork(e)?e.caipNetworkId:`${u.o.CHAIN.EVM}:${e.id}`},getDefaultRpcUrl(e,t,r){let n=e.rpcUrls?.default?.http?.[0];return m.includes(t)?f(t,r):n||""},extendCaipNetwork(e,{customNetworkImageUrls:t,projectId:r,customRpcUrls:n}){let i=this.getChainNamespace(e),a=this.getCaipNetworkId(e),s=e.rpcUrls?.default?.http?.[0],o=this.getDefaultRpcUrl(e,a,r),l=e?.rpcUrls?.chainDefault?.http?.[0]||s,c=n?.[a]?.map(e=>e.url)||[],u=[...c,...o?[o]:[]],d=[...c];return l&&!d.includes(l)&&d.push(l),{...e,chainNamespace:i,caipNetworkId:a,assets:{imageId:p.L.NetworkImageIds[e.id],imageUrl:t?.[e.id]},rpcUrls:{...e.rpcUrls,default:{http:u},chainDefault:{http:d}}}},extendCaipNetworks:(e,{customNetworkImageUrls:t,projectId:r,customRpcUrls:n})=>e.map(e=>g.extendCaipNetwork(e,{customNetworkImageUrls:t,customRpcUrls:n,projectId:r})),getViemTransport(e,t,r){let i=[];return r?.forEach(e=>{i.push((0,n.L)(e.url,e.config))}),m.includes(e.caipNetworkId)&&i.push((0,n.L)(f(e.caipNetworkId,t),{fetchOptions:{headers:{"Content-Type":"text/plain"}}})),e?.rpcUrls?.default?.http?.forEach(e=>{i.push((0,n.L)(e))}),l(i)},extendWagmiTransports(e,t,r){if(m.includes(e.caipNetworkId)){let i=this.getDefaultRpcUrl(e,e.caipNetworkId,t);return l([r,(0,n.L)(i)])}return r},getUnsupportedNetwork:e=>({id:e.split(":")[1],caipNetworkId:e,name:u.o.UNSUPPORTED_NETWORK_NAME,chainNamespace:e.split(":")[0],nativeCurrency:{name:"",decimals:0,symbol:""},rpcUrls:{default:{http:[]}}}),getCaipNetworkFromStorage(e){let t=d.i.getActiveCaipNetworkId(),r=h.W.getAllRequestedCaipNetworks(),n=Array.from(h.W.state.chains?.keys()||[]),i=t?.split(":")[0],a=!!i&&n.includes(i),s=r?.find(e=>e.caipNetworkId===t);return a&&!s&&t?this.getUnsupportedNetwork(t):s||e||r?.[0]}}},73688:(e,t,r)=>{"use strict";r.d(t,{s:()=>l});var n=r(45283),i=r(82376),a=r(36071),s=r(71016),o=r(89188);let l={async getTokenList(e){let t=await n.T.fetchSwapTokens({chainId:e});return t?.tokens?.map(e=>({...e,eip2612:!1,quantity:{decimals:"0",numeric:"0"},price:0,value:0}))||[]},async fetchGasPrice(){let e=i.W.state.activeCaipNetwork;if(!e)return null;try{if("solana"!==e.chainNamespace)return await n.T.fetchGasPrice({chainId:e.caipNetworkId});{let e=(await a.x?.estimateGas({chainNamespace:"solana"}))?.toString();return{standard:e,fast:e,instant:e}}}catch{return null}},async fetchSwapAllowance({tokenAddress:e,userAddress:t,sourceTokenAmount:r,sourceTokenDecimals:i}
6061){let s=await n.T.fetchSwapAllowance({tokenAddress:e,userAddress:t});if(s?.allowance&&r&&i){let e=a.x.parseUnits(r,i)||0;return BigInt(s.allowance)>=e}return!1},async getMyTokensWithBalance(e){let t=await s.Z.getMyTokensWithBalance({forceUpdate:e,caipNetwork:i.W.state.activeCaipNetwork,address:i.W.getAccountData()?.address});return i.W.setAccountProp("tokenBalance",t,i.W.state.activeChain),this.mapBalancesToSwapTokens(t)},mapBalancesToSwapTokens:e=>e?.map(e=>({...e,address:e?.address?e.address:(0,o.K1)(),decimals:parseInt(e.quantity.decimals,10),logoUri:e.iconUrl,eip2612:!1}))||[],async handleSwapError(e){try{let t=e?.cause;if(!t?.json)return;let r=await t.json(),n=r?.reasons?.[0]?.description;if(n?.includes("insufficient liquidity"))return"Insufficient liquidity";return}catch{return}}}},73732:(e,t,r)=>{"use strict";r(48054)},73881:(e,t,r)=>{"use strict";function n([e,t]){return`${e}=${function e(t){return Array.isArray(t)?"%5B"+t.map(e).join("%2C%20")+"%5D":"bigint"==typeof t?`${t}n`:encodeURIComponent(String(null!=t&&null===Object.getPrototypeOf(t)?{...t}:t))}(t)}`}r.d(t,{g2:()=>c,eC:()=>l});var i=class extends Error{cause=this.cause;context;constructor(...[e,t]){let r,i;if(t){let{cause:e,...n}=t;e&&(i={cause:e}),Object.keys(n).length>0&&(r=n)}super(function(e,t={}){{let r=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(r+=` '${btoa(Object.entries(t).map(n).join("&"))}'`),`${r}\``}}(e,r),i),this.context={__code:e,...r},this.name="SolanaError"}};function a(e){return"fixedSize"in e&&"number"==typeof e.fixedSize}var s=(e=>(e[e.Little=0]="Little",e[e.Big=1]="Big",e))(s||{});function o(e){return e?.endian!==1}var l=(e={})=>(function(e){var t;return Object.freeze({...t={fixedSize:e.size,write(t,r,n){e.range&&function(e,t,r,n){if(n<t||n>r)throw new i(8078011,{codecDescription:e,max:r,min:t,value:n})}(e.name,e.range[0],e.range[1],t);let a=new ArrayBuffer(e.size);return e.set(new DataView(a),t,o(e.config)),r.set(new Uint8Array(a),n),n+e.size}},encode:e=>{let r=new Uint8Array("fixedSize"in t?t.fixedSize:t.getSizeFromValue(e));return t.write(e,r,0),r}})})({config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(e,t,r)=>e.setBigUint64(0,BigInt(t),r),size:8}),c=(e={})=>(function(e,t){if(a(e)!==a(t))throw new i(8078004);if(a(e)&&a(t)&&e.fixedSize!==t.fixedSize)throw new i(8078005,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!a(e)&&!a(t)&&e.maxSize!==t.maxSize)throw new i(8078006,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return{...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}})(l(e),((e={})=>(function(e){var t;return Object.freeze({...t={fixedSize:e.size,read(t,r=0){!function(e,t,r=0){if(t.length-r<=0)throw new i(8078e3,{codecDescription:e})}(e.name,t,r),function(e,t,r,n=0){let a=r.length-n;if(a<t)throw new i(8078001,{bytesLength:a,codecDescription:e,expected:t})}(e.name,e.size,t,r);let n=new DataView(function(e,t,r){let n=e.byteOffset+(t??0),i=r??e.byteLength;return e.buffer.slice(n,n+i)}(t,r,e.size));return[e.get(n,o(e.config)),r+e.size]}},decode:(e,r=0)=>t.read(e,r)[0]})})({config:e,get:(e,t)=>e.getBigUint64(0,t),name:"u64",size:8}))(e))},74029:e=>{"use strict";var t={single_source_shortest_paths:function(e,r,n){var i,a,s,o,l,c,u,d={},h={};h[r]=0;var p=t.PriorityQueue.make();for(p.push(r,0);!p.empty();)for(s in a=(i=p.pop()).value,o=i.cost,l=e[a]||{})l.hasOwnProperty(s)&&(c=o+l[s],u=h[s],(void 0===h[s]||u>c)&&(h[s]=c,p.push(s,c),d[s]=a));if(void 0!==n&&void 0===h[n])throw Error("Could not find a path from "+r+" to "+n+".");return d},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],n=t;n;)r.push(n),e[n],n=e[n];return r.reverse(),r},find_path:function(e,r,n){var i=t.single_source_shortest_paths(e,r,n);return t.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(e){var r,n=t.PriorityQueue,i={};for(r in e=e||{},n)n.hasOwnProperty(r)&&(i[r]=n[r]);return i.queue=[],i.sorter=e.sorter||n.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){this.queue.push({value:e,cost:t}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},74351:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767);r(79909);var a=r(46756),s=r(63412),o=r(91392);let l=(0,o.AH)` 6062 :host { 6063 display: flex; 6064 justify-content: center;
6065 align-items: center; 6066 width: 40px; 6067 height: 40px; 6068 border-radius: ${({borderRadius:e})=>e["20"]}; 6069 overflow: hidden; 6070 } 6071 6072 wui-icon { 6073 width: 100%; 6074 height: 100%; 6075 } 6076`;var c=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let u=class extends n.WF{constructor(){super(...arguments),this.logo="google"}render(){return(0,n.qy)`<wui-icon color="inherit" size="inherit" name=${this.logo}></wui-icon> `}};u.styles=[a.W5,l],c([(0,i.MZ)()],u.prototype,"logo",void 0),u=c([(0,s.E)("wui-logo")],u)},74624:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransferDirection=t.TransactionStatus=t.TokenType=t.Operation=void 0;var n=r(40797);Object.defineProperty(t,"Operation",{enumerable:!0,get:function(){return n.Operation}}),Object.defineProperty(t,"TokenType",{enumerable:!0,get:function(){return n.TokenType}}),Object.defineProperty(t,"TransactionStatus",{enumerable:!0,get:function(){return n.TransactionStatus}}),Object.defineProperty(t,"TransferDirection",{enumerable:!0,get:function(){return n.TransferDirection}})},74764:(e,t,r)=>{"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`Wrong positive integer: ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function a(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function s(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function o(e,t){i(e);let r=t.outputLen;if(e.length<r)throw Error(`digestInto() expects output buffer of length at least ${r}`)}r.d(t,{CG:()=>o,ai:()=>n,ee:()=>i,t2:()=>s,tW:()=>a})},74815:(e,t)=>{"use strict";async function r(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}Object.defineProperty(t,"__esModule",{value:!0}),t.uninstallFilter=r},74868:(e,t)=>{"use strict";async function r(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}Object.defineProperty(t,"__esModule",{value:!0}),t.watchAsset=r},75003:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setNextBlockBaseFeePerGas=i;let n=r(27083);async function i(e,{baseFeePerGas:t}){await e.request({method:`${e.mode}_setNextBlockBaseFeePerGas`,params:[(0,n.numberToHex)(t)]})}},75114:(e,t,r)=>{"use strict";r.d(t,{Z:()=>td});var n=r(34410),i=r(26768);function a(e){return(0,i.KCZ)(Object.keys(e).map(t=>s(t,(0,i.Ikc)({[t]:e[t]}))))}function s(e,t){return(0,i.FsL)((0,i.Ikc)({...t.entries,$kind:(0,i.lqM)((0,i.euz)(e))}),(0,i.pdi)(t=>({...t,$kind:e})))}let o=(0,i.FsL)((0,i.YjP)(),(0,i.pdi)(e=>(0,n.t4)(e)),(0,i.z6Y)(n.AP)),l=(0,i.YjP)(),c=(0,i.FsL)((0,i.KCZ)([(0,i.YjP)(),(0,i.FsL)((0,i.aig)(),(0,i.ndf)())]),(0,i.z6Y)(e=>{try{return BigInt(e),BigInt(e)>=0&&0xffffffffffffffffn>=BigInt(e)}catch{return!1}},"Invalid u64")),u=(0,i.FsL)((0,i.aig)(),(0,i.ndf)(),(0,i.z6Y)(e=>e>=0&&e<0x100000000,"Invalid u32")),d=(0,i.Ikc)({objectId:o,version:c,digest:(0,i.YjP)()}),h=(0,i.KCZ)([s("GasCoin",(0,i.Ikc)({GasCoin:(0,i.euz)(!0)})),s("Input",(0,i.Ikc)({Input:(0,i.FsL)((0,i.aig)(),(0,i.ndf)()),type:(0,i.lqM)((0,i.KCZ)([(0,i.euz)("pure"),(0,i.euz)("object"),(0,i.euz)("withdrawal")]))})),s("Result",(0,i.Ikc)({Result:(0,i.FsL)((0,i.aig)(),(0,i.ndf)())})),s("NestedResult",(0,i.Ikc)({NestedResult:(0,i.PVZ)([(0,i.FsL)((0,i.aig)(),(0,i.ndf)()),(0,i.FsL)((0,i.aig)(),(0,i.ndf)())])}))]),p=(0,i.Ikc)({budget:(0,i.mee)(c),price:(0,i.mee)(c),owner:(0,i.mee)(o),payment:(0,i.mee)((0,i.YOg)(d))});(0,i.Ikc)({address:(0,i.YjP)(),module:(0,i.YjP)(),name:(0,i.YjP)(),typeParams:(0,i.YOg)((0,i.YjP)())});let f=(0,i.KCZ)([(0,i.Ikc)({$kind:(0,i.euz)("address")}),(0,i.Ikc)({$kind:(0,i.euz)("bool")}),(0,i.Ikc)({$kind:(0,i.euz)("u8")}),(0,i.Ikc)({$kind:(0,i.euz)("u16")}),(0,i.Ikc)({$kind:(0,i.euz)("u32")}),(0,i.Ikc)({$kind:(0,i.euz)("u64")}),(0,i.Ikc)({$kind:(0,i.euz)("u128")}),(0,i.Ikc)({$kind:(0,i.euz)("u256")}),(0,i.Ikc)({$kind:(0,i.euz)("unknown")}),(0,i.Ikc)({$kind:(0,i.euz)("vector"),vector:(0,i.RZV)(()=>f)}),(0,i.Ikc)({$kind:(0,i.euz)("datatype"),datatype:(0,i.Ikc)({typeName:(0,i.YjP)(),typeParameters:(0,i.YOg)((0,i.RZV)(()=>f))})}),(0,i.Ikc)({$kind:(0,i.euz)("typeParameter"),index:(0,i.FsL)((0,i.aig)(),(0,i.ndf)())})]),m=(0,i.Ikc)({reference:(0,i.mee)((0,i.KCZ)([(0,i.euz)("mutable"),(0,i.euz)("immutable"),(0,i.euz)("unknown")])),body:f}),g=(0,i.Ikc)({package:o,module:(0,i.YjP)(),function:(0,i.YjP)(),typeArguments:(0,i.YOg)((0,i.YjP)()),arguments:(0,i.YOg)(h),_argumentTypes:(0,i.lqM)((0,i.mee)((0,i.YOg)(m)))}),y=(0,i.Ikc)({name:(0,i.YjP)(),inputs:(0,i.g1P)((0,i.YjP)(),(0,i.KCZ)([h,(0,i.YOg)(h)])),data:(0,i.g1P)((0,i.YjP)(),(0,i.L5J)())}),b=a({MoveCall:g,TransferObjects:(0,i.Ikc)({objects:(0,i.YOg)(h),address:h}),SplitCoins:(0,i.Ikc)({coin:h,amounts:(0,i.YOg)(h)}),MergeCoins:(0,i.Ikc)({destination:h,sources:(0,i.YOg)(h)}),Publish:(0,i.Ikc)({modules:(0,i.YOg)(l),dependencies:(0,i.YOg)(o)}),MakeMoveVec:(0,i.Ikc)({type:(0,i.mee)((0,i.YjP)()),elements:(0,i.YOg)(h)}),Upgrade:(0,i.Ikc)({modules:(0,i.YOg)(l),dependencies:(0,i.YOg)(o),package:o,ticket:h}),$Intent:y}),w=a({ImmOrOwnedObject:d,SharedObject:(0,i.Ikc)({objectId:o,initialSharedVersion:c,mutable:(0,i.zMY)()}),Receiving:d}),v=a({MaxAmountU64:c}),E=a({Balance:(0,i.YjP)()}),C=a({Sender:(0,i.euz)(!0),Sponsor:(0,i.euz)(!0)}),A=(0,i.Ikc)({reservation:v,typeArg:E,withdrawFrom:C}),x=a({Object:w,Pure:(0,i.Ikc)({bytes:l}),UnresolvedPure:(0,i.Ikc)({value:(0,i.L5J)()}),UnresolvedObject:(0,i.Ikc)({objectId:o,version:(0,i.lqM)((0,i.mee)(c)),digest:(0,i.lqM)((0,i.mee)((0,i.YjP)())),initialSharedVersion:(0,i.lqM)((0,i.mee)(c)),mutable:(0,i.lqM)((0,i.mee)((0,i.zMY)()))}),FundsWithdrawal:A}),I=a({Object:w,Pure:(0,i.Ikc)({bytes:l})}),S=(0,i.Ikc)({minEpoch:(0,i.mee)(c),maxEpoch:(0,i.mee)(c),minTimestamp:(0,i.mee)(c),maxTimestamp:(0,i.mee)(c),chain:(0,i.YjP)(),nonce:u}),T=a({None:(0,i.euz)(!0),Epoch:c,ValidDuring:S}),P=(0,i.Ikc)({version:(0,i.euz)(2),sender:(0,i.cl6)(o),expiration:(0,i.cl6)(T),gasData:p,inputs:(0,i.YOg)(x),commands:(0,i.YOg)(b)});var O=r(51844),_=r(89596);let N=(0,i.Ikc)({digest:(0,i.YjP)(),objectId:(0,i.YjP)(),version:(0,i.KCZ)([(0,i.FsL)((0,i.aig)(),(0,i.ndf)()),(0,i.YjP)(),(0,i.oad)()])}),k=a({ImmOrOwned:N,Shared:(0,i.Ikc)({objectId:o,initialSharedVersion:c,mutable:(0,i.zMY)()}),Receiving:N}),R=a({Object:k,Pure:(0,i.YOg)((0,i.FsL)((0,i.aig)(),(0,i.ndf)()))}),M=(0,i.KCZ)([(0,i.Ikc)({kind:(0,i.euz)("Input"),index:(0,i.FsL)((0,i.aig)(),(0,i.ndf)()),value:(0,i.L5J)(),type:(0,i.lqM)((0,i.euz)("object"))}),(0,i.Ikc)({kind:(0,i.euz)("Input"),index:(0,i.FsL)((0,i.aig)(),(0,i.ndf)()),value:(0,i.L5J)(),type:(0,i.euz)("pure")})]),B=(0,i.KCZ)([(0,i.Ikc)({Epoch:(0,i.FsL)((0,i.aig)(),(0,i.ndf)())}),(0,i.Ikc)({None:(0,i.mee)((0,i.euz)(!0))})]),j=(0,i.FsL)((0,i.KCZ)([(0,i.aig)(),(0,i.YjP)(),(0,i.oad)()]),(0,i.z6Y)(e=>{if(!["string","number","bigint"].includes(typeof e))return!1;try{return BigInt(e),!0}catch{return!1}}
6076)),U=(0,i.KCZ)([(0,i.Ikc)({bool:(0,i.mee)((0,i.euz)(!0))}),(0,i.Ikc)({u8:(0,i.mee)((0,i.euz)(!0))}),(0,i.Ikc)({u64:(0,i.mee)((0,i.euz)(!0))}),(0,i.Ikc)({u128:(0,i.mee)((0,i.euz)(!0))}),(0,i.Ikc)({address:(0,i.mee)((0,i.euz)(!0))}),(0,i.Ikc)({signer:(0,i.mee)((0,i.euz)(!0))}),(0,i.Ikc)({vector:(0,i.RZV)(()=>U)}),(0,i.Ikc)({struct:(0,i.RZV)(()=>$)}),(0,i.Ikc)({u16:(0,i.mee)((0,i.euz)(!0))}),(0,i.Ikc)({u32:(0,i.mee)((0,i.euz)(!0))}),(0,i.Ikc)({u256:(0,i.mee)((0,i.euz)(!0))})]),$=(0,i.Ikc)({address:(0,i.YjP)(),module:(0,i.YjP)(),name:(0,i.YjP)(),typeParams:(0,i.YOg)(U)}),L=(0,i.Ikc)({budget:(0,i.lqM)(j),price:(0,i.lqM)(j),payment:(0,i.lqM)((0,i.YOg)(N)),owner:(0,i.lqM)((0,i.YjP)())}),D=[M,(0,i.Ikc)({kind:(0,i.euz)("GasCoin")}),(0,i.Ikc)({kind:(0,i.euz)("Result"),index:(0,i.FsL)((0,i.aig)(),(0,i.ndf)())}),(0,i.Ikc)({kind:(0,i.euz)("NestedResult"),index:(0,i.FsL)((0,i.aig)(),(0,i.ndf)()),resultIndex:(0,i.FsL)((0,i.aig)(),(0,i.ndf)())})],F=(0,i.KCZ)([...D]),H=(0,i.Ikc)({kind:(0,i.euz)("MoveCall"),target:(0,i.FsL)((0,i.YjP)(),(0,i.z6Y)(e=>3===e.split("::").length)),typeArguments:(0,i.YOg)((0,i.YjP)()),arguments:(0,i.YOg)(F)}),z=(0,i.Ikc)({kind:(0,i.euz)("TransferObjects"),objects:(0,i.YOg)(F),address:F}),W=(0,i.Ikc)({kind:(0,i.euz)("SplitCoins"),coin:F,amounts:(0,i.YOg)(F)}),q=(0,i.Ikc)({kind:(0,i.euz)("MergeCoins"),destination:F,sources:(0,i.YOg)(F)}),V=(0,i.Ikc)({kind:(0,i.euz)("MakeMoveVec"),type:(0,i.KCZ)([(0,i.Ikc)({Some:U}),(0,i.Ikc)({None:(0,i.mee)((0,i.euz)(!0))})]),objects:(0,i.YOg)(F)}),G=(0,i.KCZ)([H,z,W,q,(0,i.Ikc)({kind:(0,i.euz)("Publish"),modules:(0,i.YOg)((0,i.YOg)((0,i.FsL)((0,i.aig)(),(0,i.ndf)()))),dependencies:(0,i.YOg)((0,i.YjP)())}),(0,i.Ikc)({kind:(0,i.euz)("Upgrade"),modules:(0,i.YOg)((0,i.YOg)((0,i.FsL)((0,i.aig)(),(0,i.ndf)()))),dependencies:(0,i.YOg)((0,i.YjP)()),packageId:(0,i.YjP)(),ticket:F}),V]);function K(e,t){if("GasCoin"===e.$kind)return{kind:"GasCoin"};if("Result"===e.$kind)return{kind:"Result",index:e.Result};if("NestedResult"===e.$kind)return{kind:"NestedResult",index:e.NestedResult[0],resultIndex:e.NestedResult[1]};if("Input"===e.$kind)return t[e.Input];throw Error(`Invalid argument ${Object.keys(e)}`)}function Z(e){switch(e.kind){case"GasCoin":return{GasCoin:!0};case"Result":return{Result:e.index};case"NestedResult":return{NestedResult:[e.index,e.resultIndex]};case"Input":return{Input:e.index}}}function J(e){return"string"==typeof e?(0,n.t4)(e):e.Object?e.Object.ImmOrOwnedObject?(0,n.t4)(e.Object.ImmOrOwnedObject.objectId):e.Object.Receiving?(0,n.t4)(e.Object.Receiving.objectId):(0,n.t4)(e.Object.SharedObject.objectId):e.UnresolvedObject?(0,n.t4)(e.UnresolvedObject.objectId):void 0}(0,i.Ikc)({version:(0,i.euz)(1),sender:(0,i.lqM)((0,i.YjP)()),expiration:(0,i.cl6)(B),gasConfig:L,inputs:(0,i.YOg)(M),transactions:(0,i.YOg)(G)});var Y=r(77374);function Q(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name&&"BYTES_PER_ELEMENT"in e&&1===e.BYTES_PER_ELEMENT}let X=e=>e?`"${e}" `:"";function ee(e,t=""){if("number"!=typeof e)throw TypeError(X(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw RangeError(X(t)+"expected integer >= 0, got "+e);return e}function et(e,t,r=""){if(Q(e)&&(void 0===t||e.length===t))return e;void 0!==t&&ee(t,"length");let n=Q(e),i=void 0!==t?` of length ${t}`:"",a=n?`length=${e.length}`:`type=${typeof e}`,s=X(r)+"expected Uint8Array"+i+", got "+a;if(!n)throw TypeError(s);throw RangeError(s)}function er(e){return Uint8Array.from(et(e))}let en=(e,t)=>{if(null===e||"object"!=typeof e||Array.isArray(e))throw TypeError(("object"===t?"":`"${t}" `)+"expected object, got type="+typeof e)};function ei(e,t=!0){if(e.destroyed)throw Error("hash was destroyed");if(t&&e.finished)throw Error("digest() was already called")}function ea(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function es(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}let eo=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0];function el(e){return e<<24&0xff000000|e<<8&0xff0000|e>>>8&65280|e>>>24&255}let ec=eo?e=>e:e=>el(e)>>>0,eu=eo?e=>e:function(e){for(let t=0;t<e.length;
6076t++)e[t]=el(e[t]);return e};function ed(e,t,r="opts"){return en(e,"defaults"),void 0!==t&&en(t,r),Object.assign(e,t)}let eh=Uint8Array.from([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]),ep=Uint32Array.from([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),ef=(e,t,r)=>e>>>r|t<<32-r,em=(e,t,r)=>e<<32-r|t>>>r;function eg(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/0x100000000|0)|0,l:0|i}}let ey=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),eb=(e,t,r,n)=>t+r+n+(e/0x100000000|0)|0,ew=Uint32Array.from([0xf3bcc908,0x6a09e667,0x84caa73b,0xbb67ae85,0xfe94f82b,0x3c6ef372,0x5f1d36f1,0xa54ff53a,0xade682d1,0x510e527f,0x2b3e6c1f,0x9b05688c,0xfb41bd6b,0x1f83d9ab,0x137e2179,0x5be0cd19]),ev=new Uint32Array(32);function eE(e,t,r,n,i,a){let s=i[a],o=i[a+1],l=ev[2*e],c=ev[2*e+1],u=ev[2*t],d=ev[2*t+1],h=ev[2*r],p=ev[2*r+1],f=ev[2*n],m=ev[2*n+1],g=ey(l,u,s),y=m^(c=eb(g,c,d,o)),b=f^(l=0|g);m=b,f=y,({h:p,l:h}=eg(p,h,m,f)),d=ef(y=d^p,b=u^h,24),u=em(y,b,24),ev[2*e]=l,ev[2*e+1]=c,ev[2*t]=u,ev[2*t+1]=d,ev[2*r]=h,ev[2*r+1]=p,ev[2*n]=f,ev[2*n+1]=m}function eC(e,t,r,n,i,a){let s=i[a],o=i[a+1],l=ev[2*e],c=ev[2*e+1],u=ev[2*t],d=ev[2*t+1],h=ev[2*r],p=ev[2*r+1],f=ev[2*n],m=ev[2*n+1],g=ey(l,u,s),y=m^(c=eb(g,c,d,o)),b=f^(l=0|g);m=ef(y,b,16),f=em(y,b,16),({h:p,l:h}=eg(p,h,m,f)),d=(y=d^p)<<1|(b=u^h)>>>31,u=y>>>31|b<<1,ev[2*e]=l,ev[2*e+1]=c,ev[2*t]=u,ev[2*t+1]=d,ev[2*r]=h,ev[2*r+1]=p,ev[2*n]=f,ev[2*n+1]=m}class eA{buffer;buffer32;finished=!1;destroyed=!1;length=0;pos=0;blockLen;outputLen;canXOF=!1;constructor(e,t){ee(e),ee(t),this.blockLen=e,this.outputLen=t,this.buffer=new Uint8Array(e),this.buffer32=ea(this.buffer)}update(e){ei(this),et(e);let{blockLen:t,buffer:r,buffer32:n}=this,i=e.length,a=e.byteOffset,s=e.buffer;for(let o=0;o<i;){this.pos===t&&(eu(n),this.compress(n,0,!1),eu(n),this.pos=0);let l=Math.min(t-this.pos,i-o),c=a+o;if(l===t&&!(c%4)&&o+l<i){let e=new Uint32Array(s,c,Math.floor((i-o)/4));eu(e);for(let r=0;o+t<i;r+=n.length,o+=t)this.length+=t,this.compress(e,r,!1);eu(e);continue}r.set(0===o&&l===i?e:e.subarray(o,o+l),this.pos),this.pos+=l,this.length+=l,o+=l}return this}digestInto(e){ei(this);et(e,void 0,"output");let t=this.outputLen;if(!(e.length>=t))throw RangeError('"output" expected length >= '+t);if(3&e.byteOffset)throw RangeError('"output" expected 4-byte aligned byteOffset, got '+e.byteOffset);let{pos:r,buffer32:n}=this;this.finished=!0,this.buffer.fill(0,r),eu(n),this.compress(n,0,!0),eu(n);let i=this.get(),a=e===this.buffer?n:ea(e),s=Math.floor(this.outputLen/4);for(let e=0;e<s;e++)a[e]=ec(i[e]);let o=this.outputLen%4;if(!o)return;let l=4*s,c=i[s];for(let t=0;t<o;t++)e[l+t]=c>>>8*t}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){let{buffer:t,length:r,finished:n,destroyed:i,outputLen:a,pos:s}=this;return(e||=new this.constructor({dkLen:a})).set(...this.get()),e.buffer.set(t),e.destroyed=i,e.finished=n,e.length=r,e.pos=s,e.outputLen=a,e}clone(){return this._cloneInto()}}class ex extends eA{v0l=0|ew[0];v0h=0|ew[1];v1l=0|ew[2];v1h=0|ew[3];v2l=0|ew[4];v2h=0|ew[5];v3l=0|ew[6];v3h=0|ew[7];v4l=0|ew[8];v4h=0|ew[9];v5l=0|ew[10];v5h=0|ew[11];v6l=0|ew[12];v6h=0|ew[13];v7l=0|ew[14];v7h=0|ew[15];constructor(e={}){let t=void 0===(e=ed({},e)).dkLen?64:e.dkLen;super(128,t),function(e,t={},r,n,i){if(ee(64),e<=0||e>r)throw Error('"dkLen" must be 1..'+r+", got "+e);let{key:a,salt:s,personalization:o}=t;if(void 0!==a&&(a.length<1||a.length>r))throw Error('"key" expected to be undefined or of length=1..'+r);void 0!==s&&et(s,16,"salt"),void 0!==o&&et(o,16,"personalization")}(t,e,64,16,16);let{key:r,personalization:n,salt:i}=e,a=0;if(void 0!==r&&(et(r,void 0,"key"),a=r.length),this.v0l^=this.outputLen|a<<8|0x1010000,void 0!==i){et(i,void 0,"salt");let e=ea(er(i));this.v4l^=ec(e[0]),this.v4h^=ec(e[1]),this.v5l^=ec(e[2]),this.v5h^=ec(e[3])}if(void 0!==n){et(n,void 0,"personalization");let e=ea(er(n));this.v6l^=ec(e[0]),this.v6h^=ec(e[1]),this.v7l^=ec(e[2]),this.v7h^=ec(e[3])}if(void 0!==r){let e=new Uint8Array(this.blockLen);e.set(r),this.update(e),es(e)}}
6076get(){let{v0l:e,v0h:t,v1l:r,v1h:n,v2l:i,v2h:a,v3l:s,v3h:o,v4l:l,v4h:c,v5l:u,v5h:d,v6l:h,v6h:p,v7l:f,v7h:m}=this;return[e,t,r,n,i,a,s,o,l,c,u,d,h,p,f,m]}set(e,t,r,n,i,a,s,o,l,c,u,d,h,p,f,m){this.v0l=0|e,this.v0h=0|t,this.v1l=0|r,this.v1h=0|n,this.v2l=0|i,this.v2h=0|a,this.v3l=0|s,this.v3h=0|o,this.v4l=0|l,this.v4h=0|c,this.v5l=0|u,this.v5h=0|d,this.v6l=0|h,this.v6h=0|p,this.v7l=0|f,this.v7h=0|m}compress(e,t,r){let{v0l:n,v0h:i,v1l:a,v1h:s,v2l:o,v2h:l,v3l:c,v3h:u,v4l:d,v4h:h,v5l:p,v5h:f,v6l:m,v6h:g,v7l:y,v7h:b}=this;ev[0]=n,ev[1]=i,ev[2]=a,ev[3]=s,ev[4]=o,ev[5]=l,ev[6]=c,ev[7]=u,ev[8]=d,ev[9]=h,ev[10]=p,ev[11]=f,ev[12]=m,ev[13]=g,ev[14]=y,ev[15]=b,ev.set(ew,16);let w=this.length>>>0,v=this.length/0x100000000|0;ev[24]=ew[8]^w,ev[25]=ew[9]^v,r&&(ev[28]=~ev[28],ev[29]=~ev[29]);let E=0;for(let r=0;r<12;r++)eE(0,4,8,12,e,t+2*eh[E++]),eC(0,4,8,12,e,t+2*eh[E++]),eE(1,5,9,13,e,t+2*eh[E++]),eC(1,5,9,13,e,t+2*eh[E++]),eE(2,6,10,14,e,t+2*eh[E++]),eC(2,6,10,14,e,t+2*eh[E++]),eE(3,7,11,15,e,t+2*eh[E++]),eC(3,7,11,15,e,t+2*eh[E++]),eE(0,5,10,15,e,t+2*eh[E++]),eC(0,5,10,15,e,t+2*eh[E++]),eE(1,6,11,12,e,t+2*eh[E++]),eC(1,6,11,12,e,t+2*eh[E++]),eE(2,7,8,13,e,t+2*eh[E++]),eC(2,7,8,13,e,t+2*eh[E++]),eE(3,4,9,14,e,t+2*eh[E++]),eC(3,4,9,14,e,t+2*eh[E++]);this.v0l^=ev[0]^ev[16],this.v0h^=ev[1]^ev[17],this.v1l^=ev[2]^ev[18],this.v1h^=ev[3]^ev[19],this.v2l^=ev[4]^ev[20],this.v2h^=ev[5]^ev[21],this.v3l^=ev[6]^ev[22],this.v3h^=ev[7]^ev[23],this.v4l^=ev[8]^ev[24],this.v4h^=ev[9]^ev[25],this.v5l^=ev[10]^ev[26],this.v5h^=ev[11]^ev[27],this.v6l^=ev[12]^ev[28],this.v6h^=ev[13]^ev[29],this.v7l^=ev[14]^ev[30],this.v7h^=ev[15]^ev[31],es(ev)}destroy(){this.destroyed=!0,es(this.buffer32),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}let eI=function(e,t={}){if("function"!=typeof e)throw TypeError('"hashCons" expected function, got type='+typeof e);t=ed({},t,"info");let r=(t,r)=>e(r).update(t).digest(),n=e(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.canXOF=n.canXOF,r.create=t=>e(t),Object.assign(r,t),Object.freeze(r)}(e=>new ex(e));var eS=r(14663);function eT(e){return(0,n.t4)(e).replace("0x","")}var eP=class e{static fromKindBytes(t){let r=Y.jy.TransactionKind.parse(t).ProgrammableTransaction;if(!r)throw Error("Unable to deserialize from bytes.");return e.restore({version:2,sender:null,expiration:null,gasData:{budget:null,owner:null,payment:null,price:null},inputs:r.inputs,commands:r.commands})}static fromBytes(t){let r=Y.jy.TransactionData.parse(t)?.V1,n=r.kind.ProgrammableTransaction;if(!r||!n)throw Error("Unable to deserialize from bytes.");return e.restore({version:2,sender:r.sender,expiration:r.expiration,gasData:r.gasData,inputs:n.inputs,commands:n.commands})}static restore(t){return 2===t.version?new e((0,i.qgA)(P,t)):new e((0,i.qgA)(P,(0,i.qgA)(P,{version:2,sender:t.sender??null,expiration:t.expiration?"Epoch"in t.expiration?{Epoch:t.expiration.Epoch}:{None:!0}:null,gasData:{owner:t.gasConfig.owner??null,budget:t.gasConfig.budget?.toString()??null,price:t.gasConfig.price?.toString()??null,payment:t.gasConfig.payment?.map(e=>({digest:e.digest,objectId:e.objectId,version:e.version.toString()}))??null},inputs:t.inputs.map(e=>{if("Input"===e.kind){if((0,i.is)(R,e.value)){let t=(0,i.qgA)(R,e.value);if(t.Object){if(t.Object.ImmOrOwned)return{Object:{ImmOrOwnedObject:{objectId:t.Object.ImmOrOwned.objectId,version:String(t.Object.ImmOrOwned.version),digest:t.Object.ImmOrOwned.digest}}};if(t.Object.Shared)return{Object:{SharedObject:{mutable:t.Object.Shared.mutable??null,initialSharedVersion:t.Object.Shared.initialSharedVersion,objectId:t.Object.Shared.objectId}}};if(t.Object.Receiving)return{Object:{Receiving:{digest:t.Object.Receiving.digest,version:String(t.Object.Receiving.version),objectId:t.Object.Receiving.objectId}}};throw Error("Invalid object input")}return{Pure:{bytes:(0,_.n)(new Uint8Array(t.Pure))}}}return"object"===e.type?{UnresolvedObject:{objectId:e.value}}:{UnresolvedPure:{value:e.value}}}throw Error("Invalid input")}),commands:t.transactions.map(e=>{switch(e.kind){case"MakeMoveVec":return{MakeMoveVec:{type:"Some"in e.type?O.r.tagToString(e.type.Some):null,elements:e.objects.map(e=>Z(e))}};case"MergeCoins":return{MergeCoins:{destination:Z(e.destination),sources:e.sources.map(e=>Z(e))}};case"MoveCall":{let[t,r,n]=e.target.split("::");return{MoveCall:{package:t,module:r,function:n,typeArguments:e.typeArguments,arguments:e.arguments.map(e=>Z(e))}}}case"Publish":return{Publish:{modules:e.modules.map(e=>(0,_.n)(Uint8Array.from(e))),dependencies:e.dependencies}};case"SplitCoins":return{SplitCoins:{coin:Z(e.coin),amounts:e.amounts.map(e=>Z(e))}};case"TransferObjects":return{TransferObjects:{objects:e.objects.map(e=>Z(e)),address:Z(e.address)}};case"Upgrade":return{Upgrade:{modules:e.modules.map(e=>(0,_.n)(Uint8Array.from(e))),dependencies:e.dependencies,package:e.packageId,ticket:Z(e.ticket)}}}throw Error(`Unknown transaction ${Object.keys(e)}`)})})))}static getDigestFromBytes(e){return(0,eS.g)(function(e,t){let r=Array.from(`${e}::`).map(e=>e.charCodeAt(0)),n=new Uint8Array(r.length+t.length);return n.set(r),n.set(t,r.length),eI(n,{dkLen:32})}("TransactionData",e))}constructor(e){this.version=2,this.sender=e?.sender??null,this.expiration=e?.expiration??null,this.inputs=e?.inputs??[],this.commands=e?.commands??[],this.gasData=e?.gasData??{budget:null,price:null,owner:null,payment:null}}build({maxSizeBytes:e=1/0,overrides:t,onlyTransactionKind:r}={}){let n=this.inputs,i=this.commands;if(r)return Y.jy.TransactionKind.serialize({ProgrammableTransaction:{inputs:n,commands:i}},{maxSize:e}).toBytes();let a=t?.expiration??this.expiration,s=t?.sender??this.sender,o={...this.gasData,...t?.gasData};if(!s)throw Error("Missing transaction sender");if(!o.budget)throw Error("Missing gas budget");if(!o.payment)throw Error("Missing gas payment");
6076if(!o.price)throw Error("Missing gas price");let l={sender:eT(s),expiration:a||{None:!0},gasData:{payment:o.payment,owner:eT(this.gasData.owner??s),price:BigInt(o.price),budget:BigInt(o.budget)},kind:{ProgrammableTransaction:{inputs:n,commands:i}}};return Y.jy.TransactionData.serialize({V1:l},{maxSize:e}).toBytes()}addInput(e,t){let r=this.inputs.length;return this.inputs.push(t),{Input:r,type:e,$kind:"Input"}}getInputUses(e,t){this.mapArguments((r,n)=>("Input"===r.$kind&&r.Input===e&&t(r,n),r))}mapCommandArguments(e,t){let r=this.commands[e];switch(r.$kind){case"MoveCall":r.MoveCall.arguments=r.MoveCall.arguments.map(n=>t(n,r,e));break;case"TransferObjects":r.TransferObjects.objects=r.TransferObjects.objects.map(n=>t(n,r,e)),r.TransferObjects.address=t(r.TransferObjects.address,r,e);break;case"SplitCoins":r.SplitCoins.coin=t(r.SplitCoins.coin,r,e),r.SplitCoins.amounts=r.SplitCoins.amounts.map(n=>t(n,r,e));break;case"MergeCoins":r.MergeCoins.destination=t(r.MergeCoins.destination,r,e),r.MergeCoins.sources=r.MergeCoins.sources.map(n=>t(n,r,e));break;case"MakeMoveVec":r.MakeMoveVec.elements=r.MakeMoveVec.elements.map(n=>t(n,r,e));break;case"Upgrade":r.Upgrade.ticket=t(r.Upgrade.ticket,r,e);break;case"$Intent":let n=r.$Intent.inputs;for(let[i,a]of(r.$Intent.inputs={},Object.entries(n)))r.$Intent.inputs[i]=Array.isArray(a)?a.map(n=>t(n,r,e)):t(a,r,e);break;case"Publish":break;default:throw Error(`Unexpected transaction kind: ${r.$kind}`)}}mapArguments(e){for(let t of this.commands.keys())this.mapCommandArguments(t,e)}replaceCommand(e,t,r=e){if(!Array.isArray(t)){this.commands[e]=t;return}let n=t.length-1;this.commands.splice(e,1,...structuredClone(t)),this.mapArguments((a,s,o)=>{if(o<e+t.length)return a;if("number"!=typeof r&&("Result"===a.$kind&&a.Result===e||"NestedResult"===a.$kind&&a.NestedResult[0]===e))if(!("NestedResult"in a)||0===a.NestedResult[1])return(0,i.qgA)(h,structuredClone(r));else throw Error(`Cannot replace command ${e} with a specific result type: NestedResult[${e}, ${a.NestedResult[1]}] references a nested element that cannot be mapped to the replacement result`);switch(a.$kind){case"Result":a.Result===e&&"number"==typeof r&&(a.Result=r),a.Result>e&&(a.Result+=n);break;case"NestedResult":if(a.NestedResult[0]===e&&"number"==typeof r)return{$kind:"NestedResult",NestedResult:[r,a.NestedResult[1]]};a.NestedResult[0]>e&&(a.NestedResult[0]+=n)}return a})}replaceCommandWithTransaction(e,t,r){if("Result"!==r.$kind&&"NestedResult"!==r.$kind)throw Error("Result must be of kind Result or NestedResult");this.insertTransaction(e,t),this.replaceCommand(e+t.commands.length,[],"Result"in r?{NestedResult:[r.Result+e,0]}:{NestedResult:[r.NestedResult[0]+e,r.NestedResult[1]]})}insertTransaction(e,t){let r=new Map,n=new Map;for(let e=0;e<t.inputs.length;e++){let n=t.inputs[e],i=J(n),a=-1;if(void 0!==i&&-1!==(a=this.inputs.findIndex(e=>J(e)===i))&&this.inputs[a].Object?.SharedObject&&n.Object?.SharedObject&&(this.inputs[a].Object.SharedObject.mutable=this.inputs[a].Object.SharedObject.mutable||n.Object.SharedObject.mutable),-1!==a)r.set(e,a);else{let t=this.inputs.length;this.inputs.push(n),r.set(e,t)}}for(let r=0;r<t.commands.length;r++)n.set(r,e+r);let i=[];for(let e=0;e<t.commands.length;e++){let a=structuredClone(t.commands[e]);!function(e,t,r){let n=e=>{switch(e.$kind){case"Input":{let r=t.get(e.Input);if(void 0===r)throw Error(`Input ${e.Input} not found in input mapping`);return{...e,Input:r}}case"Result":{let t=r.get(e.Result);if(void 0!==t)return{...e,Result:t};return e}case"NestedResult":{let t=r.get(e.NestedResult[0]);if(void 0!==t)return{...e,NestedResult:[t,e.NestedResult[1]]};return e}default:return e}};switch(e.$kind){case"MoveCall":e.MoveCall.arguments=e.MoveCall.arguments.map(n);break;case"TransferObjects":e.TransferObjects.objects=e.TransferObjects.objects.map(n),e.TransferObjects.address=n(e.TransferObjects.address);break;case"SplitCoins":e.SplitCoins.coin=n(e.SplitCoins.coin),e.SplitCoins.amounts=e.SplitCoins.amounts.map(n);break;case"MergeCoins":e.MergeCoins.destination=n(e.MergeCoins.destination),e.MergeCoins.sources=e.MergeCoins.sources.map(n);break;case"MakeMoveVec":e.MakeMoveVec.elements=e.MakeMoveVec.elements.map(n);break;
6076case"Upgrade":e.Upgrade.ticket=n(e.Upgrade.ticket);break;case"$Intent":{let t=e.$Intent.inputs;for(let[r,i]of(e.$Intent.inputs={},Object.entries(t)))e.$Intent.inputs[r]=Array.isArray(i)?i.map(n):n(i)}}}(a,r,n),i.push(a)}this.commands.splice(e,0,...i);let a=i.length;a>0&&this.mapArguments((t,r,n)=>{if(n>=e&&n<e+i.length)return t;switch(t.$kind){case"Result":t.Result>=e&&(t.Result+=a);break;case"NestedResult":t.NestedResult[0]>=e&&(t.NestedResult[0]+=a)}return t})}getDigest(){let t=this.build({onlyTransactionKind:!1});return e.getDigestFromBytes(t)}snapshot(){return(0,i.qgA)(P,this)}shallowClone(){return new e({version:this.version,sender:this.sender,expiration:this.expiration,gasData:{...this.gasData},inputs:[...this.inputs],commands:[...this.commands]})}applyResolvedData(e){this.sender||(this.sender=e.sender??null),this.expiration||(this.expiration=e.expiration??null),this.gasData.budget||(this.gasData.budget=e.gasData.budget),this.gasData.owner||(this.gasData.owner=e.gasData.owner??null),this.gasData.payment||(this.gasData.payment=e.gasData.payment),this.gasData.price||(this.gasData.price=e.gasData.price);for(let t=0;t<this.inputs.length;t++){let r=this.inputs[t],i=e.inputs[t];switch(r.$kind){case"UnresolvedPure":if("Pure"!==i.$kind)throw Error(`Expected input at index ${t} to resolve to a Pure argument, but got ${JSON.stringify(i)}`);this.inputs[t]=i;break;case"UnresolvedObject":if("Object"!==i.$kind)throw Error(`Expected input at index ${t} to resolve to an Object argument, but got ${JSON.stringify(i)}`);if("ImmOrOwnedObject"===i.Object.$kind||"Receiving"===i.Object.$kind){let e=r.UnresolvedObject,a=i.Object.ImmOrOwnedObject??i.Object.Receiving;if((0,n.t4)(e.objectId)!==(0,n.t4)(a.objectId)||null!=e.version&&e.version!==a.version||null!=e.digest&&e.digest!==a.digest||null!=e.mutable||null!=e.initialSharedVersion)throw Error(`Input at index ${t} did not match unresolved object. ${JSON.stringify(e)} is not compatible with ${JSON.stringify(a)}`)}else if("SharedObject"===i.Object.$kind){let e=r.UnresolvedObject,a=i.Object.SharedObject;if((0,n.t4)(e.objectId)!==(0,n.t4)(a.objectId)||null!=e.initialSharedVersion&&e.initialSharedVersion!==a.initialSharedVersion||null!=e.mutable&&e.mutable!==a.mutable||null!=e.version||null!=e.digest)throw Error(`Input at index ${t} did not match unresolved object. ${JSON.stringify(e)} is not compatible with ${JSON.stringify(a)}`)}else throw Error(`Input at index ${t} resolved to an unexpected Object kind: ${JSON.stringify(i.Object)}`);this.inputs[t]=i}}}};let eO={MoveCall(e){let[t,r="",n=""]="target"in e?e.target.split("::"):[e.package,e.module,e.function];return{$kind:"MoveCall",MoveCall:{package:t,module:r,function:n,typeArguments:e.typeArguments??[],arguments:e.arguments??[]}}},TransferObjects:(e,t)=>({$kind:"TransferObjects",TransferObjects:{objects:e.map(e=>(0,i.qgA)(h,e)),address:(0,i.qgA)(h,t)}}),SplitCoins:(e,t)=>({$kind:"SplitCoins",SplitCoins:{coin:(0,i.qgA)(h,e),amounts:t.map(e=>(0,i.qgA)(h,e))}}),MergeCoins:(e,t)=>({$kind:"MergeCoins",MergeCoins:{destination:(0,i.qgA)(h,e),sources:t.map(e=>(0,i.qgA)(h,e))}}),Publish:({modules:e,dependencies:t})=>({$kind:"Publish",Publish:{modules:e.map(e=>"string"==typeof e?e:(0,_.n)(new Uint8Array(e))),dependencies:t.map(e=>(0,n.fN)(e))}}),Upgrade:({modules:e,dependencies:t,package:r,ticket:a})=>({$kind:"Upgrade",Upgrade:{modules:e.map(e=>"string"==typeof e?e:(0,_.n)(new Uint8Array(e))),dependencies:t.map(e=>(0,n.fN)(e)),package:r,ticket:(0,i.qgA)(h,a)}}),MakeMoveVec:({type:e,elements:t})=>({$kind:"MakeMoveVec",MakeMoveVec:{type:e??null,elements:t.map(e=>(0,i.qgA)(h,e))}}),Intent:({name:e,inputs:t={},data:r={}})=>({$kind:"$Intent",$Intent:{name:e,inputs:Object.fromEntries(Object.entries(t).map(([e,t])=>[e,Array.isArray(t)?t.map(e=>(0,i.qgA)(h,e)):(0,i.qgA)(h,t)])),data:r}})};function e_(e){return(0,i.KCZ)(Object.entries(e).map(([e,t])=>(0,i.Ikc)({[e]:t})))}let eN=e_({GasCoin:(0,i.euz)(!0),Input:(0,i.FsL)((0,i.aig)(),(0,i.ndf)()),Result:(0,i.FsL)((0,i.aig)(),(0,i.ndf)()),NestedResult:(0,i.PVZ)([(0,i.FsL)((0,i.aig)(),(0,i.ndf)()),(0,i.FsL)((0,i.aig)(),(0,i.ndf)())])}),ek=(0,i.Ikc)({budget:(0,i.mee)(c),price:(0,i.mee)(c),owner:(0,i.mee)(o),payment:(0,i.mee)((0,i.YOg)(d))}),eR=(0,i.Ikc)({package:o,module:(0,i.YjP)(),function:(0,i.YjP)(),typeArguments:(0,i.YOg)((0,i.YjP)()),arguments:(0,i.YOg)(eN)}),eM=(0,i.Ikc)({name:(0,i.YjP)(),inputs:(0,i.g1P)((0,i.YjP)(),(0,i.KCZ)([eN,(0,i.YOg)(eN)])),data:(0,i.g1P)((0,i.YjP)(),(0,i.L5J)())}),eB=e_({MoveCall:eR,TransferObjects:(0,i.Ikc)({objects:(0,i.YOg)(eN),address:eN}),SplitCoins:(0,i.Ikc)({coin:eN,amounts:(0,i.YOg)(eN)}),MergeCoins:(0,i.Ikc)({destination:eN,sources:(0,i.YOg)(eN)}),Publish:(0,i.Ikc)({modules:(0,i.YOg)(l),dependencies:(0,i.YOg)(o)}),MakeMoveVec:(0,i.Ikc)({type:(0,i.mee)((0,i.YjP)()),elements:(0,i.YOg)(eN)}),Upgrade:(0,i.Ikc)({modules:(0,i.YOg)(l),dependencies:(0,i.YOg)(o),package:o,ticket:eN}),$Intent:eM}),ej=e_({Object:e_({ImmOrOwnedObject:d,SharedObject:(0,i.Ikc)({objectId:o,initialSharedVersion:c,mutable:(0,i.zMY)()}),Receiving:d}),Pure:(0,i.Ikc)({bytes:l}),UnresolvedPure:(0,i.Ikc)({value:(0,i.L5J)()}),UnresolvedObject:(0,i.Ikc)({objectId:o,version:(0,i.lqM)((0,i.mee)(c)),digest:(0,i.lqM)((0,i.mee)((0,i.YjP)())),initialSharedVersion:(0,i.lqM)((0,i.mee)(c)),mutable:(0,i.lqM)((0,i.mee)((0,i.zMY)()))}),FundsWithdrawal:A}),eU=e_({None:(0,i.euz)(!0),Epoch:c,ValidDuring:S}),e$=(0,i.Ikc)({version:(0,i.euz)(2),sender:(0,i.cl6)(o),expiration:(0,i.cl6)(eU),gasData:ek,inputs:(0,i.YOg)(ej),commands:(0,i.YOg)(eB),digest:(0,i.lqM)((0,i.mee)((0,i.YjP)()))}),eL={Pure:function(e){return{$kind:"Pure",Pure:{bytes:e instanceof Uint8Array?(0,_.n)(e):e.toBase64()}}}
6076,ObjectRef:({objectId:e,digest:t,version:r})=>({$kind:"Object",Object:{$kind:"ImmOrOwnedObject",ImmOrOwnedObject:{digest:t,version:r,objectId:(0,n.t4)(e)}}}),SharedObjectRef:({objectId:e,mutable:t,initialSharedVersion:r})=>({$kind:"Object",Object:{$kind:"SharedObject",SharedObject:{mutable:t,initialSharedVersion:r,objectId:(0,n.t4)(e)}}}),ReceivingRef:({objectId:e,digest:t,version:r})=>({$kind:"Object",Object:{$kind:"Receiving",Receiving:{digest:t,version:r,objectId:(0,n.t4)(e)}}}),FundsWithdrawal:({reservation:e,typeArg:t,withdrawFrom:r})=>({$kind:"FundsWithdrawal",FundsWithdrawal:{reservation:e,typeArg:t,withdrawFrom:r}})};var eD=class extends Error{},eF=class extends eD{constructor(e,t){super(e,{cause:t?.cause}),this.executionError=t?.executionError}};BigInt(1e9);let eH="0x0000000000000000000000000000000000000000000000000000000000000001",ez="0x0000000000000000000000000000000000000000000000000000000000000002",eW=`${ez}::sui::SUI`,eq="0x0000000000000000000000000000000000000000000000000000000000000005";var eV=r(33811);let eG=(0,n.t4)("0xacc"),eK=O.r.parseFromStr("0x2::accumulator::Key<0x2::balance::Balance<0x2::sui::SUI>>"),eZ=new Uint8Array([172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172]);function eJ(e){let t=e.split("::");if(3!==t.length)throw Error(`Invalid type name format: ${e}`);return{package:t[0],module:t[1],name:t[2]}}async function eY(e,t,r){let a=function(e){if(!e.client)throw Error("No sui client passed to Transaction#build, but transaction data was not sufficient to build offline.");return e.client}(t),s=!t.onlyTransactionKind&&!e.gasData.price,o=!t.onlyTransactionKind&&!e.gasData.payment,l=e.gasData.owner??e.sender,c=!1,u=0n;e.mapArguments(e=>("GasCoin"===e.$kind&&(c=!0),e));let h=l?(0,n.t4)(l):null;for(let t of e.inputs){if("FundsWithdrawal"!==t.$kind||!h||(0,n.X)(t.FundsWithdrawal.typeArg.Balance)!==eW)continue;let r=t.FundsWithdrawal.withdrawFrom.Sender?e.sender:l;r&&(0,n.t4)(r)===h&&"MaxAmountU64"===t.FundsWithdrawal.reservation.$kind&&(u+=BigInt(t.FundsWithdrawal.reservation.MaxAmountU64))}let p=!t.onlyTransactionKind&&!e.expiration&&!e.gasData.budget,f=s||o&&c||p,m=o&&c||p,[,g,y,b,w]=await Promise.all([e2(e,a),f?a.core.getCurrentSystemState():null,o&&l?a.core.getBalance({owner:l}):null,o&&l?a.core.listCoins({owner:l,coinType:eW}):null,m?a.core.getChainIdentifier():null]);if(await e1(e,a),!t.onlyTransactionKind){let t=g?.systemState??null,r=w?.chainIdentifier??null;if(t&&!e.gasData.price&&(e.gasData.price=t.referenceGasPrice),await eQ(e,a,p&&t&&r?e0(t,r):void 0),o){if(!y||!b)throw Error("Could not resolve gas payment: a gas owner or sender must be set to fetch balance and coins.");!function({transactionData:e,balance:t,coins:r,usesGasCoin:n,withdrawals:a,gasPayer:s,chainIdentifier:o,epoch:l}){let c=BigInt(e.gasData.budget),u=BigInt(t.balance.addressBalance);if(0n===c||!n&&u>=c+a){e.gasData.payment=[];return}let h=r.objects.filter(t=>!e.inputs.find(e=>!!e.Object?.ImmOrOwnedObject&&t.objectId===e.Object.ImmOrOwnedObject.objectId)),p=h.map(e=>({objectId:e.objectId,digest:e.digest,version:e.version})),f=u-a;if(n&&f>0n&&o&&l)e.gasData.payment=[function(e,t,r,n){let a=new Uint8Array(32),s=new DataView(a.buffer);s.setBigUint64(0,e,!0);let o=Number(n);if(!Number.isSafeInteger(o)||o<0||o>0xffffffff)throw Error(`Epoch ${n} out of u32 range for coin reservation digest`);return s.setUint32(8,o,!0),a.set(eZ,12),(0,i.qgA)(d,{objectId:function(e,t){let r=(0,eV.a)((function(e,t,r){let n=Y.jy.Address.serialize(e).toBytes(),i=Y.jy.TypeTag.serialize(t).toBytes(),a=Y.jy.u64().serialize(r.length).toBytes(),s=eI.create({dkLen:32});return s.update(new Uint8Array([240])),s.update(n),s.update(a),s.update(r),s.update(i),`0x${(0,eV.n)(s.digest().slice(0,32))}`})(eG,eK,Y.jy.Address.serialize(e).toBytes()).slice(2)),n=(0,eS.n)(t);if(32!==n.length)throw Error(`Invalid chain identifier length: expected 32 bytes, got ${n.length}`);let i=new Uint8Array(32);for(let e=0;e<32;e++)i[e]=r[e]^n[e];return`0x${(0,eV.n)(i)}`}(t,r),version:"0",digest:(0,eS.g)(a)})}(f,s,o,l),...p];else if(h.length)e.gasData.payment=p;else throw Error("No valid gas coins found for the transaction.")}({transactionData:e,balance:y,coins:b,usesGasCoin:c,withdrawals:u,gasPayer:l,chainIdentifier:r,epoch:t?.epoch??null})}e.expiration||e.gasData.payment?.length!==0||await eX(e,a,t,r)}return await r()}async function eQ(e,t,r){if(e.gasData.budget)return;let n=await t.core.simulateTransaction({transaction:e.build({overrides:{gasData:{budget:String(5e10),payment:[]},...r&&{expiration:r}}}),include:{effects:!0},doGasSelection:!1});if("FailedTransaction"===n.$kind){let e=n.FailedTransaction.status.error??void 0;throw new eF(`Transaction resolution failed: ${e?.message??"Unknown error"}`,{cause:n,executionError:e})}e.gasData.budget=function(e,t=1n){let r=1000n*BigInt(t),n=BigInt(e.computationCost)+r,i=n+BigInt(e.storageCost)-BigInt(e.storageRebate);return String(i>n?i:n)}(n.Transaction.effects.gasUsed,e.gasData.price?String(e.gasData.price):void 0)}async function eX(e,t,r,n=null){let[i,a]=await Promise.all([n??t.core.getChainIdentifier().then(e=>e.chainIdentifier),r??t.core.getCurrentSystemState().then(e=>e.systemState)]);e.expiration=e0(a,i)}function e0(e,t){let r=BigInt(e.epoch);return{$kind:"ValidDuring",ValidDuring:{minEpoch:String(r),maxEpoch:String(r+1n),minTimestamp:null,maxTimestamp:null,chain:t,nonce:0x100000000*Math.random()>>>0}}}
6076async function e1(e,t){let r=[...new Set(e.inputs.filter(e=>e.UnresolvedObject&&!(e.UnresolvedObject.version||e.UnresolvedObject?.initialSharedVersion)).map(e=>(0,n.fN)(e.UnresolvedObject.objectId)))],i=r.length?Array.from({length:Math.ceil(r.length/50)},(e,t)=>r.slice(50*t,(t+1)*50)):[],a=(await Promise.all(i.map(e=>t.core.getObjects({objectIds:e})))).flatMap(e=>e.objects),s=Array.from(new Map(r.map((e,t)=>[e,a[t]]))).filter(([e,t])=>t instanceof Error).map(([e,t])=>t.message);if(s.length)throw Error(`The following input objects are invalid: ${s.join(", ")}`);let o=a.map(e=>{if(e instanceof Error)throw Error(`Failed to fetch object: ${e.message}`);let t=e.owner,r=t&&"object"==typeof t?"Shared"===t.$kind?t.Shared.initialSharedVersion:"ConsensusAddressOwner"===t.$kind?t.ConsensusAddressOwner.startVersion:null:null;return{objectId:e.objectId,digest:e.digest,version:e.version,initialSharedVersion:r}}),l=new Map(r.map((e,t)=>[e,o[t]]));for(let[t,r]of e.inputs.entries()){let i;if(!r.UnresolvedObject)continue;let a=(0,n.t4)(r.UnresolvedObject.objectId),s=l.get(a);r.UnresolvedObject.initialSharedVersion??s?.initialSharedVersion?i=eL.SharedObjectRef({objectId:a,initialSharedVersion:r.UnresolvedObject.initialSharedVersion||s?.initialSharedVersion,mutable:r.UnresolvedObject.mutable||function(e,t){let r=!1;return e.getInputUses(t,(e,t)=>{if(t.MoveCall&&t.MoveCall._argumentTypes){let n=t.MoveCall.arguments.indexOf(e);r="immutable"!==t.MoveCall._argumentTypes[n].reference||r}("MakeMoveVec"===t.$kind||"MergeCoins"===t.$kind||"SplitCoins"===t.$kind||"TransferObjects"===t.$kind)&&(r=!0)}),r}(e,t)}):function(e,t){let r=!1;return e.getInputUses(t,(e,t)=>{if(t.MoveCall&&t.MoveCall._argumentTypes){var n;let i=t.MoveCall.arguments.indexOf(e);r="datatype"===(n=t.MoveCall._argumentTypes[i]).body.$kind&&"0x0000000000000000000000000000000000000000000000000000000000000002::transfer::Receiving"===n.body.datatype.typeName||r}}),r}(e,t)&&(i=eL.ReceivingRef({objectId:a,digest:r.UnresolvedObject.digest??s?.digest,version:r.UnresolvedObject.version??s?.version})),e.inputs[e.inputs.indexOf(r)]=i??eL.ObjectRef({objectId:a,digest:r.UnresolvedObject.digest??s?.digest,version:r.UnresolvedObject.version??s?.version})}}async function e2(e,t){let{inputs:r,commands:i}=e,a=[],s=new Set;i.forEach(t=>{if(t.MoveCall&&!t.MoveCall._argumentTypes&&t.MoveCall.arguments.map(t=>"Input"===t.$kind?e.inputs[t.Input]:null).some(e=>e?.UnresolvedPure||e?.UnresolvedObject&&"boolean"!=typeof e?.UnresolvedObject.mutable)){let e=`${t.MoveCall.package}::${t.MoveCall.module}::${t.MoveCall.function}`;s.add(e),a.push(t.MoveCall)}});let o=new Map;s.size>0&&await Promise.all([...s].map(async e=>{let[r,n,i]=e.split("::"),{function:a}=await t.core.getMoveFunction({packageId:r,moduleName:n,name:i});o.set(e,a.parameters)})),a.length&&await Promise.all(a.map(async e=>{let t=o.get(`${e.package}::${e.module}::${e.function}`);t&&(e._argumentTypes=t.length>0&&function(e){if("datatype"!==e.body.$kind)return!1;let{package:t,module:r,name:i}=eJ(e.body.datatype.typeName);return(0,n.t4)(t)===ez&&"tx_context"===r&&"TxContext"===i}(t.at(-1))?t.slice(0,t.length-1):t)})),i.forEach(e=>{if(!e.MoveCall)return;let t=e.MoveCall,i=`${t.package}::${t.module}::${t.function}`,a=t._argumentTypes;if(a){if(a.length!==e.MoveCall.arguments.length)throw Error(`Incorrect number of arguments for ${i}`);a.forEach((e,i)=>{let a=t.arguments[i];if("Input"!==a.$kind)return;let s=r[a.Input];if(!s.UnresolvedPure&&!s.UnresolvedObject)return;let o=s.UnresolvedPure?.value??s.UnresolvedObject?.objectId,l=function e(t){switch(t.$kind){case"address":return Y.jy.Address;case"bool":return Y.jy.Bool;case"u8":return Y.jy.U8;case"u16":return Y.jy.U16;case"u32":return Y.jy.U32;case"u64":return Y.jy.U64;case"u128":return Y.jy.U128;case"u256":return Y.jy.U256;case"vector":{if("u8"===t.vector.$kind)return Y.jy.byteVector().transform({input:e=>"string"==typeof e?new TextEncoder().encode(e):e,output:e=>e});let r=e(t.vector);return r?Y.jy.vector(r):null}case"datatype":{let{package:r,module:i,name:a}=eJ(t.datatype.typeName),s=(0,n.t4)(r);if(s===eH){if("ascii"===i&&"String"===a||"string"===i&&"String"===a)return Y.jy.String;if("option"===i&&"Option"===a){let r=e(t.datatype.typeParameters[0]);return r?Y.jy.vector(r):null}}if(s===ez&&"object"===i&&"ID"===a)return Y.jy.Address;return null}case"typeParameter":case"unknown":return null}}(e.body);if(l){a.type="pure",r[r.indexOf(s)]=eL.Pure(l.serialize(o));return}if("string"!=typeof o)throw Error(`Expect the argument to be an object id string, got ${JSON.stringify(o,null,2)}`);a.type="object";let c=s.UnresolvedPure?{$kind:"UnresolvedObject",UnresolvedObject:{objectId:o}}:s;r[a.Input]=c})}})}function e5(e,t){return!!e.inputs.some(e=>e.UnresolvedObject||e.UnresolvedPure)||!t.onlyTransactionKind&&(!e.gasData.price||!e.gasData.budget||!e.gasData.payment||0===e.gasData.payment.length&&!e.expiration)||!1}async function e6(e,t,r){return(function(e){for(let t of e.commands)switch(t.$kind){case"SplitCoins":t.SplitCoins.amounts.forEac
6076h(t=>{e4(t,Y.jy.U64,e)});break;case"TransferObjects":e4(t.TransferObjects.address,Y.jy.Address,e)}}(e),e5(e,t))?((function(e){if(!e.client)throw Error("No sui client passed to Transaction#build, but transaction data was not sufficient to build offline.");return e.client})(t).core?.resolveTransactionPlugin()??eY)(e,t,async()=>{await e3(e),await r()}):(await e3(e),r())}function e3(e){e.inputs.forEach((e,t)=>{if("Object"!==e.$kind&&"Pure"!==e.$kind&&"FundsWithdrawal"!==e.$kind)throw Error(`Input at index ${t} has not been resolved. Expected a Pure, Object, or FundsWithdrawal input, but found ${JSON.stringify(e)}`)})}function e4(e,t,r){if("Input"!==e.$kind)return;let n=r.inputs[e.Input];"UnresolvedPure"===n.$kind&&(r.inputs[e.Input]=eL.Pure(t.serialize(n.UnresolvedPure.value)))}var e8=r(3340),e9=r(79681);function e7(e){switch(e){case"u8":return e9.j.u8();case"u16":return e9.j.u16();case"u32":return e9.j.u32();case"u64":return e9.j.u64();case"u128":return e9.j.u128();case"u256":return e9.j.u256();case"bool":return e9.j.bool();case"string":return e9.j.string();case"id":case"address":return e8.pV}let t=e.match(/^(vector|option)<(.+)>$/);if(t){let[e,r]=t.slice(1);return"vector"===e?e9.j.vector(e7(r)):e9.j.option(e7(r))}throw Error(`Invalid Pure type name: ${e}`)}var te=r(12259),tt=r(97914);function tr(e){return e.includes("/")||e.includes("@")||e.includes(".sui")}function tn(e){let t=new Set;for(let r of e)if(tr(r)){if(!(0,tt.u)(r))throw Error(`Invalid type with names: ${r}`);t.add(r)}return t}let ti="CoinWithBalance",ta=(0,n.X)("0x2::sui::SUI"),ts=(0,i.Ikc)({type:(0,i.YjP)(),balance:(0,i.FsL)((0,i.KCZ)([(0,i.oad)(),(0,i.YjP)(),(0,i.FsL)((0,i.aig)(),(0,i.ndf)())]),(0,i.pdi)(e=>BigInt(e))),outputKind:(0,i.lqM)((0,i.KIO)(["coin","balance"]))});async function to(e,t,r){let n=new Set,a=new Map,s=new Map;if(!e.sender)throw Error("Sender must be set to resolve CoinWithBalance");for(let[t,r]of e.commands.entries()){if("$Intent"!==r.$kind||r.$Intent.name!==ti)continue;let{type:o,balance:l,outputKind:c}=(0,i.qgA)(ts,r.$Intent.data);if(0n===l){let r="gas"===o?ta:o;e.replaceCommand(t,eO.MoveCall({target:(c??"coin")==="balance"?"0x2::balance::zero":"0x2::coin::zero",typeArguments:[r]}));continue}"gas"!==o&&n.add(o),a.set(o,(a.get(o)??0n)+l),s.has(o)||s.set(o,[]),s.get(o).push({balance:l,outputKind:c??"coin"})}if(a.has("gas")&&a.has(ta))throw Error("Cannot mix SUI CoinWithBalance intents that use the gas coin with ones that do not (useGasCoin: false). Use one or the other.");let o=new Set;for(let t of e.inputs)t.Object?.ImmOrOwnedObject&&o.add(t.Object.ImmOrOwnedObject.objectId),t.UnresolvedObject?.objectId&&o.add(t.UnresolvedObject.objectId);let l=new Map,c=new Map,u=t.client;if(!u)throw Error("Client must be provided to build or serialize transactions with CoinWithBalance intents");await Promise.all([...[...n].map(async t=>{let{coins:r,addressBalance:n}=await tl({coinType:t,balance:a.get(t),client:u,owner:e.sender,usedIds:o});l.set(t,r),c.set(t,n)}),a.has("gas")?await u.core.getBalance({owner:e.sender,coinType:ta}).then(({balance:e})=>{c.set("gas",BigInt(e.addressBalance))}):null]);let d=new Map,h=new Set,p=new Map,f=0;for(;f<e.commands.length;){let t,r=e.commands[f];if("$Intent"!==r.$kind||r.$Intent.name!==ti){f++;continue}let{type:n,balance:o}=(0,i.qgA)(ts,r.$Intent.data),u="gas"===n?ta:n,m=a.get(n),g=c.get(n)??0n,y=[],b=s.get(n)??[];if(b.every(e=>"balance"===e.outputKind)&&g>=m)y.push(eO.MoveCall({target:"0x2::balance::redeem_funds",typeArguments:[u],arguments:[e.addInput("withdrawal",eL.FundsWithdrawal({reservation:{$kind:"MaxAmountU64",MaxAmountU64:String(o)},typeArg:{$kind:"Balance",Balance:u},withdrawFrom:{$kind:"Sender",Sender:!0}}))]})),t={$kind:"NestedResult",NestedResult:[f+y.length-1,0]};else{if(!p.has(n)){let t=[];if(g>=m)h.add(n),y.push(eO.MoveCall({target:"0x2::coin::redeem_funds",typeArguments:[u],arguments:[e.addInput("withdrawal",eL.FundsWithdrawal({reservation:{$kind:"MaxAmountU64",MaxAmountU64:String(m)},typeArg:{$kind:"Balance",Balance:u},withdrawFrom:{$kind:"Sender",Sender:!0}}))]})),t.push({$kind:"Result",Result:f+y.length-1});else if("gas"===n)t.push({$kind:"GasCoin",GasCoin:!0});else{let r=l.get(n),i=r.reduce((e,t)=>
6076e+BigInt(t.balance),0n),a=m>i?m-i:0n;for(let s of(d.set(n,i+a===m),r))t.push(e.addInput("object",eL.ObjectRef({objectId:s.objectId,digest:s.digest,version:s.version})));a>0n&&(h.add(n),y.push(eO.MoveCall({target:"0x2::coin::redeem_funds",typeArguments:[u],arguments:[e.addInput("withdrawal",eL.FundsWithdrawal({reservation:{$kind:"MaxAmountU64",MaxAmountU64:String(a)},typeArg:{$kind:"Balance",Balance:u},withdrawFrom:{$kind:"Sender",Sender:!0}}))]})),t.push({$kind:"Result",Result:f+y.length-1}))}let r=t[0],i=t.slice(1);for(let e=0;e<i.length;e+=500)y.push(eO.MergeCoins(r,i.slice(e,e+500)));let a=f+y.length;y.push(eO.SplitCoins(r,b.map(t=>e.addInput("pure",eL.Pure(Y.jy.u64().serialize(t.balance))))));let s=[];for(let e=0;e<b.length;e++){let t={$kind:"NestedResult",NestedResult:[a,e]};"balance"===b[e].outputKind?(y.push(eO.MoveCall({target:"0x2::coin::into_balance",typeArguments:[u],arguments:[t]})),s.push({$kind:"NestedResult",NestedResult:[f+y.length-1,0]})):s.push(t)}if("gas"!==n||h.has(n)){let t=b.some(e=>"balance"===e.outputKind),i=h.has(n);t||i?y.push(eO.MoveCall({target:"0x2::coin::send_funds",typeArguments:[u],arguments:[r,e.addInput("pure",eL.Pure(Y.jy.Address.serialize(e.sender)))]})):d.get(n)&&y.push(eO.MoveCall({target:"0x2::coin::destroy_zero",typeArguments:[u],arguments:[r]}))}p.set(n,{results:s,nextIntent:0})}let r=p.get(n);t=r.results[r.nextIntent++]}e.replaceCommand(f,y,t),f+=y.length}return r()}async function tl({coinType:e,balance:t,client:r,owner:n,usedIds:i}){let a=t,s=[],o=r.core.getBalance({owner:n,coinType:e}).then(({balance:e})=>(a-=BigInt(e.addressBalance),e)),[l,c]=await Promise.all([u(),o]);if(BigInt(c.balance)<t)throw Error(`Insufficient balance of ${e} for owner ${n}. Required: ${t}, Available: ${t-a}`);return{coins:l,balance:BigInt(c.coinBalance),addressBalance:BigInt(c.addressBalance),coinBalance:BigInt(c.coinBalance)};async function u(t=null){let{objects:l,hasNextPage:c,cursor:d}=await r.core.listCoins({owner:n,coinType:e,cursor:t});for(let e of(await o,l))i.has(e.objectId)||(s.push(e),a-=BigInt(e.balance));return a>0n&&c?u(d):s}}function tc(e,t=1/0){let r=[],n=t=>r[t]??={$kind:"NestedResult",get NestedResult(){return["function"==typeof e?e():e,t]}};return new Proxy({$kind:"Result",get Result(){return"function"==typeof e?e():e}},{set(){throw Error("The transaction result is a proxy, and does not support setting properties directly")},get(e,r){if(r in e)return Reflect.get(e,r);if(r===Symbol.iterator)return function*(){let e=0;for(;e<t;)yield n(e),e++};if("symbol"==typeof r)return;let i=parseInt(r,10);if(!Number.isNaN(i)&&!(i<0))return n(i)}})}let tu=Symbol.for("@mysten/transaction");var td=class e{#tr;#tn;#ti=new Map;#ta=[];#ts=[];#to=new Set;#tl=new Set;#tc=new Map;static fromKind(t){let r=new e;return r.#eH=eP.fromKindBytes("string"==typeof t?(0,_.E)(t):t),r.#ta=r.#eH.inputs.slice(),r.#ts=r.#eH.commands.slice(),r.#to=new Set(r.#ts.map((e,t)=>t)),r}static from(t,r={}){let n=new e;t&&"object"==typeof t&&!0===t[tu]?n.#eH=eP.restore(t.getData()):"string"==typeof t&&t.startsWith("{")?n.#eH=eP.restore(JSON.parse(t)):n.#eH=eP.fromBytes("string"==typeof t?(0,_.E)(t):t),n.#ta=n.#eH.inputs.slice(),n.#ts=n.#eH.commands.slice(),n.#to=new Set(n.#ts.map((e,t)=>t));let i=new Map([[ti,to],...Object.entries(r.intentResolvers??{})]);if(!n.isPreparedForSerialization({supportedIntents:[...i.keys()]}))throw Error("Transaction has unresolved intents or async thunks. Provide resolvers for any custom intents via the `intentResolvers` option, or call `prepareForSerialization` before copying.");for(let[e,t]of i)n.addIntentResolver(e,t);return n}addSerializationPlugin(e){this.#tr.push(e)}addBuildPlugin(e){this.#tn.push(e)}addIntentResolver(e,t){if(this.#ti.has(e)&&this.#ti.get(e)!==t)throw Error(`Intent resolver for ${e} already exists`);this.#ti.set(e,t)}setSender(e){this.#eH.sender=e}setSenderIfNotSet(e){this.#eH.sender||(this.#eH.sender=e)}setExpiration(e){this.#eH.expiration=e?(0,i.qgA)(T,e):null}setGasPrice(e){this.#eH.gasData.price=String(e)}setGasBudget(e){this.#eH.gasData.budget=String(e)}setGasBudgetIfNotSet(e){null==this.#eH.gasData.budget&&(this.#eH.gasData.budget=String(e))}setGasOwner(e){this.#eH.gasData.owner=e}setGasPayment(e){this.#eH.gasData.payment=e.map(e=>(0,i.qgA)(d,e))}#eH;getData(){return this.#eH.snapshot()}get[tu](){return!0}get pure(){return Object.defineProperty(this,"pure",{enumerable:!1,value:function(e){function t(t,r){if("string"==typeof t)return e(e7(t).serialize(r));if(t instanceof Uint8Array||(0,te.d_)(t))return e(t);throw Error("tx.pure must be called either a bcs type name, or a serialized bcs value")}return t.u8=t=>e(Y.jy.U8.serialize(t)),t.u16=t=>e(Y.jy.U16.serialize(t)),t.u32=t=>e(Y.jy.U32.serialize(t)),t.u64=t=>e(Y.jy.U64.serialize(t)),t.u128=t=>e(Y.jy.U128.serialize(t)),t.u256=t=>e(Y.jy.U256.serialize(t)),t.bool=t=>e(Y.jy.Bool.serialize(t)),t.string=t=>e(Y.jy.String.serialize(t)),t.address=t=>e(Y.jy.Address.serialize(t)),t.id=t.address,t.vector=(t,r)=>e(Y.jy.vector(e7(t)).serialize(r)),t.option=(t,r)=>e(Y.jy.option(e7(t)).serialize(r)),t}(e=>(0,te.d_)(e)?this.#tu("pure",{$kind:"Pure",Pure:{bytes:e.toBase64()}}):this.#tu("pure",(0,i.is)(I,e)?(0,i.qgA)(I,e):e instanceof Uint8Array?eL.Pure(e):{$kind:"UnresolvedPure",UnresolvedPure:{value:e}}))}),this.pure}constructor(){this.object=function(e){function t(t){return e(t)}return t.system=t=>{let r=t?.mutable;return void 0!==r?e(eL.SharedObjectRef({objectId:eq,initialSharedVersion:1,mutable:r})):e({$kind:"UnresolvedObject",UnresolvedObject:{objectId:eq,initialSharedVersion:1}})},t.clock=()=>e(eL.SharedObjectRef({objectId:"0x0000000000000000000000000000000000000000000000000000000000000006",initialSharedVersion:1,mutable:!1})),t.random=()=>e({$kind:"UnresolvedObject",UnresolvedObject:{objectId:"0x0000000000000000000000000000000000000000000000000000000000000008",mutable:!1}}),t.denyList=t=>e({$kind:"UnresolvedObject",UnresolvedObject:{objectId:"0x0000000000000000000000000000000000000000000000000000000000000403",mutable:t?.mutable}}),t.option=({type:e,value:t})=>r=>r.moveCall({typeArguments:[e],target:`${eH}::option::${null===t?"none":"some"}`,arguments:null===t?[]:[r.object(t)]}),t}(e=>{if("function"==typeof e)return this.object(this.add(e));if("object"==typeof e&&(0,i.is)(h,e))return e;let t=J(e),r=this.#eH.inputs.find(e=>t===J(e));return r?.Object?.SharedObject&&"object"==typeof e&&e.Object?.SharedObject&&(r.Object.SharedObject.mutable=r.Object.SharedObject.mutable||e.Object.SharedObject.mutable),r?{$kind:"Input",Input:this.#eH.inputs.indexOf(r),type:"object"}:this.#tu("object","string"==typeof e?{$kind:"UnresolvedObject",UnresolvedObject:{objectId:(0,n.t4)(e)}}:e)}),this.#eH=new eP,this.#tn=[],this.#tr=[]}get gas(){return{$kind:"GasCoin",GasCoin:!0}}coin({type:e,balance:t,useGasCoin:r}){return this.add(function({type:e=ta,balance:t,useGasCoin:r=!0}){let i=null;return a=>{if(i)return i;a.addIntentResolver(ti,to);let s="gas"===e?e:(0,n.X)(e);return i=a.add(eO.Intent({name:ti,inputs:{},data:{type:s===ta&&r?"gas":s,balance:BigInt(t),outputKind:"coin"}}))}}({type:e,balance:t,useGasCoin:r}))}balance({type:e,balance:t,useGasCoin:r}){return this.add(function({type:e=ta,balance:t,useGasCoin:r=!0}){let i=null;return a=>{if(i)return i;a.addIntentResolver(ti,to);let s="gas"===e?e:(0,n.X)(e);return i=a.add(eO.Intent({name:ti,inputs:{},data:{type:s===ta&&r?"gas":s,balance:BigInt(t),outputKind:"balance"}}))}}({type:e,balance:t,useGasCoin:r}))}objectRef(...e){return this.object(eL.ObjectRef(...e))}receivingRef(...e){return this.object(eL.ReceivingRef(...e))}sharedObjectRef(...e){return this.object(eL.SharedObjectRef(...e))}#td(){let t=new e;return t.#eH=this.#eH,t.#tr=this.#tr,t.#tn=this.#tn,t.#ti=this.#ti,t.#tl=this.#tl,t.#to=new Set(this.#to),t.#tc=this.#tc,this.#ta.push(t.#ta),this.#ts.push(t.#ts),t}add(e){if("function"==typeof e){if(this.#tc.has(e))return this.#tc.get(e);let t=this.#td(),r=e(t);if(!(r&&"object"==typeof r&&"then"in r))return this.#to=t.#to,this.#tc.set(e,r),r;let n=this.#th({$kind:"$Intent",$Intent:{name:"AsyncTransactionThunk",inputs:{},data:{resultIndex:this.#eH.commands.length,result:null}}});this.#tl.add(Promise.resolve(r).then(e=>{n.$Intent.data.result=e}));let i=tc(()=>n.$Intent.data.resultIndex);return this.#tc.set(e,i),i}return this.#th(e),tc(this.#eH.commands.length-1)}#th(e){let t=this.#eH.commands.length;return this.#ts.push(e),this.#to.add(t),this.#eH.commands.push(e),this.#eH.mapCommandArguments(t,e=>{if("Result"===e.$kind&&!this.#to.has(e.Result))throw Error(`Result { Result: ${e.Result} } is not available to use in the current transaction`);if("NestedResult"===e.$kind&&!this.#to.has(e.NestedResult[0]))throw Error(`Result { NestedResult: [${e.NestedResult[0]}, ${e.NestedResult[1]}] } is not available to use in the current transaction`);if("Input"===e.$kind&&e.Input>=this.#eH.inputs.length)throw Error(`Input { Input: ${e.Input} } references an input that does not exist in the current transaction`);return e}),e}#tu(e,t){return this.#ta.push(t),this.#eH.addInput(e,t)}#tp(e){return(0,te.d_)(e)?this.pure(e):this.#tf(e)}#tf(e){if("function"==typeof e){let t=this.add(e);return"function"==typeof t?this.#tf(t):(0,i.qgA)(h,t)}return(0,i.qgA)(h,e)}splitCoins(e,t){let r=eO.SplitCoins("string"==typeof e?this.object(e):this.#tf(e),t.map(e=>"number"==typeof e||"bigint"==typeof e||"string"==typeof e?this.pure.u64(e):this.#tp(e)));return this.#th(r),tc(this.#eH.commands.length-1,t.length)}mergeCoins(e,t){return this.add(eO.MergeCoins(this.object(e),t.map(e=>this.object(e))))}
6076publish({modules:e,dependencies:t}){return this.add(eO.Publish({modules:e,dependencies:t}))}upgrade({modules:e,dependencies:t,package:r,ticket:n}){return this.add(eO.Upgrade({modules:e,dependencies:t,package:r,ticket:this.object(n)}))}moveCall({arguments:e,...t}){return this.add(eO.MoveCall({...t,arguments:e?.map(e=>this.#tp(e))}))}transferObjects(e,t){return this.add(eO.TransferObjects(e.map(e=>this.object(e)),"string"==typeof t?this.pure.address(t):this.#tp(t)))}makeMoveVec({type:e,elements:t}){return this.add(eO.MakeMoveVec({type:e,elements:t.map(e=>this.object(e))}))}withdrawal({amount:e,type:t}){let r={$kind:"FundsWithdrawal",FundsWithdrawal:{reservation:{$kind:"MaxAmountU64",MaxAmountU64:String(e)},typeArg:{$kind:"Balance",Balance:t??"0x2::sui::SUI"},withdrawFrom:{$kind:"Sender",Sender:!0}}};return this.#tu("object",r)}serialize(){return JSON.stringify(function(e){let t=e.inputs.map((e,t)=>{if(e.Object)return{kind:"Input",index:t,value:{Object:e.Object.ImmOrOwnedObject?{ImmOrOwned:e.Object.ImmOrOwnedObject}:e.Object.Receiving?{Receiving:{digest:e.Object.Receiving.digest,version:e.Object.Receiving.version,objectId:e.Object.Receiving.objectId}}:{Shared:{mutable:e.Object.SharedObject.mutable,initialSharedVersion:e.Object.SharedObject.initialSharedVersion,objectId:e.Object.SharedObject.objectId}}},type:"object"};if(e.Pure)return{kind:"Input",index:t,value:{Pure:Array.from((0,_.E)(e.Pure.bytes))},type:"pure"};if(e.UnresolvedPure)return{kind:"Input",type:"pure",index:t,value:e.UnresolvedPure.value};if(e.UnresolvedObject)return{kind:"Input",type:"object",index:t,value:e.UnresolvedObject.objectId};throw Error("Invalid input")});return{version:1,sender:e.sender??void 0,expiration:e.expiration?.$kind==="Epoch"?{Epoch:Number(e.expiration.Epoch)}:e.expiration?{None:!0}:null,gasConfig:{owner:e.gasData.owner??void 0,budget:e.gasData.budget??void 0,price:e.gasData.price??void 0,payment:e.gasData.payment??void 0},inputs:t,transactions:e.commands.map(e=>{if(e.MakeMoveVec)return{kind:"MakeMoveVec",type:null===e.MakeMoveVec.type?{None:!0}:{Some:O.r.parseFromStr(e.MakeMoveVec.type)},objects:e.MakeMoveVec.elements.map(e=>K(e,t))};if(e.MergeCoins)return{kind:"MergeCoins",destination:K(e.MergeCoins.destination,t),sources:e.MergeCoins.sources.map(e=>K(e,t))};if(e.MoveCall)return{kind:"MoveCall",target:`${e.MoveCall.package}::${e.MoveCall.module}::${e.MoveCall.function}`,typeArguments:e.MoveCall.typeArguments,arguments:e.MoveCall.arguments.map(e=>K(e,t))};if(e.Publish)return{kind:"Publish",modules:e.Publish.modules.map(e=>Array.from((0,_.E)(e))),dependencies:e.Publish.dependencies};if(e.SplitCoins)return{kind:"SplitCoins",coin:K(e.SplitCoins.coin,t),amounts:e.SplitCoins.amounts.map(e=>K(e,t))};if(e.TransferObjects)return{kind:"TransferObjects",objects:e.TransferObjects.objects.map(e=>K(e,t)),address:K(e.TransferObjects.address,t)};if(e.Upgrade)return{kind:"Upgrade",modules:e.Upgrade.modules.map(e=>Array.from((0,_.E)(e))),dependencies:e.Upgrade.dependencies,packageId:e.Upgrade.package,ticket:K(e.Upgrade.ticket,t)};throw Error(`Unknown transaction ${Object.keys(e)}`)})}}(this.#eH.snapshot()))}async toJSON(e={}){await this.prepareForSerialization(e);let t=this.isFullyResolved();return JSON.stringify((0,i.qgA)(e$,t?{...this.#eH.snapshot(),digest:this.#eH.getDigest()}:this.#eH.snapshot()),(e,t)=>"bigint"==typeof t?t.toString():t,2)}async sign(e){let{signer:t,...r}=e,n=await this.build(r);return t.signTransaction(n)}isPreparedForSerialization(e={}){return!(this.#tl.size>0||this.#eH.commands.some(t=>t.$Intent&&!e.supportedIntents?.includes(t.$Intent.name)))}isFullyResolved(){return!(!this.isPreparedForSerialization()||!this.#eH.sender||e5(this.#eH,{}))}async build(e={}){return await this.prepareForSerialization(e),await this.#tm(e),this.#eH.build({onlyTransactionKind:e.onlyTransactionKind})}async getDigest(e={}){return await this.prepareForSerialization(e),await this.#tm(e),this.#eH.getDigest()}async #tm(e){if(!e.onlyTransactionKind&&!this.#eH.sender)throw Error("Missing transaction sender");await this.#tg([...this.#tn,e6],e)}async #tg(e,t){try{let r=n=>{if(n>=e.length)return()=>{};let i=e[n];return async()=>{let e=r(n+1),a=!1,s=!1;if(await i(this.#eH,t,async()=>
6076{if(a)throw Error(`next() was call multiple times in TransactionPlugin ${n}`);a=!0,await e(),s=!0}),!a)throw Error(`next() was not called in TransactionPlugin ${n}`);if(!s)throw Error(`next() was not awaited in TransactionPlugin ${n}`)}};await r(0)()}finally{this.#ta=this.#eH.inputs.slice(),this.#ts=this.#eH.commands.slice(),this.#to=new Set(this.#ts.map((e,t)=>t))}}async #ty(){for(;this.#tl.size>0;){let e=Promise.all(this.#tl);this.#tl.clear(),this.#tl.add(e),await e,this.#tl.delete(e)}}#tb(){let e=this.#eH.commands,t=this.#eH.inputs,r=this.#ts.flat(1/0),n=this.#ta.flat(1/0);if(r.length!==e.length)throw Error("Unexpected number of commands found in transaction data");if(n.length!==t.length)throw Error("Unexpected number of inputs found in transaction data");let i=r.filter(e=>e.$Intent?.name!=="AsyncTransactionThunk");function a(t){let r=e[t];if(r.$Intent?.name==="AsyncTransactionThunk"){let e=r.$Intent.data.result;if(null==e)throw Error("AsyncTransactionThunk has not been resolved");return a(e.Result)}let n=i.indexOf(r);if(-1===n)throw Error("Unable to find original index for command");return n}for(let[r,s]of(this.#eH.commands=i,this.#eH.inputs=n,this.#ts=i,this.#ta=n,this.#to=new Set(i.map((e,t)=>t)),this.#eH.mapArguments(e=>{if("Input"===e.$kind){let r=n.indexOf(t[e.Input]);if(-1===r)throw Error("Input has not been resolved");return{...e,Input:r}}if("Result"===e.$kind){let t=a(e.Result);return{...e,Result:t}}if("NestedResult"===e.$kind){let t=a(e.NestedResult[0]);return{...e,NestedResult:[t,e.NestedResult[1]]}}return e}),e.entries()))if(s.$Intent?.name==="AsyncTransactionThunk")try{s.$Intent.data.resultIndex=a(r)}catch{}}async prepareForSerialization(e){await this.#ty(),this.#tb();let t=new Set;for(let e of this.#eH.commands)e.$Intent&&t.add(e.$Intent.name);let r=[...this.#tr];for(let n of t)if(!e.supportedIntents?.includes(n)){if(!this.#ti.has(n))throw Error(`Missing intent resolver for ${n}`);r.push(this.#ti.get(n))}r.push(async(e,t,r)=>{let n=function(e){let t=new Set,r=new Set;for(let n of e.commands)switch(n.$kind){case"MakeMoveVec":n.MakeMoveVec.type&&tn([n.MakeMoveVec.type]).forEach(e=>{r.add(e)});break;case"MoveCall":let e=n.MoveCall,i=e.package.split("::")[0];if(tr(i)){if(!(0,tt.O)(i))throw Error(`Invalid package name: ${i}`);t.add(i)}tn(e.typeArguments??[]).forEach(e=>{r.add(e)})}return{packages:[...t],types:[...r]}}(e);if(0===n.types.length&&0===n.packages.length)return r();if(!t.client)throw Error("Transaction contains MVR names but no client was provided to resolve them. Please pass a client to Transaction#build()");!function(e,t){for(let r of e.commands){if(r.MakeMoveVec?.type){if(!tr(r.MakeMoveVec.type))continue;if(!t.types[r.MakeMoveVec.type])throw Error(`No resolution found for type: ${r.MakeMoveVec.type}`);r.MakeMoveVec.type=t.types[r.MakeMoveVec.type].type}let e=r.MoveCall;if(!e)continue;let n=e.package.split("::"),i=n[0];if(tr(i)&&!t.packages[i])throw Error(`No address found for package: ${i}`);tr(i)&&(n[0]=t.packages[i].package,e.package=n.join("::"));let a=e.typeArguments;if(a){for(let e=0;e<a.length;e++)if(tr(a[e])){if(!t.types[a[e]])throw Error(`No resolution found for type: ${a[e]}`);a[e]=t.types[a[e]].type}e.typeArguments=a}}}(e,await t.client.core.mvr.resolve({types:n.types,packages:n.packages})),await r()}),await this.#tg(r,e)}}},75445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaxFeePerGasTooLowError=t.Eip1559FeesNotSupportedError=t.BaseFeeScalarError=void 0;let n=r(81005),i=r(45226);class a extends i.BaseError{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}t.BaseFeeScalarError=a;class s extends i.BaseError{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}t.Eip1559FeesNotSupportedError=s;class o extends i.BaseError{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,n.formatGwei)(e)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}t.MaxFeePerGasTooLowError=o},75638:(e,t,r)=>{"use strict";
6076Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionType=function(e){if(e.type)return e.type;if(void 0!==e.authorizationList)return"eip7702";if(void 0!==e.blobs||void 0!==e.blobVersionedHashes||void 0!==e.maxFeePerBlobGas||void 0!==e.sidecars)return"eip4844";if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new n.InvalidSerializableTransactionError({transaction:e})};let n=r(44789)},75726:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TXs=void 0;let n=r(25609),i=r(55082);class a{constructor(e){this.communicator=e}async getBySafeTxHash(e){if(!e)throw Error("Invalid safeTxHash");return(await this.communicator.send(n.Methods.getTxBySafeTxHash,{safeTxHash:e})).data}async signMessage(e){return(await this.communicator.send(n.Methods.signMessage,{message:e})).data}async signTypedMessage(e){if(!(0,i.isObjectEIP712TypedData)(e))throw Error("Invalid typed data");return(await this.communicator.send(n.Methods.signTypedMessage,{typedData:e})).data}async send({txs:e,params:t}){if(!e||!e.length)throw Error("No transactions were passed");return(await this.communicator.send(n.Methods.sendTransactions,{txs:e,params:t})).data}}t.TXs=a},75882:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signatureToCompactSignature=function(e){let{r:t,s:r,v:a,yParity:s}=e,o=Number(s??a-27n),l=r;if(1===o){let e=(0,n.hexToBytes)(r);e[0]|=128,l=(0,i.bytesToHex)(e)}return{r:t,yParityAndS:l}};let n=r(60037),i=r(27083)},75954:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toCoinType=function(e){if(1===e)return 60n;if(e>=0x80000000||e<0)throw new n.EnsInvalidChainIdError({chainId:e});return BigInt((0x80000000|e)>>>0)};let n=r(78869)},76218:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchChain=i;let n=r(27083);async function i(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,n.numberToHex)(t)}]},{retryCount:0})}},76583:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.approveSync=o;let n=r(88344),i=r(98065),a=r(95216),s=r(55498);async function o(e,t){let{amount:r,token:o,throwOnReceiptRevert:l=!0}=t,{decimals:c}=(0,s.resolveToken)(e,{token:o}),u=(0,s.resolveAmountDecimals)(r,c),d=await a.approve.inner(i.writeContractSync,e,{...t,throwOnReceiptRevert:l}),{args:h}=a.approve.extractEvent(d.logs);return{...h,...void 0===u?{}:{decimals:u,formatted:(0,n.formatUnits)(h.value,u)},receipt:d}}},76711:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseEther=function(e,t="wei"){return(0,i.parseUnits)(e,n.etherUnits[t])};let n=r(9949),i=r(1932)},76859:(e,t,r)=>{"use strict";r.d(t,{y:()=>M});var n=r(44582),i=r(28302),a=r(97085),s=r(56595),o=r(51843);class l extends i.Ue{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){let r=o.V.dereference(t,"string");try{r=(0,a.b)(r)}catch(e){return this._throwError(e.message,t)}return e.writeValue(r)}decode(e){return(0,a.b)((0,s.up)(e.readValue(),20))}}var c=r(10693);class u extends i.Ue{coder;constructor(e){super(e.name,e.type,"_",e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}function d(e,t,r){let a=[];if(Array.isArray(r))a=r;else if(r&&"object"==typeof r){let e={};a=t.map(t=>{let i=t.localName;return(0,n.vA)(i,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:r}),(0,n.vA)(!e[i],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:r}),e[i]=!0,r[i]})}else(0,n.MR)(!1,"invalid tuple value","tuple",r);(0,n.MR)(t.length===a.length,"types/value length mismatch","tuple",r);let s=new i.AU,o=new i.AU,l=[];t.forEach((e,t)=>{let r=a[t];if(e.dynamic){let t=o.length;e.encode(o,r);let n=s.writeUpdatableValue();l.push(e=>{n(e+t)})}else e.encode(s,r)}
6076),l.forEach(e=>{e(s.length)});let c=e.appendWriter(s);return c+e.appendWriter(o)}function h(e,t){let r=[],a=[],s=e.subReader(0);return t.forEach(t=>{let i=null;if(t.dynamic){let r=e.readIndex(),a=s.subReader(r);try{i=t.decode(a)}catch(e){if((0,n.bJ)(e,"BUFFER_OVERRUN"))throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(e){if((0,n.bJ)(e,"BUFFER_OVERRUN"))throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}if(void 0==i)throw Error("investigate");r.push(i),a.push(t.localName||null)}),i.Q7.fromItems(r,a)}class p extends i.Ue{coder;length;constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),(0,c.n)(this,{coder:e,length:t})}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let r=0;r<this.length;r++)t.push(e);return t}encode(e,t){let r=o.V.dereference(t,"array");Array.isArray(r)||this._throwError("expected array value",r);let i=this.length;-1===i&&(i=r.length,e.writeValue(r.length)),(0,n.dd)(r.length,i,"coder array"+(this.localName?" "+this.localName:""));let a=[];for(let e=0;e<r.length;e++)a.push(this.coder);return d(e,a,r)}decode(e){let t=this.length;-1===t&&(t=e.readIndex(),(0,n.vA)(t*i.Yx<=e.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:e.bytes,offset:t*i.Yx,length:e.dataLength}));let r=[];for(let e=0;e<t;e++)r.push(new u(this.coder));return h(e,r)}}class f extends i.Ue{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){let r=o.V.dereference(t,"bool");return e.writeValue(+!!r)}decode(e){return!!e.readValue()}}var m=r(98668);class g extends i.Ue{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){t=(0,m.Lm)(t);let r=e.writeValue(t.length);return r+e.writeBytes(t)}decode(e){return e.readBytes(e.readIndex(),!0)}}class y extends g{constructor(e){super("bytes",e)}decode(e){return(0,m.c$)(super.decode(e))}}class b extends i.Ue{size;constructor(e,t){let r="bytes"+String(e);super(r,r,t,!1),(0,c.n)(this,{size:e},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(e,t){let r=(0,m.Lm)(o.V.dereference(t,this.type));return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}decode(e){return(0,m.c$)(e.readBytes(this.size))}}let w=new Uint8Array([]);class v extends i.Ue{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes(w)}decode(e){return e.readBytes(0),null}}let E=BigInt(0),C=BigInt(1),A=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class x extends i.Ue{size;signed;constructor(e,t,r){let n=(t?"int":"uint")+8*e;super(n,n,r,!1),(0,c.n)(this,{size:e,signed:t},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(e,t){let r=(0,s.Ab)(o.V.dereference(t,this.type)),n=(0,s.dK)(A,8*i.Yx);if(this.signed){let e=(0,s.dK)(n,8*this.size-1);(r>e||r<-(e+C))&&this._throwError("value out-of-bounds",t),r=(0,s.JJ)(r,8*i.Yx)}else(r<E||r>(0,s.dK)(n,8*this.size))&&this._throwError("value out-of-bounds",t);return e.writeValue(r)}decode(e){let t=(0,s.dK)(e.readValue(),8*this.size);return this.signed&&(t=(0,s.ST)(t,8*this.size)),t}}var I=r(13599);class S extends g{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,(0,I.YW)(o.V.dereference(t,"string")))}decode(e){return(0,I._v)(super.decode(e))}}class T extends i.Ue{coders;constructor(e,t){let r=!1,n=[];e.forEach(e=>{e.dynamic&&(r=!0),n.push(e.type)}),super("tuple","tuple("+n.join(",")+")",t,r),(0,c.n)(this,{coders:Object.freeze(e.slice())})}defaultValue(){let e=[];this.coders.forEach(t=>{e.push(t.defaultValue())});let t=this.coders.reduce((e,t)=>{let r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e},{});return this.coders.forEach((r,n)=>{let i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))}),Object.freeze(e)}encode(e,t){let r=o.V.dereference(t,"tuple");return d(e,this.coders,r)}decode(e){return h(e,this.coders)}}var P=r(4586);let O=new Map;O.set(0,"GENERIC_PANIC"),O.set(1,"ASSERT_FALSE"),O.set(17,"OVERFLOW"),O.set(18,"DIVIDE_BY_ZERO"),O.set(33,"ENUM_RANGE_ERROR"),O.set(34,"BAD_STORAGE_DATA"),O.set(49,"STACK_UNDERFLOW"),O.set(50,"ARRAY_RANGE_ERROR"),O.set(65,"OUT_OF_MEMORY"),O.set(81,"UNINITIALIZED_FUNCTION_CALL");let _=new RegExp(/^bytes([0-9]*)$/),N=new RegExp(/^(u?int)([0-9]*)$/),k=null,R=1024;class M{#tw(e){if(e.isArray())return new p(this.#tw(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new T(e.components.map(e=>this.#tw(e)),e.name);switch(e.baseType){case"address":return new l(e.name);case"bool":return new f(e.name);case"string":return new S(e.name);case"bytes":return new y(e.name);case"":return new v(e.name)}
6076let t=e.type.match(N);if(t){let r=parseInt(t[2]||"256");return(0,n.MR)(0!==r&&r<=256&&r%8==0,"invalid "+t[1]+" bit length","param",e),new x(r/8,"int"===t[1],e.name)}if(t=e.type.match(_)){let r=parseInt(t[1]);return(0,n.MR)(0!==r&&r<=32,"invalid bytes length","param",e),new b(r,e.name)}(0,n.MR)(!1,"invalid type","type",e.type)}getDefaultValue(e){return new T(e.map(e=>this.#tw(P.aX.from(e))),"_").defaultValue()}encode(e,t){(0,n.dd)(t.length,e.length,"types/values length mismatch");let r=new T(e.map(e=>this.#tw(P.aX.from(e))),"_"),a=new i.AU;return r.encode(a,t),a.data}decode(e,t,r){return new T(e.map(e=>this.#tw(P.aX.from(e))),"_").decode(new i.mP(t,r,R))}static _setDefaultMaxInflation(e){(0,n.MR)("number"==typeof e&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),R=e}static defaultAbiCoder(){return null==k&&(k=new M),k}static getBuiltinCallException(e,t,r){return function(e,t,r,i){let s="missing revert data",o=null,l=null;if(r){s="execution reverted";let e=(0,m.q5)(r);if(r=(0,m.c$)(r),0===e.length)s+=" (no data present; likely require(false) occurred",o="require(false)";else if(e.length%32!=4)s+=" (could not decode reason; invalid data length)";else if("0x08c379a0"===(0,m.c$)(e.slice(0,4)))try{o=i.decode(["string"],e.slice(4))[0],l={signature:"Error(string)",name:"Error",args:[o]},s+=`: ${JSON.stringify(o)}`}catch(e){s+=" (could not decode reason; invalid string data)"}else if("0x4e487b71"===(0,m.c$)(e.slice(0,4)))try{let t=Number(i.decode(["uint256"],e.slice(4))[0]);l={signature:"Panic(uint256)",name:"Panic",args:[t]},o=`Panic due to ${O.get(t)||"UNKNOWN"}(${t})`,s+=`: ${o}`}catch(e){s+=" (could not decode panic code)"}else s+=" (unknown custom error)"}let c={to:t.to?(0,a.b)(t.to):null,data:t.data||"0x"};return t.from&&(c.from=(0,a.b)(t.from)),(0,n.xz)(s,"CALL_EXCEPTION",{action:e,data:r,reason:o,transaction:c,invocation:null,revert:l})}(e,t,r,M.defaultAbiCoder())}}},76916:(e,t,r)=>{"use strict";r.d(t,{O:()=>s,W:()=>o});var n=r(57873),i=r(82376),a=r(33432);let s={PHANTOM:{id:"a797aa35c0fadbfc1a53e7f675162ed5226968b44a19ee3d24385c64d1d3c393",url:"https://phantom.app",androidPackage:"app.phantom"},SOLFLARE:{id:"1ca0bdd4747578705b1939af023d120677c64fe6ca76add81fda36e350605e79",url:"https://solflare.com"},COINBASE:{id:"d0ca99ff52b99abc48743dad0f7fc891e041be73574f7fac4afe5d4bb83845c8",url:"https://go.cb-w.com",evmDeeplink:"cbwallet://miniapp"},BINANCE:{id:"2fafea35bb471d22889ccb49c08d99dd0a18a37982602c33f696a5723934ba25",appId:"yFK5FCqYprrXDiVFbhyRx7",deeplink:"bnc://app.binance.com/mp/app",url:"https://app.binance.com/en/download"}},o={isCustomDeeplinkWallet:(e,t)=>e===s.PHANTOM.id?t===n.o.CHAIN.SOLANA||t===n.o.CHAIN.EVM||t===n.o.CHAIN.BITCOIN:e===s.SOLFLARE.id?t===n.o.CHAIN.SOLANA:e===s.COINBASE.id?t===n.o.CHAIN.SOLANA||t===n.o.CHAIN.EVM:e===s.BINANCE.id&&t===n.o.CHAIN.BITCOIN,handleMobileDeeplinkRedirect(e,t,r){let o=window.location.href,l=encodeURIComponent(o),c=r?.isCoinbaseDisabled??!1;if(e===s.PHANTOM.id&&!("phantom"in window)){let e=o.startsWith("https")?"https":"http",t=o.split("/")[2],r=encodeURIComponent(`${e}://${t}`),n=`${s.PHANTOM.url}/ul/browse/${l}?ref=${r}`;if(a.w.isAndroid()){let e=`intent://browse/${l}?ref=${r}#Intent;scheme=phantom;package=${s.PHANTOM.androidPackage};end`;window.location.href=e}else window.location.href=n}if(e!==s.SOLFLARE.id||t!==n.o.CHAIN.SOLANA||"solflare"in window||(window.location.href=`${s.SOLFLARE.url}/ul/v1/browse/${l}?ref=${l}`),t!==n.o.CHAIN.SOLANA||e!==s.COINBASE.id||!c&&"coinbaseSolana"in window||(window.location.href=`${s.COINBASE.url}/dapp?cb_url=${l}`),t!==n.o.CHAIN.EVM||e!==s.COINBASE.id||!c&&"coinbaseWalletExtension"in window||(window.location.href=`${s.COINBASE.evmDeeplink}?url=${l}`),t===n.o.CHAIN.BITCOIN&&e===s.BINANCE.id&&!("binancew3w"in window)){let e=i.W.state.activeCaipNetwork,t=window.btoa("/pages/browser/index"),r=window.btoa(`url=${l}&defaultChainId=${e?.id??1}`),n=new URL(s.BINANCE.deeplink);n.searchParams.set("appId",s.BINANCE.appId),n.searchParams.set("startPagePath",t),n.searchParams.set("startPageQuery",r);let a=new URL(s.BINANCE.url);a.searchParams.set("_dp",window.btoa(n.toString())),window.location.href=a.toString()}}}},77009:(e,t,r)=>{"use strict";r.d(t,{M:()=>a});var n=r(89500);let i={attribute:!0,type:String,converter:n.W3,reflect:!1,hasChanged:n.Ec};function a(e){return(t,r)=>"object"==typeof r?((e=i,t,r)=>{let{kind:n,metadata:a}=r,s=globalThis.litPropertyMetadata.get(a);if(void 0===s&&globalThis.litPropertyMetadata.set(a,s=new Map),"setter"===n&&((e=Object.create(e)).wrapped=!0),s.set(r.name,e),"accessor"===n){let{name:n}=r;return{set(r){let i=t.get.call(this);t.set.call(this,r),this.requestUpdate(n,i,e)},init(t){return void 0!==t&&this.C(n,void 0,e,t),t}}}if("setter"===n){let{name:n}=r;return function(r){let i=this[n];t.call(this,r),this.requestUpdate(n,i,e)}}throw Error("Unsupported decorator location: "+n)})(e,t,r):((e,t,r)=>{let n=t.hasOwnProperty(r);return t.constructor.createProperty(r,e),n?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}},77081:(e,t,r)=>{"use strict";
6076Object.defineProperty(t,"__esModule",{value:!0}),t.simulateContract=c;let n=r(83562),i=r(72431),a=r(25230),s=r(38297),o=r(95847),l=r(10989);async function c(e,t){let{abi:r,address:c,args:u,functionName:d,dataSuffix:h="string"==typeof e.dataSuffix?e.dataSuffix:e.dataSuffix?.value,...p}=t,f=p.account?(0,n.parseAccount)(p.account):e.account,m=(0,a.encodeFunctionData)({abi:r,args:u,functionName:d});try{let{data:n}=await (0,o.getAction)(e,l.call,"call")({batch:!1,data:`${m}${h?h.replace("0x",""):""}`,to:c,...p,account:f}),a=(0,i.decodeFunctionResult)({abi:r,args:u,functionName:d,data:n||"0x"}),s=r.filter(e=>"name"in e&&e.name===t.functionName);return{result:a,request:{abi:s,address:c,args:u,dataSuffix:h,functionName:d,...p,account:f}}}catch(e){throw(0,s.getContractError)(e,{abi:r,address:c,args:u,docsPath:"/docs/contract/simulateContract",functionName:d,sender:f?.address})}}},77147:(e,t)=>{"use strict";async function r(e,{address:t,bytecode:r}){"ganache"===e.mode?await e.request({method:"evm_setAccountCode",params:[t,r]}):await e.request({method:`${e.mode}_setCode`,params:[t,r]})}Object.defineProperty(t,"__esModule",{value:!0}),t.setCode=r},77362:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getChainContractAddress=function({blockNumber:e,chain:t,contract:r}){let i=t?.contracts?.[r];if(!i)throw new n.ChainDoesNotSupportContract({chain:t,contract:{name:r}});if(e&&i.blockCreated&&i.blockCreated>e)throw new n.ChainDoesNotSupportContract({blockNumber:e,chain:t,contract:{name:r,blockCreated:i.blockCreated}});return i.address};let n=r(34844)},77374:(e,t,r)=>{"use strict";r.d(t,{jy:()=>G});var n=r(3340),i=r(79681);let a=i.j.struct("ChangeEpoch",{epoch:i.j.u64(),protocolVersion:i.j.u64(),storageCharge:i.j.u64(),computationCharge:i.j.u64(),storageRebate:i.j.u64(),nonRefundableStorageFee:i.j.u64(),epochStartTimestampMs:i.j.u64(),systemPackages:i.j.vector(i.j.tuple([i.j.u64(),i.j.vector(i.j.byteVector()),i.j.vector(n.pV)]))}),s=i.j.enum("GenesisObject",{RawObject:i.j.struct("RawObject",{data:n.B_,owner:n._e})}),o=i.j.struct("GenesisTransaction",{objects:i.j.vector(s)}),l=i.j.struct("ConsensusCommitPrologue",{epoch:i.j.u64(),round:i.j.u64(),commitTimestampMs:i.j.u64()}),c=i.j.struct("ConsensusCommitPrologueV2",{epoch:i.j.u64(),round:i.j.u64(),commitTimestampMs:i.j.u64(),consensusCommitDigest:n._p}),u=i.j.enum("ConsensusDeterminedVersionAssignments",{CancelledTransactions:i.j.vector(i.j.tuple([n._p,i.j.vector(i.j.tuple([n.pV,i.j.u64()]))])),CancelledTransactionsV2:i.j.vector(i.j.tuple([n._p,i.j.vector(i.j.tuple([i.j.tuple([n.pV,i.j.u64()]),i.j.u64()]))]))}),d=i.j.struct("ConsensusCommitPrologueV3",{epoch:i.j.u64(),round:i.j.u64(),subDagIndex:i.j.option(i.j.u64()),commitTimestampMs:i.j.u64(),consensusCommitDigest:n._p,consensusDeterminedVersionAssignments:u}),h=i.j.struct("ConsensusCommitPrologueV4",{epoch:i.j.u64(),round:i.j.u64(),subDagIndex:i.j.option(i.j.u64()),commitTimestampMs:i.j.u64(),consensusCommitDigest:n._p,consensusDeterminedVersionAssignments:u,additionalStateDigest:n._p}),p=i.j.struct("ActiveJwk",{jwkId:i.j.struct("JwkId",{iss:i.j.string(),kid:i.j.string()}),jwk:i.j.struct("JWK",{kty:i.j.string(),e:i.j.string(),n:i.j.string(),alg:i.j.string()}),epoch:i.j.u64()}),f=i.j.struct("AuthenticatorStateUpdate",{epoch:i.j.u64(),round:i.j.u64(),newActiveJwks:i.j.vector(p),authenticatorObjInitialSharedVersion:i.j.u64()}),m=i.j.struct("RandomnessStateUpdate",{epoch:i.j.u64(),randomnessRound:i.j.u64(),randomBytes:i.j.byteVector(),randomnessObjInitialSharedVersion:i.j.u64()}),g=i.j.struct("AuthenticatorStateExpire",{minEpoch:i.j.u64(),authenticatorObjInitialSharedVersion:i.j.u64()}),y=i.j.enum("ExecutionTimeObservationKey",{MoveEntryPoint:i.j.struct("MoveEntryPoint",{package:n.pV,module:i.j.string(),function:i.j.string(),typeArguments:i.j.vector(n.Lk)}),TransferObjects:null,SplitCoins:null,MergeCoins:null,Publish:null,MakeMoveVec:null,Upgrade:null}),b=i.j.enum("StoredExecutionTimeObservations",{V1:i.j.vector(i.j.tuple([y,i.j.vector(i.j.tuple([i.j.byteVector(),i.j.struct("Duration",{secs:i.j.u64(),nanos:i.j.u32()})]))]))}),w=i.j.struct("WriteAccumulatorStorageCost",{storageCost:i.j.u64()}),v=i.j.enum("EndOfEpochTransactionKind",{ChangeEpoch:a,AuthenticatorStateCreate:null,AuthenticatorStateExpire:g,RandomnessStateCreate:null,DenyListStateCreate:null,BridgeStateCreate:n._p,BridgeCommitteeInit:i.j.u64(),StoreExecutionTimeObservations:b,AccumulatorRootCreate:null,CoinRegistryCreate:null,DisplayRegistryCreate:null,AddressAliasStateCreate:null,WriteAccumulatorStorageCost:w}),E=i.j.enum("TransactionKind",{ProgrammableTransaction:n.CN,ChangeEpoch:a,Genesis:o,ConsensusCommitPrologue:l,AuthenticatorStateUpdate:f,EndOfEpochTransaction:i.j.vector(v),RandomnessStateUpdate:m,ConsensusCommitPrologueV2:c,ConsensusCommitPrologueV3:d,ConsensusCommitPrologueV4:h,ProgrammableSystemTransaction:n.CN}),C=i.j.struct("TransactionDataV1",{kind:E,sender:n.pV,gasData:n.gq,expiration:n.ko}),A=i.j.enum("TransactionData",{V1:C}),x=i.j.struct("SenderSignedTransaction",{intentMessage:(0,n.P4)(A),txSignatures:i.j.vector(n.Bn)}),I=i.j.vector(x,{name:"SenderSignedData"}),S=i.j.enum("PackageUpgradeError",{UnableToFetchPackage:i.j.struct("UnableToFetchPackage",{packageId:n.pV}),NotAPackage:i.j.struct("NotAPackage",{objectId:n.pV}),IncompatibleUpgrade:null,DigestDoesNotMatch:i.j.struct("DigestDoesNotMatch",{digest:i.j.byteVector()}),UnknownUpgradePolicy:i.j.struct("UnknownUpgradePolicy",{policy:i.j.u8()}),PackageIDDoesNotMatch:i.j.struct("PackageIDDoesNotMatch",{packageId:n.pV,ticketId:n.pV})}),T=i.j.struct("ModuleId",{address:n.pV,name:i.j.string()}),P=i.j.struct("MoveLocation",{module:T,function:i.j.u16(),instruction:i.j.u16(),functionName:i.j.option(i.j.string())}),O=i.j.enum("CommandArgumentError",{TypeMismatch:null,InvalidBCSBytes:null,InvalidUsageOfPureArg:null,InvalidArgumentToPrivateEntryFunction:null,IndexOutOfBounds:i.j.struct("IndexOutOfBounds",{idx:i.j.u16()}),SecondaryIndexOutOfBounds:i.j.struct("SecondaryIndexOutOfBounds",{resultIdx:i.j.u16(),secondaryIdx:i.j.u16()}),InvalidResultArity:i.j.struct("InvalidResultArity",{resultIdx:i.j.u16()}),InvalidGasCoinUsage:null,InvalidValueUsage:null,InvalidObjectByValue:null,InvalidObjectByMutRef:null,SharedObjectOperationNotAllowed:null,InvalidArgumentArity:null,InvalidTransferObject:null,InvalidMakeMoveVecNonObjectArgument:null,ArgumentWithoutValue:null,CannotMoveBorrowedValue:null,CannotWriteToExtendedReference:null,InvalidReferenceArgument:null}),_=i.j.enum("TypeArgumentError",{TypeNotFound:null,ConstraintNotSatisfied:null}),N=i.j.enum("ExecutionFailureStatus",{InsufficientGas:null,InvalidGasObject:null,InvariantViolation:null,FeatureNotYetSupported:null,MoveObjectTooBig:i.j.struct("MoveObjectTooBig",{objectSize:i.j.u64(),maxObjectSize:i.j.u64()}),MovePackageTooBig:i.j.struct("MovePackageTooBig",{objectSize:i.j.u64(),maxObjectSize:i.j.u64()}),CircularObjectOwnership:i.j.struct("CircularObjectOwnership",{object:n.pV}),InsufficientCoinBalance:null,CoinBalanceOverflow:null,PublishErrorNonZeroAddress:null,SuiMoveVerificationError:null,MovePrimitiveRuntimeError:i.j.option(P),MoveAbort:i.j.tuple([P,i.j.u64()]),VMVerificationOrDeserializationError:null,VMInvariantViolation:null,FunctionNotFound:null,ArityMismatch:null,TypeArityMismatch:null,NonEntryFunctionInvoked:null,CommandArgumentError:i.j.struct("CommandArgumentError",{argIdx:i.j.u16(),kind:O}),TypeArgumentError:i.j.struct("TypeArgumentError",{argumentIdx:i.j.u16(),kind:_}),UnusedValueWithoutDrop:i.j.struct("UnusedValueWithoutDrop",{resultIdx:i.j.u16(),secondaryIdx:i.j.u16()}),InvalidPublicFunctionReturnType:i.j.struct("InvalidPublicFunctionReturnType",{idx:i.j.u16()}),InvalidTransferObject:null,EffectsTooLarge:i.j.struct("EffectsTooLarge",{currentSize:i.j.u64(),maxSize:i.j.u64()}),PublishUpgradeMissingDependency:null,PublishUpgradeDependencyDowngrade:null,PackageUpgradeError:i.j.struct("PackageUpgradeError",{upgradeError:S}),WrittenObjectsTooLarge:i.j.struct("WrittenObjectsTooLarge",{currentSize:i.j.u64(),maxSize:i.j.u64()}),CertificateDenied:null,SuiMoveVerificationTimedout:null,SharedObjectOperationNotAllowed:null,InputObjectDeleted:null,ExecutionCancelledDueToSharedObjectCongestion:i.j.struct("ExecutionCancelledDueToSharedObjectCongestion",{congested_objects:i.j.vector(n.pV)}),AddressDeniedForCoin:i.j.struct("AddressDeniedForCoin",{address:n.pV,coinType:i.j.string()}),CoinTypeGlobalPause:i.j.struct("CoinTypeGlobalPause",{coinType:i.j.string()}),ExecutionCancelledDueToRandomnessUnavailable:null,MoveVectorElemTooBig:i.j.struct("MoveVectorElemTooBig",{valueSize:i.j.u64(),maxScaledSize:i.j.u64()}),MoveRawValueTooBig:i.j.struct("MoveRawValueTooBig",{valueSize:i.j.u64(),maxScaledSize:i.j.u64()}),InvalidLinkage:null,InsufficientBalanceForWithdraw:null,NonExclusiveWriteInputObjectModified:i.j.struct("NonExclusiveWriteInputObjectModified",{id:n.pV})}),k=i.j.enum("ExecutionStatus",{Success:null,Failure:i.j.struct("Failure",{error:N,command:i.j.option(i.j.u64())})}),R=i.j.struct("GasCostSummary",{computationCost:i.j.u64(),storageCost:i.j.u64(),storageRebate:i.j.u64(),nonRefundableStorageFee:i.j.u64()}),M=i.j.struct("TransactionEffectsV1",{status:k,executedEpoch:i.j.u64(),gasUsed:R,modifiedAtVersions:i.j.vector(i.j.tuple([n.pV,i.j.u64()])),sharedObjects:i.j.vector(n.MD),transactionDigest:n._p,created:i.j.vector(i.j.tuple([n.MD,n._e])),mutated:i.j.vector(i.j.tuple([n.MD,n._e])),unwrapped:i.j.vector(i.j.tuple([n.MD,n._e])),deleted:i.j.vector(n.MD),unwrappedThenDeleted:i.j.vector(n.MD),wrapped:i.j.vector(n.MD),gasObject:i.j.tuple([n.MD,n._e]),eventsDigest:i.j.option(n._p),dependencies:i.j.vector(n._p)}),B=i.j.tuple([i.j.u64(),n._p]),j=i.j.enum("ObjectIn",{NotExist:null,Exist:i.j.tuple([B,n._e])}),U=i.j.struct("AccumulatorAddress",{address:n.pV,ty:n.Lk}),$=i.j.enum("AccumulatorOperation",{Merge:null,Split:null}),L=i.j.enum("AccumulatorValue",{Integer:i.j.u64(),IntegerTuple:i.j.tuple([i.j.u64(),i.j.u64()]),EventDigest:i.j.vector(i.j.tuple([i.j.u64(),n._p]))}),D=i.j.struct("AccumulatorWriteV1",{address:U,operation:$,value:L}),F=i.j.enum("ObjectOut",{NotExist:null,ObjectWrite:i.j.tuple([n._p,n._e]),PackageWrite:B,AccumulatorWriteV1:D}),H=i.j.enum("IDOperation",{None:null,Created:null,Deleted:null}),z=i.j.struct("EffectsObjectChange",{inputState:j,outputState:F,idOperation:H}),W=i.j.enum("UnchangedConsensusKind",{ReadOnlyRoot:B,MutateConsensusStreamEnded:i.j.u64(),ReadConsensusStreamEnded:i.j.u64(),Cancelled:i.j.u64(),PerEpoc
6076hConfig:null}),q=i.j.struct("TransactionEffectsV2",{status:k,executedEpoch:i.j.u64(),gasUsed:R,transactionDigest:n._p,gasObjectIndex:i.j.option(i.j.u32()),eventsDigest:i.j.option(n._p),dependencies:i.j.vector(n._p),lamportVersion:i.j.u64(),changedObjects:i.j.vector(i.j.tuple([n.pV,z])),unchangedConsensusObjects:i.j.vector(i.j.tuple([n.pV,W])),auxDataDigest:i.j.option(n._p)}),V=i.j.enum("TransactionEffects",{V1:M,V2:q}),G={...i.j,U8:i.j.u8(),U16:i.j.u16(),U32:i.j.u32(),U64:i.j.u64(),U128:i.j.u128(),U256:i.j.u256(),ULEB128:i.j.uleb128(),Bool:i.j.bool(),String:i.j.string(),Address:n.pV,AppId:n.l0,Argument:n.ef,CallArg:n.FB,Command:n.uB,CompressedSignature:n.uj,Data:n.B_,GasData:n.gq,Intent:n.JD,IntentMessage:n.P4,IntentScope:n.fn,IntentVersion:n.VG,MoveObject:n.P,MoveObjectType:n.df,MovePackage:n.a_,MultiSig:n.Ft,MultiSigPkMap:n.Yj,MultiSigPublicKey:n.$R,Object:n.mZ,ObjectArg:n.MS,ObjectDigest:n._p,Owner:n._e,PasskeyAuthenticator:n.AK,ProgrammableMoveCall:n.Jz,ProgrammableTransaction:n.CN,PublicKey:n.J3,SenderSignedData:I,SenderSignedTransaction:x,SharedObjectRef:n.Cm,StructTag:n.wN,SuiObjectRef:n.MD,TransactionData:A,TransactionDataV1:C,TransactionEffects:V,TransactionExpiration:n.ko,TransactionKind:E,TypeOrigin:n.hT,TypeTag:n.Lk,UpgradeInfo:n.lf}},77652:(e,t,r)=>{"use strict";r(96574)},77794:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publicActions=function(e){var t;return{call:t=>(0,l.call)(e,t),createAccessList:t=>(0,c.createAccessList)(e,t),createBlockFilter:()=>(0,u.createBlockFilter)(e),createContractEventFilter:t=>(0,d.createContractEventFilter)(e,t),createEventFilter:t=>(0,h.createEventFilter)(e,t),createPendingTransactionFilter:()=>(0,p.createPendingTransactionFilter)(e),estimateContractGas:t=>(0,f.estimateContractGas)(e,t),estimateGas:t=>(0,g.estimateGas)(e,t),getBalance:t=>(0,w.getBalance)(e,t),getBlobBaseFee:()=>(0,v.getBlobBaseFee)(e),getBlock:t=>(0,E.getBlock)(e,t),getBlockNumber:t=>(0,C.getBlockNumber)(e,t),getBlockReceipts:t=>(0,A.getBlockReceipts)(e,t),getBlockTransactionCount:t=>(0,x.getBlockTransactionCount)(e,t),getBytecode:t=>(0,S.getCode)(e,t),getChainId:()=>(0,I.getChainId)(e),getCode:t=>(0,S.getCode)(e,t),getContractEvents:t=>(0,T.getContractEvents)(e,t),getDelegation:t=>(0,P.getDelegation)(e,t),getEip712Domain:t=>(0,O.getEip712Domain)(e,t),getEnsAddress:t=>(0,n.getEnsAddress)(e,t),getEnsAvatar:t=>(0,i.getEnsAvatar)(e,t),getEnsName:t=>(0,a.getEnsName)(e,t),getEnsResolver:t=>(0,s.getEnsResolver)(e,t),getEnsText:t=>(0,o.getEnsText)(e,t),getFeeHistory:t=>(0,_.getFeeHistory)(e,t),estimateFeesPerGas:t=>(0,m.estimateFeesPerGas)(e,t),getFilterChanges:t=>(0,N.getFilterChanges)(e,t),getFilterLogs:t=>(0,k.getFilterLogs)(e,t),getGasPrice:()=>(0,R.getGasPrice)(e),getLogs:t=>(0,M.getLogs)(e,t),getProof:t=>(0,B.getProof)(e,t),estimateMaxPriorityFeePerGas:t=>(0,y.estimateMaxPriorityFeePerGas)(e,t),fillTransaction:t=>(0,b.fillTransaction)(e,t),getRawTransaction:t=>(0,j.getRawTransaction)(e,t),getStorageAt:t=>(0,U.getStorageAt)(e,t),getTransaction:t=>(0,$.getTransaction)(e,t),getTransactionConfirmations:t=>(0,L.getTransactionConfirmations)(e,t),getTransactionCount:t=>(0,D.getTransactionCount)(e,t),getTransactionReceipt:t=>(0,F.getTransactionReceipt)(e,t),multicall:t=>(0,H.multicall)(e,t),prepareTransactionRequest:t=>(0,ea.prepareTransactionRequest)(e,t),readContract:t=>(0,z.readContract)(e,t),sendRawTransaction:t=>(0,es.sendRawTransaction)(e,t),sendRawTransactionSync:t=>(0,eo.sendRawTransactionSync)(e,t),simulate:t=>(0,W.simulateBlocks)(e,t),simulateBlocks:t=>(0,W.simulateBlocks)(e,t),simulateCalls:t=>(0,q.simulateCalls)(e,t),simulateContract:t=>(0,V.simulateContract)(e,t),verifyHash:t=>(0,K.verifyHash)(e,t),verifyMessage:t=>(0,Z.verifyMessage)(e,t),verifySiweMessage:t=>(0,en.verifySiweMessage)(e,t),verifyTypedData:t=>(0,J.verifyTypedData)(e,t),uninstallFilter:t=>(0,G.uninstallFilter)(e,t),waitForTransactionReceipt:t=>(0,Y.waitForTransactionReceipt)(e,t),watchBlocks:t=>(0,X.watchBlocks)(e,t),watchBlockNumber:t=>(0,Q.watchBlockNumber)(e,t),watchContractEvent:t=>(0,ee.watchContractEvent)(e,t),watchEvent:t=>(0,et.watchEvent)(e,t),watchPendingTransactions:t=>(0,er.watchPendingTransactions)(e,t),token:(t=e,{getAllowance:(0,el.bindActionDecorators)(t,ei.getAllowance),getBalance:(0,el.bindActionDecorators)(t,ei.getBalance),getMetadata:(0,el.bindActionDecorators)(t,ei.getMetadata),getTotalSupply:(0,el.bindActionDecorators)(t,ei.getTotalSupply)})}};let n=r(8948),i=r(35041),a=r(50587),s=r(57142),o=r(97099),l=r(10989),c=r(77899),u=r(60780),d=r(90535),h=r(50517),p=r(99506),f=r(7746),m=r(83390),g=r(87908),y=r(18697),b=r(2404),w=r(40925),v=r(17515),E=r(70200),C=r(27697),A=r(94029),x=r(23691),I=r(80517),S=r(34942),T=r(24052),P=r(73497),O=r(78667),_=r(39379),N=r(97514),k=r(38),R=r(66629),M=r(6084),B=r(15871),j=r(35449),U=r(62389),$=r(38149),L=r(90769),D=r(4200),F=r(60563),H=r(12166),z=r(527),W=r(64057),q=r(98232),V=r(77081),G=r(74815),K=r(83712),Z=r(94115),J=r(58260),Y=r(6751),Q=r(29716),X=r(27342),ee=r(48770),et=r(33316),er=r(82322),en=r(39922),ei=r(1893),ea=r(84593),es=r(37833),eo=r(29018),el=r(85583)},77805:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767);r(79909),r(39909);var a=r(46756),s=r(63412);r(86921);var o=r(91392);let l=(0,o.AH)` 6077 :host { 6078 position: relative; 6079 background-color: ${({tokens:e})=>e.theme.foregroundTertiary}; 6080 display: flex; 6081 justify-content: center;
6082 align-items: center; 6083 border-radius: inherit; 6084 border-radius: var(--local-border-radius); 6085 } 6086 6087 :host([data-image='true']) { 6088 background-color: transparent; 6089 } 6090 6091 :host > wui-flex { 6092 overflow: hidden; 6093 border-radius: inherit; 6094 border-radius: var(--local-border-radius); 6095 } 6096 6097 :host([data-size='sm']) { 6098 width: 32px; 6099 height: 32px; 6100 } 6101 6102 :host([data-size='md']) { 6103 width: 40px; 6104 height: 40px; 6105 } 6106 6107 :host([data-size='lg']) { 6108 width: 56px; 6109 height: 56px; 6110 } 6111 6112 :host([name='Extension'])::after { 6113 border: 1px solid ${({colors:e})=>e.accent010}; 6114 } 6115 6116 :host([data-wallet-icon='allWallets'])::after { 6117 border: 1px solid ${({colors:e})=>e.accent010}; 6118 } 6119 6120 wui-icon[data-parent-size='inherit'] { 6121 width: 75%; 6122 height: 75%; 6123 align-items: center; 6124 } 6125 6126 wui-icon { 6127 color: ${({tokens:e})=>e.theme.iconDefault}; 6128 } 6129 6130 wui-icon[data-parent-size='sm'] { 6131 width: 24px; 6132 height: 24px; 6133 } 6134 6135 wui-icon[data-parent-size='md'] { 6136 width: 32px; 6137 height: 32px; 6138 } 6139 6140 :host > wui-icon-box { 6141 position: absolute; 6142 overflow: hidden; 6143 right: -1px; 6144 bottom: -2px; 6145 z-index: 1; 6146 border: 2px solid ${({tokens:e})=>e.theme.backgroundPrimary}; 6147 padding: 1px; 6148 } 6149`;var c=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let u=class extends n.WF{constructor(){super(...arguments),this.size="md",this.name="",this.installed=!1,this.badgeSize="xs"}render(){let e="1";return"lg"===this.size?e="4":"md"===this.size?e="2":"sm"===this.size&&(e="1"),this.style.cssText=` 6150 --local-border-radius: var(--apkt-borderRadius-${e}); 6151 `,this.dataset.size=this.size,this.imageSrc&&(this.dataset.image="true"),this.walletIcon&&(this.dataset.walletIcon=this.walletIcon),(0,n.qy)` 6152 <wui-flex justifyContent="center" alignItems="center"> ${this.templateVisual()} </wui-flex> 6153 `}templateVisual(){return this.imageSrc?(0,n.qy)`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`:this.walletIcon?(0,n.qy)`<wui-icon size="md" color="default" name=${this.walletIcon}></wui-icon>`:(0,n.qy)`<wui-icon 6154 data-parent-size=${this.size} 6155 size="inherit" 6156 color="inherit" 6157 name="wallet" 6158 ></wui-icon>`}};u.styles=[a.W5,l],c([(0,i.MZ)()],u.prototype,"size",void 0),c([(0,i.MZ)()],u.prototype,"name",void 0),c([(0,i.MZ)()],u.prototype,"imageSrc",void 0),c([(0,i.MZ)()],u.prototype,"walletIcon",void 0),c([(0,i.MZ)({type:Boolean})],u.prototype,"installed",void 0),c([(0,i.MZ)()],u.prototype,"badgeSize",void 0),u=c([(0,s.E)("wui-wallet-image")],u)},77898:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildRequest=function(e,t={}){return async(r,d={})=>{let{dedupe:h=!1,methods:p,retryDelay:f=150,retryCount:m=3,signal:g,uid:y}={...t,...d},{method:b}=r;if(p?.exclude?.includes(b)||p?.include&&!p.include.includes(b))throw new a.MethodNotSupportedRpcError(Error("method not supported"),{method:b});if(g?.aborted)throw(0,s.getAbortError)(g);let w=h?function(e,t=0){let r=0xdeadbeef^t,n=0x41c6ce57^t;for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);r=Math.imul(r^i,0x9e3779b1),n=Math.imul(n^i,0x5f356495)}return r=Math.imul(r^r>>>16,0x85ebca6b)^Math.imul(n^n>>>16,0xc2b2ae35),(0x100000000*(2097151&(n=Math.imul(n^n>>>16,0x85ebca6b)^Math.imul(r^r>>>16,0xc2b2ae35)))+(r>>>0)).toString(36)}(`${y}.${(0,c.stringify)(r)}`):void 0;return(0,o.withDedupe)(()=>(0,l.withRetry)(async()=>{try{return await e(r,g?{signal:g}:void 0)}catch(e){if(g?.aborted)throw(0,s.getAbortError)(g);if((0,s.isAbortError)(e))throw e;switch(e.code){case a.ParseRpcError.code:throw new a.ParseRpcError(e);case a.InvalidRequestRpcError.code:throw new a.InvalidRequestRpcError(e);case a.MethodNotFoundRpcError.code:throw new a.MethodNotFoundRpcError(e,{method:r.method});case a.InvalidParamsRpcError.code:throw new a.InvalidParamsRpcError(e);case a.InternalRpcError.code:throw new a.InternalRpcError(e);case a.InvalidInputRpcError.code:throw new a.InvalidInputRpcError(e);case a.ResourceNotFoundRpcError.code:throw new a.ResourceNotFoundRpcError(e);case a.ResourceUnavailableRpcError.code:throw new a.ResourceUnavailableRpcError(e);case a.TransactionRejectedRpcError.code:throw new a.TransactionRejectedRpcError(e);case a.MethodNotSupportedRpcError.code:throw new a.MethodNotSupportedRpcError(e,{method:r.method});case a.LimitExceededRpcError.code:throw new a.LimitExceededRpcError(e);case a.JsonRpcVersionUnsupportedError.code:throw new a.JsonRpcVersionUnsupportedError(e);case a.UserRejectedRequestError.code:throw new a.UserRejectedRequestError(e);case a.UnauthorizedProviderError.code:throw new a.UnauthorizedProviderError(e);case a.UnsupportedProviderMethodError.code:throw new a.UnsupportedProviderMethodError(e);case a.ProviderDisconnectedError.code:throw new a.ProviderDisconnectedError(e);case a.ChainDisconnectedError.code:throw new a.ChainDisconnectedError(e);case a.SwitchChainError.code:throw new a.SwitchChainError(e);case a.UnsupportedNonOptionalCapabilityError.code:throw new a.UnsupportedNonOptionalCapabilityError(e);case a.UnsupportedChainIdError.code:throw new a.UnsupportedChainIdError(e);case a.DuplicateIdError.code:throw new a.DuplicateIdError(e);case a.UnknownBundleIdError.code:throw new a.UnknownBundleIdError(e);case a.BundleTooLargeError.code:throw new a.BundleTooLargeError(e);case a.AtomicReadyWalletRejectedUpgradeError.code:throw new a.AtomicReadyWalletRejectedUpgradeError(e);case a.AtomicityNotSupportedError.code:throw new a.AtomicityNotSupportedError(e);case 5e3:throw new a.UserRejectedRequestError(e);case a.WalletConnectSessionSettlementError.code:throw new a.WalletConnectSessionSettlementError(e);default:if(e instanceof n.BaseError)throw e;throw new a.UnknownRpcError(e)}}},{delay:({count:e,error:t})=>{if(t&&t instanceof i.HttpRequestError){let e=t?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*Number.parseInt(e,10)}return~~(1<<e)*f},retryCount:m,signal:g,shouldRetry:({error:e})=>u(e)}),{enabled:h,id:w})}},t.shouldRetry=u;let n=r(45226),i=r(17208),a=r(69902),s=r(5636),o=r(49497),l=r(15573),c=r(68508);function u(e){return!(0,s.isAbortError)(e)&&("code"in e&&"number"==typeof e.code?-1===e.code||e.code===a.LimitExceededRpcError.code||e.code===a.InternalRpcError.code||429===e.code:!(e instanceof i.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||!1)}},77899:(e,t,r)=>{"use strict";
6158Object.defineProperty(t,"__esModule",{value:!0}),t.createAccessList=u;let n=r(83562),i=r(45226),a=r(27083),s=r(28455),o=r(48674),l=r(53520),c=r(61609);async function u(e,t){let{account:r=e.account,blockNumber:u,blockTag:d="latest",blobs:h,data:p,gas:f,gasPrice:m,maxFeePerBlobGas:g,maxFeePerGas:y,maxPriorityFeePerGas:b,to:w,value:v,...E}=t,C=r?(0,n.parseAccount)(r):void 0;try{(0,c.assertRequest)(t);let r="bigint"==typeof u?(0,a.numberToHex)(u):void 0,n=e.chain?.formatters?.transactionRequest?.format,s=(n||l.formatTransactionRequest)({...(0,o.extract)(E,{format:n}),account:C,blobs:h,data:p,gas:f,gasPrice:m,maxFeePerBlobGas:g,maxFeePerGas:y,maxPriorityFeePerGas:b,to:w,value:v},"createAccessList"),A=await e.request({method:"eth_createAccessList",params:[s,r||d]});if(A.error)throw new i.BaseError(A.error,{details:A.error});return{accessList:A.accessList,gasUsed:BigInt(A.gasUsed)}}catch(r){throw(0,s.getCallError)(r,{...t,account:C,chain:e.chain})}}},77909:(e,t,r)=>{"use strict";async function n(...e){let t=await fetch(...e);if(!t.ok)throw Error(`HTTP status code: ${t.status}`,{cause:t});return t}r.d(t,{Z:()=>i});class i{constructor({baseUrl:e,clientId:t}){this.baseUrl=e,this.clientId=t}async get({headers:e,signal:t,cache:r,...i}){let a=this.createUrl(i);return(await n(a,{method:"GET",headers:e,signal:t,cache:r})).json()}async getBlob({headers:e,signal:t,...r}){let i=this.createUrl(r);return(await n(i,{method:"GET",headers:e,signal:t})).blob()}async post({body:e,headers:t,signal:r,...i}){let a=this.createUrl(i);return(await n(a,{method:"POST",headers:t,body:e?JSON.stringify(e):void 0,signal:r})).json()}async put({body:e,headers:t,signal:r,...i}){let a=this.createUrl(i);return(await n(a,{method:"PUT",headers:t,body:e?JSON.stringify(e):void 0,signal:r})).json()}async delete({body:e,headers:t,signal:r,...i}){let a=this.createUrl(i);return(await n(a,{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])=>{null!=t&&r.searchParams.append(e,t)}),this.clientId&&r.searchParams.append("clientId",this.clientId),r}sendBeacon({body:e,...t}){let r=this.createUrl(t);return navigator.sendBeacon(r.toString(),e?JSON.stringify(e):void 0)}}},77914:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767);r(79909);var a=r(46756),s=r(63412),o=r(91392);let l=(0,o.AH)` 6159 button { 6160 background-color: transparent; 6161 padding: ${({spacing:e})=>e[1]}; 6162 } 6163 6164 button:focus-visible { 6165 box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent020}; 6166 } 6167 6168 button[data-variant='accent']:hover:enabled, 6169 button[data-variant='accent']:focus-visible { 6170 background-color: ${({tokens:e})=>e.core.foregroundAccent010}; 6171 } 6172 6173 button[data-variant='primary']:hover:enabled, 6174 button[data-variant='primary']:focus-visible, 6175 button[data-variant='secondary']:hover:enabled, 6176 button[data-variant='secondary']:focus-visible { 6177 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 6178 } 6179 6180 button[data-size='xs'] > wui-icon { 6181 width: 8px; 6182 height: 8px; 6183 } 6184 6185 button[data-size='sm'] > wui-icon { 6186 width: 12px; 6187 height: 12px; 6188 } 6189 6190 button[data-size='xs'], 6191 button[data-size='sm'] { 6192 border-radius: ${({borderRadius:e})=>e[1]}; 6193 } 6194 6195 button[data-size='md'], 6196 button[data-size='lg'] { 6197 border-radius: ${({borderRadius:e})=>e[2]}; 6198 } 6199 6200 button[data-size='md'] > wui-icon { 6201 width: 16px; 6202 height: 16px; 6203 } 6204 6205 button[data-size='lg'] > wui-icon { 6206 width: 20px; 6207 height: 20px; 6208 } 6209 6210 button:disabled { 6211 background-color: transparent; 6212 cursor: not-allowed; 6213 opacity: 0.5; 6214 } 6215 6216 button:hover:not(:disabled) { 6217 background-color: var(--wui-color-accent-glass-015); 6218 } 6219 6220 button:focus-visible:not(:disabled) { 6221 background-color: var(--wui-color-accent-glass-015); 6222 box-shadow: 6223 inset 0 0 0 1px var(--wui-color-accent-100), 6224 0 0 0 4px var(--wui-color-accent-glass-020); 6225 } 6226`;var c=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let u=class extends n.WF{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.icon="copy",this.iconColor="default",this.variant="accent"}render(){return(0,n.qy)` 6227 <button data-variant=${this.variant} ?disabled=${this.disabled} data-size=${this.size}> 6228 <wui-icon 6229 color=${({accent:"accent-primary",primary:"inverse",secondary:"default"})[this.variant]||this.iconColor} 6230 size=${this.size} 6231 name=${this.icon} 6232 ></wui-icon> 6233 </button> 6234 `}};u.styles=[a.W5,a.fD,l],c([(0,i.MZ)()],u.prototype,"size",void 0),c([(0,i.MZ)({type:Boolean})],u.prototype,"disabled",void 0),c([(0,i.MZ)()],u.prototype,"icon",void 0),c([(0,i.MZ)()],u.prototype,"iconColor",void 0),c([(0,i.MZ)()],u.prototype,"variant",void 0),u=c([(0,s.E)("wui-icon-link")],u)},77951:(e,t,r)=>{"use strict";
6234Object.defineProperty(t,"__esModule",{value:!0}),t.parseTransaction=function(e){let t=(0,f.getSerializedTransactionType)(e);return"eip1559"===t?function(e){let t=m(e),[r,n,a,s,l,c,d,h,f,b,w,v]=t;if(9!==t.length&&12!==t.length)throw new i.InvalidSerializedTransactionError({attributes:{chainId:r,nonce:n,maxPriorityFeePerGas:a,maxFeePerGas:s,gas:l,to:c,value:d,data:h,accessList:f,...t.length>9?{v:b,r:w,s:v}:{}},serializedTransaction:e,type:"eip1559"});let E={chainId:(0,u.hexToNumber)(r),type:"eip1559"};return(0,o.isHex)(c)&&"0x"!==c&&(E.to=c),(0,o.isHex)(l)&&"0x"!==l&&(E.gas=(0,u.hexToBigInt)(l)),(0,o.isHex)(h)&&"0x"!==h&&(E.data=h),(0,o.isHex)(n)&&(E.nonce="0x"===n?0:(0,u.hexToNumber)(n)),(0,o.isHex)(d)&&"0x"!==d&&(E.value=(0,u.hexToBigInt)(d)),(0,o.isHex)(s)&&"0x"!==s&&(E.maxFeePerGas=(0,u.hexToBigInt)(s)),(0,o.isHex)(a)&&"0x"!==a&&(E.maxPriorityFeePerGas=(0,u.hexToBigInt)(a)),0!==f.length&&"0x"!==f&&(E.accessList=g(f)),(0,p.assertTransactionEIP1559)(E),{...12===t.length?y(t):void 0,...E}}(e):"eip2930"===t?function(e){let t=m(e),[r,n,a,s,l,c,d,h,f,b,w]=t;if(8!==t.length&&11!==t.length)throw new i.InvalidSerializedTransactionError({attributes:{chainId:r,nonce:n,gasPrice:a,gas:s,to:l,value:c,data:d,accessList:h,...t.length>8?{v:f,r:b,s:w}:{}},serializedTransaction:e,type:"eip2930"});let v={chainId:(0,u.hexToNumber)(r),type:"eip2930"};return(0,o.isHex)(l)&&"0x"!==l&&(v.to=l),(0,o.isHex)(s)&&"0x"!==s&&(v.gas=(0,u.hexToBigInt)(s)),(0,o.isHex)(d)&&"0x"!==d&&(v.data=d),(0,o.isHex)(n)&&(v.nonce="0x"===n?0:(0,u.hexToNumber)(n)),(0,o.isHex)(c)&&"0x"!==c&&(v.value=(0,u.hexToBigInt)(c)),(0,o.isHex)(a)&&"0x"!==a&&(v.gasPrice=(0,u.hexToBigInt)(a)),0!==h.length&&"0x"!==h&&(v.accessList=g(h)),(0,p.assertTransactionEIP2930)(v),{...11===t.length?y(t):void 0,...v}}(e):"eip4844"===t?function(e){let t=m(e),r=4===t.length,n=r?t[0]:t,a=r?t.slice(1):[],[l,c,d,h,f,b,w,v,E,C,A,x,I,S]=n,[T,P,O]=a;if(11!==n.length&&14!==n.length)throw new i.InvalidSerializedTransactionError({attributes:{chainId:l,nonce:c,maxPriorityFeePerGas:d,maxFeePerGas:h,gas:f,to:b,value:w,data:v,accessList:E,...n.length>9?{v:x,r:I,s:S}:{}},serializedTransaction:e,type:"eip4844"});let _={blobVersionedHashes:A,chainId:(0,u.hexToNumber)(l),to:b,type:"eip4844"};return(0,o.isHex)(f)&&"0x"!==f&&(_.gas=(0,u.hexToBigInt)(f)),(0,o.isHex)(v)&&"0x"!==v&&(_.data=v),(0,o.isHex)(c)&&(_.nonce="0x"===c?0:(0,u.hexToNumber)(c)),(0,o.isHex)(w)&&"0x"!==w&&(_.value=(0,u.hexToBigInt)(w)),(0,o.isHex)(C)&&"0x"!==C&&(_.maxFeePerBlobGas=(0,u.hexToBigInt)(C)),(0,o.isHex)(h)&&"0x"!==h&&(_.maxFeePerGas=(0,u.hexToBigInt)(h)),(0,o.isHex)(d)&&"0x"!==d&&(_.maxPriorityFeePerGas=(0,u.hexToBigInt)(d)),0!==E.length&&"0x"!==E&&(_.accessList=g(E)),T&&P&&O&&(_.sidecars=(0,s.toBlobSidecars)({blobs:T,commitments:P,proofs:O})),(0,p.assertTransactionEIP4844)(_),{...14===n.length?y(n):void 0,..._}}(e):"eip7702"===t?function(e){let t=m(e),[r,n,a,s,l,c,d,h,f,b,w,v,E]=t;if(10!==t.length&&13!==t.length)throw new i.InvalidSerializedTransactionError({attributes:{chainId:r,nonce:n,maxPriorityFeePerGas:a,maxFeePerGas:s,gas:l,to:c,value:d,data:h,accessList:f,authorizationList:b,...t.length>9?{v:w,r:v,s:E}:{}},serializedTransaction:e,type:"eip7702"});let C={chainId:(0,u.hexToNumber)(r),type:"eip7702"};return(0,o.isHex)(c)&&"0x"!==c&&(C.to=c),(0,o.isHex)(l)&&"0x"!==l&&(C.gas=(0,u.hexToBigInt)(l)),(0,o.isHex)(h)&&"0x"!==h&&(C.data=h),(0,o.isHex)(n)&&(C.nonce="0x"===n?0:(0,u.hexToNumber)(n)),(0,o.isHex)(d)&&"0x"!==d&&(C.value=(0,u.hexToBigInt)(d)),(0,o.isHex)(s)&&"0x"!==s&&(C.maxFeePerGas=(0,u.hexToBigInt)(s)),(0,o.isHex)(a)&&"0x"!==a&&(C.maxPriorityFeePerGas=(0,u.hexToBigInt)(a)),0!==f.length&&"0x"!==f&&(C.accessList=g(f)),0!==b.length&&"0x"!==b&&(C.authorizationList=function(e){let t=[];for(let r=0;r<e.length;r++){let[n,i,a,s,o,l]=e[r];t.push({address:i,chainId:"0x"===n?0:(0,u.hexToNumber)(n),nonce:"0x"===a?0:(0,u.hexToNumber)(a),...y([s,o,l])})}return t}(b)),(0,p.assertTransactionEIP7702)(C),{...13===t.length?y(t):void 0,...C}}(e):function(e){let t=(0,d.fromRlp)(e,"hex"),[r,n,a,s,l,c,h,f,m]=t;if(6!==t.length&&9!==t.length)throw new i.InvalidSerializedTransactionError({attributes:{nonce:r,gasPrice:n,gas:a,to:s,value:l,data:c,...t.length>6?{v:h,r:f,s:m}:{}},serializedTransaction:e,type:"legacy"});let g={type:"legacy"};
6234if((0,o.isHex)(s)&&"0x"!==s&&(g.to=s),(0,o.isHex)(a)&&"0x"!==a&&(g.gas=(0,u.hexToBigInt)(a)),(0,o.isHex)(c)&&"0x"!==c&&(g.data=c),(0,o.isHex)(r)&&(g.nonce="0x"===r?0:(0,u.hexToNumber)(r)),(0,o.isHex)(l)&&"0x"!==l&&(g.value=(0,u.hexToBigInt)(l)),(0,o.isHex)(n)&&"0x"!==n&&(g.gasPrice=(0,u.hexToBigInt)(n)),(0,p.assertTransactionLegacy)(g),6===t.length)return g;let y=(0,o.isHex)(h)&&"0x"!==h?(0,u.hexToBigInt)(h):0n;if("0x"===m&&"0x"===f)return y>0&&(g.chainId=Number(y)),g;let b=Number((y-35n)/2n);if(b>0)g.chainId=b;else if(27n!==y&&28n!==y)throw new i.InvalidLegacyVError({v:y});return g.v=y,g.s=m,g.r=f,g.yParity=+(y%2n===0n),g}(e)},t.toTransactionArray=m,t.parseAccessList=g;let n=r(9301),i=r(44789),a=r(63402),s=r(64751),o=r(80217),l=r(3669),c=r(62704),u=r(14972),d=r(36603),h=r(85244),p=r(27756),f=r(73324);function m(e){return(0,d.fromRlp)(`0x${e.slice(4)}`,"hex")}function g(e){let t=[];for(let r=0;r<e.length;r++){let[i,s]=e[r];if(!(0,a.isAddress)(i,{strict:!1}))throw new n.InvalidAddressError({address:i});t.push({address:i,storageKeys:s.map(e=>(0,h.isHash)(e)?e:(0,c.trim)(e))})}return t}function y(e){let t=e.slice(-3),r="0x"===t[0]?0n:(0,u.hexToBigInt)(t[0]);if(0n!==r&&1n!==r)throw new i.InvalidYParityError({yParity:r});let n=0n===r?27n:28n;return{r:(0,l.padHex)(t[1],{size:32}),s:(0,l.padHex)(t[2],{size:32}),v:n,yParity:+(27n!==n)}}},78027:(e,t,r)=>{"use strict";r(52131)},78369:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SafeAppProvider=void 0;let n=r(22804),i=r(35632),a=r(10881);class s extends i.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:r=[]}=e;switch(t){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return(0,a.numberToHex)(this.chainId);case"personal_sign":{let[e,t]=r;if(this.safe.safeAddress.toLowerCase()!==t.toLowerCase())throw Error("The address or message hash is invalid");let n=await this.sdk.txs.signMessage(e);return("signature"in n?n.signature:void 0)||"0x"}case"eth_sign":{let[e,t]=r;if(this.safe.safeAddress.toLowerCase()!==e.toLowerCase()||!t.startsWith("0x"))throw Error("The address or message hash is invalid");let n=await this.sdk.txs.signMessage(t);return("signature"in n?n.signature:void 0)||"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{let[e,t]=r,n="string"==typeof t?JSON.parse(t):t;if(this.safe.safeAddress.toLowerCase()!==e.toLowerCase())throw Error("The address is invalid");let i=await this.sdk.txs.signTypedMessage(n);return("signature"in i?i.signature:void 0)||"0x"}case"eth_sendTransaction":let i={...r[0],value:r[0].value||"0",data:r[0].data||"0x"};"string"==typeof i.gas&&i.gas.startsWith("0x")&&(i.gas=parseInt(i.gas,16));let s=await this.sdk.txs.send({txs:[i],params:{safeTxGas:i.gas}});return this.submittedTxs.set(s.safeTxHash,{from:this.safe.safeAddress,hash:s.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:i.data,value:i.value,to:i.to,blockHash:null,blockNumber:null,transactionIndex:null}),s.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,a.getLowerCase)(r[0]),r[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,a.getLowerCase)(r[0]),r[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,a.getLowerCase)(r[0]),r[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,a.getLowerCase)(r[0]),r[1],r[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([r[0],r[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([r[0],r[1]]);case"eth_getTransactionByHash":let o=r[0];try{o=(await this.sdk.txs.getBySafeTxHash(o)).txHash||o}catch(e){}if(this.submittedTxs.has(o))return this.submittedTxs.get(o);return this.sdk.eth.getTransactionByHash([o]).then(e=>(e&&(e.hash=r[0]),e));case"eth_getTransactionReceipt":{let e=r[0];try{e=(await this.sdk.txs.getBySafeTxHash(e)).txHash||e}catch(e){}return this.sdk.eth.getTransactionReceipt([e]).then(e=>(e&&(e.transactionHash=r[0]),e))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(r[0]);case"eth_call":return this.sdk.eth.call([r[0],r[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([r[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(r[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([r[0]]);case"wallet_sendCalls":{let{from:e,calls:t,chainId:n}=r[0];if(n!==(0,a.numberToHex)(this.chainId))throw Error(`Safe is not on chain ${n}`);if(e!==this.safe.safeAddress)throw Error("Invalid from address");let i=t.map((e,t)=>{if(!e.to)throw Error(`Invalid call #${t}: missing "to" field`);return{to:e.to,data:e.data??"0x",value:e.value??(0,a.numberToHex)(0)}}),{safeTxHash:s}=await this.sdk.txs.send({txs:i});return{id:s}}case"wallet_getCallsStatus":{let e=r[0],t={[n.TransactionStatus.AWAITING_CONFIRMATIONS]:100,[n.TransactionStatus.AWAITING_EXECUTION]:100,[n.TransactionStatus.SUCCESS]:200,[n.TransactionStatus.CANCELLED]:400,[n.TransactionStatus.FAILED]:500},i=await this.sdk.txs.getBySafeTxHash(e),s={version:"1.0",id:e,chainId:(0,a.numberToHex)(this.chainId),status:t[i.txStatus]};if(!i.txHash)return s;let o=await this.sdk.eth.getTransactionReceipt([i.txHash]);if(!o)return s;let l=i.txData?.dataDecoded?.method!=="multiSend"?1:i.txData.dataDecoded.parameters?.[0].valueDecoded?.length??1,c=Number(o.blockNumber),u=Number(o.gasUsed);return s.receipts=Array(l).fill({logs:o.logs,status:(0,a.numberToHex)(+(i.txStatus===n.TransactionStatus.SUCCESS)),blockHash:o.blockHash,blockNumber:(0,a.numberToHex)(c),gasUsed:(0,a.numberToHex)(u),transactionHash:i.txHash}),s}case"wallet_showCallsStatus":throw Error(`"${e.method}" not supported`);case"wallet_getCapabilities":return{[(0,a.numberToHex)(this.chainId)]:{atomicBatch:{supported:!0}
6234}};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))}}t.SafeAppProvider=s},78667:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEip712Domain=s;let n=r(3383),i=r(95847),a=r(527);async function s(e,t){let{address:r,factory:s,factoryData:l}=t;try{let[t,n,c,u,d,h,p]=await (0,i.getAction)(e,a.readContract,"readContract")({abi:o,address:r,functionName:"eip712Domain",factory:s,factoryData:l});return{domain:{name:n,version:c,chainId:Number(u),verifyingContract:d,salt:h},extensions:p,fields:t}}catch(e){if("ContractFunctionExecutionError"===e.name&&"ContractFunctionZeroDataError"===e.cause.name)throw new n.Eip712DomainNotFoundError({address:r});throw e}}let o=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}]},78869:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnsInvalidChainIdError=t.EnsAvatarUnsupportedNamespaceError=t.EnsAvatarUriResolutionError=t.EnsAvatarInvalidNftUriError=t.EnsAvatarInvalidMetadataError=void 0;let n=r(45226);class i extends n.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)}`],name:"EnsAvatarInvalidMetadataError"})}}t.EnsAvatarInvalidMetadataError=i;class a extends n.BaseError{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`,{name:"EnsAvatarInvalidNftUriError"})}}t.EnsAvatarInvalidNftUriError=a;class s extends n.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.`,{name:"EnsAvatarUriResolutionError"})}}t.EnsAvatarUriResolutionError=s;class o extends n.BaseError{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}t.EnsAvatarUnsupportedNamespaceError=o;class l extends n.BaseError{constructor({chainId:e}){super(`Invalid ENSIP-11 chainId: ${e}. Must be between 0 and 0x7fffffff, or 1.`,{name:"EnsInvalidChainIdError"})}}t.EnsInvalidChainIdError=l},78923:(e,t,r)=>{"use strict";r.d(t,{L:()=>f});var n=r(53597),i=r(81742);class a extends i.C{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}var s=r(31137),o=r(35261),l=r(60783);let c={current:0,take(){return this.current++},reset(){this.current=0}};async function u(e,{maxResponseBodySize:t}){if(!1===t)return e.text();let r=e.headers.get("Content-Length");if(r){let e=Number(r);if(e>t)throw new n.f({maxSize:t,size:e})}if(!e.body){let r=await e.text(),i=new TextEncoder().encode(r).length;if(i>t)throw new n.f({maxSize:t,size:i});return r}let i=e.body.getReader(),a=new TextDecoder,s="",o=0;try{for(;;){let{done:e,value:r}=await i.read();if(e)break;if((o+=r.byteLength)>t)throw await i.cancel(),new n.f({maxSize:t,size:o});s+=a.decode(r,{stream:!0})}return s+=a.decode()}finally{i.releaseLock()}}var d=r(65467);let h=0,p=new WeakMap;function f(e,t={}){let{batch:r,fetchFn:i,fetchOptions:m,key:g="http",maxResponseBodySize:y,methods:b,name:w="HTTP JSON-RPC",onFetchRequest:v,onFetchResponse:E,retryDelay:C,raw:A}=t;return({chain:f,retryCount:x,timeout:I})=>{let{batchSize:S=1e3,wait:T=0}="object"==typeof r?r:{},P=t.retryCount??x,O=I??t.timeout??1e4,_=e||f?.rpcUrls.default.http[0];if(!_)throw new a;let N=function(e,t={}){let{url:r,headers:i}=function(e){try{let t=new URL(e),r=(()=>{if(t.username){let e=`${decodeURIComponent(t.username)}:${decodeURIComponent(t.password)}`;return t.username="",t.password="",{url:t.toString(),headers:{Authorization:`Basic ${btoa(e)}`}}}})();return{url:t.toString(),...r}}catch{return{url:e}}}(e);return{async request(e){let{body:a,fetchFn:s=t.fetchFn??fetch,maxResponseBodySize:d=t.maxResponseBodySize??0xa00000,onRequest:h=t.onRequest,onResponse:p=t.onResponse,timeout:f=t.timeout??1e4}=e,m={...t.fetchOptions??{},...e.fetchOptions??{}},{headers:g,method:y,signal:b}=m;try{let e,t=await function(e,{errorInstance:t=Error("timed out"),timeout:r,signal:n}){return new Promise((i,a)=>{(async()=>{let s,l=new AbortController;try{r>0&&(s=setTimeout(()=>{n?l.abort():a(t)},r)),i(await e({signal:l?.signal||null}))}catch(e){if(l?.signal.aborted&&(0,o.zf)(e))return void a(t);a(e)}finally{clearTimeout(s)}})()})}(async({signal:e})=>{let t={...m,body:Array.isArray(a)?(0,l.A)(a.map(e=>({jsonrpc:"2.0",id:e.id??c.take(),...e}))):(0,l.A)({jsonrpc:"2.0",id:a.id??c.take(),...a}
6234),headers:{...i,"Content-Type":"application/json",...g},method:y||"POST",signal:b||(f>0?e:null)},n=new Request(r,t),o=await h?.(n,t)??{...t,url:r};return await s(o.url??r,o)},{errorInstance:new n.MU({body:a,url:r}),timeout:f,signal:!0});p&&await p(t);let w=await u(t,{maxResponseBodySize:d});if(t.headers.get("Content-Type")?.startsWith("application/json"))e=JSON.parse(w);else{e=w;try{e=JSON.parse(e||"{}")}catch(r){if(t.ok)throw r;e={error:e}}}if(!t.ok){if("number"==typeof e.error?.code&&"string"==typeof e.error?.message)return e;throw new n.Ci({body:a,details:(0,l.A)(e.error)||t.statusText,headers:t.headers,status:t.status,url:r})}return e}catch(e){if(b?.aborted)throw(0,o.TY)(b);if((0,o.zf)(e)||e instanceof n.Ci||e instanceof n.f||e instanceof n.MU)throw e;throw new n.Ci({body:a,cause:e,url:r})}}}}(_,{fetchFn:i,fetchOptions:m,maxResponseBodySize:y,onRequest:v,onResponse:E,timeout:O});return(0,d.o)({key:g,methods:b,name:w,async request({method:e,params:t},i){let a={method:e,params:t},o=i?.signal?{signal:i.signal}:void 0,{schedule:l}=(0,s.u)({id:`${_}.${function(e){if(!e)return"default";let t=p.get(e);if(void 0!==t)return t;let r=h++;return p.set(e,r),r}(i?.signal)}`,wait:T,shouldSplitBatch:e=>e.length>S,fn:e=>N.request({body:e,fetchOptions:o}),sort:(e,t)=>e.id-t.id}),c=async e=>r?l(e):[await N.request({body:e,fetchOptions:o})],[{error:u,result:d}]=await c(a);if(A)return{error:u,result:d};if(u)throw new n.J8({body:a,error:u,url:_});return d},retryCount:P,retryDelay:C,timeout:O,type:"http"},{fetchOptions:m,url:_})}}},79422:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="1.2.3"},79482:(e,t,r)=>{"use strict";r.d(t,{G:()=>o});var n=r(91004),i=r(36442);let a={eip155:void 0,solana:void 0,polkadot:void 0,bip122:void 0,cosmos:void 0,sui:void 0,stacks:void 0,ton:void 0,tron:void 0},s=(0,n.BX)({providers:{...a},providerIds:{...a}}),o={state:s,subscribeKey:(e,t)=>(0,i.u$)(s,e,t),subscribe:e=>(0,n.B1)(s,()=>{e(s)}),subscribeProviders:e=>(0,n.B1)(s.providers,()=>e(s.providers)),setProvider(e,t){e&&t&&(s.providers[e]=(0,n.KR)(t))},getProvider(e){if(e)return s.providers[e]},setProviderId(e,t){t&&(s.providerIds[e]=t)},getProviderId(e){if(e)return s.providerIds[e]},reset(){s.providers={...a},s.providerIds={...a}},resetChain(e){s.providers[e]=void 0,s.providerIds[e]=void 0}}},79535:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publicKeyToAddress=function(e){let t=(0,i.keccak256)(`0x${e.substring(4)}`).substring(26);return(0,n.checksumAddress)(`0x${t}`)};let n=r(24998),i=r(4319)},79561:(e,t,r)=>{"use strict";r.d(t,{N:()=>w});var n=r(91004),i=r(36442),a=r(57873),s=r(28877),o=r(33432),l=r(77909),c=r(76916),u=r(29092),d=r(12573),h=r(82376),p=r(32590),f=r(42242),m=r(18627);let g=o.w.getApiUrl(),y=new l.Z({baseUrl:g,clientId:null}),b=(0,n.BX)({promises:{},page:1,count:0,featured:[],allFeatured:[],recommended:[],allRecommended:[],wallets:[],filteredWallets:[],search:[],isAnalyticsEnabled:!1,excludedWallets:[],isFetchingRecommendedWallets:!1,explorerWallets:[],explorerFilteredWallets:[],plan:{tier:"none",hasExceededUsageLimit:!1,limits:{isAboveRpcLimit:!1,isAboveMauLimit:!1}}}),w={state:b,subscribeKey:(e,t)=>(0,i.u$)(b,e,t),_getSdkProperties(){let{projectId:e,sdkType:t,sdkVersion:r}=m.H.state;return{projectId:e,st:t||"appkit",sv:r||"html-wagmi-4.2.2"}},_filterOutExtensions:e=>m.H.state.isUniversalProvider?e.filter(e=>!!(e.mobile_link||e.desktop_link||e.webapp_link)):e,async _fetchWalletImage(e){let t=`${y.baseUrl}/getWalletImage/${e}`,r=await y.getBlob({path:t,params:w._getSdkProperties()});d.j.setWalletImage(e,URL.createObjectURL(r))},async _fetchNetworkImage(e){let t=`${y.baseUrl}/public/getAssetImage/${e}`,r=await y.getBlob({path:t,params:w._getSdkProperties()});d.j.setNetworkImage(e,URL.createObjectURL(r))},async _fetchConnectorImage(e){let t=`${y.baseUrl}/public/getAssetImage/${e}`,r=await y.getBlob({path:t,params:w._getSdkProperties()});d.j.setConnectorImage(e,URL.createObjectURL(r))},async _fetchCurrencyImage(e){let t=`${y.baseUrl}/public/getCurrencyImage/${e}`,r=await y.getBlob({path:t,params:w._getSdkProperties()});d.j.setCurrencyImage(e,URL.createObjectURL(r))},async _fetchTokenImage(e){let t=`${y.baseUrl}/public/getTokenImage/${e}`,r=await y.getBlob({path:t,params:w._getSdkProperties()});d.j.setTokenImage(e,URL.createObjectURL(r))},_filterWalletsByPlatform(e){let t=e.length,r=o.w.isMobile()?e?.filter(e=>!!e.mobile_link||!!e.webapp_link||Object.values(c.O).map(e=>e.id).includes(e.id)):e,n=t-r.length;return{filteredWallets:r,mobileFilteredOutWalletsLength:n}},fetchProjectConfig:async()=>(await y.get({path:"/appkit/v1/config",params:w._getSdkProperties()})).features,async fetchUsage(){try{let{tier:e,isAboveMauLimit:t,isAboveRpcLim
6234it:r}=(await y.get({path:"/appkit/v1/project-limits",params:w._getSdkProperties()})).planLimits;w.state.plan={tier:e,hasExceededUsageLimit:"starter"===e&&(t||r),limits:{isAboveRpcLimit:r,isAboveMauLimit:t}}}catch(e){console.warn("Failed to fetch usage",e)}},async fetchAllowedOrigins(){try{let{allowedOrigins:e}=await y.get({path:"/projects/v1/origins",params:w._getSdkProperties()});return e}catch(e){if(e instanceof Error&&e.cause instanceof Response){let t=e.cause.status;if(t===a.o.HTTP_STATUS_CODES.TOO_MANY_REQUESTS)throw Error("RATE_LIMITED",{cause:e});if(t>=a.o.HTTP_STATUS_CODES.SERVER_ERROR&&t<600)throw Error("SERVER_ERROR",{cause:e})}return[]}},async fetchNetworkImages(){let e=h.W.getAllRequestedCaipNetworks(),t=e?.map(({assets:e})=>e?.imageId).filter(Boolean).filter(e=>!s.$.getNetworkImageById(e));t&&await Promise.allSettled(t.map(e=>w._fetchNetworkImage(e)))},async fetchConnectorImages(){let{connectors:e}=p.a.state,t=e.map(({imageId:e})=>e).filter(Boolean);await Promise.allSettled(t.map(e=>w._fetchConnectorImage(e)))},async fetchCurrencyImages(e=[]){await Promise.allSettled(e.map(e=>w._fetchCurrencyImage(e)))},async fetchTokenImages(e=[]){await Promise.allSettled(e.map(e=>w._fetchTokenImage(e)))},async fetchWallets(e){let t=e.exclude??[];w._getSdkProperties().sv.startsWith("html-core-")&&t.push(...Object.values(c.O).map(e=>e.id));let r=await y.get({path:"/getWallets",params:{...w._getSdkProperties(),...e,page:String(e.page),entries:String(e.entries),include:e.include?.join(",")||void 0,exclude:t.join(",")||void 0,include_pay_only:e.include_pay_only?"true":void 0}}),{filteredWallets:n,mobileFilteredOutWalletsLength:i}=w._filterWalletsByPlatform(r?.data);return{data:n||[],count:r?.count,mobileFilteredOutWalletsLength:i}},async prefetchWalletRanks(){let e=p.a.state.connectors;if(!e?.length)return;let t={page:1,entries:20,badge:"certified"};if(t.names=e.map(e=>e.name).join(","),h.W.state.activeChain===a.o.CHAIN.EVM){let r=[...e.flatMap(e=>e.connectors?.map(e=>e.info?.rdns)||[]),...e.map(e=>e.info?.rdns)].filter(e=>"string"==typeof e&&e.length>0);r.length&&(t.rdns=r.join(","))}let{data:r}=await w.fetchWallets(t);b.explorerWallets=r,p.a.extendConnectorsWithExplorerWallets(r);let n=h.W.getRequestedCaipNetworkIds().join(",");b.explorerFilteredWallets=r.filter(e=>e.chains?.some(e=>n.includes(e)))},async fetchFeaturedWallets(){let{featuredWalletIds:e}=m.H.state;if(e?.length){let t={...w._getSdkProperties(),page:1,entries:e?.length??4,include:e},{data:r}=await w.fetchWallets(t),n=[...r].sort((t,r)=>e.indexOf(t.id)-e.indexOf(r.id)),i=n.map(e=>e.image_id).filter(Boolean);await Promise.allSettled(i.map(e=>w._fetchWalletImage(e))),b.featured=n,b.allFeatured=n}},async fetchRecommendedWallets(){try{b.isFetchingRecommendedWallets=!0;let{includeWalletIds:e,excludeWalletIds:t,featuredWalletIds:r}=m.H.state,n=[...t??[],...r??[]].filter(Boolean),i=h.W.getRequestedCaipNetworkIds().join(","),{data:a,count:s}=await w.fetchWallets({page:1,entries:4,include:e,exclude:n,chains:i}),o=u.i.getRecentWallets(),l=a.map(e=>e.image_id).filter(Boolean),c=o.map(e=>e.image_id).filter(Boolean);await Promise.allSettled([...l,...c].map(e=>w._fetchWalletImage(e))),b.recommended=a,b.allRecommended=a,b.count=s??0}catch{}finally{b.isFetchingRecommendedWallets=!1}},async fetchWalletsByPage({page:e,entries:t,badge:r,include:n,exclude:i,includePayOnly:a,sort:s}){let{includeWalletIds:l,excludeWalletIds:c,featuredWalletIds:u}=m.H.state,d=h.W.getRequestedCaipNetworkIds().join(","),p=[...b.recommended.map(({id:e})=>e),...c??[],...u??[]].filter(Boolean),{data:f,count:g,mobileFilteredOutWalletsLength:y}=await w.fetchWallets({page:e,entries:t??40,include:n??l,exclude:i??p,badge_type:r,include_pay_only:a,sort:s,chains:d});b.mobileFilteredOutWalletsLength=y+(b.mobileFilteredOutWalletsLength??0);let v=f.slice(0,20).map(e=>e.image_id).filter(Boolean);await Promise.allSettled(v.map(e=>w._fetchWalletImage(e))),b.wallets=o.w.uniqueBy([...b.wallets,...w._filterOutExtensions(f)],"id").filter(e=>e.chains?.some(e=>d.includes(e))),b.count=g>b.count?g:b.count,b.page=e},async initializeExcludedWallets({ids:e}){let t={page:1,entries:e.length,include:e},{data:r}=await w.fetchWallets(t);
6234r&&r.forEach(e=>{b.excludedWallets.push({rdns:e.rdns,name:e.name})})},async searchWallet({search:e,badge:t,entries:r,page:n,include:i,exclude:a,includePayOnly:s,sort:l}){let{includeWalletIds:c,excludeWalletIds:u}=m.H.state,d=h.W.getRequestedCaipNetworkIds().join(",");b.search=[];let p={page:n??1,entries:r??100,search:e?.trim()||void 0,badge_type:t,include:i??c,exclude:a??u,include_pay_only:s,sort:l,chains:d},{data:g}=await w.fetchWallets(p);f.E.sendEvent({type:"track",event:"SEARCH_WALLET",properties:{badge:t??"",search:e??""}});let y=g.map(e=>e.image_id).filter(Boolean);await Promise.allSettled([...y.map(e=>w._fetchWalletImage(e)),o.w.wait(300)]),b.search=w._filterOutExtensions(g)},initPromise(e,t){let r=b.promises[e];return r||(b.promises[e]=t())},prefetch:({fetchConnectorImages:e=!0,fetchFeaturedWallets:t=!0,fetchRecommendedWallets:r=!0,fetchNetworkImages:n=!0,fetchWalletRanks:i=!0}={})=>Promise.allSettled([e&&w.initPromise("connectorImages",w.fetchConnectorImages),t&&w.initPromise("featuredWallets",w.fetchFeaturedWallets),r&&w.initPromise("recommendedWallets",w.fetchRecommendedWallets),n&&w.initPromise("networkImages",w.fetchNetworkImages),i&&w.initPromise("walletRanks",w.prefetchWalletRanks)].filter(Boolean)),prefetchAnalyticsConfig(){m.H.state.features?.anal
6234ytics&&w.fetchAnalyticsConfig()},async fetchAnalyticsConfig(){try{let{isAnalyticsEnabled:e}=await y.get({path:"/getAnalyticsConfig",params:w._getSdkProperties()});m.H.setFeatures({analytics:e})}catch(e){m.H.setFeatures({analytics:!1})}},filterByNamespaces(e){if(!e?.length){b.featured=b.allFeatured,b.recommended=b.allRecommended;return}let t=h.W.getRequestedCaipNetworkIds().join(",");b.featured=b.allFeatured.filter(e=>e.chains?.some(e=>t.includes(e))),b.recommended=b.allRecommended.filter(e=>e.chains?.some(e=>t.includes(e))),b.filteredWallets=b.wallets.filter(e=>e.chains?.some(e=>t.includes(e)))},clearFilterByNamespaces(){b.filteredWallets=[]},setFilterByNamespace(e){if(!e){b.featured=b.allFeatured,b.recommended=b.allRecommended;return}let t=h.W.getRequestedCaipNetworkIds().join(",");b.featured=b.allFeatured.filter(e=>e.chains?.some(e=>t.includes(e))),b.recommended=b.allRecommended.filter(e=>e.chains?.some(e=>t.includes(e))),b.filteredWallets=b.wallets.filter(e=>e.chains?.some(e=>t.includes(e)))}}},79681:(e,t,r)=>{"use strict";r.d(t,{j:()=>a});var n=r(23331),i=r(12259);let a={u8:e=>(0,i.jo)({readMethod:"read8",writeMethod:"write8",size:1,maxValue:255,...e,name:e?.name??"u8"}),u16:e=>(0,i.jo)({readMethod:"read16",writeMethod:"write16",size:2,maxValue:65535,...e,name:e?.name??"u16"}),u32:e=>(0,i.jo)({readMethod:"read32",writeMethod:"write32",size:4,maxValue:0x100000000-1,...e,name:e?.name??"u32"}),u64:e=>(0,i.L2)({readMethod:"read64",writeMethod:"write64",size:8,maxValue:2n**64n-1n,...e,name:e?.name??"u64"}),u128:e=>(0,i.L2)({readMethod:"read128",writeMethod:"write128",size:16,maxValue:2n**128n-1n,...e,name:e?.name??"u128"}),u256:e=>(0,i.L2)({readMethod:"read256",writeMethod:"write256",size:32,maxValue:2n**256n-1n,...e,name:e?.name??"u256"}),bool:e=>(0,i.u0)({size:1,read:e=>1===e.read8(),write:(e,t)=>t.write8(+!!e),...e,name:e?.name??"bool",validate:t=>{if(e?.validate?.(t),"boolean"!=typeof t)throw TypeError(`Expected boolean, found ${typeof t}`)}}),uleb128:e=>(0,i.Jk)({read:e=>e.readULEB(),serialize:e=>Uint8Array.from((0,n.h)(e)),...e,name:e?.name??"uleb128"}),bytes:(e,t)=>(0,i.u0)({size:e,read:t=>t.readBytes(e),write:(e,t)=>{t.writeBytes(new Uint8Array(e))},...t,name:t?.name??`bytes[${e}]`,validate:r=>{if(t?.validate?.(r),!r||"object"!=typeof r||!("length"in r))throw TypeError(`Expected array, found ${typeof r}`);if(r.length!==e)throw TypeError(`Expected array of length ${e}, found ${r.length}`)}}),byteVector:e=>new i.ju({read:e=>{let t=e.readULEB();return e.readBytes(t)},write:(e,t)=>{let r=new Uint8Array(e);t.writeULEB(r.length),t.writeBytes(r)},...e,name:e?.name??"vector<u8>",serializedSize:e=>{let t="length"in e?e.length:null;return null==t?null:(0,n.h)(t).length+t},validate:t=>{if(e?.validate?.(t),!t||"object"!=typeof t||!("length"in t))throw TypeError(`Expected array, found ${typeof t}`)}}),string:e=>(0,i.$b)({toBytes:e=>new TextEncoder().encode(e),fromBytes:e=>new TextDecoder().decode(e),...e,name:e?.name??"string"}),fixedArray:function(e,t,r){return new i.ju({read:r=>{let n=Array(e);for(let i=0;i<e;i++)n[i]=t.read(r);return n},write:(e,r)=>{for(let n of e)t.write(n,r)},...r,name:r?.name??`${t.name}[${e}]`,validate:t=>{if(r?.validate?.(t),!t||"object"!=typeof t||!("length"in t))throw TypeError(`Expected array, found ${typeof t}`);if(t.length!==e)throw TypeError(`Expected array of length ${e}, found ${t.length}`)}})},option:function(e){return a.enum(`Option<${e.name}>`,{None:null,Some:e}).transform({input:e=>null==e?{None:!0}:{Some:e},output:e=>"Some"===e.$kind?e.Some:null})},vector:function(e,t){return new i.ju({read:t=>{let r=t.readULEB(),n=Array(r);for(let i=0;i<r;i++)n[i]=e.read(t);return n},write:(t,r)=>{for(let n of(r.writeULEB(t.length),t))e.write(n,r)},...t,name:t?.name??`vector<${e.name}>`,validate:e=>{if(t?.validate?.(e),!e||"object"!=typeof e||!("length"in e))throw TypeError(`Expected array, found ${typeof e}`)}})},tuple:(e,t)=>new i.TY({fields:e,...t}),struct:(e,t,r)=>new i.Wv({name:e,fields:t,...r}),enum:(e,t,r)=>new i.o({name:e,fields:t,...r}),map:function(e,t){return new i.ju({name:`Map<${e.name}, ${t.name}>`,read:r=>{let n=r.readULEB(),i=new Map;for(let a=0;a<n;a++)i.set(e.read(r),t.read(r));return i},write:(r,n)=>{let i=[...r.entries()].map(([t,r])=>[e.serialize(t).toBytes(),r]);for(let[e,r]of(i.sort(([e],[t])=>(function(e,t){for(let r=0;r<Math.min(e.length,t.length);r++)if(e[r]!==t[r])return e[r]-t[r];return e.length-t.length})(e,t)),n.writeULEB(i.length),i))n.writeBytes(e),t.write(r,n)}})},lazy:e=>(0,i.HD)(e)}},79909:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(55284),s=r(80407);let o=Symbol.for(""),l=e=>{if(e?.r===o)return e?._$litStatic$},c=new Map,u=e=>(t,...r)=>{let n,i,a=r.length,s=[],o=[],u,d=0,h=!1;for(;d<a;){for(u=t[d];d<a&&void 0!==(n=l(i=r[d]));)u+=n+t[++d],h=!0;d!==a&&o.push(i),s.push(u),d++}if(d===a&&s.push(t[a]),h){let e=s.join("$$lit$$");void 0===(t=c.get(e))&&(s.raw=s,c.set(e,t=s)),r=o}return e(t,...r)},d=u(s.qy);u(s.JW),u(s.ej);let h=(0,n.JW)`<svg width="30" height="30" viewBox="0 0 30 30" fill="none"> 6235 <g clip-path="url(#clip0_87_33)"> 6236 <path d="M23.9367 2.29447e-07H6.05917C5.26333 -0.000218805 4.47526 0.156384 3.73997 0.46086C3.00469 0.765337 2.33661 1.21172 1.77391 1.7745C1.21121 2.33727 0.7649
623617 3.00542 0.460542 3.74074C0.156167 4.47607 -0.000327963 5.26417 5.16031e-07 6.06V23.9433C4.48257e-07 24.7389 0.156744 25.5267 0.461276 26.2617C0.765808 26.9967 1.21216 27.6645 1.77484 28.2269C2.33752 28.7894 3.0055 29.2355 3.74061 29.5397C4.47573 29.8439 5.26358 30.0003 6.05917 30H23.9417C25.5486 29.9996 27.0895 29.3609 28.2257 28.2245C29.3618 27.0881 30 25.5469 30 23.94V6.06C29.9993 4.45241 29.3602 2.91091 28.2232 1.77449C27.0861 0.638064 25.5443 -0.000220881 23.9367 2.29447e-07Z" fill="url(#paint0_linear_87_33)"/> 6237 <path d="M14.8708 6.89259L15.4783 5.84259C15.5679 5.68703 15.6873 5.55064 15.8296 5.44122C15.9719 5.3318 16.1344 5.25148 16.3078 5.20486C16.4812 5.15824 16.662 5.14622 16.8401 5.1695C17.0181 5.19277 17.1898 5.25088 17.3453 5.34051C17.5009 5.43013 17.6373 5.54952 17.7467 5.69186C17.8561 5.83419 17.9364 5.99669 17.9831 6.17006C18.0297 6.34344 18.0417 6.5243 18.0184 6.70232C17.9952 6.88034 17.9371 7.05203 17.8474 7.20759L11.9949 17.3401H16.2283C17.5999 17.3401 18.3691 18.9526 17.7724 20.0701H5.36159C5.18215 20.0707 5.00436 20.0359 4.83845 19.9675C4.67254 19.8992 4.5218 19.7986 4.39492 19.6718C4.26803 19.5449 4.16751 19.3941 4.09915 19.2282C4.03079 19.0623 3.99593 18.8845 3.99659 18.7051C3.99659 17.9476 4.60492 17.3401 5.36159 17.3401H8.84159L13.2958 9.61926L11.9041 7.20426C11.738 6.89096 11.7 6.52543 11.7982 6.18469C11.8963 5.84395 12.1229 5.5546 12.4301 5.37763C12.7374 5.20065 13.1014 5.14987 13.4454 5.23599C13.7893 5.3221 14.0864 5.53838 14.2741 5.83926L14.8708 6.89259ZM9.60659 21.4759L8.29409 23.7526C8.20446 23.9082 8.08506 24.0446 7.94271 24.1541C7.80035 24.2636 7.63783 24.344 7.46441 24.3906C7.291 24.4373 7.11009 24.4493 6.93202 24.4261C6.75395 24.4028 6.58221 24.3447 6.42659 24.2551C6.27097 24.1655 6.13454 24.0461 6.02506 23.9037C5.91559 23.7613 5.83523 23.5988 5.78857 23.4254C5.74191 23.252 5.72986 23.0711 5.75311 22.893C5.77637 22.715 5.83446 22.5432 5.92409 22.3876L6.89909 20.7001C8.00159 20.3584 8.89742 20.6209 9.60659 21.4759ZM20.9066 17.3476H24.4583C25.2158 17.3476 25.8233 17.9551 25.8233 18.7126C25.8233 19.4701 25.2149 20.0776 24.4583 20.0776H22.4858L23.8166 22.3876C24.1916 23.0443 23.9708 23.8726 23.3149 24.2551C23.0006 24.4359 22.6274 24.4845 22.2772 24.3903C21.927 24.2961 21.6286 24.0667 21.4474 23.7526C19.2058 19.8643 17.5216 16.9534 16.4041 15.0151C15.2608 13.0426 16.0783 11.0626 16.8841 10.3909C17.7799 11.9293 19.1191 14.2501 20.9074 17.3476H20.9066Z" fill="white"/> 6238 </g> 6239 <defs> 6240 <linearGradient id="paint0_linear_87_33" x1="15" y1="2.29447e-07" x2="15" y2="30" gradientUnits="userSpaceOnUse"> 6241 <stop stop-color="#18BFFB"/> 6242 <stop offset="1" stop-color="#2072F3"/> 6243 </linearGradient> 6244 <clipPath id="clip0_87_33"> 6245 <rect width="30" height="30" fill="white"/> 6246 </clipPath> 6247 </defs> 6248</svg>`,p=(0,n.JW)`<svg fill="none" viewBox="0 0 40 40"> 6249 <g clip-path="url(#a)"> 6250 <g clip-path="url(#b)"> 6251 <circle cx="20" cy="19.89" r="20" fill="#000" /> 6252 <g clip-path="url(#c)"> 6253 <path 6254 fill="#fff" 6255 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" 6256 /> 6257 </g> 6258 </g> 6259 </g> 6260 <defs> 6261 <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath> 6262 <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath> 6263 <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath> 6264 </defs> 6265</svg>`,f=(0,n.JW)` 6266 <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 8 11"> 6267 <path 6268 fill="var(--apkt-tokens-theme-textPrimary)" 6269 d="M7.862 4.86c.159-1.064-.652-1.637-1.76-2.018l.36-1.443-.879-.218-.35 1.404c-.23-.058-.468-.112-.703-.166l.352-1.413-.877-.219-.36 1.442a29.02 29.02 0 0 1-.56-.132v-.005l-1.21-.302-.234.938s.652.15.638.158c.356.089.42.324.41.51l-.41 1.644a.715.715 0 0 1 .09.03l-.092-.024-.574 2.302c-.044.108-.154.27-.402.208.008.013-.639-.16-.639-.16L.227 8.403l1.142.285c.213.053.42.109.626.161l-.363 1.459.877.218.36-1.443c.239.065.472.125.7.
6269182l-.36 1.436.879.219.363-1.456c1.497.283 2.623.17 3.097-1.185.381-1.09-.02-1.719-.807-2.129.574-.132 1.006-.51 1.12-1.289ZM5.856 7.673c-.272 1.09-2.107.5-2.702.353l.482-1.933c.595.149 2.503.443 2.22 1.58Zm.271-2.829c-.247.992-1.775.488-2.27.365l.436-1.753c.496.124 2.092.354 1.834 1.388Z" 6270 /> 6271 </svg> 6272`,m=(0,n.JW)`<svg viewBox="0 0 32 32" fill="none"> 6273<path d="M29.0612 10.0613L13.0612 26.0613C12.9218 26.2011 12.7563 26.3121 12.5739 26.3878C12.3916 26.4635 12.1961 26.5024 11.9987 26.5024C11.8013 26.5024 11.6058 26.4635 11.4235 26.3878C11.2411 26.3121 11.0756 26.2011 10.9362 26.0613L3.9362 19.0613C3.79667 18.9217 3.68599 18.7561 3.61047 18.5738C3.53496 18.3915 3.49609 18.1961 3.49609 17.9988C3.49609 17.8014 3.53496 17.606 3.61047 17.4237C3.68599 17.2414 3.79667 17.0758 3.9362 16.9363C4.07573 16.7967 4.24137 16.686 4.42367 16.6105C4.60598 16.535 4.80137 16.4962 4.9987 16.4962C5.19602 16.4962 5.39141 16.535 5.57372 16.6105C5.75602 16.686 5.92167 16.7967 6.0612 16.9363L11.9999 22.875L26.9387 7.93876C27.2205 7.65697 27.6027 7.49866 28.0012 7.49866C28.3997 7.49866 28.7819 7.65697 29.0637 7.93876C29.3455 8.22055 29.5038 8.60274 29.5038 9.00126C29.5038 9.39977 29.3455 9.78197 29.0637 10.0638L29.0612 10.0613Z" fill="currentColor"/> 6274</svg> 6275`,g=(0,n.JW)`<svg width="30" height="30" viewBox="0 0 30 30" fill="none"> 6276<path d="M14.9978 7.80003H27.4668C26.2032 5.61107 24.3857 3.79333 22.1968 2.52955C20.008 1.26577 17.525 0.600485 14.9975 0.600586C12.47 0.600687 9.98712 1.26617 7.79838 2.53012C5.60964 3.79408 3.79221 5.61197 2.52881 7.80103L8.76281 18.599L8.76881 18.598C8.13412 17.5044 7.79906 16.2628 7.79743 14.9983C7.79579 13.7339 8.12764 12.4914 8.7595 11.3961C9.39136 10.3008 10.3009 9.39159 11.3963 8.76005C12.4918 8.12851 13.7344 7.79702 14.9988 7.79903L14.9978 7.80003Z" fill="url(#paint0_linear_87_32)"/> 6277<path d="M21.237 18.5981L15.003 29.3961C17.5305 29.3961 20.0134 28.7308 22.2022 27.467C24.391 26.2032 26.2086 24.3854 27.4721 22.1965C28.7356 20.0075 29.4006 17.5245 29.4003 14.997C29.3999 12.4695 28.7342 9.9867 27.47 7.7981H15.002L15 7.8041C16.2642 7.80168 17.5067 8.13257 18.6022 8.76342C19.6977 9.39428 20.6076 10.3028 21.2401 11.3974C21.8726 12.492 22.2053 13.734 22.2048 14.9982C22.2042 16.2623 21.8704 17.504 21.237 18.5981Z" fill="url(#paint1_linear_87_32)"/> 6278<path d="M8.76502 18.601L2.53102 7.80298C1.26664 9.99172 0.600848 12.4748 0.600586 15.0025C0.600324 17.5302 1.2656 20.0134 2.52953 22.2024C3.79345 24.3914 5.61145 26.209 7.80071 27.4725C9.98998 28.736 12.4733 29.4008 15.001 29.4L21.236 18.602L21.232 18.598C20.6022 19.6941 19.6944 20.6049 18.6003 21.2383C17.5062 21.8717 16.2644 22.2055 15.0002 22.2059C13.7359 22.2063 12.4939 21.8733 11.3994 21.2406C10.3049 20.6079 9.39657 19.6977 8.76602 18.602L8.76502 18.601Z" fill="url(#paint2_linear_87_32)"/> 6279<path d="M14.9998 22.2C16.9094 22.2 18.7407 21.4415 20.091 20.0912C21.4412 18.741 22.1998 16.9096 22.1998 15C22.1998 13.0905 21.4412 11.2591 20.091 9.90888C18.7407 8.55862 16.9094 7.80005 14.9998 7.80005C13.0902 7.80005 11.2589 8.55862 9.90864 9.90888C8.55837 11.2591 7.7998 13.0905 7.7998 15C7.7998 16.9096 8.55837 18.741 9.90864 20.0912C11.2589 21.4415 13.0902 22.2 14.9998 22.2Z" fill="white"/> 6280<path d="M14.9998 20.7C16.5115 20.7 17.9614 20.0995 19.0303 19.0306C20.0993 17.9616 20.6998 16.5118 20.6998 15C20.6998 13.4883 20.0993 12.0385 19.0303 10.9695C17.9614 9.90058 16.5115 9.30005 14.9998 9.30005C13.4881 9.30005 12.0383 9.90058 10.9693 10.9695C9.90034 12.0385 9.2998 13.4883 9.2998 15C9.2998 16.5118 9.90034 17.9616 10.9693 19.0306C12.0383 20.0995 13.4881 20.7 14.9998 20.7Z" fill="#1A73E8"/> 6281<defs> 6282 <linearGradient id="paint0_linear_87_32" x1="3.29381" y1="2.99503" x2="38.0998" y2="2.99503" gradientUnits="userSpaceOnUse"> 6283 <stop stop-color="#D93025"/> 6284 <stop offset="1" stop-color="#EA4335"/> 6285 </linearGradient> 6286 <linearGradient id="paint1_linear_87_32" x1="17.953" y1="29.1431" x2="34.194" y2="-0.298904" gradientUnits="userSpaceOnUse"> 6287 <stop stop-color="#FCC934"/> 6288 <stop offset="1" stop-color="#FBBC04"/> 6289 </linearGradient> 6290 <linearGradient id="paint2_linear_87_32" x1="22.873" y1="28.2" x2="6.63202" y2="-1.24102" gradientUnits="userSpaceOnUse"> 6291 <stop stop-color="#1E8E3E"/> 6292 <stop offset="1" stop-color="#34A853"/> 6293 </linearGradient> 6294</defs> 6295</svg>`,y=(0,n.JW)`<svg width="32" height="32" viewBox="0 0 32 32" fill="none"> 6296<path d="M23 11.1962V10.5C23 7.365 18.2712 5 12 5C5.72875 5 1 7.365 1 10.5V15.5C1 18.1112 4.28125 20.1863 9 20.8075V21.5C9 24.635 13.7288 27 20 27C26.2712 27 31 24.635 31 21.5V16.5C31 13.9125 27.8225 11.835 23 11.1962ZM7 18.3587C4.55125 17.675 3 16.5487 3 15.5V13.7413C4.02 14.4637 5.38625 15.0463 7 15.4375V18.3587ZM17 15.4375C18.6138 15.0463 19.98 14.4637 21 13.7413V15.5C21 16.5487 19.4487 17.675 17 18.3587V15.4375ZM15 24.3587C12.5513 23.675 11 22.5487 11 21.5V20.9788C11.3287 20.9913 11.6613 21 12 21C12.485 21 12.9587 20.9837 13.4237 20.9562C13.9403 21.1412 14.4665 21.2981 15 21.4263V24.3587ZM15 18.7812C14.0068 18.928 13.004 19.0011 12 19C10.996 19.0011 9.99324 18.928 9 18.7812V15.8075C9.99472 15.9371 10.9969 16.0014 12 16C13.0031 16.0014 14.0053 15.9371 15 15.8075V18.7812ZM23 24.7812C21.0106 25.0729 18.9894 25.0729 17 24.7812V21.8C17.9944 21.9337 18.9967 22.0005 20 22C21.0031 22.0014 22.0053 21.9371 23 21.8075V24.7812ZM29 21.5C29 22.5487 27.4487 23.675 25 24.3587V21.4375C26.6138 21.0462 27.98 20.4637 29 19.7412V21.5Z" fill="currentColor"/> 6297</svg> 6298`,b=(0,n.JW)` <svg fill="none" viewBox="0 0 13 4">
6299 <path fill="currentColor" d="M.5 0h12L8.9 3.13a3.76 3.76 0 0 1-4.8 0L.5 0Z" /> 6300</svg>`,w=(0,n.JW)`<svg fill="none" viewBox="0 0 40 40"> 6301 <g clip-path="url(#a)"> 6302 <g clip-path="url(#b)"> 6303 <circle cx="20" cy="19.89" r="20" fill="#5865F2" /> 6304 <path 6305 fill="#fff" 6306 fill-rule="evenodd" 6307 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" 6308 clip-rule="evenodd" 6309 /> 6310 </g> 6311 </g> 6312 <defs> 6313 <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath> 6314 <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath> 6315 </defs> 6316</svg>`,v=(0,n.JW)`<svg 6317 xmlns="http://www.w3.org/2000/svg" 6318 fill="none" 6319 viewBox="0 0 9 12" 6320> 6321 <path 6322 fill="var(--apkt-tokens-theme-textPrimary)" 6323 d="M4.666.001v4.435l3.748 1.675L4.666.001Zm0 0L.917 6.111l3.749-1.675V.001Zm0 8.984V12l3.75-5.19-3.75 2.176Zm0 3.014V8.985L.917 6.81 4.666 12Zm0-3.712 3.748-2.176-3.748-1.675v3.851Z" 6324 /> 6325 <path fill="var(--apkt-tokens-theme-textPrimary)" d="m.917 6.111 3.749 2.176v-3.85L.917 6.11Z" /> 6326</svg>`,E=(0,n.JW)`<svg fill="none" viewBox="0 0 16 16"> 6327 <path 6328 fill="currentColor" 6329 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" 6330 /> 6331</svg>`,C=(0,n.JW)`<svg fill="none" viewBox="0 0 40 40"> 6332 <g clip-path="url(#a)"> 6333 <g clip-path="url(#b)"> 6334 <circle cx="20" cy="19.89" r="20" fill="#1877F2" /> 6335 <g clip-path="url(#c)"> 6336 <path 6337 fill="#fff" 6338 d="M26 12.38h-2.89c-.92 0-1.61.38-1.61 1.34v1.66H26l-.36 4.5H2
63381.5v12H17v-12h-3v-4.5h3V12.5c0-3.03 1.6-4.62 5.2-4.62H26v4.5Z" 6339 /> 6340 </g> 6341 </g> 6342 <path 6343 fill="#1877F2" 6344 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" 6345 /> 6346 <path 6347 fill="#fff" 6348 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" 6349 /> 6350 </g> 6351 <defs> 6352 <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath> 6353 <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath> 6354 <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath> 6355 </defs> 6356</svg>`,A=(0,n.JW)`<svg style="border-radius: 9999px; overflow: hidden;" fill="none" viewBox="0 0 1000 1000"> 6357 <rect width="1000" height="1000" rx="9999" ry="9999" fill="#855DCD"/> 6358 <path fill="#855DCD" d="M0 0h1000v1000H0V0Z" /> 6359 <path 6360 fill="#fff" 6361 d="M320 248h354v504h-51.96V521.13h-.5c-5.76-63.8-59.31-113.81-124.54-113.81s-118.78 50-124.53 113.81h-.5V752H320V248Z" 6362 /> 6363 <path 6364 fill="#fff" 6365 d="m225 320 21.16 71.46h17.9v289.09a16.29 16.29 0 0 0-16.28 16.24v19.49h-3.25a16.3 16.3 0 0 0-16.28 16.24V752h182.26v-19.48a16.22 16.22 0 0 0-16.28-16.24h-3.25v-19.5a16.22 16.22 0 0 0-16.28-16.23h-19.52V320H225Zm400.3 360.55a16.3 16.3 0 0 0-15.04 10.02 16.2 16.2 0 0 0-1.24 6.22v19.49h-3.25a16.29 16.29 0 0 0-16.27 16.24V752h182.24v-19.48a16.23 16.23 0 0 0-16.27-16.24h-3.25v-19.5a16.2 16.2 0 0 0-10.04-15 16.3 16.3 0 0 0-6.23-1.23v-289.1h17.9L775 320H644.82v360.55H625.3Z" 6366 /> 6367</svg>`,x=(0,n.JW)`<svg fill="none" viewBox="0 0 40 40"> 6368 <g clip-path="url(#a)"> 6369 <g clip-path="url(#b)"> 6370 <circle cx="20" cy="19.89" r="20" fill="#1B1F23" /> 6371 <g clip-path="url(#c)"> 6372 <path 6373 fill="#fff" 6374 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" 6375 /> 6376 </g> 6377 </g> 6378 </g> 6379 <defs> 6380 <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath> 6381 <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath> 6382 <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath> 6383 </defs> 6384</svg>`,I=(0,n.JW)`<svg fill="none" viewBox="0 0 40 40"> 6385 <path 6386 fill="#4285F4" 6387 d="M32.74 20.3c0-.93-.08-1.81-.24-2.66H20.26v5.03h7a6 6 0 0 1-2.62 3.91v3.28h4.22c2.46-2.27 3.88-5.6 3.88-9.56Z" 6388 /> 6389 <path 6390 fill="#34A853" 6391 d="M20.26 33a12.4 12.4 0 0 0 8.6-3.14l-4.22-3.28a7.74 7.74 0 0 1-4.38 1.26 7.76 7.76 0 0 1-7.28-5.36H8.65v3.36A12.99 12.99 0 0 0 20.26 33Z" 6392 /> 6393 <path 6394 fill="#FBBC05" 6395 d="M12.98 22.47a7.79 7.79 0 0 1 0-4.94v-3.36H8.65a12.84 12.84 0 0 0 0 11.66l3.37-2.63.96-.73Z" 6396 /> 6397 <path 6398 fill="#EA4335" 6399 d="M20.26 12.18a7.1 7.1 0 0 1 4.98 1.93l3.72-3.72A12.47 12.47 0 0 0 20.26 7c-5.08 0-9.47 2.92-11.6 7.17l4.32 3.36a7.76 7.76 0 0 1 7.28-5.35Z" 6400 /> 6401</svg>`,S=(0,n.JW)`<svg width="10" height="10" viewBox="0 0 10 10" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> 6402<path d="M4.875 0C3.91082 0 2.96829 0.285914 2.1666 0.821586C1.36491 1.35726 0.740067 2.11863 0.371089 3.00942C0.00211226 3.90021 -0.094429 4.88041 0.093674 5.82607C0.281777 6.77172 0.746076 7.64036 1.42786 8.32215C2.10964 9.00393 2.97828 9.46823 3.92394 9.65633C4.86959 9.84443 5.84979 9.74789 6.74058 9.37891C7.63137 9.00994 8.39274 8.38509 8.92842 7.5834C9.46409 6.78171 9.75 5.83918 9.75 4.875C9.74864 3.58249 9.23458 2.34331 8.32064 1.42936C7.4067 0.515418 6.16751 0.00136492 4.875 0ZM4.6875 2.25C4.79875 2.25 4.90751 2.28299 5.00001 2.3448C5.09251 2.40661 5.16461 2.49446 5.20718 2.59724C5.24976 2.70002 5.2609 2.81312 5.23919 2.92224C5.21749 3.03135 5.16392 3.13158 5.08525 3.21025C5.00658 3.28891 4.90635 3.34249 4.79724 3.36419C4.68813 3.3859 4.57503 3.37476 4.47224 3.33218C4.36946 3.28961 4.28161 3.21751 4.2198 3.12501C4.15799 3.03251 4.125 2.92375 4.125 2.8125C4.125 2.66332 4.18427 2.52024 4.28975 2.41475C4.39524 2.30926 4.53832 2.25 4.6875 2.25ZM5.25 7.5C5.05109 7.5 4.86032 7.42098 4.71967 7.28033C4.57902 7.13968 4.5 6.94891 4.5 6.75V4.875C4.40055 4.875 4.30516 4.83549 4.23484 4.76516C4.16451 4.69484 4.125 4.59946 4.125 4.5C4.125 4.40054 4.16451 4.30516 4.23484 4.23484C4.30516 4.16451 4.40055 4.125 4.5 4.125C4.69891 4.125 4.88968 4.20402 5.03033 4.34467C5.17098 4.48532 5.25 4.67609 5.25 4.875V6.75C5.34946 6.75 5.44484 6.78951 5.51517 6.85983C5.58549 6.93016 5.625 7.02554 5.625 7.125C5.625 7.22446 5.58549 7.31984 5.51517 7.39017C5.44484 7.46049 5.34946 7.5 5.25 7.5Z" fill="#9A9A9A"/> 6403</svg> 6404`,T=(0,n.JW)`<svg width="32" height="32" viewBox="0 0 32 32" fill="none"> 6405<path d="M28.925 5.5425C28.925 5.5425 28.925 5.555 28.925 5.56125L21.65 29.5537C21.5399 29.9434 21.3132 30.2901 21.0004 30.5473C20.6876 30.8045 20.3036 3
64050.9598 19.9 30.9925C19.8425 30.9975 19.785 31 19.7275 31C19.3493 31.0012 18.9786 30.8941 18.6592 30.6915C18.3398 30.4888 18.085 30.199 17.925 29.8563L13.375 20.5187C13.3295 20.4252 13.3143 20.3197 13.3315 20.2171C13.3488 20.1145 13.3976 20.0198 13.4713 19.9463L20.7113 12.7063C20.8909 12.5172 20.9895 12.2654 20.9862 12.0047C20.9829 11.7439 20.8778 11.4948 20.6934 11.3104C20.509 11.126 20.2599 11.0209 19.9991 11.0176C19.7383 11.0142 19.4866 11.1129 19.2975 11.2925L12.0538 18.5325C11.9802 18.6061 11.8855 18.655 11.7829 18.6722C11.6803 18.6895 11.5748 18.6743 11.4813 18.6287L2.13502 14.08C1.76954 13.9047 1.46598 13.6224 1.26454 13.2706C1.06311 12.9189 0.973316 12.5142 1.00707 12.1102C1.04082 11.7063 1.19652 11.3221 1.45354 11.0087C1.71056 10.6952 2.05676 10.4673 2.44627 10.355L26.4388 3.08H26.4575C26.7991 2.98403 27.1601 2.98066 27.5034 3.07025C27.8468 3.15984 28.1601 3.33916 28.4113 3.58981C28.6624 3.84045 28.8424 4.15341 28.9326 4.49656C29.0229 4.83971 29.0203 5.2007 28.925 5.5425Z" fill="currentColor"/> 6406</svg> 6407`,P=(0,n.JW)` <svg width="27" height="30" viewBox="0 0 27 30" fill="none"> 6408 <path d="M12.5395 14.3237L0.116699 27.5049V27.5188C0.251527 28.0177 0.49972 28.4788 0.841941 28.866C1.18416 29.2533 1.61117 29.5563 2.0897 29.7515C2.56823 29.9467 3.08536 30.0287 3.60081 29.9913C4.11625 29.9538 4.61609 29.7979 5.06139 29.5356L5.0975 29.512L19.0718 21.4519L12.5395 14.3237Z" fill="#EA4335"/> 6409 <path d="M25.103 12.0833L25.0919 12.0722L19.0611 8.57202L12.2607 14.6279L19.0847 21.4504L25.0919 17.9864C25.6229 17.6983 26.0665 17.2725 26.376 16.7537C26.6854 16.2349 26.8493 15.6422 26.8505 15.0381C26.8516 14.434 26.6899 13.8408 26.3824 13.3208C26.0749 12.8008 25.633 12.3734 25.103 12.0833Z" fill="#FBBC04"/> 6410 <path d="M0.116672 2.49553C0.047224 2.7761 0 3.05528 0 3.35946V26.6537C0 26.9565 0.0347234 27.237 0.116672 27.5162L12.959 14.6725L0.116672 2.49553Z" fill="#4285F4"/> 6411 <path d="M12.634 15.0001L19.0607 8.57198L5.0975 0.477133C4.65115 0.210463 4.14916 0.0506574 3.63079 0.0102139C3.11242 -0.0302296 2.59172 0.0497852 2.10941 0.244001C1.6271 0.438216 1.19625 0.741368 0.850556 1.12975C0.504864 1.51813 0.253698 1.98121 0.116699 2.48279L12.634 15.0001Z" fill="#34A853"/> 6412</svg>`,O=(0,n.JW)`<svg width="75" height="20" viewBox="0 0 75 20" fill="none" xmlns="http://www.w3.org/2000/svg"> 6413<path d="M11.6666 5.83334C11.6666 2.61168 14.2783 0 17.5 0H25.8334C29.055 0 31.6666 2.61168 31.6666 5.83334V14.1666C31.6666 17.3883 29.055 20 25.8334 20H17.5C14.2783 20 11.6666 17.3883 11.6666 14.1666V5.83334Z" fill="var(--apkt-tokens-theme-foregroundTertiary)"/> 6414<path d="M19.5068 13.7499L22.4309 5.83331H23.2895L20.3654 13.7499H19.5068Z" fill="var(--apkt-tokens-theme-textPrimary)"/> 6415<path d="M0 5.41666C0 2.42513 2.42513 0 5.41666 0C8.40821 0 10.8334 2.42513 10.8334 5.41666V14.5833C10.8334 17.5748 8.40821 20 5.41666 20C2.42513 20 0 17.5748 0 14.5833V5.41666Z" fill="var(--apkt-tokens-theme-foregroundTertiary)"/> 6416<path d="M4.89581 12.4997V11.458H5.93747V12.4997H4.89581Z" fill="var(--apkt-tokens-theme-textPrimary)"/> 6417<path d="M32.5 10C32.5 4.47715 36.6896 0 41.8578 0H65.6422C70.8104 0 75 4.47715 75 10C75 15.5229 70.8104 20 65.6422 20H41.8578C36.6896 20 32.5 15.5229 32.5 10Z" fill="var(--apkt-tokens-theme-foregroundTertiary)"/> 6418<path d="M61.7108 12.4475V7.82751H62.5266V8.52418C62.8199 8.01084 63.4157 7.70834 64.0757 7.70834C65.0749 7.70834 65.7715 8.34084 65.7715 9.56918V12.4475H64.9649V9.61503C64.9649 8.80831 64.5066 8.38668 63.8374 8.38668C63.1132 8.38668 62.5266 8.9642 62.5266 9.78001V12.4475H61.7108Z" fill="var(--apkt-tokens-theme-textPrimary)"/> 6419<path d="M56.5671 12.4475L55.7147 7.82748H56.4846L57.0896 11.6409L57.8871 9.12916H58.6479L59.4363 11.6134L60.0505 7.82748H60.8204L59.9679 12.4475H59.0513L58.2721 10.0458L57.4838 12.4475H56.5671Z" fill="var(--apkt-tokens-theme-textPrimary)"/> 6420<path d="M52.9636 12.5666C51.5611 12.5666 50.7361 11.5217 50.7361 10.1375C50.7361 8.76254 51.5611 7.70834 52.9636 7.70834C54.3661 7.70834 55.1911 8.76254 55.1911 10.1375C55.1911 11.5217 54.3661 12.5666 52.9636 12.5666ZM52.9636 11.8883C53.9719 11.8883 54.357 11.0266 54.357 10.1283C54.357 9.23914 53.9719 8.38668 52.9636 8.38668C51.9552 8.38668 51.5702 9.23914 51.5702 10.1283C51.5702 11.0266 51.9552 11.8883 52.9636 11.8883Z" fill="var(--apkt-tokens-theme-textPrimary)"/> 6421<path d="M47.8507 12.5666C46.494 12.5666 45.6415 11.5308 45.6415 10.1375C45.6415 8.75337 46.494 7.70834 47.8507 7.70834C48.9965 7.70834 50.0048 8.35917 49.8948 10.3483H46.4756C46.5398 11.2009 46.934 11.8975 47.8507 11.8975C48.4648 11.8975 48.8681 11.5217 49.0057 11.0908H49.8123C49.684 11.8609 48.9598 12.5666 47.8507 12.5666ZM46.494 9.73416H49.1065C49.0423 8.80831 48.6114 8.37751 47.8507 8.37751C47.0165 8.37751 46.604 8.98254 46.494 9.73416Z" fill="var(--apkt-tokens-theme-textPrimary)"/> 6422<path d="M41.7284 12.4475V7.82748H42.5625V8.60665C42.8559 8.09332 43.3601 7.82748 43.8825 7.82748H44.9917V8.60665H43.8184C43.0851 8.60665 42.5625 9.08331 42.5625 10.0092V12.4475H41.7284Z" fill="var(--apkt-tokens-theme-textPrimary)"/> 6423</svg> 6424 6425`,_=(0,n.JW)` 6426 <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 8"> 6427 <path 6428 fill="var(--apkt-tokens-theme-textPrimary)" 6429 d="m9.524 6.307-1.51 1.584A.35.35 0 0 1 7.76 8H.604a.178.178 0 0 1-.161-.103.168.168 0 0 1 .033-.186l1.51-1.583a.35.35 0 0 1 .256-.11h7.154c.034 0 .068.01.096.029a.168.168 0 0 1 .032.26Zm-1.51-3.189a.35.35 0 0 0-.255-.109H.604a.178.178 0 0 0-.161.103.168.168 0 0 0 .033.186l1.51 1.583a.35.35 0 0 0 .256.11h7.154a.178.178 0 0 0 .16-.104.168.168 0 0 0-.032-.185l-1.51-1.584ZM.605 1.981H7.76a.357.357 0 0 0 .256-.11L9.525.289a.17.17 0 0 0 .032-.185.173.173 0 0 0-.16-.103H2.241a.357.357 0 0 0-.256.109L.476 1.692a.17.17 0 0 0-.033.185.178.178 0 0 0 .16.103Z" 6430 /> 6431 </svg> 6432`,N=(0,n.JW)`<svg width="32" height="32" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"> 6433 <g clip-path="url(#a)"> 6434 <path fill="url(#b)" d="M0 0h32v32H0z"/> 6435 <path fill-rule="evenodd" clip-rule="evenodd" d="M7.034 15.252c4.975-2.167 8.293-3.596 9.953-4.287 4.74-1.971 5.725-2.314 6.366-2.325.142-.002.457.033.662.198.172.14.22.33.243.463.022.132.05.435.028.671-.257 2.7-1.368 9.248-1.933 12.27-.24 1.28-.71 1.708-1.167 1.75-.99.091-1.743-.655-2.703-1.284-1.502-.985-2.351-1.598-3.81-2.558-1.684-1.11-.592-1.721.368-2.718.252-.261 4.619-4.233 4.703-4.594.01-.045.02-.213-.08-.301-.1-.09-.246-.059-.353-.035-.15.034-2.55 1.62-7.198 4.758-.682.468-1.298.696-1.851.684-.61-.013-1.782-.344-2.653-.628-1.069-.347-1.918-.53-1.845-1.12.039-.308.462-.623 1.27-.944Z" fill="#fff"/> 6436 </g> 6437 <path d="M.5 16C.5 7.44 7.44.5 16 .5 24.56.5 31.5 7.44 31.5 16c0 8.56-6.94 15.5-15.5 15.5C7.44 31.5.5 24.56.5 16Z" stroke="#141414" stroke-opacity=".05"/> 6438 <defs> 6439 <linearGradient id="b" x1="1600" y1="0" x2="1600" y2="3176.27" gradientUnits="userSpaceOnUse"> 6440 <stop stop-color="#2AABEE"/> 6441 <stop offset="1" stop-color="#229ED9"/> 6442 </linearGradient> 6443 <clipPath id="a"> 6444 <path d="M0 16C0 7.163 7.163 0 16 0s16 7.163 16 16-7.163 16-16 16S0 24.837 0 16Z" fill="#fff"/> 6445 </clipPath> 6446 </defs> 6447</svg>`;var k=r(97379);let R=(0,n.JW)` 6448 <svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewB
6448ox="0 0 64 64"> 6449 <path fill="var(--apkt-tokens-theme-textPrimary)" d="M61.55 19.28c-3-2.77-7.15-7-10.53-10l-.2-.14a3.82 3.82 0 0 0-1.11-.62l0 0C41.56 7 3.63-.09 2.89 0a1.4 1.4 0 0 0-.58.22L2.12.37a2.23 2.23 0 0 0-.52.84l-.05.13v.71l0 .11C5.82 14.05 22.68 53 26 62.14c.2.62.58 1.8 1.29 1.86h.16c.38 0 2-2.14 2-2.14S58.41 26.74 61.34 23a9.46 9.46 0 0 0 1-1.48A2.41 2.41 0 0 0 61.55 19.28ZM36.88 23.37 49.24 13.12l7.25 6.68Zm-4.8-.67L10.8 5.26l34.43 6.35ZM34 27.27l21.78-3.51-24.9 30ZM7.91 7 30.3 26 27.06 53.78Z"/> 6450 </svg> 6451`,M=(0,n.JW)`<svg fill="none" viewBox="0 0 40 40"> 6452 <g clip-path="url(#a)"> 6453 <g clip-path="url(#b)"> 6454 <circle cx="20" cy="19.89" r="20" fill="#5A3E85" /> 6455 <g clip-path="url(#c)"> 6456 <path 6457 fill="#fff" 6458 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" 6459 /> 6460 </g> 6461 </g> 6462 </g> 6463 <defs> 6464 <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath> 6465 <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath> 6466 <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath> 6467 </defs> 6468</svg>`,B=(0,n.JW)`<svg fill="none" viewBox="0 0 16 16"> 6469 <path 6470 fill="currentColor" 6471 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" 6472 /> 6473</svg>`,j=(0,n.JW)` 6474<svg xmlns="http://www.w3.org/2000/svg" width="89" height="89" viewBox="0 0 89 89" fill="none"> 6475<path d="M60.0468 39.2502L65.9116 33.3854C52.6562 20.13 36.1858 20.13 22.9304 33.3854L28.7952 39.2502C38.8764 29.169 49.9725 29.169 60.0536 39.2502H60.0468Z" fill="var(--apkt-tokens-theme-textPrimary)"/> 6476<path d="M58.0927 52.9146L44.415 39.2369L30.7373 52.9146L17.0596 39.2369L11.2017 45.0949L30.7373 64.6374L44.415 50.9597L58.0927 64.6374L77.6284 45.0949L71.7704 39.2369L58.0927 52.9146Z" fill="var(--apkt-tokens-theme-textPrimary)"/> 6477</svg>`,U=(0,n.JW)` 6478<svg xmlns="http://www.w3.org/2000/svg" width="89" height="89" viewBox="0 0 89 89" fill="none"> 6479<path d="M60.0468 39.2502L65.9116 33.3854C52.6562 20.13 36.1858 20.13 22.9304 33.3854L28.7952 39.2502C38.8764 29.169 49.9725 29.169 60.0536 39.2502H60.0468Z" fill="var(--apkt-tokens-theme-textInvert)"/> 6480<path d="M58.0927 52.9146L44.415 39.2369L30.7373 52.9146L17.0596 39.2369L11.2017 45.0949L30.7373 64.6374L44.415 50.9597L58.0927 64.6374L77.6284 45.0949L71.7704 39.2369L58.0927 52.9146Z" fill="var(--apkt-tokens-theme-textInvert)"/> 6481</svg>`,$=(0,n.JW)` 6482<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> 6483<g clip-path="url(#clip0_22274_4692)"> 6484<path d="M0 6.64C0 4.17295 0 2.93942 0.525474 2.01817C0.880399 1.39592 1.39592 0.880399 2.01817 0.525474C2.93942 0 4.17295 0 6.64 0H9.36C11.8271 0 13.0606 0 13.9818 0.525474C14.6041 0.880399 15.1196 1.39592 15.4745 2.01817C16 2.93942 16 4.17295 16 6.64V9.36C16 11.8271 16 13.0606 15.4745 13.9818C15.1196 14.6041 14.6041 15.1196 13.9818 15.4745C13.0606 16 11.8271 16 9.36 16H6.64C4.17295 16 2.93942 16 2.01817 15.4745C1.39592 15.1196 0.880399 14.6041 0.525474 13.9818C0 13.0606 0 11.8271 0 9.36V6.64Z" fill="#C7B994"/> 6485<path d="M4.49038 5.76609C6.42869 3.86833 9.5713 3.86833 11.5096 5.76609L11.7429 5.99449C11.8398 6.08938 11.8398 6.24323 11.7429 6.33811L10.9449 7.11942C10.8964 7.16686 10.8179 7.16686 10.7694 7.11942L10.4484 6.80512C9.09617 5.48119 6.90381 5.48119 5.5516 6.80512L5.20782 7.14171C5.15936 7.18915 5.08079 7.18915 5.03234 7.14171L4.23434 6.3604C4.13742 6.26552 4.13742 6.11167 4.23434 6.01678L4.49038 5.76609ZM13.1599 7.38192L13.8702 8.07729C13.9671 8.17217 13.9671 8.32602 13.8702 8.4209L10.6677 11.5564C10.5708 11.6513 10.4137 11.6513 10.3168 11.5564L8.04388 9.33105C8.01965 9.30733 7.98037 9.30733 7.95614 9.33105L5.6833 11.5564C5.58638 11.6513 5.42925 11.6513 5.33234 11.5564L2.12982 8.42087C2.0329 8.32598 2.0329 8.17213 2.12982 8.07724L2.84004 7.38188C2.93695 7.28699 3.09408 7.28699 3.191 7.38188L5.46392 9.60726C5.48815 9.63098 5.52743 9.63098 5.55166 9.60726L7.82447 7.38188C7.92138 7.28699 8.07851 7.28699 8.17543 7.38187L10.4484 9.60726C10.4726 9.63098 10.5119 9.63098 10.5361 9.60726L12.809 7.38192C12.9059 7.28703 13.063 7.28703 13.1599 7.38192Z" fill="currentColor"/> 6486</g> 6487<defs> 6488<clipPath id="clip0_22274_4692"> 6489<path d="M0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8Z" fill="white"/> 6490</clipPath> 6491</defs> 6492</svg> 6493`,L=(0,n.JW)` 6494<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> 6495<circle cx="11" cy="11" r="11" transform="matrix(-1 0 0 1 23 1)" fill="#202020"/> 6496<circle cx="11" cy="11" r="11.5" transform="matrix(-1 0 0 1 23 1)" stroke="#C7B994" stroke-opacity="0.7"/> 6497<path d="M15.4523 11.0686L16.7472 9.78167C13.8205 6.87297 10.1838 6.87297 7.25708 9.78167L8.55201 11.0686C10.7779 8.85645 13.2279 8.85645 15.4538 11.0686H15.4523Z" fill="#C7B994"/> 6498<path d="M15.0199 14.067L12 11.0656L8.98 14.067L5.96004 11.0656L4.66663 12.3511L8.98 16.6393L12 13.638L15.0199 16.6393L19.3333 12.3511L18.0399 11.0656L15.0199 14.067Z" fill="#C7B994"/> 6499</svg> 6500`,D=(0,n.JW)`<svg fill="none" viewBox="0 0 41 40"> 6501 <g clip-path="url(#a)"> 6502 <path fill="#000" d="M.8 0h40v40H.8z" /> 6503 <path 6504 fill="#fff" 6505 d="m22.63 18.46 7.14-8.3h-1.69l-6.2 7.2-4.96-7.2H11.2l7.5 10.9-7.5 8.71h1.7l6.55-7.61 5.23 7.61h5.72l-7.77-11.31Zm-9.13-7.03h2.6l11.98 17.13h-2.6L13.5 11.43Z" 6506 /> 6507 </g>
6508 <defs> 6509 <clipPath id="a"><path fill="#fff" d="M.8 20a20 20 0 1 1 40 0 20 20 0 0 1-40 0Z" /></clipPath> 6510 </defs> 6511</svg>`;var F=r(91392),H=r(46756),z=r(63412);let W=(0,n.AH)` 6512 :host { 6513 display: flex; 6514 justify-content: center; 6515 align-items: center; 6516 aspect-ratio: 1 / 1; 6517 color: var(--local-color); 6518 width: var(--local-width); 6519 } 6520 6521 svg { 6522 height: inherit; 6523 width: inherit; 6524 object-fit: contain; 6525 object-position: center; 6526 } 6527`;var q=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let V={add:"ph-plus",allWallets:"ph-dots-three",arrowBottom:"ph-arrow-down",arrowBottomCircle:"ph-arrow-circle-down",arrowClockWise:"ph-arrow-clockwise",arrowLeft:"ph-arrow-left",arrowRight:"ph-arrow-right",arrowTop:"ph-arrow-up",arrowTopRight:"ph-arrow-up-right",bank:"ph-bank",bin:"ph-trash",browser:"ph-browser",card:"ph-credit-card",checkmarkBold:"ph-check",chevronBottom:"ph-caret-down",chevronLeft:"ph-caret-left",chevronRight:"ph-caret-right",chevronTop:"ph-caret-up",clock:"ph-clock",close:"ph-x",coinPlaceholder:"ph-circle-half",compass:"ph-compass",copy:"ph-copy",desktop:"ph-desktop",dollar:"ph-currency-dollar",download:"ph-vault",exclamationCircle:"ph-warning-circle",extension:"ph-puzzle-piece",externalLink:"ph-arrow-square-out",filters:"ph-funnel-simple",helpCircle:"ph-question",id:"ph-identification-card",image:"ph-image",info:"ph-info",lightbulb:"ph-lightbulb",mail:"ph-envelope",mobile:"ph-device-mobile",more:"ph-dots-three",networkPlaceholder:"ph-globe",nftPlaceholder:"ph-image",plus:"ph-plus",power:"ph-power",qrCode:"ph-qr-code",questionMark:"ph-question",refresh:"ph-arrow-clockwise",recycleHorizontal:"ph-arrows-clockwise",search:"ph-magnifying-glass",sealCheck:"ph-seal-check",send:"ph-paper-plane-right",signOut:"ph-sign-out",spinner:"ph-spinner",swapHorizontal:"ph-arrows-left-right",swapVertical:"ph-arrows-down-up",threeDots:"ph-dots-three",user:"ph-user",verify:"ph-seal-check",verifyFilled:"ph-seal-check",wallet:"ph-wallet",warning:"ph-warning",warningCircle:"ph-warning-circle",appStore:"",apple:"",bitcoin:"",coins:"",chromeStore:"",cursor:"",discord:"",ethereum:"",etherscan:"",facebook:"",farcaster:"",github:"",google:"",playStore:"",paperPlaneTitle:"",reown:"",solana:"",ton:"",tron:"",telegram:"",twitch:"",twitterIcon:"",twitter:"",walletConnect:"",walletConnectBrown:"",walletConnectLightBrown:"",x:"",infoSeal:"",checkmark:""},G={"ph-arrow-circle-down":()=>Promise.all([r.e(8006),r.e(8737)]).then(r.bind(r,58737)),"ph-arrow-clockwise":()=>Promise.all([r.e(8006),r.e(4491)]).then(r.bind(r,14491)),"ph-arrow-down":()=>Promise.all([r.e(8006),r.e(5561)]).then(r.bind(r,55561)),"ph-arrow-left":()=>Promise.all([r.e(8006),r.e(301)]).then(r.bind(r,22682)),"ph-arrow-right":()=>Promise.all([r.e(8006),r.e(1463)]).then(r.bind(r,21463)),"ph-arrow-square-out":()=>Promise.all([r.e(8006),r.e(1662)]).then(r.bind(r,11662)),"ph-arrows-down-up":()=>Promise.all([r.e(8006),r.e(9929)]).then(r.bind(r,49929)),"ph-arrows-left-right":()=>Promise.all([r.e(8006),r.e(4455)]).then(r.bind(r,34455)),"ph-arrow-up":()=>Promise.all([r.e(8006),r.e(8498)]).then(r.bind(r,88498)),"ph-arrow-up-right":()=>Promise.all([r.e(8006),r.e(7022)]).then(r.bind(r,27022)),"ph-arrows-clockwise":()=>Promise.all([r.e(8006),r.e(18)]).then(r.bind(r,80018)),"ph-bank":()=>Promise.all([r.e(8006),r.e(7126)]).then(r.bind(r,4745)),"ph-browser":()=>Promise.all([r.e(8006),r.e(6974)]).then(r.bind(r,76974)),"ph-caret-down":()=>Promise.all([r.e(8006),r.e(8095)]).then(r.bind(r,28095)),"ph-caret-left":()=>Promise.all([r.e(8006),r.e(704)]).then(r.bind(r,30704)),"ph-caret-right":()=>Promise.all([r.e(8006),r.e(1885)]).then(r.bind(r,71885)),"ph-caret-up":()=>Promise.all([r.e(8006),r.e(1396)]).then(r.bind(r,61396)),"ph-check":()=>Promise.all([r.e(8006),r.e(7526)]).then(r.bind(r,87526)),"ph-circle-half":()=>Promise.all([r.e(8006),r.e(5211)]).then(r.bind(r,15211)),"ph-clock":()=>Promise.all([r.e(8006),r.e(9132)]).then(r.bind(r,19132)),"ph-compass":()=>Promise.all([r.e(8006),r.e(9998)]).then(r.bind(r,69998)),"ph-copy":()=>Promise.all([r.e(8006),r.e(6735)]).then(r.bind(r,26735)),"ph-credit-card":()=>Promise.all([r.e(8006),r.e(3002)]).then(r.bind(r,80621)),"ph-currency-dollar":()=>Promise.all([r.e(8006),r.e(4943)]).then(r.bind(r,94943)),"ph-desktop":()=>Promise.all([r.e(8006),r.e(490)]).then(r.bind(r,60490)),"ph-device-mobile":()=>
6527Promise.all([r.e(8006),r.e(1796)]).then(r.bind(r,1796)),"ph-dots-three":()=>Promise.all([r.e(8006),r.e(4742)]).then(r.bind(r,94742)),"ph-vault":()=>Promise.all([r.e(8006),r.e(8158)]).then(r.bind(r,38158)),"ph-envelope":()=>Promise.all([r.e(8006),r.e(1764)]).then(r.bind(r,11764)),"ph-funnel-simple":()=>Promise.all([r.e(8006),r.e(4962)]).then(r.bind(r,4962)),"ph-globe":()=>Promise.all([r.e(8006),r.e(7797)]).then(r.bind(r,47797)),"ph-identification-card":()=>Promise.all([r.e(8006),r.e(7916)]).then(r.bind(r,87916)),"ph-image":()=>Promise.all([r.e(8006),r.e(1373)]).then(r.bind(r,51373)),"ph-info":()=>Promise.all([r.e(8006),r.e(8900)]).then(r.bind(r,8900)),"ph-lightbulb":()=>Promise.all([r.e(8006),r.e(5967)]).then(r.bind(r,35967)),"ph-magnifying-glass":()=>Promise.all([r.e(8006),r.e(1087)]).then(r.bind(r,81087)),"ph-paper-plane-right":()=>Promise.all([r.e(8006),r.e(6824)]).then(r.bind(r,96824)),"ph-plus":()=>Promise.all([r.e(8006),r.e(7332)]).then(r.bind(r,97332)),"ph-power":()=>Promise.all([r.e(8006),r.e(6977)]).then(r.bind(r,26977)),"ph-puzzle-piece":()=>Promise.all([r.e(8006),r.e(5532)]).then(r.bind(r,55532)),"ph-qr-code":()=>Promise.all([r.e(8006),r.e(1462)]).then(r.bind(r,9081)),"ph-question":()=>Promise.all([r.e(8006),r.e(9479)]).then(r.bind(r,81860)),"ph-question-circle":()=>Promise.all([r.e(8006),r.e(739)]).then(r.bind(r,10739)),"ph-seal-check":()=>Promise.all([r.e(8006),r.e(1851)]).then(r.bind(r,11851)),"ph-sign-out":()=>Promise.all([r.e(8006),r.e(8507)]).then(r.bind(r,68507)),"ph-spinner":()=>Promise.all([r.e(8006),r.e(3009)]).then(r.bind(r,63009)),"ph-trash":()=>Promise.all([r.e(8006),r.e(2788)]).then(r.bind(r,22788)),"ph-user":()=>Promise.all([r.e(8006),r.e(277)]).then(r.bind(r,90277)),"ph-wallet":()=>Promise.all([r.e(8006),r.e(2903)]).then(r.bind(r,22903)),"ph-warning":()=>Promise.all([r.e(8006),r.e(4977)]).then(r.bind(r,97358)),"ph-warning-circle":()=>Promise.all([r.e(8006),r.e(7158)]).then(r.bind(r,7158)),"ph-x":()=>Promise.all([r.e(8006),r.e(5158)]).then(r.bind(r,62777))},K={appStore:h,apple:p,bitcoin:f,coins:y,chromeStore:g,cursor:b,discord:w,ethereum:v,etherscan:E,facebook:C,farcaster:A,github:x,google:I,playStore:P,paperPlaneTitle:T,reown:O,solana:_,ton:k._,tron:R,telegram:N,twitch:M,twitter:D,twitterIcon:B,walletConnect:j,walletConnectInvert:U,walletConnectBrown:L,walletConnectLightBrown:$,x:D,infoSeal:S,checkmark:m},Z={"accent-primary":F.f.tokens.core.iconAccentPrimary,"accent-certified":F.f.tokens.core.iconAccentCertified,"foreground-secondary":F.f.tokens.theme.foregroundSecondary,default:F.f.tokens.theme.iconDefault,success:F.f.tokens.core.iconSuccess,error:F.f.tokens.core.iconError,warning:F.f.tokens.core.iconWarning,inverse:F.f.tokens.theme.iconInverse},J=class extends n.WF{constructor(){super(...arguments),this.size="md",this.name="copy",this.weight="bold",this.color="inherit"}render(){this.style.cssText=` 6528 --local-width: ${"inherit"===this.size?"inherit":`var(--apkt-spacing-${({xxs:"2",xs:"3",sm:"3",md:"4",mdl:"5",lg:"5",xl:"6",xxl:"7",inherit:"inherit"})[this.size]})`}; 6529 --local-color: ${"inherit"===this.color?"inherit":Z[this.color]} 6530 `;let e=V[this.name];if(e&&""!==e){let t=G[e];t&&t();let r={_$litStatic$:e,r:o};return d`<${r} size=${(0,a.J)({xxs:"0.5em",xs:"0.75em",sm:"0.75em",md:"1em",mdl:"1.25em",lg:"1.25em",xl:"1.5em",xxl:"1.75em"}[this.size])} weight="${this.weight}"></${r}>`}return K[this.name]||d``}};J.styles=[H.W5,W],q([(0,i.MZ)()],J.prototype,"size",void 0),q([(0,i.MZ)()],J.prototype,"name",void 0),q([(0,i.MZ)()],J.prototype,"weight",void 0),q([(0,i.MZ)()],J.prototype,"color",void 0),J=q([(0,z.E)("wui-icon")],J)},80076:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.blobsToCommitments=function(e){let{kzg:t}=e,r=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),a="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,n.hexToBytes)(e)):e.blobs,s=[];for(let e of a)s.push(Uint8Array.from(t.blobToKzgCommitment(e)));return"bytes"===r?s:s.map(e=>(0,i.bytesToHex)(e))};let n=r(60037),i=r(27083)},80217:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHex=function(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}},80407:(e,t,r)=>{"use strict";r.d(t,{JW:()=>I,XX:()=>W,c0:()=>T,ej:()=>S,ge:()=>H,qy:()=>x,s6:()=>P});let n=globalThis,i=n.trustedTypes,a=i?i.createPolicy("lit-html",{createHTML:e=>e}):void 0,s="$lit$",o=`lit$${Math.random().toFixed(9).slice(2)}$`,l="?"+o,c=`<${l}>`,u=document,d=()=>u.createComment(""),h=e=>null===e||"object"!=typeof e&&"function"!=typeof e,p=Array.isArray,f=e=>
6530p(e)||"function"==typeof e?.[Symbol.iterator],m="[ \n\f\r]",g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,b=/>/g,w=RegExp(`>|${m}(?:([^\\s"'>=/]+)(${m}*=${m}*(?:[^ 6531\f\r"'\`<>=]|("|')|))|$)`,"g"),v=/'/g,E=/"/g,C=/^(?:script|style|textarea|title)$/i,A=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),x=A(1),I=A(2),S=A(3),T=Symbol.for("lit-noChange"),P=Symbol.for("lit-nothing"),O=new WeakMap,_=u.createTreeWalker(u,129);function N(e,t){if(!p(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==a?a.createHTML(t):t}let k=(e,t)=>{let r=e.length-1,n=[],i,a=2===t?"<svg>":3===t?"<math>":"",l=g;for(let t=0;t<r;t++){let r=e[t],u,d,h=-1,p=0;for(;p<r.length&&(l.lastIndex=p,null!==(d=l.exec(r)));)p=l.lastIndex,l===g?"!--"===d[1]?l=y:void 0!==d[1]?l=b:void 0!==d[2]?(C.test(d[2])&&(i=RegExp("</"+d[2],"g")),l=w):void 0!==d[3]&&(l=w):l===w?">"===d[0]?(l=i??g,h=-1):void 0===d[1]?h=-2:(h=l.lastIndex-d[2].length,u=d[1],l=void 0===d[3]?w:'"'===d[3]?E:v):l===E||l===v?l=w:l===y||l===b?l=g:(l=w,i=void 0);let f=l===w&&e[t+1].startsWith("/>")?" ":"";a+=l===g?r+c:h>=0?(n.push(u),r.slice(0,h)+s+r.slice(h)+o+f):r+o+(-2===h?t:f)}return[N(e,a+(e[r]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),n]};class R{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let a=0,c=0,u=e.length-1,h=this.parts,[p,f]=k(e,t);if(this.el=R.createElement(p,r),_.currentNode=this.el.content,2===t||3===t){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=_.nextNode())&&h.length<u;){if(1===n.nodeType){if(n.hasAttributes())for(let e of n.getAttributeNames())if(e.endsWith(s)){let t=f[c++],r=n.getAttribute(e).split(o),i=/([.?@])?(.*)/.exec(t);h.push({type:1,index:a,name:i[2],strings:r,ctor:"."===i[1]?$:"?"===i[1]?L:"@"===i[1]?D:U}),n.removeAttribute(e)}else e.startsWith(o)&&(h.push({type:6,index:a}),n.removeAttribute(e));if(C.test(n.tagName)){let e=n.textContent.split(o),t=e.length-1;if(t>0){n.textContent=i?i.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],d()),_.nextNode(),h.push({type:2,index:++a});n.append(e[t],d())}}}else if(8===n.nodeType)if(n.data===l)h.push({type:2,index:a});else{let e=-1;for(;-1!==(e=n.data.indexOf(o,e+1));)h.push({type:7,index:a}),e+=o.length-1}a++}}static createElement(e,t){let r=u.createElement("template");return r.innerHTML=e,r}}function M(e,t,r=e,n){if(t===T)return t;let i=void 0!==n?r._$Co?.[n]:r._$Cl,a=h(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),void 0===a?i=void 0:(i=new a(e))._$AT(e,r,n),void 0!==n?(r._$Co??=[])[n]=i:r._$Cl=i),void 0!==i&&(t=M(e,i._$AS(e,t.values),i,n)),t}class B{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,n=(e?.creationScope??u).importNode(t,!0);_.currentNode=n;let i=_.nextNode(),a=0,s=0,o=r[0];for(;void 0!==o;){if(a===o.index){let t;2===o.type?t=new j(i,i.nextSibling,this,e):1===o.type?t=new o.ctor(i,o.name,o.strings,this,e):6===o.type&&(t=new F(i,this,e)),this._$AV.push(t),o=r[++s]}a!==o?.index&&(i=_.nextNode(),a++)}return _.currentNode=u,n}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++}}class j{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,n){this.type=2,this._$AH=P,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.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){h(e=M(this,e,t))?e===P||null==e||""===e?(this._$AH!==P&&this._$AR(),this._$AH=P):e!==this._$AH&&e!==T&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):f(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==P&&h(this._$AH)?this._$AA.nextSibling.data=e:this.T(u.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:r}=e,n="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=R.createElement(N(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{let e=new B(n,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=O.get(e.strings);return void 0===t&&O.set(e.strings,t=new R(e)),t}k(e){p(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,n=0;for(let i of e)n===t.length?t.push(r=new j(this.O(d()),this.O(d()),this,this.options)):r=t[n],r._$AI(i),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class U{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,n,i){this.type=1,this._$AH=P,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=i,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=P}_$AI(e,t=this,r,n){let i=this.strings,a=!1;if(void 0===i)(a=!h(e=M(this,e,t,0))||e!==this._$AH&&e!==T)&&(this._$AH=e);else{let n,s,o=e;for(e=i[0],n=0;n<i.length-1;n++)(s=M(this,o[r+n],t,n))===T&&(s=this._$AH[n]),a||=!h(s)||s!==this._$AH[n],s===P?e=P:e!==P&&(e+=(s??"")+i[n+1]
6531),this._$AH[n]=s}a&&!n&&this.j(e)}j(e){e===P?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class $ extends U{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===P?void 0:e}}class L extends U{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==P)}}class D extends U{constructor(e,t,r,n,i){super(e,t,r,n,i),this.type=5}_$AI(e,t=this){if((e=M(this,e,t,0)??P)===T)return;let r=this._$AH,n=e===P&&r!==P||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,i=e!==P&&(r===P||n);n&&this.element.removeEventListener(this.name,this,r),i&&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)}}class F{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){M(this,e)}}let H={M:s,P:o,A:l,C:1,L:k,R:B,D:f,V:M,I:j,H:U,N:L,U:D,B:$,F:F},z=n.litHtmlPolyfillSupport;z?.(R,j),(n.litHtmlVersions??=[]).push("3.3.1");let W=(e,t,r)=>{let n=r?.renderBefore??t,i=n._$litPart$;if(void 0===i){let e=r?.renderBefore??null;n._$litPart$=i=new j(t.insertBefore(d(),e),e,void 0,r??{})}return i._$AI(e),i}},80517:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getChainId=i;let n=r(14972);async function i(e){let t=await e.request({method:"eth_chainId"},{dedupe:!0});return(0,n.hexToNumber)(t)}},80563:(e,t,r)=>{"use strict";function n(){let e=()=>void 0,t=()=>void 0;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}r.d(t,{Y:()=>n})},80779:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownNodeError=t.TipAboveFeeCapError=t.TransactionTypeNotSupportedError=t.IntrinsicGasTooLowError=t.IntrinsicGasTooHighError=t.InsufficientFundsError=t.NonceMaxValueError=t.NonceTooLowError=t.NonceTooHighError=t.FeeCapTooLowError=t.FeeCapTooHighError=t.ExecutionRevertedError=void 0;let n=r(81005),i=r(45226);class a extends i.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,name:"ExecutionRevertedError"})}}t.ExecutionRevertedError=a,Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class s extends i.BaseError{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.formatGwei)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}t.FeeCapTooHighError=s,Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class o extends i.BaseError{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.formatGwei)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}t.FeeCapTooLowError=o,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/});class l extends i.BaseError{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}t.NonceTooHighError=l,Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class c extends i.BaseError{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account. 6532Try increasing the nonce or find the latest nonce with \`getTransactionCount\`.`,{cause:e,name:"NonceTooLowError"})}}t.NonceTooLowError=c,Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class u extends i.BaseError{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}t.NonceMaxValueError=u,Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class d extends i.BaseError{constructor({cause:e}={}){super("The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.",{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."],name:"InsufficientFundsError"})}}t.InsufficientFundsError=d,Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class h extends i.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,name:"IntrinsicGasTooHighError"})}}t.IntrinsicGasTooHighError=h,Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class p extends i.BaseError{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}t.IntrinsicGasTooLowError=p,Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class f extends i.BaseError{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}
6532t.TransactionTypeNotSupportedError=f,Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends i.BaseError{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super(`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,n.formatGwei)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${(0,n.formatGwei)(r)} gwei`:""}).`,{cause:e,name:"TipAboveFeeCapError"})}}t.TipAboveFeeCapError=m,Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class g extends i.BaseError{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}t.UnknownNodeError=g},80783:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},80847:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(18627),s=r(2076);r(6647),r(66803),r(65507);let o=(0,s.AH)` 6533 :host wui-ux-by-reown { 6534 padding-top: 0; 6535 } 6536 6537 :host wui-ux-by-reown.branding-only { 6538 padding-top: ${({spacing:e})=>e["3"]}; 6539 } 6540 6541 a { 6542 text-decoration: none; 6543 color: ${({tokens:e})=>e.core.textAccentPrimary}; 6544 font-weight: 500; 6545 } 6546`;var l=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let c=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.remoteFeatures=a.H.state.remoteFeatures,this.unsubscribe.push(a.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=a.H.state,r=a.H.state.features?.legalCheckbox;return(e||t)&&!r?(0,n.qy)` 6547 <wui-flex flexDirection="column"> 6548 <wui-flex .padding=${["4","3","3","3"]} justifyContent="center"> 6549 <wui-text color="secondary" variant="md-regular" align="center"> 6550 By connecting your wallet, you agree to our <br /> 6551 ${this.termsTemplate()} ${this.andTemplate()} ${this.privacyTemplate()} 6552 </wui-text> 6553 </wui-flex> 6554 ${this.reownBrandingTemplate()} 6555 </wui-flex> 6556 `:(0,n.qy)` 6557 <wui-flex flexDirection="column"> ${this.reownBrandingTemplate(!0)} </wui-flex> 6558 `}andTemplate(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=a.H.state;return e&&t?"and":""}termsTemplate(){let{termsConditionsUrl:e}=a.H.state;return e?(0,n.qy)`<a href=${e} target="_blank" rel="noopener noreferrer" 6559 >Terms of Service</a 6560 >`:null}privacyTemplate(){let{privacyPolicyUrl:e}=a.H.state;return e?(0,n.qy)`<a href=${e} target="_blank" rel="noopener noreferrer" 6561 >Privacy Policy</a 6562 >`:null}reownBrandingTemplate(e=!1){return this.remoteFeatures?.reownBranding?e?(0,n.qy)`<wui-ux-by-reown class="branding-only"></wui-ux-by-reown>`:(0,n.qy)`<wui-ux-by-reown></wui-ux-by-reown>`:null}};c.styles=[o],l([(0,i.wk)()],c.prototype,"remoteFeatures",void 0),c=l([(0,s.EM)("w3m-legal-footer")],c)},80944:(e,t,r)=>{"use strict";function n(e){switch(e){case"processed":case"confirmed":case"finalized":case void 0:return e;case"recent":return"processed";case"single":case"singleGossip":return"confirmed";case"max":case"root":return"finalized";default:return}}r.d(t,{i:()=>n})},81005:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatGwei=function(e,t="wei"){return(0,i.formatUnits)(e,n.gweiUnits[t])};let n=r(9949),i=r(88344)},81124:(e,t)=>{"use strict";async function r(e){return await e.request({method:"txpool_inspect"})}Object.defineProperty(t,"__esModule",{value:!0}),t.inspectTxpool=r},81366:(e,t,r)=>{"use strict";r.d(t,{U6:()=>s,sT:()=>o});var n=r(14663),i=r(89596),a=r(33811);function s(e,t){switch(t){case"base58":return(0,n.g)(e);case"base64":return(0,i.n)(e);case"hex":return(0,a.n)(e);default:throw Error("Unsupported encoding, supported values are: base64, hex")}}function o(e,t=["<",">"]){let[r,n]=t,i=[],a="",s=0;for(let t=0;t<e.length;t++){let o=e[t];if(o===r&&s++,o===n&&s--,0===s&&","===o){i.push(a.trim()),a="";continue}a+=o}return i.push(a.trim()),i}},81557:(e,t,r)=>{"use strict";
6562Object.defineProperty(t,"__esModule",{value:!0}),t.assertCurrentChain=function({chain:e,currentChainId:t}){if(!e)throw new n.ChainNotFoundError;if(t!==e.id)throw new n.ChainMismatchError({chain:e,currentChainId:t})};let n=r(34844)},81701:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawContractError=t.CounterfactualDeploymentFailedError=t.ContractFunctionZeroDataError=t.ContractFunctionRevertedError=t.ContractFunctionExecutionError=t.CallExecutionError=void 0;let n=r(83562),i=r(29414),a=r(51513),s=r(71680),o=r(58089),l=r(61569),c=r(40771),u=r(81005),d=r(82311),h=r(45226),p=r(37412),f=r(44789),m=r(5636);class g extends h.BaseError{constructor(e,{account:t,docsPath:r,chain:i,data:a,gas:s,gasPrice:o,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:h,to:m,value:g,stateOverride:y}){let b=t?(0,n.parseAccount)(t):void 0,w=(0,f.prettyPrint)({from:b?.address,to:m,value:void 0!==g&&`${(0,c.formatEther)(g)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:a,gas:s,gasPrice:void 0!==o&&`${(0,u.formatGwei)(o)} gwei`,maxFeePerGas:void 0!==l&&`${(0,u.formatGwei)(l)} gwei`,maxPriorityFeePerGas:void 0!==d&&`${(0,u.formatGwei)(d)} gwei`,nonce:h});y&&(w+=` 6563${(0,p.prettyStateOverride)(y)}`),super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",w].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}t.CallExecutionError=g;class y extends h.BaseError{constructor(e,{abi:t,args:r,contractAddress:n,docsPath:i,functionName:a,sender:c}){let u=(0,l.getAbiItem)({abi:t,args:r,name:a}),d=u?(0,o.formatAbiItemWithArgs)({abiItem:u,args:r,includeFunctionName:!1,includeName:!1}):void 0,h=u?(0,s.formatAbiItem)(u,{includeName:!0}):void 0,p=(0,f.prettyPrint)({address:n&&(0,m.getContractAddress)(n),function:h,args:d&&"()"!==d&&`${[...Array(a?.length??0).keys()].map(()=>" ").join("")}${d}`,sender:c});super(e.shortMessage||`An unknown error occurred while executing the contract function "${a}".`,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],p&&"Contract Call:",p].filter(Boolean),name:"ContractFunctionExecutionError"}),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}),this.abi=t,this.args=r,this.cause=e,this.contractAddress=n,this.functionName=a,this.sender=c}}t.ContractFunctionExecutionError=y;class b extends h.BaseError{constructor({abi:e,data:t,functionName:r,message:n,cause:l}){let c,u,h,p,f;if(t&&"0x"!==t)try{let{abiItem:r,errorName:n,args:c}=u=(0,a.decodeErrorResult)({abi:e,data:t,cause:l});if("Error"===n)p=c[0];else if("Panic"===n){let[e]=c;p=i.panicReasons[e]}else{let e=r?(0,s.formatAbiItem)(r,{includeName:!0}):void 0,t=r&&c?(0,o.formatAbiItemWithArgs)({abiItem:r,args:c,includeFunctionName:!1,includeName:!1}):void 0;h=[e?`Error: ${e}`:"",t&&"()"!==t?` ${[...Array(n?.length??0).keys()].map(()=>" ").join("")}${t}`:""]}}catch(e){c=e}else n&&(p=n);c instanceof d.AbiErrorSignatureNotFoundError&&(f=c.signature,h=[`Unable to decode signature "${f}" 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://4byte.sourcify.dev/?q=${f}.`]),super(p&&"execution reverted"!==p||f?[`The contract function "${r}" reverted with the following ${f?"signature":"reason"}:`,p||f].join("\n"):`The contract function "${r}" reverted.`,{cause:c??l,metaMessages:h,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{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.raw=t,this.reason=p,this.signature=f}}t.ContractFunctionRevertedError=b;class w extends h.BaseError{constructor({functionName:e,cause:t}){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."],name:"ContractFunctionZeroDataError",cause:t})}}t.ContractFunctionZeroDataError=w;class v extends h.BaseError{constructor({factory:e}){super(`Deployment for counterfactual contract call failed${e?` for factory "${e}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}t.CounterfactualDeploymentFailedError=v;class E extends h.BaseError{constructor({data:e,message:t}){super(t||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}t.RawContractError=E},81742:(e,t,r)=>{"use strict";r.d(t,{C:()=>a});let n="2.55.1",i={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${n}`};
6563class a extends Error{constructor(e,t={}){let r=t.cause instanceof a?t.cause.details:t.cause?.message?t.cause.message:t.details,s=t.cause instanceof a&&t.cause.docsPath||t.docsPath,o=i.getDocsUrl?.({...t,docsPath:s});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...o?[`Docs: ${o}`]:[],...r?[`Details: ${r}`]:[],...i.version?[`Version: ${i.version}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),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,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=s,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=n}walk(e){return function e(t,r){return r?.(t)?t:t&&"object"==typeof t&&"cause"in t&&void 0!==t.cause?e(t.cause,r):r?null:t}(this,e)}}},81767:(e,t,r)=>{"use strict";r.d(t,{MZ:()=>n.M,wk:()=>i.w});var n=r(77009),i=r(66889)},81846:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wNAF=function(e,t){return{constTimeNegate:o,hasPrecomputes:e=>1!==m(e),unsafeLadder(t,r,n=e.ZERO){let i=t;for(;r>a;)r&s&&(n=n.add(i)),i=i.double(),r>>=s;return n},precomputeWindow(e,r){let{windows:n,windowSize:i}=c(r,t),a=[],s=e,o=s;for(let e=0;e<n;e++){o=s,a.push(o);for(let e=1;e<i;e++)o=o.add(s),a.push(o);s=o.double()}return a},wNAF(r,n,i){let a=e.ZERO,s=e.BASE,l=c(r,t);for(let e=0;e<l.windows;e++){let{nextN:t,offset:r,isZero:c,isNeg:d,isNegF:h,offsetF:p}=u(i,e,l);i=t,c?s=s.add(o(h,n[p])):a=a.add(o(d,n[r]))}return{p:a,f:s}},wNAFUnsafe(r,n,i,s=e.ZERO){let o=c(r,t);for(let e=0;e<o.windows&&i!==a;e++){let{nextN:t,offset:r,isZero:a,isNeg:l}=u(i,e,o);if(i=t,!a){let e=n[r];s=s.add(l?e.negate():e)}}return s},getPrecomputes(e,t,r){let n=p.get(t);return n||(n=this.precomputeWindow(t,e),1!==e&&p.set(t,r(n))),n},wNAFCached(e,t,r){let n=m(e);return this.wNAF(n,this.getPrecomputes(n,e,r),t)},wNAFCachedUnsafe(e,t,r,n){let i=m(e);return 1===i?this.unsafeLadder(e,t,n):this.wNAFUnsafe(i,this.getPrecomputes(i,e,r),t,n)},setWindowSize(e,r){l(r,t),f.set(e,r),p.delete(e)}}},t.pippenger=function(e,t,r,n){d(r,e),h(n,t);let a=r.length,s=n.length;if(a!==s)throw Error("arrays of points and scalars must have equal length");let o=e.ZERO,l=(0,i.bitLen)(BigInt(a)),c=1;l>12?c=l-3:l>4?c=l-2:l>0&&(c=2);let u=(0,i.bitMask)(c),p=Array(Number(u)+1).fill(o),f=Math.floor((t.BITS-1)/c)*c,m=o;for(let e=f;e>=0;e-=c){p.fill(o);for(let t=0;t<s;t++){let i=Number(n[t]>>BigInt(e)&u);p[i]=p[i].add(r[t])}let t=o;for(let e=p.length-1,r=o;e>0;e--)r=r.add(p[e]),t=t.add(r);if(m=m.add(t),0!==e)for(let e=0;e<c;e++)m=m.double()}return m},t.precomputeMSMUnsafe=function(e,t,r,n){l(n,t.BITS),d(r,e);let a=e.ZERO,s=2**n-1,o=Math.ceil(t.BITS/n),c=(0,i.bitMask)(n),u=r.map(e=>{let t=[];for(let r=0,n=e;r<s;r++)t.push(n),n=n.add(e);return t});return e=>{if(h(e,t),e.length>r.length)throw Error("array of scalars must be smaller than array of points");let i=a;for(let t=0;t<o;t++){if(i!==a)for(let e=0;e<n;e++)i=i.double();let r=BigInt(o*n-(t+1)*n);for(let t=0;t<e.length;t++){let n=Number(e[t]>>r&c);n&&(i=i.add(u[t][n-1]))}}return i}},t.validateBasic=function(e){return(0,n.validateField)(e.Fp),(0,i.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(e.n,e.nBitLength),...e,...{p:e.Fp.ORDER}})};let n=r(83935),i=r(56196),a=BigInt(0),s=BigInt(1);function o(e,t){let r=t.negate();return e?r:t}function l(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function c(e,t){l(e,t);let r=Math.ceil(t/e)+1,n=2**(e-1),a=2**e;return{windows:r,windowSize:n,mask:(0,i.bitMask)(e),maxNumber:a,shiftBy:BigInt(e)}}function u(e,t,r){let{windowSize:n,mask:i,maxNumber:a,shiftBy:o}=r,l=Number(e&i),c=e>>o;l>n&&(l-=a,c+=s);let u=t*n,d=u+Math.abs(l)-1,h=0===l;return{nextN:c,offset:d,isZero:h,isNeg:l<0,isNegF:t%2!=0,offsetF:u}}function d(e,t){if(!Array.isArray(e))throw Error("array expected");e.forEach((e,r)=>{if(!(e instanceof t))throw Error("invalid point at index "+r)})}function h(e,t){if(!Array.isArray(e))throw Error("array of scalars expected");e.forEach((e,r)=>{if(!t.isValid(e))throw Error("invalid scalar at index "+r)})}let p=new WeakMap,f=new WeakMap;function m(e){return f.get(e)||1}},81920:(e,t,r)=>{"use strict";r.d(t,{Db:()=>l,oU:()=>c,tM:()=>o});var n=r(57873),i=r(31480),a=r(55036);let s=(void 0!==a&&void 0!==a.env?a.env.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",o=[{label:"Meld.io",name:"meld",feeRange:"1-2%",url:"https://meldcrypto.com",supportedChains:["eip155","solana"]}],l="WXETMuFUQmqqybHuRkSgxv:25B8LJHSfpG6LVjR2ytU5Cwh7Z4Sch2ocoU",c={FOUR_MINUTES_MS:24e4,TEN_SEC_MS:1e4,FIVE_SEC_MS:5e3,THREE_SEC_MS:3e3,ONE_SEC_MS:1e3,SECURE_SITE:s,SECURE_SITE_DASHBOARD:`${s}/dashboard`,SECURE_SITE_FAVICON:`${s}/images/favicon.png`,SOLANA_NATIVE_TOKEN_ADDRESS:"So11111111111111111111111111111111111111111",RESTRICTED_TIMEZONES:["ASIA/SHANGHAI","ASIA/URUMQI","ASIA/CHONGQING","ASIA/HARBIN","ASIA/KASHGAR","ASIA/MACAU","ASIA/HONG_KONG","ASIA/MACAO","ASIA/BEIJING","ASIA/HARBIN"],SWAP_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"],SWAP_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","METAL","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"],SUGGESTED_TOKENS_BY_CHAIN:{"eip155:42161":["USDâ®0"]},BALANCE_SUPPORTED_CHAINS:[n.o.CHAIN.EVM,n.o.CHAIN.SOLANA],SEND_PARAMS_SUPPORTED_CHAINS:[n.o.CHAIN.EVM],SWAP_SUPPORTED_NETWORKS:["eip155:1","eip155:42161","eip155:10","eip155:324","eip155:8453","eip155:
656356","eip155:137","eip155:100","eip155:43114","eip155:250","eip155:8217","eip155:1313161554"],NAMES_SUPPORTED_CHAIN_NAMESPACES:[n.o.CHAIN.EVM],ONRAMP_SUPPORTED_CHAIN_NAMESPACES:[n.o.CHAIN.EVM,n.o.CHAIN.SOLANA],PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES:[n.o.CHAIN.EVM,n.o.CHAIN.SOLANA],ACTIVITY_ENABLED_CHAIN_NAMESPACES:[n.o.CHAIN.EVM,n.o.CHAIN.TON],NATIVE_TOKEN_ADDRESS:{eip155:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",solana:"So11111111111111111111111111111111111111111",polkadot:"0x",bip122:"0x",cosmos:"0x",sui:"0x",stacks:"0x",ton:"0x",tron:"0x"},CONVERT_SLIPPAGE_TOLERANCE:1,CONNECT_LABELS:{MOBILE:"Open and continue in the wallet app",WEB:"Open and continue in the wallet app"},SEND_SUPPORTED_NAMESPACES:[n.o.CHAIN.EVM,n.o.CHAIN.SOLANA],DEFAULT_REMOTE_FEATURES:{swaps:["1inch"],onramp:["meld"],email:!0,socials:["google","x","discord","farcaster","github","apple","facebook"],activity:!0,reownBranding:!0,multiWallet:!1,emailCapture:!1,payWithExchange:!1,payments:!1,reownAuthentication:!1,headless:!1},DEFAULT_REMOTE_FEATURES_DISABLED:{email:!1,socials:!1,swaps:!1,onramp:!1,activity:!1,reownBranding:!1,emailCapture:!1,reownAuthentication:!1,headless:!1},DEFAULT_FEATURES:{receive:!0,send:!0,emailShowWallets:!0,connectorTypeOrder:["walletConnect","recent","injected","featured","custom","external","recommended"],analytics:!0,allWallets:!0,legalCheckbox:!1,smartSessions:!1,collapseWallets:!1,walletFeaturesOrder:["onramp","swaps","receive","send"],connectMethodsOrder:void 0,pay:!1,reownAuthentication:!1,headless:!1},DEFAULT_SOCIALS:["google","x","farcaster","discord","apple","github","facebook"],DEFAULT_ACCOUNT_TYPES:{bip122:"payment",eip155:"smartAccount",polkadot:"eoa",solana:"eoa",ton:"eoa",tron:"eoa"},ADAPTER_TYPES:{UNIVERSAL:"universal",SOLANA:"solana",WAGMI:"wagmi",ETHERS:"ethers",ETHERS5:"ethers5",BITCOIN:"bitcoin"},SIWX_DEFAULTS:{signOutOnDisconnect:!0},MANDATORY_WALLET_IDS_ON_MOBILE:[i.L.ConnectorExplorerIds[n.o.CONNECTOR_ID.COINBASE],i.L.ConnectorExplorerIds[n.o.CONNECTOR_ID.COINBASE_SDK],i.L.ConnectorExplorerIds[n.o.CONNECTOR_ID.BASE_ACCOUNT],i.L.ConnectorExplorerIds[n.o.SOLFLARE_CONNECTOR_NAME],i.L.ConnectorExplorerIds[n.o.PHANTOM_CONNECTOR_NAME],i.L.ConnectorExplorerIds[n.o.BINANCE_CONNECTOR_NAME]],DEFAULT_CONNECT_METHOD_ORDER:["email","social","wallet"]}},81983:(e,t,r)=>{"use strict";r.d(t,{j:()=>w});var n=r(20801),i=r(7105),a=r(73329),s=r(97013),o=r(11001),l=r(27942),c=r(24145),u=r(72391),d=r(1231),h=r(18181);function p(){return(p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var y=a.x.extend({defaultProps:{__TYPE:"OverlayPanel",id:null,dismissable:!0,showCloseIcon:!1,closeIcon:null,style:null,className:null,appendTo:null,breakpoints:null,ariaCloseLabel:null,transitionOptions:null,onShow:null,onHide:null,children:void 0,closeOnEscape:!0},css:{classes:{root:function(e){e.props;var t=e.context;return(0,h.xW)("p-overlaypanel p-component",{"p-input-filled":t&&"filled"===t.inputStyle||"filled"===i.Ay.inputStyle,"p-ripple-disabled":t&&!1===t.ripple||!1===i.Ay.ripple})},closeIcon:"p-overlaypanel-close-icon",closeButton:"p-overlaypanel-close p-link",content:"p-overlaypanel-content",transition:"p-overlaypanel"},styles:'\n@layer primereact {\n .p-overlaypanel {\n position: absolute;\n margin-top: 10px;\n /* Github #3122: Prevent animation flickering */\n top: -9999px;\n left: -9999px;\n }\n \n .p-overlaypanel-flipped {\n margin-top: -10px;\n margin-bottom: 10px;\n }\n \n .p-overlaypanel-close {\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n \n /* Animation */\n .p-overlaypanel-enter {\n opacity: 0;\n transform: scaleY(0.8);\n }\n \n .p-overlaypanel-enter-active {\n opacity: 1;\n transform: scaleY(1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-overlaypanel-enter-done {\n transform: none;\n }\n \n .p-overlaypanel-exit {\n opacity: 1;\n }\n \n .p-overlaypanel-exit-active {\n opacity: 0;\n transition: opacity .1s linear;\n }\n \n .p-overlaypanel:after, .p-overlaypanel:before {\n bottom: 100%;\n left: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n }\n \n .p-overlaypanel:after {\n border-width: 8px;\n margin-left: -8px;\n }\n \n .p-overlaypanel:before {\n border-width: 10px;\n margin-left: -10px;\n }\n \n .p-overlaypanel-flipped:after, .p-overlaypanel-flipped:before {\n bottom: auto;\n top: 100%;\n }\n \n .p-overlaypanel.p-overlaypanel-flipped:after {\n border-bottom-color: transparent;\n }\n \n .p-overlaypanel.p-overlaypanel-flipped:before {\n border-bottom-color: transparent\n }\n}\n'}});function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}
6563var w=n.forwardRef(function(e,t){var r,m,w,v,E,C,A,x,I=(0,o.qV)(),S=n.useContext(i.UM),T=y.getProps(e,S),P=g(n.useState(!1),2),O=P[0],_=P[1],N=y.setMetaData({props:T,state:{visible:O}}),k=N.ptm,R=N.cx;N.sx;var M=N.isUnstyled;(0,a.j)(y.css.styles,M,{name:"overlaypanel"});var B=n.useRef(""),j=n.useRef(null),U=n.useRef(null),$=n.useRef(!1),L=n.useRef(null),D=n.useRef(null),F=g((0,o.ct)({target:U,overlay:j,listener:function(e,t){var r=t.type;t.valid&&("outside"===r?(T.dismissable&&!$.current&&Y(),$.current=!1):S.hideOverlaysOnDocumentScrolling?Y():h.DV.isDocument(e.target)||Q())},when:O}),2),H=F[0],z=F[1],W=O&&T.closeOnEscape,q=(0,o.qb)("overlay-panel",W);(0,o.ai)({callback:function(){Y()},when:W&&q,priority:[o.$i.OVERLAY_PANEL,q]});var V=function(e){Y(),e.preventDefault()},G=function(e){$.current=!0,c.s.emit("overlay-click",{originalEvent:e,target:U.current})},K=function(){$.current=!0},Z=function(e,t){if(O)Y(),null!=U.current&&U.current!==(t||e.currentTarget||e.target)&&(U.current=t||e.currentTarget||e.target,setTimeout(function(){J(e,U.current)},200));else J(e,t)},J=function(e,t){U.current=t||e.currentTarget||e.target,O?Q():(_(!0),D.current=function(e){var t;t=e.target,j&&j.current&&!(j.current.isSameNode(t)||j.current.contains(t))||($.current=!0)},c.s.on("overlay-click",D.current))},Y=function(){_(!1),c.s.off("overlay-click",D.current),D.current=null},Q=function(){if(U.current&&j.current){h.DV.absolutePosition(j.current,U.current);var e=h.DV.getOffset(j.current),t=h.DV.getOffset(U.current),r=0;e.left<t.left&&(r=t.left-e.left),j.current.style.setProperty("--overlayArrowLeft","".concat(r,"px")),e.top<t.top?(j.current.setAttribute("data-p-overlaypanel-flipped","true"),M&&h.DV.addClass(j.current,"p-overlaypanel-flipped")):(j.current.setAttribute("data-p-overlaypanel-flipped","false"),M&&h.DV.removeClass(j.current,"p-overlaypanel-flipped"))}},X=function(){if(!L.current){L.current=h.DV.createInlineStyle(S&&S.nonce||i.Ay.nonce,S&&S.styleContainer);var e="";for(var t in T.breakpoints)e+="\n @media screen and (max-width: ".concat(t,") {\n .p-overlaypanel[").concat(B.current,"] {\n width: ").concat(T.breakpoints[t],";\n }\n }\n ");L.current.innerHTML=e}};(0,o.uU)(function(){B.current=(0,h._Y)(),T.breakpoints&&X()}),(0,o.l0)(function(){L.current=h.DV.removeInlineStyle(L.current),D.current&&(c.s.off("overlay-click",D.current),D.current=null),h.Q$.clear(j.current)}),n.useImperativeHandle(t,function(){return{props:T,toggle:Z,show:J,hide:Y,align:Q,isVisible:function(){return O},getElement:function(){return j.current}}});var ee=(r=I({className:R("closeIcon"),"aria-hidden":!0},k("closeIcon")),m=T.closeIcon||n.createElement(l.A,r),w=h.Hj.getJSXIcon(m,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach(function(t){!function(e,t,r){var n;(n=function(e,t){if("object"!=f(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=f(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==f(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},r),{props:T}),v=I({type:"button",className:R("closeButton"),onClick:function(e){return V(e)},"aria-label":T.ariaCloseLabel||(0,i.Y4)("close")},k("closeButton")),E=T.showCloseIcon?n.createElement("button",v,w,n.createElement(d.n,null)):null,C=I({id:T.id,className:(0,h.xW)(T.className,R("root",{context:S})),style:T.style,onClick:function(e){return G(e)}},y.getOtherProps(T),k("root")),A=I({className:R("content"),onClick:function(e){return K()},onMouseDown:K},y.getOtherProps(T),k("content")),x=I({classNames:R("transition"),in:O,timeout:{enter:120,exit:100},options:T.transitionOptions,unmountOnExit:!0,onEnter:function(){j.current.setAttribute(B.current,""),h.Q$.set("overlay",j.current,S&&S.autoZIndex||i.Ay.autoZIndex,S&&S.zIndex.overlay||i.Ay.zIndex.overlay),h.DV.addStyles(j.current,{position:"absolute",top:"0",left:"0"}),Q()},onEntered:function(){H(),T.onShow&&T.onShow()},onExit:function(){z()},onExited:function(){h.Q$.clear(j.current),T.onHide&&T.onHide()}},k("transition")),n.createElement(s.B,p({nodeRef:j},x),n.createElement("div",p({ref:j},C),n.createElement("div",A,T.children),E)));return n.createElement(u.Z,{element:ee,appendTo:T.appendTo})});w.displayName="OverlayPanel"},82104:(e,t,r)=>{"use strict";
vendor: 3,349 bytes, line 6563
6563Object.defineProperty(t,"__esModule",{value:!0}),t.sha512_224=t.sha512_256=t.sha384=t.sha512=t.sha224=t.sha256=t.SHA512_256=t.SHA512_224=t.SHA384=t.SHA512=t.SHA224=t.SHA256=void 0;let n=r(57568),i=r(63386),a=r(92565),s=Uint32Array.from([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),o=new Uint32Array(64);class l extends n.HashMD{constructor(e=32){super(64,e,8,!1),this.A=0|n.SHA256_IV[0],this.B=0|n.SHA256_IV[1],this.C=0|n.SHA256_IV[2],this.D=0|n.SHA256_IV[3],this.E=0|n.SHA256_IV[4],this.F=0|n.SHA256_IV[5],this.G=0|n.SHA256_IV[6],this.H=0|n.SHA256_IV[7]}get(){let{A:e,B:t,C:r,D:n,E:i,F:a,G:s,H:o}=this;return[e,t,r,n,i,a,s,o]}set(e,t,r,n,i,a,s,o){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|a,this.G=0|s,this.H=0|o}process(e,t){for(let r=0;r<16;r++,t+=4)o[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=o[e-15],r=o[e-2],n=(0,a.rotr)(t,7)^(0,a.rotr)(t,18)^t>>>3,i=(0,a.rotr)(r,17)^(0,a.rotr)(r,19)^r>>>10;o[e]=i+o[e-7]+n+o[e-16]|0}let{A:r,B:i,C:l,D:c,E:u,F:d,G:h,H:p}=this;for(let e=0;e<64;e++){let t=p+((0,a.rotr)(u,6)^(0,a.rotr)(u,11)^(0,a.rotr)(u,25))+(0,n.Chi)(u,d,h)+s[e]+o[e]|0,f=((0,a.rotr)(r,2)^(0,a.rotr)(r,13)^(0,a.rotr)(r,22))+(0,n.Maj)(r,i,l)|0;p=h,h=d,d=u,u=c+t|0,c=l,l=i,i=r,r=t+f|0}r=r+this.A|0,i=i+this.B|0,l=l+this.C|0,c=c+this.D|0,u=u+this.E|0,d=d+this.F|0,h=h+this.G|0,p=p+this.H|0,this.set(r,i,l,c,u,d,h,p)}roundClean(){(0,a.clean)(o)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,a.clean)(this.buffer)}}t.SHA256=l;class c extends l{constructor(){super(28),this.A=0|n.SHA224_IV[0],this.B=0|n.SHA224_IV[1],this.C=0|n.SHA224_IV[2],this.D=0|n.SHA224_IV[3],this.E=0|n.SHA224_IV[4],this.F=0|n.SHA224_IV[5],this.G=0|n.SHA224_IV[6],this.H=0|n.SHA224_IV[7]}}t.SHA224=c;let u=i.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
65635771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),d=u[0],h=u[1],p=new Uint32Array(80),f=new Uint32Array(80);class m extends n.HashMD{constructor(e=64){super(128,e,16,!1),this.Ah=0|n.SHA512_IV[0],this.Al=0|n.SHA512_IV[1],this.Bh=0|n.SHA512_IV[2],this.Bl=0|n.SHA512_IV[3],this.Ch=0|n.SHA512_IV[4],this.Cl=0|n.SHA512_IV[5],this.Dh=0|n.SHA512_IV[6],this.Dl=0|n.SHA512_IV[7],this.Eh=0|n.SHA512_IV[8],this.El=0|n.SHA512_IV[9],this.Fh=0|n.SHA512_IV[10],this.Fl=0|n.SHA512_IV[11],this.Gh=0|n.SHA512_IV[12],this.Gl=0|n.SHA512_IV[13],this.Hh=0|n.SHA512_IV[14],this.Hl=0|n.SHA512_IV[15]}get(){let{Ah:e,Al:t,Bh:r,Bl:n,Ch:i,Cl:a,Dh:s,Dl:o,Eh:l,El:c,Fh:u,Fl:d,Gh:h,Gl:p,Hh:f,Hl:m}=this;return[e,t,r,n,i,a,s,o,l,c,u,d,h,p,f,m]}set(e,t,r,n,i,a,s,o,l,c,u,d,h,p,f,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|a,this.Dh=0|s,this.Dl=0|o,this.Eh=0|l,this.El=0|c,this.Fh=0|u,this.Fl=0|d,this.Gh=0|h,this.Gl=0|p,this.Hh=0|f,this.Hl=0|m}process(e,t){for(let r=0;r<16;r++,t+=4)p[r]=e.getUint32(t),f[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=0|p[e-15],r=0|f[e-15],n=i.rotrSH(t,r,1)^i.rotrSH(t,r,8)^i.shrSH(t,r,7),a=i.rotrSL(t,r,1)^i.rotrSL(t,r,8)^i.shrSL(t,r,7),s=0|p[e-2],o=0|f[e-2],l=i.rotrSH(s,o,19)^i.rotrBH(s,o,61)^i.shrSH(s,o,6),c=i.rotrSL(s,o,19)^i.rotrBL(s,o,61)^i.shrSL(s,o,6),u=i.add4L(a,c,f[e-7],f[e-16]),d=i.add4H(u,n,l,p[e-7],p[e-16]);p[e]=0|d,f[e]=0|u}let{Ah:r,Al:n,Bh:a,Bl:s,Ch:o,Cl:l,Dh:c,Dl:u,Eh:m,El:g,Fh:y,Fl:b,Gh:w,Gl:v,Hh:E,Hl:C}=this;for(let e=0;e<80;e++){let t=i.rotrSH(m,g,14)^i.rotrSH(m,g,18)^i.rotrBH(m,g,41),A=i.rotrSL(m,g,14)^i.rotrSL(m,g,18)^i.rotrBL(m,g,41),x=m&y^~m&w,I=g&b^~g&v,S=i.add5L(C,A,I,h[e],f[e]),T=i.add5H(S,E,t,x,d[e],p[e]),P=0|S,O=i.rotrSH(r,n,28)^i.rotrBH(r,n,34)^i.rotrBH(r,n,39),_=i.rotrSL(r,n,28)^i.rotrBL(r,n,34)^i.rotrBL(r,n,39),N=r&a^r&o^a&o,k=n&s^n&l^s&l;E=0|w,C=0|v,w=0|y,v=0|b,y=0|m,b=0|g,({h:m,l:g}=i.add(0|c,0|u,0|T,0|P)),c=0|o,u=0|l,o=0|a,l=0|s,a=0|r,s=0|n;let R=i.add3L(P,_,k);r=i.add3H(R,T,O,N),n=0|R}({h:r,l:n}=i.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:a,l:s}=i.add(0|this.Bh,0|this.Bl,0|a,0|s)),({h:o,l:l}=i.add(0|this.Ch,0|this.Cl,0|o,0|l)),({h:c,l:u}=i.add(0|this.Dh,0|this.Dl,0|c,0|u)),({h:m,l:g}=i.add(0|this.Eh,0|this.El,0|m,0|g)),({h:y,l:b}=i.add(0|this.Fh,0|this.Fl,0|y,0|b)),({h:w,l:v}=i.add(0|this.Gh,0|this.Gl,0|w,0|v)),({h:E,l:C}=i.add(0|this.Hh,0|this.Hl,0|E,0|C)),this.set(r,n,a,s,o,l,c,u,m,g,y,b,w,v,E,C)}roundClean(){(0,a.clean)(p,f)}destroy(){(0,a.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}t.SHA512=m;class g extends m{constructor(){super(48),this.Ah=0|n.SHA384_IV[0],this.Al=0|n.SHA384_IV[1],this.Bh=0|n.SHA384_IV[2],this.Bl=0|n.SHA384_IV[3],this.Ch=0|n.SHA384_IV[4],this.Cl=0|n.SHA384_IV[5],this.Dh=0|n.SHA384_IV[6],this.Dl=0|n.SHA384_IV[7],this.Eh=0|n.SHA384_IV[8],this.El=0|n.SHA384_IV[9],this.Fh=0|n.SHA384_IV[10],this.Fl=0|n.SHA384_IV[11],this.Gh=0|n.SHA384_IV[12],this.Gl=0|n.SHA384_IV[13],this.Hh=0|n.SHA384_IV[14],this.Hl=0|n.SHA384_IV[15]}}t.SHA384=g;let y=Uint32Array.from([0x8c3d37c8,0x19544da2,0x73e19966,0x89dcd4d6,0x1dfab7ae,0x32ff9c82,0x679dd514,0x582f9fcf,0xf6d2b69,0x7bd44da8,0x77e36f73,0x4c48942,0x3f9d85a8,0x6a1d36c8,0x1112e6ad,0x91d692a1]),b=Uint32Array.from([0x22312194,0xfc2bf72c,0x9f555fa3,0xc84c64c2,0x2393b86b,0x6f53b151,0x96387719,0x5940eabd,0x96283ee2,0xa88effe3,0xbe5e1e25,0x53863992,0x2b0199fc,0x2c85b8aa,0xeb72ddc,0x81c52ca2]);class w extends m{constructor(){super(28),this.Ah=0|y[0],this.Al=0|y[1],this.Bh=0|y[2],this.Bl=0|y[3],this.Ch=0|y[4],this.Cl=0|y[5],this.Dh=0|y[6],this.Dl=0|y[7],this.Eh=0|y[8],this.El=0|y[9],this.Fh=0|y[10],this.Fl=0|y[11],this.Gh=0|y[12],this.Gl=0|y[13],this.Hh=0|y[14],this.Hl=0|y[15]}}t.SHA512_224=w;class v extends m{constructor(){super(32),this.Ah=0|b[0],this.Al=0|b[1],this.Bh=0|b[2],this.Bl=0|b[3],this.Ch=0|b[4],this.Cl=0|b[5],this.Dh=0|b[6],this.Dl=0|b[7],this.Eh=0|b[8],this.El=0|b[9],this.Fh=0|b[10],this.Fl=0|b[11],this.Gh=0|b[12],this.Gl=0|b[13],this.Hh=0|b[14],this.Hl=0|b[15]}}t.SHA512_256=v,t.sha256=(0,a.createHasher)(()=>new l),t.sha224=(0,a.createHasher)(()=>new c),t.sha512=(0,a.createHasher)(()=>new m),t.sha384=(0,a.createHasher)(()=>new g),t.sha512_256=(0,a.createHasher)(()=>new v),t.sha512_224=(0,a.createHasher)(()=>new w)},82238:(e,t,r)=>{"use strict";
6563Object.defineProperty(t,"__esModule",{value:!0}),t.decodeParameter=c,t.decodeAddress=u,t.decodeArray=d,t.decodeBool=h,t.decodeBytes=p,t.decodeNumber=f,t.decodeTuple=m,t.decodeString=g,t.prepareParameters=function({checksumAddress:e,parameters:t,values:r}){let n=[];for(let i=0;i<t.length;i++)n.push(y({checksumAddress:e,parameter:t[i],value:r[i]}));return n},t.prepareParameter=y,t.encode=b,t.encodeAddress=w,t.encodeArray=v,t.encodeBytes=E,t.encodeBoolean=C,t.encodeNumber=A,t.encodeString=x,t.encodeTuple=I,t.getArrayComponents=S,t.hasDynamicChild=T;let n=r(57300),i=r(92898),a=r(31837),s=r(53937),o=r(70259),l=r(3063);function c(e,t,r){let{checksumAddress:i,staticPosition:a}=r,s=S(t.type);if(s){let[r,n]=s;return d(e,{...t,type:n},{checksumAddress:i,length:r,staticPosition:a})}if("tuple"===t.type)return m(e,t,{checksumAddress:i,staticPosition:a});if("address"===t.type)return u(e,{checksum:i});if("bool"===t.type)return h(e);if(t.type.startsWith("bytes"))return p(e,t,{staticPosition:a});if(t.type.startsWith("uint")||t.type.startsWith("int"))return f(e,t);if("string"===t.type)return g(e,{staticPosition:a});throw new n.InvalidTypeError(t.type)}function u(e,t={}){let r,{checksum:n=!1}=t,s=e.readBytes(32);return[(r=o.fromBytes(a.slice(s,-20)),n?i.checksum(r):r),32]}function d(e,t,r){let{checksumAddress:n,length:i,staticPosition:s}=r;if(!i){let r=s+a.toNumber(e.readBytes(32)),i=r+32;e.setPosition(r);let o=a.toNumber(e.readBytes(32)),l=T(t),u=0,d=[];for(let r=0;r<o;++r){e.setPosition(i+(l?32*r:u));let[a,s]=c(e,t,{checksumAddress:n,staticPosition:i});u+=s,d.push(a)}return e.setPosition(s+32),[d,32]}if(T(t)){let r=s+a.toNumber(e.readBytes(32)),o=[];for(let a=0;a<i;++a){e.setPosition(r+32*a);let[i]=c(e,t,{checksumAddress:n,staticPosition:r});o.push(i)}return e.setPosition(s+32),[o,32]}let o=0,l=[];for(let r=0;r<i;++r){let[r,i]=c(e,t,{checksumAddress:n,staticPosition:s+o});o+=i,l.push(r)}return[l,o]}function h(e){return[a.toBoolean(e.readBytes(32),{size:32}),32]}function p(e,t,{staticPosition:r}){let[n,i]=t.type.split("bytes");if(!i){let t=a.toNumber(e.readBytes(32));e.setPosition(r+t);let n=a.toNumber(e.readBytes(32));if(0===n)return e.setPosition(r+32),["0x",32];let i=e.readBytes(n);return e.setPosition(r+32),[o.fromBytes(i),32]}return[o.fromBytes(e.readBytes(Number.parseInt(i,10),32)),32]}function f(e,t){let r=t.type.startsWith("int"),n=Number.parseInt(t.type.split("int")[1]||"256",10),i=e.readBytes(32);return[n>48?a.toBigInt(i,{signed:r}):a.toNumber(i,{signed:r}),32]}function m(e,t,r){let{checksumAddress:n,staticPosition:i}=r,s=0===t.components.length||t.components.some(({name:e})=>!e),o=s?[]:{},l=0;if(T(t)){let r=i+a.toNumber(e.readBytes(32));for(let i=0;i<t.components.length;++i){let a=t.components[i];e.setPosition(r+l);let[u,d]=c(e,a,{checksumAddress:n,staticPosition:r});l+=d,o[s?i:a?.name]=u}return e.setPosition(i+32),[o,32]}for(let r=0;r<t.components.length;++r){let a=t.components[r],[u,d]=c(e,a,{checksumAddress:n,staticPosition:i});o[s?r:a?.name]=u,l+=d}return[o,l]}function g(e,{staticPosition:t}){let r=a.toNumber(e.readBytes(32));e.setPosition(t+r);let n=a.toNumber(e.readBytes(32));if(0===n)return e.setPosition(t+32),["",32];let i=e.readBytes(n,32),s=a.toString(a.trimLeft(i));return e.setPosition(t+32),[s,32]}function y({checksumAddress:e=!1,parameter:t,value:r}){let i=S(t.type);if(i){let[n,a]=i;return v(r,{checksumAddress:e,length:n,parameter:{...t,type:a}})}if("tuple"===t.type)return I(r,{checksumAddress:e,parameter:t});if("address"===t.type)return w(r,{checksum:e});if("bool"===t.type)return C(r);if(t.type.startsWith("uint")||t.type.startsWith("int")){let e=t.type.startsWith("int"),[,,n="256"]=l.integerRegex.exec(t.type)??[];return A(r,{signed:e,size:Number(n)})}if(t.type.startsWith("bytes"))return E(r,{type:t.type});if("string"===t.type)return x(r);throw new n.InvalidTypeError(t.type)}function b(e){let t=0;for(let r=0;r<e.length;r++){let{dynamic:n,encoded:i}=e[r];n?t+=32:t+=o.size(i)}let r=[],n=[],i=0;for(let a=0;a<e.length;a++){let{dynamic:s,encoded:l}=e[a];s?(r.push(o.fromNumber(t+i,{size:32})),n.push(l),i+=o.size(l)):r.push(l)}return o.concat(...r,...n)}function w(e,t){let{checksum:r=!1}=t;return i.assert(e,{strict:r}),{dynamic:!1,encoded:o.padLeft(e.toLowerCase())}}function v(e,t){let{checksumAddress:r,length:i,parameter:a}=t,s=null===i;if(!Array.isArray(e))throw new n.InvalidArrayError(e);
6563if(!s&&e.length!==i)throw new n.ArrayLengthMismatchError({expectedLength:i,givenLength:e.length,type:`${a.type}[${i}]`});let l=!1,c=[];for(let t=0;t<e.length;t++){let n=y({checksumAddress:r,parameter:a,value:e[t]});n.dynamic&&(l=!0),c.push(n)}if(s||l){let e=b(c);if(s){let t=o.fromNumber(c.length,{size:32});return{dynamic:!0,encoded:c.length>0?o.concat(t,e):t}}if(l)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:o.concat(...c.map(({encoded:e})=>e))}}function E(e,{type:t}){let[,r]=t.split("bytes"),i=o.size(e);if(!r){let t=e;return i%32!=0&&(t=o.padRight(t,32*Math.ceil((e.length-2)/2/32))),{dynamic:!0,encoded:o.concat(o.padLeft(o.fromNumber(i,{size:32})),t)}}if(i!==Number.parseInt(r,10))throw new n.BytesSizeMismatchError({expectedSize:Number.parseInt(r,10),value:e});return{dynamic:!1,encoded:o.padRight(e)}}function C(e){if("boolean"!=typeof e)throw new s.BaseError(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:o.padLeft(o.fromBoolean(e))}}function A(e,{signed:t,size:r}){if("number"==typeof r){let n=2n**(BigInt(r)-(t?1n:0n))-1n,i=t?-n-1n:0n;if(e>n||e<i)throw new o.IntegerOutOfRangeError({max:n.toString(),min:i.toString(),signed:t,size:r/8,value:e.toString()})}return{dynamic:!1,encoded:o.fromNumber(e,{size:32,signed:t})}}function x(e){let t=o.fromString(e),r=Math.ceil(o.size(t)/32),n=[];for(let e=0;e<r;e++)n.push(o.padRight(o.slice(t,32*e,(e+1)*32)));return{dynamic:!0,encoded:o.concat(o.padRight(o.fromNumber(o.size(t),{size:32})),...n)}}function I(e,t){let{checksumAddress:r,parameter:n}=t,i=!1,a=[];for(let t=0;t<n.components.length;t++){let s=n.components[t],o=Array.isArray(e)?t:s.name,l=y({checksumAddress:r,parameter:s,value:e[o]});a.push(l),l.dynamic&&(i=!0)}return{dynamic:i,encoded:i?b(a):o.concat(...a.map(({encoded:e})=>e))}}function S(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function T(e){let{type:t}=e;if("string"===t||"bytes"===t||t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(T);let r=S(e.type);return!!(r&&T({...e,type:r[1]}))}},82311:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedPackedAbiType=t.InvalidDefinitionTypeError=t.InvalidArrayError=t.InvalidAbiDecodingTypeError=t.InvalidAbiEncodingTypeError=t.DecodeLogTopicsMismatch=t.DecodeLogDataMismatch=t.BytesSizeMismatchError=t.AbiItemAmbiguityError=t.AbiFunctionSignatureNotFoundError=t.AbiFunctionOutputsNotFoundError=t.AbiFunctionNotFoundError=t.AbiEventNotFoundError=t.AbiEventSignatureNotFoundError=t.AbiEventSignatureEmptyTopicsError=t.AbiErrorSignatureNotFoundError=t.AbiErrorNotFoundError=t.AbiErrorInputsNotFoundError=t.AbiEncodingLengthMismatchError=t.AbiEncodingBytesSizeMismatchError=t.AbiEncodingArrayLengthMismatchError=t.AbiDecodingZeroDataError=t.AbiDecodingDataSizeTooSmallError=t.AbiDecodingDataSizeInvalidError=t.AbiConstructorParamsNotFoundError=t.AbiConstructorNotFoundError=void 0;let n=r(71680),i=r(29813),a=r(45226);class s extends a.BaseError{constructor({docsPath:e}){super("A constructor was not found on the ABI.\nMake sure you are using the correct ABI and that the constructor exists on it.",{docsPath:e,name:"AbiConstructorNotFoundError"})}}t.AbiConstructorNotFoundError=s;class o extends a.BaseError{constructor({docsPath:e}){super("Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.\nMake sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.",{docsPath:e,name:"AbiConstructorParamsNotFoundError"})}}t.AbiConstructorParamsNotFoundError=o;class l extends a.BaseError{constructor({data:e,size:t}){super(`Data size of ${t}
6563 bytes is invalid. 6564Size must be in increments of 32 bytes (size % 32 === 0).`,{metaMessages:[`Data: ${e} (${t} bytes)`],name:"AbiDecodingDataSizeInvalidError"})}}t.AbiDecodingDataSizeInvalidError=l;class c extends a.BaseError{constructor({data:e,params:t,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${(0,n.formatAbiParams)(t,{includeName:!0})})`,`Data: ${e} (${r} bytes)`],name:"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}}t.AbiDecodingDataSizeTooSmallError=c;class u extends a.BaseError{constructor({cause:e}={}){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError",cause:e})}}t.AbiDecodingZeroDataError=u;class d extends a.BaseError{constructor({expectedLength:e,givenLength:t,type:r}){super(`ABI encoding array length mismatch for type ${r}. 6565Expected length: ${e} 6566Given length: ${t}`,{name:"AbiEncodingArrayLengthMismatchError"})}}t.AbiEncodingArrayLengthMismatchError=d;class h extends a.BaseError{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,i.size)(t)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}t.AbiEncodingBytesSizeMismatchError=h;class p extends a.BaseError{constructor({expectedLength:e,givenLength:t}){super(`ABI encoding params/values length mismatch. 6567Expected length (params): ${e} 6568Given length (values): ${t}`,{name:"AbiEncodingLengthMismatchError"})}}t.AbiEncodingLengthMismatchError=p;class f extends a.BaseError{constructor(e,{docsPath:t}){super(`Arguments (\`args\`) were provided to "${e}", but "${e}" on the ABI does not contain any parameters (\`inputs\`). 6569Cannot encode error result without knowing what the parameter types are. 6570Make sure you are using the correct ABI and that the inputs exist on it.`,{docsPath:t,name:"AbiErrorInputsNotFoundError"})}}t.AbiErrorInputsNotFoundError=f;class m extends a.BaseError{constructor(e,{docsPath:t}={}){super(`Error ${e?`"${e}" `:""}not found on ABI. 6571Make sure you are using the correct ABI and that the error exists on it.`,{docsPath:t,name:"AbiErrorNotFoundError"})}}t.AbiErrorNotFoundError=m;class g extends a.BaseError{constructor(e,{docsPath:t,cause:r}){super(`Encoded error signature "${e}" not found on ABI. 6572Make sure you are using the correct ABI and that the error exists on it. 6573You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${e}.`,{docsPath:t,name:"AbiErrorSignatureNotFoundError",cause:r}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}t.AbiErrorSignatureNotFoundError=g;class y extends a.BaseError{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e,name:"AbiEventSignatureEmptyTopicsError"})}}t.AbiEventSignatureEmptyTopicsError=y;class b extends a.BaseError{constructor(e,{docsPath:t}){super(`Encoded event signature "${e}" not found on ABI. 6574Make sure you are using the correct ABI and that the event exists on it. 6575You can look up the signature here: https://4byte.sourcify.dev/?q=${e}.`,{docsPath:t,name:"AbiEventSignatureNotFoundError"})}}t.AbiEventSignatureNotFoundError=b;class w extends a.BaseError{constructor(e,{docsPath:t}={}){super(`Event ${e?`"${e}" `:""}not found on ABI. 6576Make sure you are using the correct ABI and that the event exists on it.`,{docsPath:t,name:"AbiEventNotFoundError"})}}t.AbiEventNotFoundError=w;class v extends a.BaseError{constructor(e,{docsPath:t}={}){super(`Function ${e?`"${e}" `:""}not found on ABI. 6577Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t,name:"AbiFunctionNotFoundError"})}}t.AbiFunctionNotFoundError=v;class E extends a.BaseError{constructor(e,{docsPath:t}){super(`Function "${e}" does not contain any \`outputs\` on ABI. 6578Cannot decode function result without knowing what the parameter types are. 6579Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t,name:"AbiFunctionOutputsNotFoundError"})}}t.AbiFunctionOutputsNotFoundError=E;class C extends a.BaseError{constructor(e,{docsPath:t}){super(`Encoded function signature "${e}" not found on ABI. 6580Make sure you are using the correct ABI and that the function exists on it. 6581You can look up the signature here: https://4byte.sourcify.dev/?q=${e}.`,{docsPath:t,name:"AbiFunctionSignatureNotFoundError"})}}t.AbiFunctionSignatureNotFoundError=C;class A extends a.BaseError{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}
6581\` in \`${(0,n.formatAbiItem)(e.abiItem)}\`, and`,`\`${t.type}\` in \`${(0,n.formatAbiItem)(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}t.AbiItemAmbiguityError=A;class x extends a.BaseError{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`,{name:"BytesSizeMismatchError"})}}t.BytesSizeMismatchError=x;class I extends a.BaseError{constructor({abiItem:e,data:t,params:r,size:i}){super(`Data size of ${i} bytes is too small for non-indexed event parameters.`,{metaMessages:[`Params: (${(0,n.formatAbiParams)(r,{includeName:!0})})`,`Data: ${t} (${i} bytes)`],name:"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=t,this.params=r,this.size=i}}t.DecodeLogDataMismatch=I;class S extends a.BaseError{constructor({abiItem:e,param:t}){super(`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,n.formatAbiItem)(e,{includeName:!0})}".`,{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}t.DecodeLogTopicsMismatch=S;class T extends a.BaseError{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid encoding type. 6582Please provide a valid ABI type.`,{docsPath:t,name:"InvalidAbiEncodingType"})}}t.InvalidAbiEncodingTypeError=T;class P extends a.BaseError{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid decoding type. 6583Please provide a valid ABI type.`,{docsPath:t,name:"InvalidAbiDecodingType"})}}t.InvalidAbiDecodingTypeError=P;class O extends a.BaseError{constructor(e){super(`Value "${e}" is not a valid array.`,{name:"InvalidArrayError"})}}t.InvalidArrayError=O;class _ extends a.BaseError{constructor(e){super(`"${e}" is not a valid definition type. 6584Valid types: "function", "event", "error"`,{name:"InvalidDefinitionTypeError"})}}t.InvalidDefinitionTypeError=_;class N extends a.BaseError{constructor(e){super(`Type "${e}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}t.UnsupportedPackedAbiType=N},82322:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.watchPendingTransactions=function(e,{batch:t=!0,onError:r,onTransactions:u,poll:d,pollingInterval:h=e.pollingInterval}){let p,f;return(void 0!==d?d:"webSocket"!==e.transport.type&&"ipc"!==e.transport.type)?(()=>{let d=(0,s.stringify)(["watchPendingTransactions",e.uid,t,h]);return(0,i.observe)(d,{onTransactions:u,onError:r},r=>{let i,s=(0,a.poll)(async()=>{try{if(!i)try{i=await (0,n.getAction)(e,o.createPendingTransactionFilter,"createPendingTransactionFilter")({});return}catch(e){throw s(),e}let a=await (0,n.getAction)(e,l.getFilterChanges,"getFilterChanges")({filter:i});if(0===a.length)return;if(t)r.onTransactions(a);else for(let e of a)r.onTransactions([e])}catch(e){r.onError?.(e)}},{emitOnBegin:!0,interval:h});return async()=>{i&&await (0,n.getAction)(e,c.uninstallFilter,"uninstallFilter")({filter:i}),s()}})})():(p=!0,f=()=>p=!1,(async()=>{try{let{unsubscribe:t}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!p)return;let t=e.result;u([t])},onError(e){r?.(e)}});f=t,p||f()}catch(e){r?.(e)}})(),()=>f())};let n=r(95847),i=r(84053),a=r(63342),s=r(68508),o=r(99506),l=r(97514),c=r(74815)},82376:(e,t,r)=>{"use strict";r.d(t,{W:()=>O});var n=r(91004),i=r(36442),a=r(52335),s=r(57873),o=r(42846),l=r(11558),c=r(47482),u=r(71016),d=r(81920),h=r(33432),p=r(29092),f=r(17052),m=r(14429),g=r(36071),y=r(32590),b=r(42242),w=r(53984),v=r(18627),E=r(79482),C=r(95987),A=r(18577),x=r(82875);let I={currentTab:0,tokenBalance:[],smartAccountDeployed:!1,addressLabels:new Map,user:void 0,preferredAccountType:void 0},S={caipNetwork:void 0,supportsAllNetworks:!0,smartAccountEnabledNetworks:[]},T=(0,n.BX)({chains:(0,i.zC)(),activeCaipAddress:void 0,activeChain:void 0,activeCaipNetwork:void 0,noAdapters:!1,universalAdapter
6584:{connectionControllerClient:void 0},isSwitchingNamespace:!1}),P={state:T,subscribe:e=>(0,n.B1)(T,()=>{e(T)}),subscribeKey:(e,t)=>(0,i.u$)(T,e,t),subscribeAccountStateProp(e,t,r){let n=r||T.activeChain;return n?(0,i.u$)(T.chains.get(n)?.accountState||{},e,t):()=>void 0},subscribeChainProp(e,t,r){let i;return(0,n.B1)(T.chains,()=>{let n=r||T.activeChain;if(n){let r=T.chains.get(n)?.[e];i!==r&&(i=r,t(r))}})},initialize(e,t,r){let{chainId:i,namespace:a}=p.i.getActiveNetworkProps(),s=t?.find(e=>e.id.toString()===i?.toString()),o=e.find(e=>e?.namespace===a)||e?.[0],l=e.map(e=>e.namespace).filter(e=>void 0!==e),c=new Set(v.H.state.enableEmbedded?[...l]:[...t?.map(e=>e.chainNamespace)??[]]);e?.length!==0&&o||(T.noAdapters=!0),!T.noAdapters&&(T.activeChain=o?.namespace,T.activeCaipNetwork=s,O.setChainNetworkData(o?.namespace,{caipNetwork:s}),T.activeChain&&C.z.set({activeChain:o?.namespace})),c.forEach(e=>{let i=t?.filter(t=>t.chainNamespace===e),a=p.i.getPreferredAccountTypes()||{},s={...v.H.state.defaultAccountTypes,...a};O.state.chains.set(e,{namespace:e,networkState:(0,n.BX)({...S,caipNetwork:i?.[0]}),accountState:(0,n.BX)({...I,preferredAccountType:s[e]}),caipNetworks:i??[],...r}),O.setRequestedCaipNetworks(i??[],e)})},removeAdapter(e){if(T.activeChain===e){let t=Array.from(T.chains.entries()).find(([t])=>t!==e);if(t){let e=t[1]?.caipNetworks?.[0];e&&O.setActiveCaipNetwork(e)}}T.chains.delete(e)},addAdapter(e,{connectionControllerClient:t},r){if(!e.namespace)throw Error("ChainController:addAdapter - adapter must have a namespace");T.chains.set(e.namespace,{namespace:e.namespace,networkState:{...S,caipNetwork:r[0]},accountState:{...I},caipNetworks:r,connectionControllerClient:t}),O.setRequestedCaipNetworks(r?.filter(t=>t.chainNamespace===e.namespace)??[],e.namespace)},addNetwork(e){let t=T.chains.get(e.chainNamespace);if(t){let r=[...t.caipNetworks||[]];t.caipNetworks?.find(t=>t.id===e.id)||r.push(e),T.chains.set(e.chainNamespace,{...t,caipNetworks:r}),O.setRequestedCaipNetworks(r,e.chainNamespace),y.a.filterByNamespace(e.chainNamespace,!0)}},removeNetwork(e,t){let r=T.chains.get(e);if(r){let n=T.activeCaipNetwork?.id===t,i=[...r.caipNetworks?.filter(e=>e.id!==t)||[]];n&&r?.caipNetworks?.[0]&&O.setActiveCaipNetwork(r.caipNetworks[0]),T.chains.set(e,{...r,caipNetworks:i}),O.setRequestedCaipNetworks(i||[],e),0===i.length&&y.a.filterByNamespace(e,!1)}},setAdapterNetworkState(e,t){let r=T.chains.get(e);r&&(r.networkState={...r.networkState||S,...t},T.chains.set(e,r))},setChainAccountData(e,t,r=!0){if(!e)throw Error("Chain is required to update chain account data");let n=T.chains.get(e);if(n){let r={...n.accountState||I,...t};T.chains.set(e,{...n,accountState:r}),(1===T.chains.size||T.activeChain===e)&&t.caipAddress&&(T.activeCaipAddress=t.caipAddress)}},setChainNetworkData(e,t){if(!e)return;let r=T.chains.get(e);if(r){let n={...r.networkState||S,...t};T.chains.set(e,{...r,networkState:n})}},setAccountProp(e,t,r,n=!0){O.setChainAccountData(r,{[e]:t},n)},setActiveNamespace(e){T.activeChain=e;let t=e?T.chains.get(e):void 0,r=t?.networkState?.caipNetwork;r?.id&&e&&(T.activeCaipAddress=t?.accountState?.caipAddress,T.activeCaipNetwork=r,O.setChainNetworkData(e,{caipNetwork:r}),p.i.setActiveCaipNetworkId(r?.caipNetworkId),C.z.set({activeChain:e,selectedNetworkId:r?.caipNetworkId}))},setActiveCaipNetwork(e){if(!e)return;let t=T.activeChain===e.chainNamespace;t||O.setIsSwitchingNamespace(!0);let r=T.chains.get(e.chainNamespace);T.activeChain=e.chainNamespace,T.activeCaipNetwork=e,O.setChainNetworkData(e.chainNamespace,{caipNetwork:e});let n=r?.accountState?.address;if(n)T.activeCaipAddress=`${e.chainNamespace}:${e.id}:${n}`;else if(t&&T.activeCaipAddress){let{address:t}=a.C.parseCaipAddress(T.activeCaipAddress);n=t,T.activeCaipAddress=`${e.caipNetworkId}:${n}`}else T.activeCaipAddress=void 0;O.setChainAccountData(e.chainNamespace,{address:n,caipAddress:T.activeCaipAddress}),A.R.resetSend(),C.z.set({activeChain:T.activeChain,selectedNetworkId:T.activeCaipNetwork?.caipNetworkId}),p.i.setActiveCaipNetworkId(e.caipNetworkId),O.checkIfSupportedNetwork(e.chainNamespace)||!v.H.state.enableNetworkSwitch||v.H.state.allowUnsupportedChain||g.x.state.wcBasic||O.showUnsupportedChainUI()},addCaipNetwork(e){if(!e)return;let t=T.chains.get(e.chainNamespace);t&&t?.caipNetworks?.push(e)},async switchActiveNamespace(e){if(!e)return;let t=e!==O.state.activeChain,r=O.getNetworkData(e)?.caipNetwork,n=O.getCaipNetworkByNamespace(e,r?.id);t&&n&&await O.switchActiveNetwork(n)},async switchActiveNetwork(e,{throwOnFailure:t=!1}={}){let r=O.state.activeChain;if(!r)throw Error("ChainController:switchActiveNetwork - namespace is required");let n="AUTH"===E.G.getProviderId(T.activeChain),i=O.getAccountData(r)?.address,a=s.o.AUTH_CONNECTOR_SUPPORTED_CHAINS.includes(e.chainNamespace);try{if(i&&e.chainNamespace===r||n&&a){let t=m.q.get(e.chainNamespace);if(!t)throw Error("Adapter not found");await t.switchNetwork({caipNetwork:e})}O.setActiveCaipNetwork(e)}catch(e){if(t)throw e}b.E.sendEvent({type:"track",event:"SWITCH_NETWORK",properties:{network:e.caipNetworkId}})},getConnectionControllerClient(e){let t=e||T.activeChain;if(!t)throw Error("Chain is required to get connection controller client");let r=T.chains.get(t);if(!r?.connectionControllerClient)throw Error("ConnectionController client not set");return r.connectionControllerClient},getNetworkProp(e,t){let r=T.chains.get(t)?.networkState;if(r)return r[e]},getRequestedCaipNetworks(e){let t=T.chains.get(e),{approvedCaipNetworkIds:r=[],requestedCaipNetworks:n=[]}=t?.networkState||{};return h.w.sortRequestedNetworks(r,n).filter(e=>e?.id)},getAllRequestedCaipNetworks(){let e=[];return T.chains.forEach(t=>{if(!t.namespace)throw Error("ChainController:getAllRequestedCaipNetworks - chainAdapter must have a namespace");let r=O.getRequestedCaipNetworks(t.namespace);e.push(...r)}),e},setRequestedCaipNetworks(e,t){O.setAdapterNetworkState(t,{requestedCaipNetworks:e});let r=Array.from(new Set(O.getAllRequestedCaipNetworks().map(e=>e.chainNamespace)));y.a.filterByNamespaces(r)},getAllApprovedCaipNetworkIds(){let e=[];return T.chains.forEach(t=>{if(!t.namespace)throw Error("ChainController:getAllApprovedCaipNetworkIds - chainAdapter must have a namespace");let r=O.getApprovedCaipNetworkIds(t.namespace);e.push(...r)}),e},getActiveCaipNetwork:e=>e?T.chains.get(e)?.networkState?.caipNetwork:T.activeCaipNetwork,getActiveCaipAddress:()=>T.activeCaipAddress,getApprovedCaipNetworkIds(e){let t=T.chains.get(e);return t?.networkState?.approvedCaipNetworkIds||[]},setApprovedCaipNetworksData(e,t){O.setAdapterNetworkState(e,t)},checkIfSupportedNetwork(e,t){let r=t||T.activeCaipNetwork?.caipNetworkId,n=O.getRequestedCaipNetworks(e);return!n.length||n?.some(e=>e.caipNetworkId===r)},checkIfSupportedChainId(e){if(!T.activeChain)return!0;let t=O.getRequestedCaipNetworks(T.activeChain);return t?.some(t=>t.id===e)},checkIfSmartAccountEnabled(){let e=o.L.caipNetworkIdToNumber(T.activeCaipNetwork?.caipNetworkId);if(!T.activeChain||!e)return!1;let t=l.o.get(c.s1.SMART_ACCOUNT_ENABLED_NETWORKS)?.split(",")||[];return!!t?.includes(e.toString())},showUnsupportedChainUI(){w.W.open({view:"UnsupportedChain"})},checkIfNamesSupported(){let e=T.activeCaipNetwork;return!!(e?.chainNamespace&&d.oU.NAMES_SUPPORTED_CHAIN_NAMESPACES.includes(e.chainNamespace))},resetNetwork(e){O.setAdapterNetworkState(e,{approvedCaipNetworkIds:void 0,supportsAllNetworks:!0})},resetAccount(e){if(!e)throw Error("Chain is required to set account prop");let t=O.state.chains.get(e)?.accountState?.preferredAccountType,r=v.H.state.defaultAccountTypes[e];T.activeCaipAddress=void 0,O.setChainAccountData(e,{smartAccountDeployed:!1,currentTab:0,caipAddress:void 0,address:void 0,balance:void 0,balanceSymbol
6584:void 0,profileName:void 0,profileImage:void 0,addressExplorerUrl:void 0,tokenBalance:[],connectedWalletInfo:void 0,preferredAccountType:r||t,socialProvider:void 0,socialWindow:void 0,farcasterUrl:void 0,user:void 0,status:"disconnected"}),y.a.removeConnectorId(e)},setIsSwitchingNamespace(e){T.isSwitchingNamespace=e},getFirstCaipNetworkSupportsAuthConnector(){let e=[];if(T.chains.forEach(t=>{s.o.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(e=>e===t.namespace)&&t.namespace&&e.push(t.namespace)}),e.length>0){let t=e[0];return t?T.chains.get(t)?.caipNetworks?.[0]:void 0}},getAccountData(e){let t=e||T.activeChain;if(t)return O.state.chains.get(t)?.accountState},getNetworkData(e){let t=e||T.activeChain;if(t)return O.state.chains.get(t)?.networkState},getCaipNetworkByNamespace(e,t){if(!e)return;let r=O.state.chains.get(e),n=r?.caipNetworks?.find(e=>e.id.toString()===t?.toString());return n||r?.networkState?.caipNetwork||r?.caipNetworks?.[0]},getRequestedCaipNetworkIds(){let e=y.a.state.filterByNamespace;return(e?[T.chains.get(e)]:Array.from(T.chains.values())).flatMap(e=>e?.caipNetworks||[]).map(e=>e.caipNetworkId)},getCaipNetworks:e=>e?O.getRequestedCaipNetworks(e):O.getAllRequestedCaipNetworks(),getCaipNetworkById:(e,t)=>P.getCaipNetworks(t).find(t=>t.id.toString()===e.toString()||t.caipNetworkId.toString()===e.toString()),setLastConnectedSIWECaipNetwork(e){T.lastConnectedSIWECaipNetwork=e},getLastConnectedSIWECaipNetwork:()=>T.lastConnectedSIWECaipNetwork,async fetchTokenBalance(e){let t=O.getAccountData();if(!t)return[];let r=O.state.activeCaipNetwork?.caipNetworkId,n=O.state.activeCaipNetwork?.chainNamespace,i=O.state.activeCaipAddress,a=i?h.w.getPlainAddress(i):void 0;if(O.setAccountProp("balanceLoading",!0,n),t.lastRetry&&!h.w.isAllowedRetry(t.lastRetry,30*d.oU.ONE_SEC_MS))return O.setAccountProp("balanceLoading",!1,n),[];try{if(a&&r&&n){let e=await u.Z.getMyTokensWithBalance();return O.setAccountProp("tokenBalance",e,n),O.setAccountProp("lastRetry",void 0,n),O.setAccountProp("balanceLoading",!1,n),e}}catch(t){O.setAccountProp("lastRetry",Date.now(),n),e?.(t),x.P.showError("Token Balance Unavailable")}finally{O.setAccountProp("balanceLoading",!1,n)}return[]},isCaipNetworkDisabled(e){let t=e.chainNamespace,r=!!O.getAccountData(t)?.caipAddress,n=O.getAllApprovedCaipNetworkIds(),i=!1!==O.getNetworkProp("supportsAllNetworks",t),a=y.a.getConnectorId(t),o=y.a.getAuthConnector(),l=a===s.o.CONNECTOR_ID.AUTH&&o;return!!r&&!i&&!l&&!n?.includes(e.caipNetworkId)}},O=(0,f.X)(P)},82469:(e,t,r)=>{let n=r(17568);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=n.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw Error("Encoder not initialized");let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},e.exports=i},82689:function(e){e.exports=function(e,t,r){r.updateLocale=function(e,t){var n=r.Ls[e];if(n)return(t?Object.keys(t):[]).forEach(function(e){n[e]=t[e]}),n}}},82875:(e,t,r)=>{"use strict";r.d(t,{P:()=>l});var n=r(91004),i=r(36442),a=r(33432);let s=Object.freeze({message:"",variant:"success",svg:void 0,open:!1,autoClose:!0}),o=(0,n.BX)({...s}),l={state:o,subscribeKey:(e,t)=>(0,i.u$)(o,e,t),showLoading(e,t={}){this._showMessage({message:e,variant:"loading",...t})},showSuccess(e){this._showMessage({message:e,variant:"success"})},showSvg(e,t){this._showMessage({message:e,svg:t})},showError(e){let t=a.w.parseError(e);this._showMessage({message:t,variant:"error"})},hide(){o.message=s.message,o.variant=s.variant,o.svg=s.svg,o.open=s.open,o.autoClose=s.autoClose},_showMessage({message:e,svg:t,variant:r="success",autoClose:n=s.autoClose}){o.open?(o.open=!1,setTimeout(()=>{o.message=e,o.variant=r,o.svg=t,o.open=!0,o.autoClose=n},150)):(o.message=e,o.variant=r,o.svg=t,o.open=!0,o.autoClose=n)}}},83038:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="0.1.1"},83066:(e,t,r)=>{"use strict";r.d(t,{Z:()=>e5});var n={};r.r(n),r.d(n,{OG:()=>Z,My:()=>D,Ph:()=>z,lX:()=>W,Id:()=>K,fg:()=>Q,qj:()=>G,aT:()=>H,lq:()=>q,z:()=>V,Q5:()=>ee});var i=r(97085),a=r(66620),s=r(74764),o=r(16040);class l extends o.Vw{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,o.O8)(this.buffer)}update(e){(0,s.t2)(this);let{view:t,buffer:r,blockLen:n}=this,i=(e=(0,o.ZJ)(e)).length;for(let a=0;a<i;){let s=Math.min(n-this.pos,i-a);if(s===n){let t=(0,o.O8)(e);for(;n<=i-a;a+=n)this.process(t,a);continue}r.set(e.subarray(a,a+s),this.pos),this.pos+=s,a+=s,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,s.t2)(this),(0,s.CG)(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:n,isLE:i}=this,{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>n-a&&(this.process(r,0),a=0);for(let e=a;
6584e<n;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),a=BigInt(0xffffffff),s=Number(r>>i&a),o=Number(r&a),l=4*!!n,c=4*!n;e.setUint32(t+l,s,n),e.setUint32(t+c,o,n)}(r,n-8,BigInt(8*this.length),i),this.process(r,0);let l=(0,o.O8)(e),c=this.outputLen;if(c%4)throw Error("_sha2: outputLen should be aligned to 32bit");let u=c/4,d=this.get();if(u>d.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<u;e++)l.setUint32(4*e,d[e],i)}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:n,finished:i,destroyed:a,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=a,n%t&&e.buffer.set(r),e}}let c=(e,t,r)=>e&t^~e&r,u=(e,t,r)=>e&t^e&r^t&r,d=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),h=new Uint32Array([0x6a09e66
65847,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),p=new Uint32Array(64);class f extends l{constructor(){super(64,32,8,!1),this.A=0|h[0],this.B=0|h[1],this.C=0|h[2],this.D=0|h[3],this.E=0|h[4],this.F=0|h[5],this.G=0|h[6],this.H=0|h[7]}get(){let{A:e,B:t,C:r,D:n,E:i,F:a,G:s,H:o}=this;return[e,t,r,n,i,a,s,o]}set(e,t,r,n,i,a,s,o){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|a,this.G=0|s,this.H=0|o}process(e,t){for(let r=0;r<16;r++,t+=4)p[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=p[e-15],r=p[e-2],n=(0,o.Ow)(t,7)^(0,o.Ow)(t,18)^t>>>3,i=(0,o.Ow)(r,17)^(0,o.Ow)(r,19)^r>>>10;p[e]=i+p[e-7]+n+p[e-16]|0}let{A:r,B:n,C:i,D:a,E:s,F:l,G:h,H:f}=this;for(let e=0;e<64;e++){let t=f+((0,o.Ow)(s,6)^(0,o.Ow)(s,11)^(0,o.Ow)(s,25))+c(s,l,h)+d[e]+p[e]|0,m=((0,o.Ow)(r,2)^(0,o.Ow)(r,13)^(0,o.Ow)(r,22))+u(r,n,i)|0;f=h,h=l,l=s,s=a+t|0,a=i,i=n,n=r,r=t+m|0}r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,a=a+this.D|0,s=s+this.E|0,l=l+this.F|0,h=h+this.G|0,f=f+this.H|0,this.set(r,n,i,a,s,l,h,f)}roundClean(){p.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}let m=(0,o.ld)(()=>new f);var g=r(20471);let[y,b]=g.Ay.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
65845771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),w=new Uint32Array(80),v=new Uint32Array(80);class E extends l{constructor(){super(128,64,16,!1),this.Ah=0x6a09e667,this.Al=-0xc4336f8,this.Bh=-0x4498517b,this.Bl=-0x7b3558c5,this.Ch=0x3c6ef372,this.Cl=-0x16b07d5,this.Dh=-0x5ab00ac6,this.Dl=0x5f1d36f1,this.Eh=0x510e527f,this.El=-0x52197d2f,this.Fh=-0x64fa9774,this.Fl=0x2b3e6c1f,this.Gh=0x1f83d9ab,this.Gl=-0x4be4295,this.Hh=0x5be0cd19,this.Hl=0x137e2179}get(){let{Ah:e,Al:t,Bh:r,Bl:n,Ch:i,Cl:a,Dh:s,Dl:o,Eh:l,El:c,Fh:u,Fl:d,Gh:h,Gl:p,Hh:f,Hl:m}=this;return[e,t,r,n,i,a,s,o,l,c,u,d,h,p,f,m]}set(e,t,r,n,i,a,s,o,l,c,u,d,h,p,f,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|a,this.Dh=0|s,this.Dl=0|o,this.Eh=0|l,this.El=0|c,this.Fh=0|u,this.Fl=0|d,this.Gh=0|h,this.Gl=0|p,this.Hh=0|f,this.Hl=0|m}process(e,t){for(let r=0;r<16;r++,t+=4)w[r]=e.getUint32(t),v[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=0|w[e-15],r=0|v[e-15],n=g.Ay.rotrSH(t,r,1)^g.Ay.rotrSH(t,r,8)^g.Ay.shrSH(t,r,7),i=g.Ay.rotrSL(t,r,1)^g.Ay.rotrSL(t,r,8)^g.Ay.shrSL(t,r,7),a=0|w[e-2],s=0|v[e-2],o=g.Ay.rotrSH(a,s,19)^g.Ay.rotrBH(a,s,61)^g.Ay.shrSH(a,s,6),l=g.Ay.rotrSL(a,s,19)^g.Ay.rotrBL(a,s,61)^g.Ay.shrSL(a,s,6),c=g.Ay.add4L(i,l,v[e-7],v[e-16]),u=g.Ay.add4H(c,n,o,w[e-7],w[e-16]);w[e]=0|u,v[e]=0|c}let{Ah:r,Al:n,Bh:i,Bl:a,Ch:s,Cl:o,Dh:l,Dl:c,Eh:u,El:d,Fh:h,Fl:p,Gh:f,Gl:m,Hh:E,Hl:C}=this;for(let e=0;e<80;e++){let t=g.Ay.rotrSH(u,d,14)^g.Ay.rotrSH(u,d,18)^g.Ay.rotrBH(u,d,41),A=g.Ay.rotrSL(u,d,14)^g.Ay.rotrSL(u,d,18)^g.Ay.rotrBL(u,d,41),x=u&h^~u&f,I=d&p^~d&m,S=g.Ay.add5L(C,A,I,b[e],v[e]),T=g.Ay.add5H(S,E,t,x,y[e],w[e]),P=0|S,O=g.Ay.rotrSH(r,n,28)^g.Ay.rotrBH(r,n,34)^g.Ay.rotrBH(r,n,39),_=g.Ay.rotrSL(r,n,28)^g.Ay.rotrBL(r,n,34)^g.Ay.rotrBL(r,n,39),N=r&i^r&s^i&s,k=n&a^n&o^a&o;E=0|f,C=0|m,f=0|h,m=0|p,h=0|u,p=0|d,({h:u,l:d}=g.Ay.add(0|l,0|c,0|T,0|P)),l=0|s,c=0|o,s=0|i,o=0|a,i=0|r,a=0|n;let R=g.Ay.add3L(P,_,k);r=g.Ay.add3H(R,T,O,N),n=0|R}({h:r,l:n}=g.Ay.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:i,l:a}=g.Ay.add(0|this.Bh,0|this.Bl,0|i,0|a)),({h:s,l:o}=g.Ay.add(0|this.Ch,0|this.Cl,0|s,0|o)),({h:l,l:c}=g.Ay.add(0|this.Dh,0|this.Dl,0|l,0|c)),({h:u,l:d}=g.Ay.add(0|this.Eh,0|this.El,0|u,0|d)),({h:h,l:p}=g.Ay.add(0|this.Fh,0|this.Fl,0|h,0|p)),({h:f,l:m}=g.Ay.add(0|this.Gh,0|this.Gl,0|f,0|m)),({h:E,l:C}=g.Ay.add(0|this.Hh,0|this.Hl,0|E,0|C)),this.set(r,n,i,a,s,o,l,c,u,d,h,p,f,m,E,C)}roundClean(){w.fill(0),v.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}let C=(0,o.ld)(()=>new E);var A=r(44582);let x=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();function I(e){switch(e){case"sha256":return m.create();case"sha512":return C.create()}(0,A.MR)(!1,"invalid hashing algorithm name","algorithm",e)}x.crypto||x.msCrypto;var S=r(98668);let T=function(e){return I("sha256").update(e).digest()},P=function(e){return I("sha512").update(e).digest()},O=T,_=P,N=!1,k=!1;function R(e){let t=(0,S.q5)(e,"data");return(0,S.c$)(O(t))}function M(e){let t=(0,S.q5)(e,"data");return(0,S.c$)(_(t))}R._=T,R.lock=function(){N=!0},R.register=function(e){if(N)throw Error("sha256 is locked");O=e},Object.freeze(R),M._=P,M.lock=function(){k=!0},M.register=function(e){if(k)throw Error("sha512 is locked");_=e},Object.freeze(R);var B=r(41906),j=r(92391);BigInt(0);let U=BigInt(1),$=BigInt(2),L=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function D(e){if(!(e instanceof Uint8Array))throw Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=L[e[r]];return t}function F(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}function H(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);let t=e.length;if(t%2)throw 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 n=2*t,i=Number.parseInt(e.slice(n,n+2),16);if(Number.isNaN(i)||i<0)throw Error("Invalid byte sequence");r[t]=i}return r}function z(e){return F(D(e))}function W(e){if(!(e instanceof Uint8Array))throw Error("Uint8Array expected");return F(D(Uint8Array.from(e).reverse()))}function q(e,t){return H(e.toString(16).padStart(2*t,"0"))}function V(e,t){return q(e,t).reverse()}function G(e,t,r){let n;if("string"==typeof t)try{n=H(t)}catch(r){throw Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else if(t instanceof Uint8Array)n=Uint8Array.from(t);else throw Error(`${e} must be hex string or Uint8Array`);let i=n.length;if("number"==typeof r&&i!==r)throw Error(`${e} expected ${r} bytes, got ${i}`);return n}function K(...e){let t=new Uint8Array(e.reduce((e,t)=>
6584e+t.length,0)),r=0;return e.forEach(e=>{if(!(e instanceof Uint8Array))throw Error("Uint8Array expected");t.set(e,r),r+=e.length}),t}let Z=e=>($<<BigInt(e-1))-U,J=e=>new Uint8Array(e),Y=e=>Uint8Array.from(e);function Q(e,t,r){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=J(e),i=J(e),a=0,s=()=>{n.fill(1),i.fill(0),a=0},o=(...e)=>r(i,n,...e),l=(e=J())=>{i=o(Y([0]),e),n=o(),0!==e.length&&(i=o(Y([1]),e),n=o())},c=()=>{if(a++>=1e3)throw Error("drbg: tried 1000 values");let e=0,r=[];for(;e<t;){let t=(n=o()).slice();r.push(t),e+=n.length}return K(...r)};return(e,t)=>{let r;for(s(),l(e);!(r=t(c()));)l();return s(),r}}let X={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)};function ee(e,t,r={}){let n=(t,r,n)=>{let i=X[r];if("function"!=typeof i)throw Error(`Invalid validator "${r}", expected function`);let a=e[t];if((!n||void 0!==a)&&!i(a,e))throw Error(`Invalid param ${String(t)}=${a} (${typeof a}), expected ${r}`)};for(let[e,r]of Object.entries(t))n(e,r,!1);for(let[e,t]of Object.entries(r))n(e,t,!0);return e}let et=BigInt(0),er=BigInt(1),en=BigInt(2),ei=BigInt(3),ea=BigInt(4),es=BigInt(5),eo=BigInt(8);function el(e,t){let r=e%t;return r>=et?r:t+r}function ec(e,t,r){let n=e;for(;t-- >et;)n*=n,n%=r;return n}function eu(e,t){if(e===et||t<=et)throw Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=el(e,t),n=t,i=et,a=er,s=er,o=et;for(;r!==et;){let e=n/r,t=n%r,l=i-s*e,c=a-o*e;n=r,r=t,i=s,a=o,s=l,o=c}if(n!==er)throw Error("invert: does not exist");return el(i,t)}BigInt(9),BigInt(16);let ed=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function eh(e,t){let r=void 0!==t?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function ep(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function ef(e){let t=ep(e);return t+Math.ceil(t/2)}class em extends o.Vw{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,s.tW)(e);let r=(0,o.ZJ)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),i.fill(0)}update(e){return(0,s.t2)(this),this.iHash.update(e),this}digestInto(e){(0,s.t2)(this),(0,s.ee)(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:n,destroyed:i,blockLen:a,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=a,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}let eg=(e,t,r)=>new em(e,t).update(r).digest();eg.create=(e,t)=>new em(e,t);let ey=BigInt(0),eb=BigInt(1);function ew(e){return ee(e.Fp,ed.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),ee(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...eh(e.n,e.nBitLength),...e,...{p:e.Fp.ORDER}})}let{Ph:ev,aT:eE}=n,eC={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){let{Err:t}=eC;if(e.length<2||2!==e[0])throw new t("Invalid signature integer tag");let r=e[1],n=e.subarray(2,r+2);if(!r||n.length!==r)throw new t("Invalid signature integer: wrong length");if(128&n[0])throw new t("Invalid signature integer: negative");if(0===n[0]&&!(128&n[1]))throw new t("Invalid signature integer: unnecessary leading zero");return{d:ev(n),l:e.subarray(r+2)}},toSig(e){let{Err:t}=eC,r="string"==typeof e?eE(e):e;if(!(r instanceof Uint8Array))throw Error("ui8a expected");let n=r.length;if(n<2||48!=r[0])throw new t("Invalid signature tag");if(r[1]!==n-2)throw new t("Invalid signature: incorrect length");let{d:i,l:a}=eC._parseInt(r.subarray(2)),{d:s,l:o}=eC._parseInt(a);if(o.length)throw new t("Invalid signature: left bytes after parsing");return{r:i,s}},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},n=t(r(e.s)),i=t(r(e.r)),a=n.length/2,s=i.length/2,o=r(a),l=r(s);return`30${r(s+a+4)}02${l}${i}02${o}${n}`}},eA=BigInt(0),ex=BigInt(1),eI=(BigInt(2),BigInt(3));BigInt(4);let eS=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),eT=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),eP=BigInt(1),eO
6584=BigInt(2),e_=(e,t)=>(e+t/eO)/t,eN=function(e,t,r=!1,n={}){if(e<=et)throw Error(`Expected Field ORDER > 0, got ${e}`);let{nBitLength:i,nByteLength:a}=eh(e,t);if(a>2048)throw Error("Field lengths over 2048 bytes are not supported");let s=function(e){if(e%ea===ei){let t=(e+er)/ea;return function(e,r){let n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw Error("Cannot find square root");return n}}if(e%eo===es){let t=(e-es)/eo;return function(e,r){let n=e.mul(r,en),i=e.pow(n,t),a=e.mul(r,i),s=e.mul(e.mul(a,en),i),o=e.mul(a,e.sub(s,e.ONE));if(!e.eql(e.sqr(o),r))throw Error("Cannot find square root");return o}}return function(e){let t,r,n,i=(e-er)/en;for(t=e-er,r=0;t%en===et;t/=en,r++);for(n=en;n<e&&function(e,t,r){if(r<=et||t<et)throw Error("Expected power/modulo > 0");if(r===er)return et;let n=er;for(;t>et;)t&er&&(n=n*e%r),e=e*e%r,t>>=er;return n}(n,i,e)!==e-er;n++);if(1===r){let t=(e+er)/ea;return function(e,r){let n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw Error("Cannot find square root");return n}}let a=(t+er)/en;return function(e,s){if(e.pow(s,i)===e.neg(e.ONE))throw Error("Cannot find square root");let o=r,l=e.pow(e.mul(e.ONE,n),t),c=e.pow(s,a),u=e.pow(s,t);for(;!e.eql(u,e.ONE);){if(e.eql(u,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(u);t<o&&!e.eql(r,e.ONE);t++)r=e.sqr(r);let r=e.pow(l,er<<BigInt(o-t-1));l=e.sqr(r),c=e.mul(c,r),u=e.mul(u,l),o=t}return c}}(e)}(e),o=Object.freeze({ORDER:e,BITS:i,BYTES:a,MASK:Z(i),ZERO:et,ONE:er,create:t=>el(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error(`Invalid field element: expected bigint, got ${typeof t}`);return et<=t&&t<e},is0:e=>e===et,isOdd:e=>(e&er)===er,neg:t=>el(-t,e),eql:(e,t)=>e===t,sqr:t=>el(t*t,e),add:(t,r)=>el(t+r,e),sub:(t,r)=>el(t-r,e),mul:(t,r)=>el(t*r,e),pow:(e,t)=>(function(e,t,r){if(r<et)throw Error("Expected power > 0");if(r===et)return e.ONE;if(r===er)return t;let n=e.ONE,i=t;for(;r>et;)r&er&&(n=e.mul(n,i)),i=e.sqr(i),r>>=er;return n})(o,e,t),div:(t,r)=>el(t*eu(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>eu(t,e),sqrt:n.sqrt||(e=>s(o,e)),invertBatch:e=>(function(e,t){let r=Array(t.length),n=t.reduce((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n)),e.ONE),i=e.inv(n);return t.reduceRight((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n)),i),r})(o,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?V(e,a):q(e,a),fromBytes:e=>{if(e.length!==a)throw Error(`Fp.fromBytes: expected ${a}, got ${e.length}`);return r?W(e):z(e)}});return Object.freeze(o)}(eS,void 0,void 0,{sqrt:function(e){let t=BigInt(3),r=BigInt(6),n=BigInt(11),i=BigInt(22),a=BigInt(23),s=BigInt(44),o=BigInt(88),l=e*e*e%eS,c=l*l*e%eS,u=ec(c,t,eS)*c%eS,d=ec(u,t,eS)*c%eS,h=ec(d,eO,eS)*l%e
6584S,p=ec(h,n,eS)*h%eS,f=ec(p,i,eS)*p%eS,m=ec(f,s,eS)*f%eS,g=ec(m,o,eS)*m%eS,y=ec(g,s,eS)*f%eS,b=ec(y,t,eS)*c%eS,w=ec(b,a,eS)*p%eS,v=ec(w,r,eS)*l%eS,E=ec(v,eO,eS);if(!eN.eql(eN.sqr(E),e))throw Error("Cannot find square root");return E}}),ek=function(e,t){let r=t=>(function(e){let t=function(e){let t=ew(e);return ee(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n:n}=t,i=r.BYTES+1,a=2*r.BYTES+1;function s(e){return el(e,n)}let{ProjectivePoint:o,normPrivateKeyToScalar:l,weierstrassEquation:c,isWithinCurveOrder:u}=function(e){let t=function(e){let t=ew(e);ee(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:i}=t;if(r){if(!n.eql(i,n.ZERO))throw Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,n=t.toBytes||((e,t,n)=>{let i=t.toAffine();return K(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),i=t.fromBytes||(e=>{let t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function a(e){let{a:n,b:i}=t,a=r.sqr(e),s=r.mul(a,e);return r.add(r.add(s,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),a(t.Gx)))throw Error("bad generator point: equation left != right");function s(e){return"bigint"==typeof e&&eA<e&&e<t.n}function o(e){if(!s(e))throw Error("Expected valid bigint: 0 < bigint < curve.n")}function l(e){let r,{allowedPrivateKeyLengths:n,nByteLength:i,wrapPrivateKey:a,n:s}=t;if(n&&"bigint"!=typeof e){if(e instanceof Uint8Array&&(e=D(e)),"string"!=typeof e||!n.includes(e.length))throw Error("Invalid key");e=e.padStart(2*i,"0")}try{r="bigint"==typeof e?e:z(G("private key",e,i))}catch(t){throw Error(`private key must be ${i} bytes, hex or bigint, not ${typeof e}`)}return a&&(r=el(r,s)),o(r),r}let c=new Map;function u(e){if(!(e instanceof d))throw Error("ProjectivePoint expected")}class d{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw Error("x required");if(null==t||!r.isValid(t))throw Error("y required");if(null==n||!r.isValid(n))throw Error("z required")}static fromAffine(e){let{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw Error("invalid affine point");if(e instanceof d)throw Error("projective point not allowed");let i=e=>r.eql(e,r.ZERO);return i(t)&&i(n)?d.ZERO:new d(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(d.fromAffine)}static fromHex(e){let t=d.fromAffine(i(G("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(l(e))}_setWindowSize(e){this._WINDOW_SIZE=e,c.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw Error("bad point: ZERO")}let{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw Error("bad point: x or y not FE");let i=r.sqr(n),s=a(e);if(!r.eql(i,s))throw Error("bad point: equation left != right");if(!this.isTorsionFree())throw Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw Error("Field doesn't support isOdd")}equals(e){u(e);let{px:t,py:n,pz:i}=this,{px:a,py:s,pz:o}=e,l=r.eql(r.mul(t,o),r.mul(a,i)),c=r.eql(r.mul(n,o),r.mul(s,i));return l&&c}negate(){return new d(this.px,r.neg(this.py),this.pz)}double(){let{a:e,b:n}=t,i=r.mul(n,eI),{px:a,py:s,pz:o}=this,l=r.ZERO,c=r.ZERO,u=r.ZERO,h=r.mul(a,a),p=r.mul(s,s),f=r.mul(o,o),m=r.mul(a,s);return m=r.add(m,m),u=r.mul(a,o),u=r.add(u,u),l=r.mul(e,u),c=r.mul(i,f),c=r.add(l,c),l=r.sub(p,c),c=r.add(p,c),c=r.mul(l,c),l=r.mul(m,l),u=r.mul(i,u),f=r.mul(e,f),m=r.sub(h,f),m=r.mul(e,m),m=r.add(m,u),u=r.add(h,h),h=r.add(u,h),h=r.add(h,f),h=r.mul(h,m),c=r.add(c,h),f=r.mul(s,o),f=r.add(f,f),h=r.mul(f,m),l=r.sub(l,h),u=r.mul(f,p),u=r.add(u,u),new d(l,c,u=r.add(u,u))}add(e){u(e);let{px:n,py:i,pz:a}=this,{px:s,py:o,pz:l}=e,c=r.ZERO,h=r.ZERO,p=r.ZERO,f=t.a,m=r.mul(t.b,eI),g=r.mul(n,s),y=r.mul(i,o),b=r.mul(a,l),w=r.add(n,i),v=r.add(s,o);w=r.mul(w,v),v=r.add(g,y),w=r.sub(w,v),v=r.add(n,a);let E=r.add(s,l);return v=r.mul(v,E),E=r.add(g,b),v=r.sub(v,E),E=r.add(i,a),c=r.add(o,l),E=r.mul(E,c),c=r.add(y,b),E=r.sub(E,c),p=r.mul(f,v),c=r.mul(m,b),p=r.add(c,p),c=r.sub(y,p),p=r.add(y,p),h=r.mul(c,p),y=r.add(g,g),y=r.add(y,g),b=r.mul(f,b),v=r.mul(m,v),y=r.add(y,b),b=r.sub(g,b),b=r.mul(f,b),v=r.add(v,b),g=r.mul(y,v),h=r.add(h,g),g=r.mul(E,v),c=r.mul(w,c),c=r.sub(c,g),g=r.mul(w,y),p=r.mul(E,p),new d(c,h,p=r.add(p,g))}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return p.wNAFCached(this,c,e,e=>{let t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(d.fromAffine)})}multiplyUnsafe(e){let n=d.ZERO;if(e===eA)return n;if(o(e),e===ex)return this;let{endo:i}=t;if(!i)return p.unsafeLadder(this,e);
6584let{k1neg:a,k1:s,k2neg:l,k2:c}=i.splitScalar(e),u=n,h=n,f=this;for(;s>eA||c>eA;)s&ex&&(u=u.add(f)),c&ex&&(h=h.add(f)),f=f.double(),s>>=ex,c>>=ex;return a&&(u=u.negate()),l&&(h=h.negate()),h=new d(r.mul(h.px,i.beta),h.py,h.pz),u.add(h)}multiply(e){let n,i;o(e);let{endo:a}=t;if(a){let{k1neg:t,k1:s,k2neg:o,k2:l}=a.splitScalar(e),{p:c,f:u}=this.wNAF(s),{p:h,f:f}=this.wNAF(l);c=p.constTimeNegate(t,c),h=p.constTimeNegate(o,h),h=new d(r.mul(h.px,a.beta),h.py,h.pz),n=c.add(h),i=u.add(f)}else{let{p:t,f:r}=this.wNAF(e);n=t,i=r}return d.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){let n=d.BASE,i=(e,t)=>t!==eA&&t!==ex&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),a=i(this,t).add(i(e,r));return a.is0()?void 0:a}toAffine(e){let{px:t,py:n,pz:i}=this,a=this.is0();null==e&&(e=a?r.ONE:r.inv(i));let s=r.mul(t,e),o=r.mul(n,e),l=r.mul(i,e);if(a)return{x:r.ZERO,y:r.ZERO};if(!r.eql(l,r.ONE))throw Error("invZ was invalid");return{x:s,y:o}}isTorsionFree(){let{h:e,isTorsionFree:r}=t;if(e===ex)return!0;if(r)return r(d,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:e,clearCofactor:r}=t;return e===ex?this:r?r(d,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),n(d,this,e)}toHex(e=!0){return D(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,r.ONE),d.ZERO=new d(r.ZERO,r.ONE,r.ZERO);let h=t.nBitLength,p=function(e,t){let r=(e,t)=>{let r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,i=t;for(;r>ey;)r&eb&&(n=n.add(i)),i=i.double(),r>>=eb;return n},precomputeWindow(e,t){let{windows:r,windowSize:i}=n(t),a=[],s=e,o=s;for(let e=0;e<r;e++){o=s,a.push(o);for(let e=1;e<i;e++)o=o.add(s),a.push(o);s=o.double()}return a},wNAF(t,i,a){let{windows:s,windowSize:o}=n(t),l=e.ZERO,c=e.BASE,u=BigInt(2**t-1),d=2**t,h=BigInt(t);for(let e=0;e<s;e++){let t=e*o,n=Number(a&u);a>>=h,n>o&&(n-=d,a+=eb);let s=t+Math.abs(n)-1,p=e%2!=0,f=n<0;0===n?c=c.add(r(p,i[t])):l=l.add(r(f,i[s]))}return{p:l,f:c}},wNAFCached(e,t,r,n){let i=e._WINDOW_SIZE||1,a=t.get(e);return a||(a=this.precomputeWindow(e,i),1!==i&&t.set(e,n(a))),this.wNAF(i,a,r)}}}(d,t.endo?Math.ceil(h/2):h);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:l,weierstrassEquation:a,isWithinCurveOrder:s}}({...t,toBytes(e,t,n){let i=t.toAffine(),a=r.toBytes(i.x),s=K;return n?s(Uint8Array.from([t.hasEvenY()?2:3]),a):s(Uint8Array.from([4]),a,r.toBytes(i.y))},fromBytes(e){let t=e.length,n=e[0],s=e.subarray(1);if(t===i&&(2===n||3===n)){let e=z(s);if(!(eA<e&&e<r.ORDER))throw Error("Point is not on curve");let t=c(e),i=r.sqrt(t);return(1&n)==1!=((i&ex)===ex)&&(i=r.neg(i)),{x:e,y:i}}if(t===a&&4===n)return{x:r.fromBytes(s.subarray(0,r.BYTES)),y:r.fromBytes(s.subarray(r.BYTES,2*r.BYTES))};throw Error(`Point of length ${t} was invalid. Expected ${i} compressed bytes or ${a} uncompressed bytes`)}}),d=e=>D(q(e,t.nByteLength)),h=(e,t,r)=>z(e.slice(t,r));class p{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){let r=t.nByteLength;return new p(h(e=G("compactSignature",e,2*r),0,r),h(e,r,2*r))}static fromDER(e){let{r:t,s:r}=eC.toSig(G("DER",e));return new p(t,r)}assertValidity(){if(!u(this.r))throw Error("r must be 0 < r < CURVE.n");if(!u(this.s))throw Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new p(this.r,this.s,e)}recoverPublicKey(e){let{r:i,s:a,recovery:l}=this,c=g(G("msgHash",e));if(null==l||![0,1,2,3].includes(l))throw Error("recovery id invalid");let u=2===l||3===l?i+t.n:i;if(u>=r.ORDER)throw Error("recovery id 2 or 3 invalid");let h=(1&l)==0?"02":"03",p=o.fromHex(h+d(u)),f=eu(u,n),m=s(-c*f),y=s(a*f),b=o.BASE.multiplyAndAddUnsafe(p,m,y);if(!b)throw Error("point at infinify");return b.assertValidity(),b}hasHighS(){return this.s>n>>ex}normalizeS(){return this.hasHighS()?new p(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return H(this.toDERHex())}toDERHex(){return eC.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return H(this.toCompactHex())}toCompactHex(){return d(this.r)+d(this.s)}}function f(e){let t=e instanceof Uint8Array,r="string"==typeof e,n=(t||r)&&e.length;return t?n===i||n===a:r?n===2*i||n===2*a:e instanceof o}let m=t.bits2int||function(e){let r=z(e),n=8*e.length-t.nBitLength;return n>0?r>>BigInt(n):r},g=t.bits2int_modN||function(e){return s(m(e))},y=Z(t.nBitLength);function b(e){if("bigint"!=typeof e)throw Error("bigint expected");if(!(eA<=e&&e<y))throw Error(`bigint expected < 2^${t.nBitLength}`);return q(e,t.nByteLength)}let w={lowS:t.lowS,prehash:!1},v={lowS:t.lowS,prehash:!1};return o.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return o.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(f(e))throw Error("first arg must be private key");if(!f(t))throw Error("second arg must be public key");return o.fromHex(t).multiply(l(e)).toRawBytes(r)},sign:function(e,i,a=w){let{seed:c,k2sig:d}=function(e,i,a=w){if(["recovered","canonical"].some(e=>e in a))throw Error("sign() legacy options not supported");let{hash:c,randomBytes:d}=t,{lowS:h,prehash:f,extraEntropy:y}=a;null==h&&(h=!0),e=G("msgHash",e),f&&(e=G("prehashed msgHash",c(e)));let v=g(e),E=l(i),C=[b(E),b(v)];if(null!=y){let e=!0===y?d(r.BYTES):y;C.push(G("extraEntropy",e))}return{seed:K(...C),k2sig:function(e){var t;let r=m(e);if(!u(r))return;let i=eu(r,n),a=o.BASE.multiply(r).toAffine(),l=s(a.x);if(l===eA)return;let c=s(i*s(v+l*E));if(c===eA)return;let d=2*(a.x!==l)|Number(a.y&ex),f=c;return h&&c>n>>ex&&(f=(t=c)>n>>
6584ex?s(-t):t,d^=1),new p(l,f,d)}}}(e,i,a);return Q(t.hash.outputLen,t.nByteLength,t.hmac)(c,d)},verify:function(e,r,i,a=v){let l,c;if(r=G("msgHash",r),i=G("publicKey",i),"strict"in a)throw Error("options.strict was renamed to lowS");let{lowS:u,prehash:d}=a;try{if("string"==typeof e||e instanceof Uint8Array)try{c=p.fromDER(e)}catch(t){if(!(t instanceof eC.Err))throw t;c=p.fromCompact(e)}else if("object"==typeof e&&"bigint"==typeof e.r&&"bigint"==typeof e.s){let{r:t,s:r}=e;c=new p(t,r)}else throw Error("PARSE");l=o.fromHex(i)}catch(e){if("PARSE"===e.message)throw Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&c.hasHighS())return!1;d&&(r=t.hash(r));let{r:h,s:f}=c,m=g(r),y=eu(f,n),b=s(m*y),w=s(h*y),E=o.BASE.multiplyAndAddUnsafe(l,b,w)?.toAffine();return!!E&&s(E.x)===h},ProjectivePoint:o,Signature:p,utils:{isValidPrivateKey(e){try{return l(e),!0}catch(e){return!1}},normPrivateKeyToScalar:l,randomPrivateKey:()=>{let e=ef(t.n);return function(e,t,r=!1){let n=e.length,i=ep(t),a=ef(t);if(n<16||n<a||n>1024)throw Error(`expected ${a}-1024 bytes of input, got ${n}`);let s=el(r?z(e):W(e),t-er)+er;return r?V(s,i):q(s,i)}(t.randomBytes(e),t.n)},precompute:(e=8,t=o.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}})({...e,...{hash:t,hmac:(e,...r)=>eg(t,e,(0,o.Id)(...r)),randomBytes:o.po}});return Object.freeze({...r(t),create:r})}({a:BigInt(0),b:BigInt(7),Fp:eN,n:eT,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-eP*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=BigInt("0x100000000000000000000000000000000"),a=e_(t*e,eT),s=e_(-r*e,eT),o=el(e-a*t-s*n,eT),l=el(-a*r-s*t,eT),c=o>i,u=l>i;if(c&&(o=eT-o),u&&(l=eT-l),o>i||l>i)throw Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:c,k1:o,k2neg:u,k2:l}}}},m);BigInt(0),ek.ProjectivePoint;var eR=r(56595);class eM{#tv;constructor(e){(0,A.MR)(32===(0,S.pO)(e),"invalid private key","privateKey","[REDACTED]"),this.#tv=(0,S.c$)(e)}get privateKey(){return this.#tv}get publicKey(){return eM.computePublicKey(this.#tv)}get compressedPublicKey(){return eM.computePublicKey(this.#tv,!0)}sign(e){(0,A.MR)(32===(0,S.pO)(e),"invalid digest length","digest",e);let t=ek.sign((0,S.Lm)(e),(0,S.Lm)(this.#tv),{lowS:!0});return B.t.from({r:(0,eR.up)(t.r,32),s:(0,eR.up)(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){let t=eM.computePublicKey(e);return(0,S.c$)(ek.getSharedSecret((0,S.Lm)(this.#tv),(0,S.q5)(t),!1))}static computePublicKey(e,t){let r=(0,S.q5)(e,"key");if(32===r.length){let e=ek.getPublicKey(r,!!t);return(0,S.c$)(e)}if(64===r.length){let e=new Uint8Array(65);e[0]=4,e.set(r,1),r=e}let n=ek.ProjectivePoint.fromHex(r);return(0,S.c$)(n.toRawBytes(t))}static recoverPublicKey(e,t){(0,A.MR)(32===(0,S.pO)(e),"invalid digest length","digest",e);let r=B.t.from(t),n=ek.Signature.fromCompact((0,S.Lm)((0,S.xW)([r.r,r.s]))),i=(n=n.addRecoveryBit(r.yParity)).recoverPublicKey((0,S.Lm)(e));return(0,A.MR)(null!=i,"invalid signature for digest","signature",t),"0x"+i.toHex(!1)}static addPoints(e,t,r){let n=ek.ProjectivePoint.fromHex(eM.computePublicKey(e).substring(2)),i=ek.ProjectivePoint.fromHex(eM.computePublicKey(t).substring(2));return"0x"+n.add(i).toHex(!!r)}}function eB(e,t,r){let n=0;for(let i=0;i<r;i++)n=256*n+e[t+i];return n}function ej(e,t,r,n){let i=[];for(;r<t+1+n;){let a=eU(e,r);i.push(a.result),r+=a.consumed,(0,A.vA)(r<=t+1+n,"child data too short","BUFFER_OVERRUN",{buffer:e,length:n,offset:t})}return{consumed:1+n,result:i}}function eU(e,t){(0,A.vA)(0!==e.length,"data too short","BUFFER_OVERRUN",{buffer:e,length:0,offset:1});let r=t=>{(0,A.vA)(t<=e.length,"data short segment too short","BUFFER_OVERRUN",{buffer:e,length:e.length,offset:t})};if(e[t]>=248){let n=e[t]-247;r(t+1+n);let i=eB(e,t+1,n);return r(t+1+n+i),ej(e,t,t+1+n,n+i)}if(e[t]>=192){let n=e[t]-192;return r(t+1+n),ej(e,t,t+1,n)}if(e[t]>=184){let n=e[t]-183;r(t+1+n);let i=eB(e,t+1,n);r(t+1+n+i);let a=(0,S.c$)(e.slice(t+1+n,t+1+n+i));return{consumed:1+n+i,result:a}}if(e[t]>=128){let n=e[t]-128;r(t+1+n);let i=(0,S.c$)(e.slice(t+1,t+1+n));return{consumed:1+n,result:i}}return{consumed:1,result:function(e){let t=e.toString(16);for(;t.length<2;)t="0"+t;return"0x"+t}(e[t])}}function e$(e){let t=(0,S.q5)(e,"data"),r=eU(t,0);return(0,A.MR)(r.consumed===t.length,"unexpected junk after rlp payload","data",e),r.result}var eL=r(49411),eD=r(85885),eF=r(59132);let eH=BigInt(0),ez=BigInt(2),eW=BigInt(27),eq=BigInt(28),eV=BigInt(35),eG=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),eK=Symbol.for("nodejs.util.inspect.custom");function eZ(e,t){let r=e.toString(16);for(;r.length<2;)r="0"+r;return"0x"+(r+=R(t).substring(4))}function eJ(e){return"0x"===e?null:(0,i.b)(e)}function eY(e,t){try{return(0,eD.$)(e)}catch(r){(0,A.MR)(!1,r.message,t,e)}}function eQ(e,t){return"0x"===e?0:(0,eR.WZ)(e,t)}function eX(e,t){if("0x"===e)return eH;let r=(0,eR.Ab)(e,t);return(0,A.MR)(r<=eG,"value exceeds uint size",t,r),r}function e0(e,t){let r=(0,eR.Ab)(e,"value"),n=(0,eR.c4)(r);return(0,A.MR)(n.length<=32,"value too large",`tx.${t}`,r),n}function e1(e){return(0,eD.$)(e).map(e=>[e.address,e.storageKeys])}function e2(e,t){let r;
6584try{if(r=eQ(t[0],"yParity"),0!==r&&1!==r)throw Error("bad yParity")}catch(e){(0,A.MR)(!1,"invalid yParity","yParity",t[0])}let n=(0,S.nx)(t[1],32),i=(0,S.nx)(t[2],32);e.signature=B.t.from({r:n,s:i,yParity:r})}class e5{#tE;#tC;#eH;#tA;#tx;#tI;#tS;#tT;#tP;#D;#tO;#t_;#tN;#tk;#tR;#tM;#tB;#tj;get type(){return this.#tE}set type(e){switch(e){case null:this.#tE=null;break;case 0:case"legacy":this.#tE=0;break;case 1:case"berlin":case"eip-2930":this.#tE=1;break;case 2:case"london":case"eip-1559":this.#tE=2;break;case 3:case"cancun":case"eip-4844":this.#tE=3;break;case 4:case"pectra":case"eip-7702":this.#tE=4;break;default:(0,A.MR)(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844";case 4:return"eip-7702"}return null}get to(){let e=this.#tC;return null==e&&3===this.type?a.j:e}set to(e){this.#tC=null==e?null:(0,i.b)(e)}get nonce(){return this.#tA}set nonce(e){this.#tA=(0,eR.WZ)(e,"value")}get gasLimit(){return this.#tx}set gasLimit(e){this.#tx=(0,eR.Ab)(e)}get gasPrice(){let e=this.#tI;return null==e&&(0===this.type||1===this.type)?eH:e}set gasPrice(e){this.#tI=null==e?null:(0,eR.Ab)(e,"gasPrice")}get maxPriorityFeePerGas(){let e=this.#tS;return null==e?2===this.type||3===this.type?eH:null:e}set maxPriorityFeePerGas(e){this.#tS=null==e?null:(0,eR.Ab)(e,"maxPriorityFeePerGas")}get maxFeePerGas(){let e=this.#tT;return null==e?2===this.type||3===this.type?eH:null:e}set maxFeePerGas(e){this.#tT=null==e?null:(0,eR.Ab)(e,"maxFeePerGas")}get data(){return this.#eH}set data(e){this.#eH=(0,S.c$)(e)}get value(){return this.#tP}set value(e){this.#tP=(0,eR.Ab)(e,"value")}get chainId(){return this.#D}set chainId(e){this.#D=(0,eR.Ab)(e)}get signature(){return this.#tO||null}set signature(e){this.#tO=null==e?null:B.t.from(e)}isValid(){let e=this.signature;if(e&&!e.isValid())return!1;let t=this.authorizationList;if(t){for(let e of t)if(!e.signature.isValid())return!1}return!0}get accessList(){let e=this.#t_||null;return null==e?1===this.type||2===this.type||3===this.type?[]:null:e}set accessList(e){this.#t_=null==e?null:(0,eD.$)(e)}get authorizationList(){let e=this.#tB||null;return null==e&&4===this.type?[]:e}set authorizationList(e){this.#tB=null==e?null:e.map(e=>(0,eF.M)(e))}get maxFeePerBlobGas(){let e=this.#tN;return null==e&&3===this.type?eH:e}set maxFeePerBlobGas(e){this.#tN=null==e?null:(0,eR.Ab)(e,"maxFeePerBlobGas")}get blobVersionedHashes(){let e=this.#tk;return null==e&&3===this.type?[]:e}set blobVersionedHashes(e){if(null!=e){(0,A.MR)(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let t=0;t<e.length;t++)(0,A.MR)((0,S.Lo)(e[t],32),"invalid blobVersionedHash",`value[${t}]`,e[t])}this.#tk=e}get blobs(){return null==this.#tM?null:this.#tM.map(e=>Object.assign({},e))}set blobs(e){if(null==e){this.#tM=null;return}let t=[],r=[];for(let n=0;n<e.length;n++){let i=e[n];if((0,S.f)(i)){(0,A.vA)(this.#tR,"adding a raw blob requires a KZG library","UNSUPPORTED_OPERATION",{operation:"set blobs()"});let e=(0,S.q5)(i);if((0,A.MR)(e.length<=131072,"blob is too large",`blobs[${n}]`,i),131072!==e.length){let t=new Uint8Array(131072);t.set(e),e=t}let a=this.#tR.blobToKzgCommitment(e),s=(0,S.c$)(this.#tR.computeBlobKzgProof(e,a));t.push({data:(0,S.c$)(e),commitment:(0,S.c$)(a),proof:s}),r.push(eZ(1,a))}else{let e=(0,S.c$)(i.data),n=(0,S.c$)(i.commitment),a=(0,S.c$)(i.proof);t.push({data:e,commitment:n,proof:a}),r.push(eZ(1,n))}}this.#tM=t,this.#tk=r}get kzg(){return this.#tR}set kzg(e){if(null==e)this.#tR=null;else this.#tR={blobToKzgCommitment:t=>{if("computeBlobProof"in e){if("blobToKzgCommitment"in e&&"function"==typeof e.blobToKzgCommitment)return(0,S.q5)(e.blobToKzgCommitment((0,S.c$)(t)))}else if("blobToKzgCommitment"in e&&"function"==typeof e.blobToKzgCommitment)return(0,S.q5)(e.blobToKzgCommitment(t));if("blobToKZGCommitment"in e&&"function"==typeof e.blobToKZGCommitment)return(0,S.q5)(e.blobToKZGCommitment((0,S.c$)(t)));(0,A.MR)(!1,"unsupported KZG library","kzg",e)},computeBlobKzgProof:(t,r)=>"computeBlobProof"in e&&"function"==typeof e.computeBlobProof?(0,S.q5)(e.computeBlobProof((0,S.c$)(t),(0,S.c$)(r))):"computeBlobKzgProof"in e&&"function"==typeof e.computeBlobKzgProof?e.computeBlobKzgProof(t,r):"computeBlobKZGProof"in e&&"function"==typeof e.computeBlobKZGProof?(0,S.q5)(e.computeBlobKZGProof((0,S.c$)(t),(0,S.c$)(r))):void(0,A.MR)(!1,"unsupported KZG library","kzg",e)}}get blobWrapperVersion(){return this.#tj}set blobWrapperVersion(e){this.#tj=e}constructor(){this.#tE=null,this.#tC=null,this.#tA=0,this.#tx=eH,this.#tI=null,this.#tS=null,this.#tT=null,this.#eH="0x",this.#tP=eH,this.#D=eH,this.#tO=null,this.#t_=null,this.#tN=null,this.#tk=null,this.#tR=null,this.#tM=null,this.#tB=null,this.#tj=null}get hash(){return null==this.signature?null:(0,j.S)(this.#tU(!0,!1))}get unsignedHash(){return(0,j.S)(this.unsignedSerialized)}get from(){var e,t,r;let n;return null==this.signature?null:(e=this.unsignedHash,t=this.signature.getCanonical(),n="string"==typeof(r=eM.recoverPublicKey(e,t))?eM.computePublicKey(r,!1):r.publicKey,(0,i.b)((0,j.S)("0x"+n.substring(4)).substring(26)))}get fromPublicKey(){return null==this.signature?null:eM.recoverPublicKey(this.unsignedHash,this.signature.getCanonical())}isSigned(){return null!=this.signature}#tU(e,t){(0,A.vA)(!e||null!=this.signature,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});let r=e?this.signature:null;switch(this.inferType()){case 0:return function(e,t){let r=[e0(e.nonce,"nonce"),e0(e.gasPrice||0,"gasPrice"),e0(e.gasLim
6584it,"gasLimit"),e.to||"0x",e0(e.value,"value"),e.data],n=eH;if(e.chainId!=eH)n=(0,eR.Ab)(e.chainId,"tx.chainId"),(0,A.MR)(!t||null==t.networkV||t.legacyChainId===n,"tx.chainId/sig.v mismatch","sig",t);else if(e.signature){let t=e.signature.legacyChainId;null!=t&&(n=t)}if(!t)return n!==eH&&(r.push((0,eR.c4)(n)),r.push("0x"),r.push("0x")),(0,eL.R)(r);let i=BigInt(27+t.yParity);return n!==eH?i=B.t.getChainIdV(n,t.v):BigInt(t.v)!==i&&(0,A.MR)(!1,"tx.chainId/sig.v mismatch","sig",t),r.push((0,eR.c4)(i)),r.push((0,eR.c4)(t.r)),r.push((0,eR.c4)(t._s)),(0,eL.R)(r)}(this,r);case 1:let n=[e0(this.chainId,"chainId"),e0(this.nonce,"nonce"),e0(this.gasPrice||0,"gasPrice"),e0(this.gasLimit,"gasLimit"),this.to||"0x",e0(this.value,"value"),this.data,e1(this.accessList||[])];return r&&(n.push(e0(r.yParity,"recoveryParam")),n.push((0,eR.c4)(r.r)),n.push((0,eR.c4)(r.s))),(0,S.xW)(["0x01",(0,eL.R)(n)]);case 2:let i=[e0(this.chainId,"chainId"),e0(this.nonce,"nonce"),e0(this.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),e0(this.maxFeePerGas||0,"maxFeePerGas"),e0(this.gasLimit,"gasLimit"),this.to||"0x",e0(this.value,"value"),this.data,e1(this.accessList||[])];return r&&(i.push(e0(r.yParity,"yParity")),i.push((0,eR.c4)(r.r)),i.push((0,eR.c4)(r.s))),(0,S.xW)(["0x02",(0,eL.R)(i)]);case 3:return function(e,t,r){let n=[e0(e.chainId,"chainId"),e0(e.nonce,"nonce"),e0(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),e0(e.maxFeePerGas||0,"maxFeePerGas"),e0(e.gasLimit,"gasLimit"),e.to||a.j,e0(e.value,"value"),e.data,e1(e.accessList||[]),e0(e.maxFeePerBlobGas||0,"maxFeePerBlobGas"),function(e,t){(0,A.MR)(Array.isArray(e),`invalid ${t}`,"value",e);for(let t=0;t<e.length;t++)(0,A.MR)((0,S.Lo)(e[t],32),"invalid ${ param } hash",`value[${t}]`,e[t]);return e}(e.blobVersionedHashes||[],"blobVersionedHashes")];if(t&&(n.push(e0(t.yParity,"yParity")),n.push((0,eR.c4)(t.r)),n.push((0,eR.c4)(t.s)),r)){if(null!=e.blobWrapperVersion){let t=(0,eR.c4)(e.blobWrapperVersion),i=[];for(let{proof:e}of r){let t=(0,S.q5)(e),r=t.length/128;for(let e=0;e<t.length;e+=r)i.push(t.subarray(e,e+r))}return(0,S.xW)(["0x03",(0,eL.R)([n,t,r.map(e=>e.data),r.map(e=>e.commitment),i])])}return(0,S.xW)(["0x03",(0,eL.R)([n,r.map(e=>e.data),r.map(e=>e.commitment),r.map(e=>e.proof)])])}return(0,S.xW)(["0x03",(0,eL.R)(n)])}(this,r,t?this.blobs:null);case 4:let s=[e0(this.chainId,"chainId"),e0(this.nonce,"nonce"),e0(this.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),e0(this.maxFeePerGas||0,"maxFeePerGas"),e0(this.gasLimit,"gasLimit"),this.to||"0x",e0(this.value,"value"),this.data,e1(this.accessList||[]),(this.authorizationList||[]).map(e=>[e0(e.chainId,"chainId"),e.address,e0(e.nonce,"nonce"),e0(e.signature.yParity,"yParity"),(0,eR.c4)(e.signature.r),(0,eR.c4)(e.signature._s)])];return r&&(s.push(e0(r.yParity,"yParity")),s.push((0,eR.c4)(r.r)),s.push((0,eR.c4)(r.s))),(0,S.xW)(["0x04",(0,eL.R)(s)])}(0,A.vA)(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get serialized(){return this.#tU(!0,!0)}get unsignedSerialized(){return this.#tU(!1,!1)}inferType(){let e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){let e=null!=this.gasPrice,t=null!=this.maxFeePerGas||null!=this.maxPriorityFeePerGas,r=null!=this.accessList,n=null!=this.#tN||this.#tk;null!=this.maxFeePerGas&&null!=this.maxPriorityFeePerGas&&(0,A.vA)(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),(0,A.vA)(!t||0!==this.type&&1!==this.type,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),(0,A.vA)(0!==this.type||!r,"legacy transaction cannot have accessList","BAD_DATA",{value:this});let i=[];return null!=this.type?i.push(this.type):this.authorizationList&&this.authorizationList.length?i.push(4):t?i.push(2):e?(i.push(1),r||i.push(0)):r?(i.push(1),i.push(2)):(n&&this.to||(i.push(0),i.push(1),i.push(2)),i.push(3)),i.sort(),i}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}clone(){return e5.from(this)}toJSON(){let e=e=>null==e?null:e.toString();
6584return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}[eK](){return this.toString()}toString(){let e=[],t=t=>{let r=this[t];"string"==typeof r&&(r=JSON.stringify(r)),e.push(`${t}: ${r}`)};this.type&&t("type"),t("to"),t("data"),t("nonce"),t("gasLimit"),t("value"),null!=this.chainId&&t("chainId"),this.signature&&(t("from"),e.push(`signature: ${this.signature.toString()}`));let r=this.authorizationList;if(r){let t=[];for(let e of r){let r=[];r.push(`address: ${JSON.stringify(e.address)}`),null!=e.nonce&&r.push(`nonce: ${e.nonce}`),null!=e.chainId&&r.push(`chainId: ${e.chainId}`),e.signature&&r.push(`signature: ${e.signature.toString()}`),t.push(`Authorization { ${r.join(", ")} }`)}e.push(`authorizations: [ ${t.join(", ")} ]`)}return`Transaction { ${e.join(", ")} }`}static from(e){if(null==e)return new e5;if("string"==typeof e){let t=(0,S.q5)(e);if(t[0]>=127)return e5.from(function(e){let t=e$(e);(0,A.MR)(Array.isArray(t)&&(9===t.length||6===t.length),"invalid field count for legacy transaction","data",e);let r={type:0,nonce:eQ(t[0],"nonce"),gasPrice:eX(t[1],"gasPrice"),gasLimit:eX(t[2],"gasLimit"),to:eJ(t[3]),value:eX(t[4],"value"),data:(0,S.c$)(t[5]),chainId:eH};if(6===t.length)return r;let n=eX(t[6],"v"),i=eX(t[7],"r"),a=eX(t[8],"s");if(i===eH&&a===eH)r.chainId=n;else{let e=(n-eV)/ez;e<eH&&(e=eH),r.chainId=e,(0,A.MR)(e!==eH||n===eW||n===eq,"non-canonical legacy v","v",t[6]),r.signature=B.t.from({r:(0,S.nx)(t[7],32),s:(0,S.nx)(t[8],32),v:n})}return r}(t));switch(t[0]){case 1:return e5.from(function(e){let t=e$((0,S.q5)(e).slice(1));(0,A.MR)(Array.isArray(t)&&(8===t.length||11===t.length),"invalid field count for transaction type: 1","data",(0,S.c$)(e));let r={type:1,chainId:eX(t[0],"chainId"),nonce:eQ(t[1],"nonce"),gasPrice:eX(t[2],"gasPrice"),gasLimit:eX(t[3],"gasLimit"),to:eJ(t[4]),value:eX(t[5],"value"),data:(0,S.c$)(t[6]),accessList:eY(t[7],"accessList")};return 8===t.length||e2(r,t.slice(8)),r}(t));case 2:return e5.from(function(e){let t=e$((0,S.q5)(e).slice(1));(0,A.MR)(Array.isArray(t)&&(9===t.length||12===t.length),"invalid field count for transaction type: 2","data",(0,S.c$)(e));let r={type:2,chainId:eX(t[0],"chainId"),nonce:eQ(t[1],"nonce"),maxPriorityFeePerGas:eX(t[2],"maxPriorityFeePerGas"),maxFeePerGas:eX(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:eX(t[4],"gasLimit"),to:eJ(t[5]),value:eX(t[6],"value"),data:(0,S.c$)(t[7]),accessList:eY(t[8],"accessList")};return 9===t.length||e2(r,t.slice(9)),r}(t));case 3:return e5.from(function(e){let t=e$((0,S.q5)(e).slice(1)),r="3",n=null,i=null;if(4===t.length&&Array.isArray(t[0])){r="3 (network format)";let e=t[1],n=t[2],a=t[3];(0,A.MR)(Array.isArray(e),"invalid network format: blobs not an array","fields[1]",e),(0,A.MR)(Array.isArray(n),"invalid network format: commitments not an array","fields[2]",n),(0,A.MR)(Array.isArray(a),"invalid network format: proofs not an array","fields[3]",a),(0,A.MR)(e.length===n.length,"invalid network format: blobs/commitments length mismatch","fields",t),(0,A.MR)(e.length===a.length,"invalid network format: blobs/proofs length mismatch","fields",t),i=[];for(let r=0;r<t[1].length;r++)i.push({data:e[r],commitment:n[r],proof:a[r]});t=t[0]}else if(5===t.length&&Array.isArray(t[0])){r="3 (EIP-7594 network format)",n=(0,eR.WZ)(t[1]);let e=t[2],a=t[3],s=t[4];(0,A.MR)(1===n,`unsupported EIP-7594 network format version: ${n}`,"fields[1]",n),(0,A.MR)(Array.isArray(e),"invalid EIP-7594 network format: blobs not an array","fields[2]",e),(0,A.MR)(Array.isArray(a),"invalid EIP-7594 network format: commitments not an array","fields[3]",a),(0,A.MR)(Array.isArray(s),"invalid EIP-7594 network format: proofs not an array","fields[4]",s),(0,A.MR)(e.length===a.length,"invalid network format: blobs/commitments length mismatch","fields",t),(0,A.MR)(128*e.length===s.length,"invalid network format: blobs/proofs length mismatch","fields",t),i=[];for(let t=0;t<e.length;t++){let r=[];for(let e=0;e<128;
6584e++)r.push(s[128*t+e]);i.push({data:e[t],commitment:a[t],proof:(0,S.xW)(r)})}t=t[0]}(0,A.MR)(Array.isArray(t)&&(11===t.length||14===t.length),`invalid field count for transaction type: ${r}`,"data",(0,S.c$)(e));let a={type:3,chainId:eX(t[0],"chainId"),nonce:eQ(t[1],"nonce"),maxPriorityFeePerGas:eX(t[2],"maxPriorityFeePerGas"),maxFeePerGas:eX(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:eX(t[4],"gasLimit"),to:eJ(t[5]),value:eX(t[6],"value"),data:(0,S.c$)(t[7]),accessList:eY(t[8],"accessList"),maxFeePerBlobGas:eX(t[9],"maxFeePerBlobGas"),blobVersionedHashes:t[10],blobWrapperVersion:n};i&&(a.blobs=i),(0,A.MR)(null!=a.to,`invalid address for transaction type: ${r}`,"data",e),(0,A.MR)(Array.isArray(a.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",e);for(let t=0;t<a.blobVersionedHashes.length;t++)(0,A.MR)((0,S.Lo)(a.blobVersionedHashes[t],32),`invalid blobVersionedHash at index ${t}: must be length 32`,"data",e);return 11===t.length||e2(a,t.slice(11)),a}(t));case 4:return e5.from(function(e){let t=e$((0,S.q5)(e).slice(1));(0,A.MR)(Array.isArray(t)&&(10===t.length||13===t.length),"invalid field count for transaction type: 4","data",(0,S.c$)(e));let r={type:4,chainId:eX(t[0],"chainId"),nonce:eQ(t[1],"nonce"),maxPriorityFeePerGas:eX(t[2],"maxPriorityFeePerGas"),maxFeePerGas:eX(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:eX(t[4],"gasLimit"),to:eJ(t[5]),value:eX(t[6],"value"),data:(0,S.c$)(t[7]),accessList:eY(t[8],"accessList"),authorizationList:function(e,t){try{if(!Array.isArray(e))throw Error("authorizationList: invalid array");let t=[];for(let r=0;r<e.length;r++){let n=e[r];if(!Array.isArray(n))throw Error(`authorization[${r}
6584]: invalid array`);if(6!==n.length)throw Error(`authorization[${r}]: wrong length`);if(!n[1])throw Error(`authorization[${r}]: null address`);t.push({address:eJ(n[1]),nonce:eX(n[2],"nonce"),chainId:eX(n[0],"chainId"),signature:B.t.from({yParity:eQ(n[3],"yParity"),r:(0,S.nx)(n[4],32),s:(0,S.nx)(n[5],32)})})}return t}catch(r){(0,A.MR)(!1,r.message,t,e)}}(t[9],"authorizationList")};return 10===t.length||e2(r,t.slice(10)),r}(t))}(0,A.vA)(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}let t=new e5;return null!=e.type&&(t.type=e.type),null!=e.to&&(t.to=e.to),null!=e.nonce&&(t.nonce=e.nonce),null!=e.gasLimit&&(t.gasLimit=e.gasLimit),null!=e.gasPrice&&(t.gasPrice=e.gasPrice),null!=e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas),null!=e.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null!=e.maxFeePerBlobGas&&(t.maxFeePerBlobGas=e.maxFeePerBlobGas),null!=e.data&&(t.data=e.data),null!=e.value&&(t.value=e.value),null!=e.chainId&&(t.chainId=e.chainId),null!=e.signature&&(t.signature=B.t.from(e.signature)),null!=e.accessList&&(t.accessList=e.accessList),null!=e.authorizationList&&(t.authorizationList=e.authorizationList),null!=e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes),null!=e.kzg&&(t.kzg=e.kzg),null!=e.blobWrapperVersion&&(t.blobWrapperVersion=e.blobWrapperVersion),null!=e.blobs&&(t.blobs=e.blobs),null!=e.hash&&((0,A.MR)(t.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),(0,A.MR)(t.hash===e.hash,"hash mismatch","tx",e)),null!=e.from&&((0,A.MR)(t.isSigned(),"unsigned transaction cannot define '.from'","tx",e),(0,A.MR)(t.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),t}}},83271:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTestClient=function(e){let{key:t="test",name:r="Test Client",mode:a}=e;return(0,n.createClient)({...e,key:t,name:r,type:"testClient"}).extend(e=>({mode:a,...(0,i.testActions)({mode:a})(e)}))};let n=r(85583),i=r(89507)},83289:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidDecimalNumberError=void 0;let n=r(45226);class i extends n.BaseError{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}t.InvalidDecimalNumberError=i},83390:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.estimateFeesPerGas=l,t.internal_estimateFeesPerGas=c;let n=r(75445),i=r(95847),a=r(18697),s=r(70200),o=r(66629);async function l(e,t){return c(e,t)}async function c(e,t){let{block:r,chain:l=e.chain,request:c,type:u="eip1559"}=t||{},d=await (async()=>"function"==typeof l?.fees?.baseFeeMultiplier?l.fees.baseFeeMultiplier({block:r,client:e,request:c}):l?.fees?.baseFeeMultiplier??1.2)();if(d<1)throw new n.BaseFeeScalarError;let h=d.toString().split(".")[1]?.length??0,p=10**h,f=e=>e*BigInt(Math.ceil(d*p))/BigInt(p),m=r||await (0,i.getAction)(e,s.getBlock,"getBlock")({});if("function"==typeof l?.fees?.estimateFeesPerGas){let t=await l.fees.estimateFeesPerGas({block:r,client:e,multiply:f,request:c,type:u});if(null!==t)return t}if("eip1559"===u){if("bigint"!=typeof m.baseFeePerGas)throw new n.Eip1559FeesNotSupportedError;let t="bigint"==typeof c?.maxPriorityFeePerGas?c.maxPriorityFeePerGas:await (0,a.internal_estimateMaxPriorityFeePerGas)(e,{block:m,chain:l,request:c}),r=f(m.baseFeePerGas);return{maxFeePerGas:c?.maxFeePerGas??r+t,maxPriorityFeePerGas:t}}return{gasPrice:c?.gasPrice??f(await (0,i.getAction)(e,o.getGasPrice,"getGasPrice")({}))}}},83545:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sidecarsToVersionedHashes=function(e){let{sidecars:t,version:r}=e,i=e.to??("string"==typeof t[0].blob?"hex":"bytes"),a=[];for(let{commitment:e}of t)a.push((0,n.commitmentToVersionedHash)({commitment:e,to:i,version:r}));return a};let n=r(69546)},83562:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseAccount=function(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}},83627:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(88787),s=r(91392),o=r(46756),l=r(63412);let c=(0,s.AH)` 6585 slot { 6586 width: 100%; 6587 display: inline-block; 6588 font-style: normal; 6589 overflow: inherit; 6590 text-overflow: inherit; 6591 text-align: var(--local-align); 6592 color: var(--local-color); 6593 } 6594 6595 .wui-line-clamp-1 { 6596 overflow: hidden; 6597 display: -webkit-box; 6598 -webkit-box-orient: vertical; 6599 -webkit-line-clamp: 1; 6600 } 6601 6602 .wui-line-clamp-2 { 6603 overflow: hidden; 6604 display: -webkit-box; 6605 -webkit-box-orient: vertical; 6606 -webkit-line-clamp: 2; 6607 } 6608 6609 /* -- Headings --------------------------------------------------- */ 6610 .wui-font-h1-regular-mono { 6611 font-size: ${({textSize:e})=>e.h1}; 6612 line-height: ${({typography:e})=>e["h1-regular-mono"].lineHeight}; 6613 letter-spacing: ${({typography:e})=>e["h1-regular-mono"].letterSpacing}; 6614 font-weight: ${({fontWeight:e})=>e.regular}; 6615 font-family: ${({fontFamily:e})=>e.mono}; 6616 } 6617 6618 .wui-font-h1-regular { 6619 font-size: ${({textSize:e})=>e.h1}; 6620 line-height: ${({typography:e})=>e["h1-regular"].lineHeight}; 6621 letter-spacing: ${({typography:e})=>e["h1-regular"].letterSpacing}; 6622 font-weight: ${({fontWeight:e})=>e.regular}; 6623 font-family: ${({fontFamily:e})=>e.regular}; 6624 font-feature-settings: 6625 'liga' off, 6626 'clig' off; 6627 } 6628 6629 .wui-font-h1-medium { 6630 font-size: ${({textSize:e})=>e.h1}; 6631 line-height: ${({typography:e})=>e["h1-medium"].lineHeight}; 6632 letter-spacing: ${({typography:e})=>e["h1-medium"].letterSpacing}; 6633 font-weight: ${({fontWeight:e})=>e.medium}; 6634 font-family: ${({fontFamily:e})=>e.regular}; 6635 font-feature-settings: 6636 'liga' off, 6637 'clig' off; 6638 } 6639 6640 .wui-font-h2-regular-mono { 6641 font-size: ${({textSize:e})=>e.h2}; 6642 line-height: ${({typography:e})=>e["h2-regular-mono"].lineHeight}; 6643 letter-spacing: ${({typography:e})=>e["h2-regular-mono"].letterSpacing}; 6644 font-weight: ${({fontWeight:e})=>e.regular}; 6645 font-family: ${({fontFamily:e})=>e.mono}; 6646 } 6647 6648 .wui-font-h2-regular { 6649 font-size: ${({textSize:e})=>e.h2}; 6650 line-height: ${({typography:e})=>e["h2-regular"].lineHeight}; 6651 letter-spacing: ${({typography:e})=>e["h2-regular"].letterSpacing}; 6652 font-weight: ${({fontWeight:e})=>e.regular}; 6653 font-family: ${({fontFamily:e})=>e.regular}; 6654 font-feature-settings: 6655 'liga' off, 6656 'clig' off; 6657 } 6658 6659 .wui-font-h2-medium { 6660 font-size: ${({textSize:e})=>e.h2}; 6661 line-height: ${({typography:e})=>e["h2-medium"].lineHeight}; 6662 letter-spacing: ${({typography:e})=>e["h2-medium"].letterSpacing}; 6663 font-weight: ${({fontWeight:e})=>e.medium}; 6664 font-family: ${({fontFamily:e})=>e.regular}; 6665 font-feature-settings: 6666 'liga' off, 6667 'clig' off; 6668 } 6669 6670 .wui-font-h3-regular-mono { 6671 font-size: ${({textSize:e})=>e.h3}; 6672 line-height: ${({typography:e})=>e["h3-regular-mono"].lineHeight}; 6673 letter-spacing: ${({typography:e})=>e["h3-regular-mono"].letterSpacing}; 6674 font-weight: ${({fontWeight:e})=>e.regular}; 6675 font-family: ${({fontFamily:e})=>e.mono}; 6676 } 6677 6678 .wui-font-h3-regular { 6679 font-size: ${({textSize:e})=>e.h3}; 6680 line-height: ${({typography:e})=>e["h3-regular"].lineHeight}; 6681 letter-spacing: ${({typography:e})=>e["h3-regular"].letterSpacing}; 6682 font-weight: ${({fontWeight:e})=>e.regular}; 6683 font-family: ${({fontFamily:e})=>e.regular}; 6684 font-feature-settings: 6685 'liga' off, 6686 'clig' off; 6687 } 6688 6689 .wui-font-h3-medium { 6690 font-size: ${({textSize:e})=>e.h3}; 6691 line-height: ${({typography:e})=>e["h3-medium"].lineHeight}; 6692 letter-spacing: ${({typography:e})=>e["h3-medium"].letterSpacing}; 6693 font-weight: ${({fontWeight:e})=>e.medium}; 6694 font-family: ${({fontFamily:e})=>e.regular}; 6695 font-feature-settings: 6696 'liga' off, 6697 'clig' off; 6698 } 6699 6700 .wui-font-h4-regular-mono { 6701 font-size: ${({textSize:e})=>e.h4}; 6702 line-height: ${({typography:e})=>e["h4-regular-mono"].lineHeight}; 6703 letter-spacing: ${({typography:e})=>e["h4-regular-mono"].letterSpacing}; 6704 font-weight: ${({fontWeight:e})=>e.regular}; 6705 font-family: ${({fontFamily:e})=>e.mono}; 6706 } 6707 6708 .wui-font-h4-regular { 6709 font-size: ${({textSize:e})=>e.h4}; 6710 line-height: ${({typography:e})=>e["h4-regular"].lineHeight}; 6711 letter-spacing: ${({typography:e})=>e["h4-regular"].letterSpacing}; 6712 font-weight: ${({fontWeight:e})=>e.regular}; 6713 font-family: ${({fontFamily:e})=>e.regular}; 6714 font-feature-settings: 6715 'liga' off, 6716 'clig' off; 6717 } 6718 6719 .wui-font-h4-medium { 6720 font-size: ${({textSize:e})=>e.h4}; 6721 line-height: ${({typography:e})=>e["h4-medium"].lineHeight}; 6722 letter-spacing: ${({typography:e})=>e["h4-medium"].letterSpacing}; 6723 font-weight: ${({fontWeight:e})=>e.medium}; 6724 font-family: ${({fontFamily:e})=>e.regular}; 6725 font-feature-settings: 6726 'liga' off, 6727 'clig' off; 6728 } 6729 6730 .wui-font-h5-regular-mono { 6731 font-size: ${({textSize:e})=>e.h5}; 6732 line-height: ${({typography:e})=>e["h5-regular-mono"].lineHeight}; 6733 letter-spacing: ${({typography:e})=>e["h5-regular-mono"].letterSpacing}; 6734 font-weight: ${({fontWeight:e})=>e.regular}; 6735 font-family: ${({fontFamily:e})=>e.mono}; 6736 } 6737 6738 .wui-font-h5-regular { 6739 font-size: ${({textSize:e})=>e.h5}; 6740 line-height: ${({typography:e})=>e["h5-regular"].lineHeight}; 6741 letter-spacing: ${({typography:e})=>e["h5-regular"].letterSpacing}; 6742 font-weight: ${({fontWeight:e})=>e.regular}; 6743 font-family: ${({fontFamily:e})=>e.regular}; 6744 font-feature-settings: 6745 'liga' off, 6746 'clig' off; 6747 } 6748 6749 .wui-font-h5-medium { 6750 font-size: ${({textSize:e})=>e.h5}; 6751 line-height: ${({typography:e})=>e["h5-medium"].lineHeight}; 6752 letter-spacing: ${({typography:e})=>e["h5-medium"].letterSpacing}; 6753 font-weight: ${({fontWeight:e})=>e.medium}; 6754 font-family: ${({fontFamily:e})=>e.regular}; 6755 font-feature-settings: 6756 'liga' off, 6757 'clig' off; 6758 } 6759 6760 .wui-font-h6-regular-mono { 6761 font-size: ${({textSize:e})=>e.h6}; 6762 line-height: ${({typography:e})=>e["h6-regular-mono"].lineHeight}; 6763 letter-spacing: ${({typography:e})=>e["h6-regular-mono"].letterSpacing}; 6764 font-weight: ${({fontWeight:e})=>e.regular}; 6765 font-family: ${({fontFamily:e})=>e.mono}; 6766 } 6767 6768 .wui-font-h6-regular { 6769 font-size: ${({textSize:e})=>e.h6}; 6770 line-height: ${({typography:e})=>e["h6-regular"].lineHeight}; 6771 letter-spacing: ${({typography:e})=>e["h6-regular"].letterSpacing}; 6772 font-weight: ${({fontWeight:e})=>e.regular}; 6773 font-family: ${({fontFamily:e})=>e.regular}; 6774 font-feature-settings: 6775 'liga' off, 6776 'clig' off; 6777 } 6778 6779 .wui-font-h6-medium { 6780 font-size: ${({textSize:e})=>e.h6}; 6781 line-height: ${({typography:e})=>e["h6-medium"].lineHeight}; 6782 letter-spacing: ${({typography:e})=>e["h6-medium"].letterSpacing}; 6783 font-weight: ${({fontWeight:e})=>e.medium}; 6784 font-family: ${({fontFamily:e})=>e.regular}; 6785 font-feature-settings: 6786 'liga' off, 6787 'clig' off; 6788 } 6789 6790 .wui-font-lg-regular-mono { 6791 font-size: ${({textSize:e})=>e.large}; 6792 line-height: ${({typography:e})=>e["lg-regular-mono"].lineHeight}; 6793 letter-spacing: ${({typography:e})=>e["lg-regular-mono"].letterSpacing}; 6794 font-weight: ${({fontWeight:e})=>e.regular}; 6795 font-family: ${({fontFamily:e})=>e.mono}; 6796 } 6797 6798 .wui-font-lg-regular { 6799 font-size: ${({textSize:e})=>e.large}; 6800 line-height: ${({typography:e})=>e["lg-regular"].lineHeight}; 6801 letter-spacing: ${({typography:e})=>e["lg-regular"].letterSpacing}; 6802 font-weight: ${({fontWeight:e})=>e.regular}; 6803 font-family: ${({fontFamily:e})=>e.regular}; 6804 font-feature-settings: 6805 'liga' off, 6806 'clig' off; 6807 } 6808 6809 .wui-font-lg-medium { 6810 font-size: ${({textSize:e})=>e.large}; 6811 line-height: ${({typography:e})=>e["lg-medium"].lineHeight}; 6812 letter-spacing: ${({typography:e})=>e["lg-medium"].letterSpacing}; 6813 font-weight: ${({fontWeight:e})=>e.medium}; 6814 font-family: ${({fontFamily:e})=>e.regular}; 6815 font-feature-settings: 6816 'liga' off, 6817 'clig' off; 6818 } 6819 6820 .wui-font-md-regular-mono { 6821 font-size: ${({textSize:e})=>e.medium}; 6822 line-height: ${({typography:e})=>e["md-regular-mono"].lineHeight}; 6823 letter-spacing: ${({typography:e})=>e["md-regular-mono"].letterSpacing}; 6824 font-weight: ${({fontWeight:e})=>e.regular}; 6825 font-family: ${({fontFamily:e})=>e.mono}; 6826 } 6827 6828 .wui-font-md-regular { 6829 font-size: ${({textSize:e})=>e.medium}; 6830 line-height: ${({typography:e})=>e["md-regular"].lineHeight}; 6831 letter-spacing: ${({typography:e})=>e["md-regular"].letterSpacing}; 6832 font-weight: ${({fontWeight:e})=>e.regular}; 6833 font-family: ${({fontFamily:e})=>e.regular}; 6834 font-feature-settings: 6835 'liga' off, 6836 'clig' off; 6837 } 6838 6839 .wui-font-md-medium { 6840 font-size: ${({textSize:e})=>e.medium}; 6841 line-height: ${({typography:e})=>e["md-medium"].lineHeight}; 6842 letter-spacing: ${({typography:e})=>e["md-medium"].letterSpacing}; 6843 font-weight: ${({fontWeight:e})=>e.medium}; 6844 font-family: ${({fontFamily:e})=>e.regular}; 6845 font-feature-settings: 6846 'liga' off, 6847 'clig' off; 6848 } 6849 6850 .wui-font-sm-regular-mono { 6851 font-size: ${({textSize:e})=>e.small}; 6852 line-height: ${({typography:e})=>e["sm-regular-mono"].lineHeight}; 6853 letter-spacing: ${({typography:e})=>e["sm-regular-mono"].letterSpacing}; 6854 font-weight: ${({fontWeight:e})=>e.regular}; 6855 font-family: ${({fontFamily:e})=>e.mono}; 6856 } 6857 6858 .wui-font-sm-regular { 6859 font-size: ${({textSize:e})=>e.small}; 6860 line-height: ${({typography:e})=>e["sm-regular"].lineHeight}; 6861 letter-spacing: ${({typography:e})=>e["sm-regular"].letterSpacing}; 6862 font-weight: ${({fontWeight:e})=>e.regular}; 6863 font-family: ${({fontFamily:e})=>e.regular}; 6864 font-feature-settings: 6865 'liga' off, 6866 'clig' off; 6867 } 6868 6869 .wui-font-sm-medium { 6870 font-size: ${({textSize:e})=>e.small}; 6871 line-height: ${({typography:e})=>e["sm-medium"].lineHeight}; 6872 letter-spacing: ${({typography:e})=>e["sm-medium"].letterSpacing}; 6873 font-weight: ${({fontWeight:e})=>e.medium}; 6874 font-family: ${({fontFamily:e})=>e.regular}; 6875 font-feature-settings: 6876 'liga' off, 6877 'clig' off; 6878 } 6879`;var u=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let d={primary:s.f.tokens.theme.textPrimary,secondary:s.f.tokens.theme.textSecondary,tertiary:s.f.tokens.theme.textTertiary,invert:s.f.tokens.theme.textInvert,error:s.f.tokens.core.textError,success:s.f.tokens.core.textSuccess,warning:s.f.tokens.core.textWarning,"accent-primary":s.f.tokens.core.textAccentPrimary},h=class extends n.WF{constructor(){super(...arguments),this.variant="md-regular",this.color="inherit",this.align="left",this.lineClamp=void 0,this.display="inline-flex"}render(){let e={[`wui-font-${this.variant}
vendor: 7,547 bytes, lines 6879-6883
6879`]:!0,[`wui-line-clamp-${this.lineClamp}`]:!!this.lineClamp};return this.style.cssText=` 6880 display: ${this.display}; 6881 --local-align: ${this.align}; 6882 --local-color: ${"inherit"===this.color?"inherit":d[this.color??"primary"]}; 6883 `,(0,n.qy)`<slot class=${(0,a.H)(e)}></slot>`}};h.styles=[o.W5,c],u([(0,i.MZ)()],h.prototype,"variant",void 0),u([(0,i.MZ)()],h.prototype,"color",void 0),u([(0,i.MZ)()],h.prototype,"align",void 0),u([(0,i.MZ)()],h.prototype,"lineClamp",void 0),u([(0,i.MZ)()],h.prototype,"display",void 0),h=u([(0,l.E)("wui-text")],h)},83712:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyHash=A,t.verifyErc8010=x,t.verifyErc1271=S;let n=r(40216),i=r(59104),a=r(91472),s=r(13894),o=r(81701),l=r(11985),c=r(25230),u=r(24998),d=r(18978),h=r(62917),p=r(26504),f=r(80217),m=r(14972),g=r(27083),y=r(95847),b=r(41636),w=r(27872),v=r(10989),E=r(34942),C=r(527);async function A(e,t){let{address:r,chain:n=e.chain,hash:a,erc6492VerifierAddress:s=t.universalSignatureVerifierAddress??n?.contracts?.erc6492Verifier?.address,multicallAddress:o=t.multicallAddress??n?.contracts?.multicall3?.address,mode:l="auto"}=t;if(n?.verifyHash)return await n.verifyHash(e,t);let c=(()=>{let e=t.signature;return(0,f.isHex)(e)?e:"object"==typeof e&&"r"in e&&"s"in e?(0,w.serializeSignature)(e):(0,g.bytesToHex)(e)})();try{if("eoa"===l)try{if((0,d.isAddressEqual)((0,u.getAddress)(r),await (0,b.recoverAddress)({hash:a,signature:c})))return!0}catch{}if(i.SignatureErc8010.validate(c))return await x(e,{...t,multicallAddress:o,signature:c});return await I(e,{...t,verifierAddress:s,signature:c})}catch(e){if("eoa"!==l)try{if((0,d.isAddressEqual)((0,u.getAddress)(r),await (0,b.recoverAddress)({hash:a,signature:c})))return!0}catch{}if(e instanceof T)return!1;throw e}}async function x(e,t){let{address:r,blockHash:n,blockNumber:o,blockTag:l,hash:u,multicallAddress:d,requireCanonical:f}=t,{authorization:m,data:b,signature:w,to:v}=i.SignatureErc8010.unwrap(t.signature);if(await (0,E.getCode)(e,{address:r,blockHash:n,blockNumber:o,blockTag:l,requireCanonical:f})===(0,p.concatHex)(["0xef0100",m.address]))return await S(e,{...t,signature:w});let A={address:m.address,chainId:Number(m.chainId),nonce:Number(m.nonce),r:(0,g.numberToHex)(m.r,{size:32}),s:(0,g.numberToHex)(m.s,{size:32}),yParity:m.yParity};if(!await (0,h.verifyAuthorization)({address:r,authorization:A}))throw new T;let x=await (0,y.getAction)(e,C.readContract,"readContract")({...d?{address:d}:{code:s.multicall3Bytecode},authorizationList:[A],abi:a.multicall3Abi,blockHash:n,blockNumber:o,blockTag:"pending",functionName:"aggregate3",requireCanonical:f,args:[[...b?[{allowFailure:!0,target:v??r,callData:b}]:[],{allowFailure:!0,target:r,callData:(0,c.encodeFunctionData)({abi:a.erc1271Abi,functionName:"isValidSignature",args:[u,w]})}]]}),I=x[x.length-1]?.returnData;if(I?.startsWith("0x1626ba7e"))return!0;throw new T}async function I(e,t){let{address:r,factory:i,factoryData:u,hash:d,signature:h,verifierAddress:p,...f}=t,g=await (async()=>!i&&!u||n.SignatureErc6492.validate(h)?h:n.SignatureErc6492.wrap({data:u,signature:h,to:i}))(),b=p?{to:p,data:(0,c.encodeFunctionData)({abi:a.erc6492SignatureValidatorAbi,functionName:"isValidSig",args:[r,d,g]}),...f}:{data:(0,l.encodeDeployData)({abi:a.erc6492SignatureValidatorAbi,args:[r,d,g],bytecode:s.erc6492SignatureValidatorByteCode}),...f},{data:w}=await (0,y.getAction)(e,v.call,"call")(b).catch(e=>{if(e instanceof o.CallExecutionError)throw new T;throw e});if((0,m.hexToBool)(w??"0x0"))return!0;throw new T}async function S(e,t){let{address:r,blockHash:n,blockNumber:i,blockTag:s,hash:l,requireCanonical:c,signature:u}=t;if((await (0,y.getAction)(e,C.readContract,"readContract")({address:r,abi:a.erc1271Abi,args:[l,u],blockHash:n,blockNumber:i,blockTag:s,functionName:"isValidSignature",requireCanonical:c}).catch(e=>{if(e instanceof o.ContractFunctionExecutionError)throw new T;throw e})).startsWith("0x1626ba7e"))return!0;throw new T}class T extends Error{}},83899:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=void 0,t.keccakP=w;let n=r(63386),i=r(92565),a=BigInt(0),s=BigInt(1),o=BigInt(2),l=BigInt(7),c=BigInt(256),u=BigInt(113),d=[],h=[],p=[];for(let e=0,t=s,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],d.push(2*(5*n+r)),h.push((e+1)*(e+2)/2%64);let i=a;for(let e=0;e<7;e++)(t=(t<<s^(t>>l)*u)%c)&o&&(i^=s<<(s<<BigInt(e))-s);p.push(i)}let f=(0,n.split)(p,!0),m=f[0],g=f[1],y=(e,t,r)=>r>32?(0,n.rotlBH)(e,t,r):(0,n.rotlSH)(e,t,r),b=(e,t,r)=>r>32?(0,n.rotlBL)(e,t,r):(0,n.rotlSL)(e,t,r);function w(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){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 n=(t+8)%10,i=(t+2)%10,a=r[i],s=r[i+1],o=y(a,s,1)^r[n],l=b(a,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=o,e[t+r+1]^=l}let t=e[2],i=e[3];for(let r=0;r<24;r++){let n=h[r],a=y(t,i,n),s=b(t,i,n),o=d[r];t=e[o],i=e[o+1],e[o]=a,e[o+1]=s}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=m[n],e[1]^=g[n]}(0,i.clean)(r)}class v extends i.Hash{constructor(e,t,r,n=!1,a=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=a,(0,i.anumber)(r),!(0<e&&e<200))throw Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,i.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,i.swap32IfBE)(this.state32),w(this.state32,this.rounds),(0,i.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(e){(0,i.aexists)(this),e=(0,i.toBytes)(e),(0,i.abytes)(e);let{blockLen:t,state:r}=this,n=e.length;for(let i=0;i<n;){let a=Math.min(t-this.pos,n-i);for(let t=0;t<a;t++)r[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,(128&t)!=0&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,i.aexists)(this,!1),(0,i.abytes)(e),this.finish();let t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();let a=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+a),n),this.posOut+=a,n+=a}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,i.anumber)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,i.aoutput)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,i.clean)(this.state)}_cloneInto(e){let{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:a}=this;return e||(e=new v(t,r,n,a,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=a,e.destroyed=this.destroyed,e}}t.Keccak=v;let E=(e,t,r)=>(0,i.createHasher)(()=>new v(t,e,r));t.sha3_224=E(6,144,28),t.sha3_256=E(6,136,32),t.sha3_384=E(6,104,48),t.sha3_512=E(6,72,64),t.keccak_224=E(1,144,28),t.keccak_256=E(1,136,32),t.keccak_384=E(1,104,48),t.keccak_512=E(1,72,64);let C=(e,t,r)=>(0,i.createXOFer)((n={})=>new v(t,e,void 0===n.dkLen?r:n.dkLen,!0));t.shake128=C(31,168,16),t.shake256=C(31,136,32)},83935:(e,t,r)=>{"use strict";
6883Object.defineProperty(t,"__esModule",{value:!0}),t.isNegativeLE=void 0,t.mod=h,t.pow=function(e,t,r){return w(A(r),e,t)},t.pow2=function(e,t,r){let n=e;for(;t-- >a;)n*=n,n%=r;return n},t.invert=p,t.tonelliShanks=g,t.FpSqrt=y,t.validateField=function(e){let t=b.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,i.validateObject)(e,t)},t.FpPow=w,t.FpInvertBatch=v,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?p(r,e.ORDER):e.inv(r))},t.FpLegendre=E,t.FpIsSquare=function(e,t){return 1===E(e,t)},t.nLength=C,t.Field=A,t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw Error("Field doesn't have isOdd");let r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw Error("Field doesn't have isOdd");let r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){let n=(e=(0,i.ensureBytes)("privateHash",e)).length,a=C(t).nByteLength+8;if(a<24||n<a||n>1024)throw Error("hashToPrivateScalar: expected "+a+"-1024 bytes of input, got "+n);return h(r?(0,i.bytesToNumberLE)(e):(0,i.bytesToNumberBE)(e),t-s)+s},t.getFieldBytesLength=x,t.getMinHashLength=I,t.mapHashToField=function(e,t,r=!1){let n=e.length,a=x(t),o=I(t);if(n<16||n<o||n>1024)throw Error("expected "+o+"-1024 bytes of input, got "+n);let l=h(r?(0,i.bytesToNumberLE)(e):(0,i.bytesToNumberBE)(e),t-s)+s;return r?(0,i.numberToBytesLE)(l,a):(0,i.numberToBytesBE)(l,a)};let n=r(92565),i=r(56196),a=BigInt(0),s=BigInt(1),o=BigInt(2),l=BigInt(3),c=BigInt(4),u=BigInt(5),d=BigInt(8);function h(e,t){let r=e%t;return r>=a?r:t+r}function p(e,t){if(e===a)throw Error("invert: expected non-zero number");if(t<=a)throw Error("invert: expected positive modulus, got "+t);let r=h(e,t),n=t,i=a,o=s,l=s,c=a;for(;r!==a;){let e=n/r,t=n%r,a=i-l*e,s=o-c*e;n=r,r=t,i=l,o=c,l=a,c=s}if(n!==s)throw Error("invert: does not exist");return h(i,t)}function f(e,t){let r=(e.ORDER+s)/c,n=e.pow(t,r);if(!e.eql(e.sqr(n),t))throw Error("Cannot find square root");return n}function m(e,t){let r=(e.ORDER-u)/d,n=e.mul(t,o),i=e.pow(n,r),a=e.mul(t,i),s=e.mul(e.mul(a,o),i),l=e.mul(a,e.sub(s,e.ONE));if(!e.eql(e.sqr(l),t))throw Error("Cannot find square root");return l}function g(e){if(e<BigInt(3))throw Error("sqrt is not defined for small field");let t=e-s,r=0;for(;t%o===a;)t/=o,r++;let n=o,i=A(e);for(;1===E(i,n);)if(n++>1e3)throw Error("Cannot find square root: probably non-prime P");if(1===r)return f;let l=i.pow(n,t),c=(t+s)/o;return function(e,n){if(e.is0(n))return n;if(1!==E(e,n))throw Error("Cannot find square root");let i=r,a=e.mul(e.ONE,l),o=e.pow(n,t),u=e.pow(n,c);for(;!e.eql(o,e.ONE);){if(e.is0(o))return e.ZERO;let t=1,r=e.sqr(o);for(;!e.eql(r,e.ONE);)if(t++,r=e.sqr(r),t===i)throw Error("Cannot find square root");let n=s<<BigInt(i-t-1),l=e.pow(a,n);i=t,a=e.sqr(l),o=e.mul(o,a),u=e.mul(u,l)}return u}}function y(e){return e%c===l?f:e%d===u?m:g(e)}t.isNegativeLE=(e,t)=>(h(e,t)&s)===s;let b=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function w(e,t,r){if(r<a)throw Error("invalid exponent, negatives unsupported");if(r===a)return e.ONE;if(r===s)return t;let n=e.ONE,i=t;for(;r>a;)r&s&&(n=e.mul(n,i)),i=e.sqr(i),r>>=s;return n}function v(e,t,r=!1){let n=Array(t.length).fill(r?e.ZERO:void 0),i=t.reduce((t,r,i)=>e.is0(r)?t:(n[i]=t,e.mul(t,r)),e.ONE),a=e.inv(i);return t.reduceRight((t,r,i)=>e.is0(r)?t:(n[i]=e.mul(t,n[i]),e.mul(t,r)),a),n}function E(e,t){let r=(e.ORDER-s)/o,n=e.pow(t,r),i=e.eql(n,e.ONE),a=e.eql(n,e.ZERO),l=e.eql(n,e.neg(e.ONE));if(!i&&!a&&!l)throw Error("invalid Legendre symbol result");return i?1:a?0:-1}function C(e,t){void 0!==t&&(0,n.anumber)(t);let r=void 0!==t?t:e.toString(2).length,i=Math.ceil(r/8);return{nBitLength:r,nByteLength:i}}function A(e,t,r=!1,n={}){let o;if(e<=a)throw Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:l,nByteLength:c}=C(e,t);if(c>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let u=Object.freeze({ORDER:e,isLE:r,BITS:l,BYTES:c,MASK:(0,i.bitMask)(l),ZERO:a,ONE:s,create:t=>h(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return a<=t&&t<e},is0:e=>e===a,isOdd:e=>(e&s)===s,neg:t=>h(-t,e),eql:(e,t)=>
6883e===t,sqr:t=>h(t*t,e),add:(t,r)=>h(t+r,e),sub:(t,r)=>h(t-r,e),mul:(t,r)=>h(t*r,e),pow:(e,t)=>w(u,e,t),div:(t,r)=>h(t*p(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>p(t,e),sqrt:n.sqrt||(t=>(o||(o=y(e)),o(u,t))),toBytes:e=>r?(0,i.numberToBytesLE)(e,c):(0,i.numberToBytesBE)(e,c),fromBytes:e=>{if(e.length!==c)throw Error("Field.fromBytes: expected "+c+" bytes, got "+e.length);return r?(0,i.bytesToNumberLE)(e):(0,i.bytesToNumberBE)(e)},invertBatch:e=>v(u,e),cmov:(e,t,r)=>r?t:e});return Object.freeze(u)}function x(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function I(e){let t=x(e);return t+Math.ceil(t/2)}},84053:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cleanupCache=t.listenersCache=void 0,t.observe=function(e,n,i){let a=++r,s=()=>t.listenersCache.get(e)||[],o=()=>{let r=s();if(!r.some(e=>e.id===a))return;let n=t.cleanupCache.get(e);if(1===r.length&&n){let e=n();e instanceof Promise&&e.catch(()=>{})}(()=>{let r=s().filter(e=>e.id!==a);if(0===r.length){t.listenersCache.delete(e),t.cleanupCache.delete(e);return}t.listenersCache.set(e,r)})()},l=s();if(t.listenersCache.set(e,[...l,{id:a,fns:n}]),l&&l.length>0)return o;let c={};for(let e in n)c[e]=(...t)=>{let r=s();if(0!==r.length)for(let n of r)n.fns[e]?.(...t)};let u=i(c);return"function"==typeof u&&t.cleanupCache.set(e,u),o},t.listenersCache=new Map,t.cleanupCache=new Map;let r=0},84340:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSDKVersion=void 0,t.getSDKVersion=()=>"9.1.0"},84462:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseErc8010Signature=function(e){if(!(0,a.isErc8010Signature)(e))return{signature:e};let{authorization:t,to:r,...s}=n.SignatureErc8010.unwrap(e);return{authorization:{address:t.address,chainId:t.chainId,nonce:Number(t.nonce),r:(0,i.numberToHex)(t.r,{size:32}),s:(0,i.numberToHex)(t.s,{size:32}),yParity:t.yParity},...r?{address:r}:{},...s}};let n=r(59104),i=r(27083),a=r(3797)},84593:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsFillTransaction=t.eip1559NetworkCache=t.defaultParameters=void 0,t.prepareTransactionRequest=w;let n=r(83562),i=r(83390),a=r(87908),s=r(70200),o=r(4200),l=r(75445),c=r(80076),u=r(55085),d=r(32309),h=r(64751),p=r(95847),f=r(6724),m=r(61609),g=r(75638),y=r(2404),b=r(80517);async function w(e,r){let f,w,v=r;v.account??=e.account,v.parameters??=t.defaultParameters;let{account:E,chain:C=e.chain,nonceManager:A,parameters:x}=v,I="function"==typeof C?.prepareTransactionRequest?{fn:C.prepareTransactionRequest,runAt:["beforeFillTransaction"]}:Array.isArray(C?.prepareTransactionRequest)?{fn:C.prepareTransactionRequest[0],runAt:C.prepareTransactionRequest[1].runAt}:void 0;async function S(){return f?f:void 0!==v.chainId?v.chainId:C?C.id:f=await (0,p.getAction)(e,b.getChainId,"getChainId")({})}let T=E?(0,n.parseAccount)(E):E,P=v.nonce;if(x.includes("nonce")&&void 0===P&&T&&A){let t=await S();P=await A.consume({address:T.address,chainId:t,client:e})}I?.fn&&I.runAt?.includes("beforeFillTransaction")&&(v=await I.fn({...v,chain:C},{client:e,phase:"beforeFillTransaction"}),P??=v.nonce);let O=(!(x.includes("blobVersionedHashes")||x.includes("sidecars"))||!v.kzg||!v.blobs)&&!1!==t.supportsFillTransaction.get(e.uid)&&["fees","gas"].some(e=>x.includes(e))&&(x.includes("chainId")&&"number"!=typeof v.chainId||x.includes("nonce")&&"number"!=typeof P||x.includes("fees")&&"bigint"!=typeof v.gasPrice&&("bigint"!=typeof v.maxFeePerGas||"bigint"!=typeof v.maxPriorityFeePerGas)||x.includes("gas")&&"bigint"!=typeof v.gas)?await (0,p.getAction)(e,y.fillTransaction,"fillTransaction")({...v,nonce:P}).then(r=>{let{chainId:n,from:i,gas:a,gasPrice:s,nonce:o,maxFeePerBlobGas:l,maxFeePerGas:c,maxPriorityFeePerGas:u,type:d,...h}=r.transaction,p="feeToken"in h?h.feeToken:void 0,f="feePayerSignature"in h&&null!==h.feePayerSignature&&void 0!==h.feePayerSignature,m=null!=p&&(!("feeToken"in v)||f);return t.supportsFillTransaction.set(e.uid,!0),{...v,...i?{from:i}:{},...d&&!v.type?{type:d}:{},...void 0!==n?{chainId:n}:{},...void 0!==a?{gas:a}:{},...void 0!==s?{gasPrice:s}:{},...void 0!==o?{nonce:o}:{},...void 0!==l&&"legacy"!==v.type&&"eip2930"!==v.type?{maxFeePerBlobGas:l}:{},...void 0!==c&&"legacy"!==v.type&&"eip2930"!==v.type?{maxFeePerGas:c}:{},...void 0!==u&&"legacy"!==v.type&&"eip2930"!==v.type?{maxPriorityFeePerGas:u}:{},..."nonceKey"in h&&void 0!==h.nonceKey?{nonceKey:h.nonceKey}:{},..."keyAuthorization"in h&&void 0!==h.keyAuthorization&&null!==h.keyAuthorization&&!("keyAuthorization"in v)?{keyAuthorization:h.keyAuthorization}:{},..."feePayerSignature"in h&&void 0!==h.feePayerSignature&&null!==h.feePayerSignature?{feePayerSignature:h.feePayerSignature}:{},...m?{feeToken:p}:{},...r.capabilities?{_capabilities:r.capabilities}:{}}}).catch(r=>{if("TransactionExecutionError"!==r.name)return v;if(r.walk?.(e=>"ExecutionRevertedError"===e.name))throw r;return r.walk?.(e=>"MethodNotFoundRpcError"===e.name||"MethodNotSupportedRpcError"===e.name||e.message?.includes("eth_fillTransaction is not available"))&&t.supportsFillTransaction.set(e.uid,!1),v}):v;P??=O.nonce;let{blobs:_,gas:N,kzg:k,type:R}=v={...O,...T?{from:T?.address}:{},...void 0!==P?{nonce:P}:{}};async function M(){return w||(w=await (0,p.getAction)(e,s.getBlock,"getBlock")({blockTag:"latest"}))}if(I?.fn&&I.runAt?.includes("beforeFillParameters")&&(v=await I.fn({...v,chain:C},{client:e,phase:"beforeFillParameters"})),x.includes("nonce")&&void 0===P&&T&&!A&&(v.nonce=await (0,p.getAction)(e,o.getTransactionCount,"getTransactionCount")({address:T.address,blockTag:"pending"})),(x.includes("blobVersionedHashes")||x.includes("sidecars"))&&_&&k){let e=(0,c.blobsToCommitments)({blobs:_,kzg:k});if(x.includes("blobVersionedHashes")){let t=(0,d.commitmentsToVersionedHashes)({commitments:e,to:"hex"});v.blobVersionedHashes=t}if(x.includes("sidecars")){let t=(0,u.blobsToProofs)({blobs:_,commitments:e,kzg:k}),r=(0,h.toBlobSidecars)({blobs:_,commitments:e,proofs:t,to:"hex"});v.sidecars=r}}if(x.includes("chainId")&&(v.chainId=await S()),(x.includes("fees")||x.includes("type"))&&void 0===R)try{v.type=(0,g.getTransactionType)(v)}catch{let r=t.eip1559NetworkCache.get(e.uid);if(void 0===r){let n=await M();r="bigint"==typeof n?.baseFeePerGas,t.eip1559NetworkCache.set(e.uid,r)}v.type=r?"eip1559":"legacy"}if(x.includes("fees"))if("legacy"!==v.type&&"eip2930"!==v.type){if(void 0===v.maxFeePerGas||void 0===v.maxPriorityFeePerGas){let t=await M(),{maxFeePerGas:r,maxPriorityFeePerGas:n}=await (0,i.internal_estimateFeesPerGas)(e,{block:t,chain:C,request:v});if(void 0===v.maxPriorityFeePerGas&&v.maxFeePerGas&&v.maxFeePerGas<n)throw new l.MaxFeePerGasTooLowError({maxPriorityFeePerGas:n});v.maxPriorityFeePerGas=n,v.maxFeePerGas=r}}else{if(void 0!==v.maxFeePerGas||void 0!==v.maxPriorityFeePerGas)throw new l.Eip1559FeesNotSupportedError;if(void 0===v.gasPrice){let t=await M(),{gasPrice:r}=await (0,i.internal_estimateFeesPerGas)(e,{block:t,chain:C,request:v,type:"legacy"});v.gasPrice=r}}return x.includes("gas")&&void 0===N&&(v.gas=await (0,p.getAction)(e,a.estimateGas,"estimateGas")({...v,account:T,prepare:T?.type==="local"?[]:["blobVersionedHashes"]})),I?.fn&&I.runAt?.includes("afterFillParameters")&&(v=await I.fn({...v,chain:C},{client:e,phase:"afterFillParameters"})),(0,m.assertRequest)(v),delete v.parameters,v}t.defaultParameters=["blobVersionedHashes","chainId","fees","gas","nonce","type"],t.eip1559NetworkCache=new Map,t.supportsFillTransaction=new f.LruMap(128)},84642:(e,t)=>{"use strict";
6883Object.defineProperty(t,"__esModule",{value:!0}),t.idCache=void 0,t.idCache={current:0,take(){return this.current++},reset(){this.current=0}}},84984:(e,t,r)=>{"use strict";let n,i;r.d(t,{S:()=>eQ});var a,s,o,l,c,u=r(13048);r(49135);var d=r(69760),h=r(43850),p=r(57873),f=r(3770),m=r(29092),g=r(82376),y=r(18627),b=r(23655),w=r(33432),v=r(57217),E=r(88239),C=r(33384),A=r(70485),x=r(23028),I=r(89188),S=r(25340);class T{constructor(){this.listeners={accountsChanged:[],chainChanged:[],connect:[],disconnect:[],pendingTransaction:[],auth_rpcRequest:[],auth_rpcSuccess:[],auth_rpcError:[]}}on(e,t){this.listeners[e].push(t)}removeListener(e,t){this.listeners[e]=this.listeners[e].filter(e=>e!==t)}emit(e,t){this.listeners[e].forEach(e=>e(t))}}class P extends T{constructor(e){super(),this.id=p.o.CONNECTOR_ID.AUTH,this.name=p.o.CONNECTOR_NAMES.AUTH,this.type="AUTH",this.chain=p.o.CHAIN.SOLANA,this.provider=e.w3mFrameProvider,this.requestedChains=e.chains,this.getActiveChain=e.getActiveChain}get publicKey(){let e=g.W.state.chains.get(p.o.CHAIN.SOLANA)?.accountState?.address;return e?new u.PublicKey(e):void 0}get chains(){let e=this.provider.getAvailableChainIds();return this.requestedChains.filter(t=>e.includes(t.caipNetworkId))}async connect(e={}){let t=e.chainId||this.getActiveChain()?.id,r=(0,I.lj)("solana");if(await S.U.authConnectorAuthenticate({authConnector:this.provider,chainId:function(e){if("string"==typeof e)return`solana:${e}`}(t),socialUri:e.socialUri,preferredAccountType:r,chainNamespace:p.o.CHAIN.SOLANA}),!this.publicKey)throw Error("Failed to connect to the wallet");return this.emit("connect",this.publicKey),this.publicKey.toBase58()}async disconnect(){await this.provider.disconnect(),this.emit("disconnect",void 0)}async signMessage(e){if(!this.publicKey)throw Error("Wallet not connected");let t=await this.provider.request({method:"solana_signMessage",params:{message:d.A.encode(e),pubkey:this.publicKey.toBase58()},chainNamespace:this.chain});return d.A.decode(t.signature)}async signTransaction(e){let t=await this.provider.request({method:"solana_signTransaction",params:{transaction:this.serializeTransaction(e)},chainNamespace:this.chain}),r=d.A.decode(t.transaction);return(0,x.Y)(e)?u.VersionedTransaction.deserialize(r):u.Transaction.from(r)}async signAndSendTransaction(e,t){let r=this.serializeTransaction(e);return(await this.provider.request({method:"solana_signAndSendTransaction",params:{transaction:r,options:t},chainNamespace:this.chain})).signature}async sendTransaction(e,t,r){let n=await this.signTransaction(e);return await t.sendRawTransaction(n.serialize(),r)}async signAllTransactions(e){return(await this.provider.request({method:"solana_signAllTransactions",params:{transactions:e.map(e=>this.serializeTransaction(e))},chainNamespace:this.chain})).transactions.map((t,r)=>{let n=e[r];if(!n)throw Error("Invalid solana_signAllTransactions response");let i=d.A.decode(t);return(0,x.Y)(n)?u.VersionedTransaction.deserialize(i):u.Transaction.from(i)})}async request(e){return this.provider.request({method:e.method,params:e.params,chainNamespace:this.chain})}async getAccounts(){return this.publicKey?Promise.resolve([{namespace:this.chain,address:this.publicKey.toBase58(),type:"eoa"}]):Promise.resolve([])}
6883serializeTransaction(e){return d.A.encode(new Uint8Array(e.serialize({verifySignatures:!1})))}}var O=r(31480),_=r(50989);class N extends T{constructor(e){super(),this.name="Coinbase Wallet",this.id=O.L.ConnectorExplorerIds[p.o.CONNECTOR_ID.COINBASE_SDK]||this.name,this.explorerId=O.L.ConnectorExplorerIds[p.o.CONNECTOR_ID.COINBASE_SDK],this.type="ANNOUNCED",this.imageUrl="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8Y2lyY2xlIGN4PSI1MTIiIGN5PSI1MTIiIHI9IjUxMiIgZmlsbD0iIzAwNTJGRiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE1MiA1MTJDMTUyIDcxMC44MjMgMzEzLjE3NyA4NzIgNTEyIDg3MkM3MTAuODIzIDg3MiA4NzIgNzEwLjgyMyA4NzIgNTEyQzg3MiAzMTMuMTc3IDcxMC44MjMgMTUyIDUxMiAxNTJDMzEzLjE3NyAxNTIgMTUyIDMxMy4xNzcgMTUyIDUxMlpNNDIwIDM5NkM0MDYuNzQ1IDM5NiAzOTYgNDA2Ljc0NSAzOTYgNDIwVjYwNEMzOTYgNjE3LjI1NSA0MDYuNzQ1IDYyOCA0MjAgNjI4SDYwNEM2MTcuMjU1IDYyOCA2MjggNjE3LjI1NSA2MjggNjA0VjQyMEM2MjggNDA2Ljc0NSA2MTcuMjU1IDM5NiA2MDQgMzk2SDQyMFoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=",this.chain=p.o.CHAIN.SOLANA,this.provider=this,this.coinbase=e.provider,this.requestedChains=e.chains}get chains(){return this.requestedChains.filter(e=>e.id===_.tWt.id)}get publicKey(){return this.coinbase.publicKey}get imageId(){return O.L.ConnectorImageIds[p.o.CONNECTOR_ID.COINBASE]}async connect(){try{await this.coinbase.connect();let e=this.getAccount(!0);return this.coinbase.emit("connect",this.coinbase.publicKey),this.emit("connect",e),e.toBase58()}catch(e){throw this.coinbase.emit("error",e),new h.vx(e)}}async disconnect(){await this.coinbase.disconnect(),this.coinbase.emit("disconnect",void 0),this.emit("disconnect",void 0)}async signMessage(e){return(await this.coinbase.signMessage(e)).signature}async signTransaction(e){return this.coinbase.signTransaction(e)}async signAndSendTransaction(e,t){return(await this.coinbase.signAndSendTransaction(e,t)).signature}async sendTransaction(e,t,r){let n=await this.signTransaction(e);return await t.sendRawTransaction(n.serialize(),r)}async signAllTransactions(e){return await this.coinbase.signAllTransactions(e)}async request(e){return Promise.reject(Error('The "request" method is not supported on Coinbase Wallet'))}async getAccounts(){let e=this.getAccount();return e?Promise.resolve([{namespace:this.chain,address:e.toBase58(),type:"eoa"}]):Promise.resolve([])}getAccount(e){let t=this.coinbase.publicKey;if(e&&!t)throw Error("Not connected");return t}}r(37037);var k=r(52335),R=r(90411),M=r(12573);class B extends Error{constructor(e){super(`The wallet does not support the "${e}" feature`)}}class j extends Error{constructor(e){super(`The method "${e}" is not supported by the wallet`)}}var U=r(44168).Buffer,$=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class L extends R.F{constructor({provider:e,chains:t,getActiveChain:r}){super({caipNetworks:t,namespace:"solana",provider:e}),this.eventEmitter=new T,this.emit=this.eventEmitter.emit.bind(this.eventEmitter),this.on=this.eventEmitter.on.bind(this.eventEmitter),this.removeListener=this.eventEmitter.removeListener.bind(this.eventEmitter),a.set(this,"1.0.0"),this.getActiveChain=r}get session(){return this.provider.session}get chains(){return this.sessionChains.map(e=>{let t=e;return t===A.w.CHAIN_IDS.Deprecated_Mainnet?t=A.w.CHAIN_IDS.Mainnet:t===A.w.CHAIN_IDS.Deprecated_Devnet&&(t=A.w.CHAIN_IDS.Devnet),this.caipNetworks.find(e=>e.caipNetworkId===t)}).filter(Boolean)}get icon(){return M.j.state.connectorImages[this.id]}get version(){return $(this,a,"f")}get publicKey(){let e=this.getAccount(!1);if(e)return new u.PublicKey(e.publicKey)}async connect(){await super.connectWalletConnect();let e=this.getAccount(!0);return this.emit("connect",new u.PublicKey(e.publicKey)),e.address}
6883async disconnect(){await super.disconnect(),this.emit("disconnect",void 0)}async signMessage(e){this.checkIfMethodIsSupported("solana_signMessage");let t=await this.internalRequest("solana_signMessage",{message:d.A.encode(e),pubkey:this.getAccount(!0).address});return d.A.decode(t.signature)}async signTransaction(e){this.checkIfMethodIsSupported("solana_signTransaction");let t=this.serializeTransaction(e),r=await this.internalRequest("solana_signTransaction",{transaction:t,pubkey:this.getAccount(!0).address,...this.getRawRPCParams(e)});if("signature"in r){let t=d.A.decode(r.signature);return e.addSignature(new u.PublicKey(this.getAccount(!0).publicKey),U.from(t)),e}let n=U.from(r.transaction,"base64");return(0,x.Y)(e)?u.VersionedTransaction.deserialize(new Uint8Array(n)):u.Transaction.from(n)}async signAndSendTransaction(e,t){this.checkIfMethodIsSupported("solana_signAndSendTransaction");let r=this.serializeTransaction(e),n=await this.internalRequest("solana_signAndSendTransaction",{transaction:r,pubkey:this.getAccount(!0).address,sendOptions:t});return this.emit("pendingTransaction",void 0),n.signature}async sendTransaction(e,t,r){let n=await this.signTransaction(e),i=await t.sendRawTransaction(n.serialize(),r);return this.emit("pendingTransaction",void 0),i}async signAllTransactions(e){try{return this.checkIfMethodIsSupported("solana_signAllTransactions"),(await this.internalRequest("solana_signAllTransactions",{transactions:e.map(e=>this.serializeTransaction(e))})).transactions.map((t,r)=>{let n=e[r];if(!n)throw Error("Invalid transactions response");let i=U.from(t,"base64");return(0,x.Y)(n)?u.VersionedTransaction.deserialize(new Uint8Array(i)):(this.emit("pendingTransaction",void 0),u.Transaction.from(i))})}catch(t){if(t instanceof j){let t=[];for(let r of e)t.push(await this.signTransaction(r));return t}throw t}}request(e){return this.internalRequest(e.method,e.params)}async getAccounts(){return Promise.resolve((this.session?.namespaces.solana?.accounts||[]).map(e=>({namespace:this.chain,address:k.C.parseCaipAddress(e).address,type:"eoa"})))}setDefaultChain(e){this.provider?.setDefaultChain(e)}internalRequest(e,t){let r=this.chains.find(e=>this.getActiveChain()?.id===e.id),n=r?.caipNetworkId;switch(n){case A.w.CHAIN_IDS.Mainnet:this.sessionChains.includes(A.w.CHAIN_IDS.Mainnet)||(n=A.w.CHAIN_IDS.Deprecated_Mainnet);break;case A.w.CHAIN_IDS.Devnet:this.sessionChains.includes(A.w.CHAIN_IDS.Devnet)||(n=A.w.CHAIN_IDS.Deprecated_Devnet)}return this.provider?.request({method:e,params:t},n)}get sessionChains(){return v.k.getChainsFromNamespaces(this.session?.namespaces)}serializeTransaction(e){return U.from(new Uint8Array(e.serialize({verifySignatures:!1}))).toString("base64")}getAccount(e){let t=this.session?.namespaces.solana?.accounts[0];if(!t){if(e)throw Error("Account not found");return}let r=t.split(":")[2];if(!r){if(e)throw Error("Address not found");return}return{address:r,publicKey:d.A.decode(r)}}getRawRPCParams(e){return(0,x.Y)(e)?{}:{feePayer:e.feePayer?.toBase58()??"",instructions:e.instructions.map(e=>
6883({data:d.A.encode(new Uint8Array(e.data)),keys:e.keys.map(e=>({isWritable:e.isWritable,isSigner:e.isSigner,pubkey:e.pubkey.toBase58()})),programId:e.programId.toBase58()})),recentBlockhash:e.recentBlockhash??""}}checkIfMethodIsSupported(e){if(!this.session?.namespaces.solana?.methods.includes(e))throw new j(e)}}a=new WeakMap;var D=r(91004),F=r(36442);let H=(0,D.BX)({connection:null}),z={state:H,subscribeKey:(e,t)=>(0,F.u$)(H,e,t),subscribe:e=>(0,D.B1)(H,()=>e(H)),setConnection(e){H.connection=(0,D.KR)(e)}},W=new u.PublicKey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),q=new u.PublicKey("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"),V=new u.PublicKey("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");new u.PublicKey("So11111111111111111111111111111111111111112"),new u.PublicKey("9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP");var G=r(12244),K=r(98837);let Z=e=>({decode:e.decode.bind(e),encode:e.encode.bind(e)});var J=r(44168).Buffer;let Y=e=>t=>{let r=(0,G.av)(e,t),{encode:n,decode:i}=Z(r);return r.decode=(e,t)=>{let r=i(e,t);return(0,K.k5)(J.from(r))},r.encode=(t,r,i)=>n((0,K.Bq)(t,e),r,i),r},Q=e=>t=>{let r=(0,G.av)(e,t),{encode:n,decode:i}=Z(r);return r.decode=(e,t)=>{let r=i(e,t);return(0,K.cI)(J.from(r))},r.encode=(t,r,i)=>n((0,K.zy)(t,e),r,i),r},X=Y(8);Q(8),Y(16),Q(16),Y(24),Q(24),Y(32),Q(32),new(r(17268)).A("1e+18");let ee=e=>{let t=(0,G.u8)(e),{encode:r,decode:n}=Z(t);return t.decode=(e,t)=>!!n(e,t),t.encode=(e,t,n)=>r(Number(e),t,n),t},et=e=>{let t=(0,G.av)(32,e),{encode:r,decode:n}=Z(t);return t.decode=(e,t)=>{let r=n(e,t);return new u.PublicKey(r)},t.encode=(e,t,n)=>r(e.toBuffer(),t,n),t};class er extends Error{constructor(e){super(e)}}class en extends er{constructor(){super(...arguments),this.name="TokenAccountNotFoundError"}}class ei extends er{constructor(){super(...arguments),this.name="TokenInvalidAccountError"}}class ea extends er{constructor(){super(...arguments),this.name="TokenInvalidAccountOwnerError"}}class es extends er{constructor(){super(...arguments),this.name="TokenInvalidAccountSizeError"}}class eo extends er{constructor(){super(...arguments),this.name="TokenInvalidMintError"}}class el extends er{constructor(){super(...arguments),this.name="TokenOwnerOffCurveError"}}!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Mint=1]="Mint",e[e.Account=2]="Account"}(s||(s={}));let ec=(0,G.w3)([(0,G.u8)("m"),(0,G.u8)("n"),ee("isInitialized"),et("signer1"),et("signer2"),et("signer3"),et("signer4"),et("signer5"),et("signer6"),et("signer7"),et("signer8"),et("signer9"),et("signer10"),et("signer11")]).span;var eu=r(44168).Buffer;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initialized=1]="Initialized",e[e.Frozen=2]="Frozen"}(o||(o={}));let ed=(0,G.w3)([et("mint"),et("owner"),X("amount"),(0,G.DH)("delegateOption"),et("delegate"),(0,G.u8)("state"),(0,G.DH)("isNativeOption"),X("isNative"),X("delegatedAmount"),(0,G.DH)("closeAuthorityOption"),et("closeAuthority")]),eh=ed.span;async function ep(e,t,r,n=W){let i=await e.getAccountInfo(t,r);return function(e,t,r=W){if(!t)throw new en;if(!t.owner.equals(r))throw new ea;if(t.data.length<eh)throw new es;let n=ed.decode(t.data.slice(0,eh)),i=eu.alloc(0);if(t.data.length>eh){if(t.data.length===ec)throw new es;if(t.data[eh]!=s.Account)throw new ei;i=t.data.slice(eh+1)}return{address:e,mint:n.mint,owner:n.owner,amount:n.amount,delegate:n.delegateOption?n.delegate:null,delegatedAmount:n.delegatedAmount,isInitialized:n.state!==o.Uninitialized,isFrozen:n.state===o.Frozen,isNative:!!n.isNativeOption,rentExemptReserve:n.isNativeOption?n.isNative:null,closeAuthority:n.closeAuthorityOption?n.closeAuthority:null,tlvData:i}}(t,i,n)}var ef=r(44168).Buffer;let em=(0,G.w3)([(0,G.DH)("mintAuthorityOption"),et("mintAuthority"),X("supply"),(0,G.u8)("decimals"),ee("isInitialized"),(0,G.DH)("freezeAuthorityOption"),et("freezeAuthority")]),eg=em.span;async function ey(e,t,r,n=W){let i=await e.getAccountInfo(t,r);return function(e,t,r=W){if(!t)throw new en;if(!t.owner.equals(r))throw new ea;if(t.data.length<eg)throw new es;let n=em.decode(t.data.slice(0,eg)),i=ef.alloc(0);if(t.data.length>eg){if(t.data.length<=eh||t.data.length===ec)throw new es;if(t.data[eh]!=s.Mint)throw new eo;i=t.data.slice(eh+1)}return{address:e,mintAuthority:n.mintAuthorityOption?n.mintAuthority:null,supply:n.supply,decimals:n.decimals,isInitialized:n.isInitialized,freezeAuthority:n.freezeAuthorityOption?n.freezeAuthority:null,tlvData:i}}(t,i,n)}function eb(e,t,r=!1,n=W,i=V){if(!r&&!u.PublicKey.isOnCurve(t.toBuffer()))throw new el;let[a]=u.PublicKey.findProgramAddressSync([t.toBuffer(),n.toBuffer(),e.toBuffer()],i);return a}var ew=r(44168).Buffer;!function(e){e[e.InitializeMint=0]="InitializeMint",e[e.InitializeAccount=1]="InitializeAccount",e[e.InitializeMultisig=2]="InitializeMultisig",e[e.Transfer=3]="Transfer",e[e.Approve=4]="Approve",e[e.Revoke=5]="Revoke",e[e.SetAuthority=6]="SetAuthority",e[e.MintTo=7]="MintTo",e[e.Burn=8]="Burn",e[e.CloseAccount=9]="CloseAccount",e[e.FreezeAccount=10]="FreezeAccount",e[e.ThawAccount=11]="ThawAccount",e[e.TransferChecked=12]="TransferChecked",e[e.ApproveChecked=13]="ApproveChecked",e[e.MintToChecked=14]="MintToChecked",e[e.BurnChecked=15]="BurnChecked",e[e.InitializeAccount2=16]="InitializeAccount2",e[e.SyncNative=17]="SyncNative",e[e.InitializeAccount3=18]="InitializeAccount3",e[e.InitializeMultisig2=19]="InitializeMultisig2",e[e.InitializeMint2=20]="InitializeMint2",e[e.GetAccountDataSize=21]="GetAccountDataSize",e[e.InitializeImmutableOwner=22]="InitializeImmutableOwner",e[e.AmountToUiAmount=23]="Amou
6883ntToUiAmount",e[e.UiAmountToAmount=24]="UiAmountToAmount",e[e.InitializeMintCloseAuthority=25]="InitializeMintCloseAuthority",e[e.TransferFeeExtension=26]="TransferFeeExtension",e[e.ConfidentialTransferExtension=27]="ConfidentialTransferExtension",e[e.DefaultAccountStateExtension=28]="DefaultAccountStateExtension",e[e.Reallocate=29]="Reallocate",e[e.MemoTransferExtension=30]="MemoTransferExtension",e[e.CreateNativeMint=31]="CreateNativeMint",e[e.InitializeNonTransferableMint=32]="InitializeNonTransferableMint",e[e.InterestBearingMintExtension=33]="InterestBearingMintExtension",e[e.CpiGuardExtension=34]="CpiGuardExtension",e[e.InitializePermanentDelegate=35]="InitializePermanentDelegate",e[e.TransferHookExtension=36]="TransferHookExtension",e[e.MetadataPointerExtension=39]="MetadataPointerExtension",e[e.GroupPointerExtension=40]="GroupPointerExtension",e[e.GroupMemberPointerExtension=41]="GroupMemberPointerExtension",e[e.ScaledUiAmountExtension=43]="ScaledUiAmountExtension",e[e.PausableExtension=44]="PausableExtension"}(l||(l={}));var ev=r(44168).Buffer;let eE=(0,G.w3)([(0,G.u8)("instruction"),X("amount"),(0,G.u8)("decimals")]);async function eC(e,t){let r=await e.getAccountInfo(t);if(!r)throw Error("Mint account not found");if(r.owner.equals(W))return W;if(r.owner.equals(q))return q;throw Error("Unknown mint owner program")}async function eA({provider:e,to:t,amount:r,tokenMint:n,connection:i}){if(!e.publicKey)throw Error("No public key found");if(r<=0)throw Error("Amount must be greater than 0");try{let a=e.publicKey,s=new u.PublicKey(t),o=new u.PublicKey(n),c=await eC(i,o),d=(await ey(i,o,void 0,c)).decimals;if(d<0)throw Error("Invalid token decimals");let h=Math.floor(r*10**d),p=eb(o,a,!1,c),f=eb(o,s,!1,c);try{if((await ep(i,p,void 0,c)).amount<BigInt(h))throw Error("Insufficient token balance")}catch(e){if(e instanceof en)throw Error("Sender does not have a token account for this mint");throw e}let m=!1;try{await ep(i,f,void 0,c)}catch(e){if(e instanceof en)m=!0;else throw e}let g=[],y=m?A.Y.UNIT_LIMIT_WITH_ATA_CREATION:A.Y.UNIT_LIMIT_TRANSFER_ONLY;g.push(u.ComputeBudgetProgram.setComputeUnitPrice({microLamports:A.Y.UNIT_PRICE_MICRO_LAMPORTS}),u.ComputeBudgetProgram.setComputeUnitLimit({units:y})),m&&g.push(function(e,t,r,n,i=W,a=V){return function(e,t,r,n,i,a=W,s=V){let o=[{pubkey:e,isSigner:!0,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:u.SystemProgram.programId,isSigner:!1,isWritable:!1},{pubkey:a,isSigner:!1,isWritable:!1}];return new u.TransactionInstruction({keys:o,programId:s,data:i})}(e,t,r,n,ew.alloc(0),i,a)}(a,f,s,o,c)),g.push(function(e,t,r,n,i,a,s=[],o=W){let c=function(e,t,r){if(r.length)for(let n of(e.push({pubkey:t,isSigner:!1,isWritable:!1}),r))e.push({pubkey:n instanceof u.PublicKey?n:n.publicKey,isSigner:!0,isWritable:!1});else e.push({pubkey:t,isSigner:!0,isWritable:!1});return e}([{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!1,isWritable:!0}],n,s),d=ev.alloc(eE.span);return eE.encode({instruction:l.TransferChecked,amount:BigInt(i),decimals:a},d),new u.TransactionInstruction({keys:c,programId:o,data:d})}(p,o,f,a,h,d,[],c));let{blockhash:b,lastValidBlockHeight:w}=await i.getLatestBlockhash();return new u.Transaction({feePayer:a,blockhash:b,lastValidBlockHeight:w}).add(...g)}catch(e){throw Error(`Failed to create SPL token transaction: ${e instanceof Error?e.message:"Unknown error"}`)}}let ex={UNIT_PRICE_MICRO_LAMPORTS:2e7,UNIT_LIMIT:500};async function eI({provider:e,to:t,value:r,connection:n}){if(!e.publicKey)throw Error("No public key found");let i=new u.PublicKey(t),a=Math.floor(r*u.LAMPORTS_PER_SOL),{blockhash:s,lastValidBlockHeight:o}=await n.getLatestBlockhash(),l=[u.ComputeBudgetProgram.setComputeUnitPrice({microLamports:ex.UNIT_PRICE_MICRO_LAMPORTS}),u.ComputeBudgetProgram.setComputeUnitLimit({units:ex.UNIT_LIMIT}),u.SystemProgram.transfer({fromPubkey:e.publicKey,toPubkey:i,lamports:a})];return new u.Transaction({feePayer:e.publicKey,blockhash:s,lastValidBlockHeight:o}).add(...l)}var eS=r(36469),eT=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},eP=function(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r};let eO=new Set,e_={};function eN(...e){return(e=e.filter(e=>
6883!eO.has(e))).length?(e.forEach(e=>{n=void 0,eO.add(e)}),e_.register?.forEach(t=>eM(()=>t(...e))),function(){e.forEach(e=>{n=void 0,eO.delete(e)}),e_.unregister?.forEach(t=>eM(()=>t(...e)))}):()=>{}}function ek(){return n||(n=[...eO]),n}function eR(e,t){return e_[e]?.push(t)||(e_[e]=[t]),function(){e_[e]=e_[e]?.filter(e=>t!==e)}}function eM(e){try{e()}catch(e){console.error(e)}}class eB extends Event{get detail(){return eT(this,c,"f")}get type(){return"wallet-standard:app-ready"}constructor(e){super("wallet-standard:app-ready",{bubbles:!1,cancelable:!1,composed:!1}),c.set(this,void 0),eP(this,c,e,"f")}preventDefault(){throw Error("preventDefault cannot be called")}stopImmediatePropagation(){throw Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw Error("stopPropagation cannot be called")}}c=new WeakMap;var ej=r(66883);let eU="solana:signTransaction";var e$=r(80944),eL=r(3733),eD=r(5763),eF=r(9616),eH=r(32590);let ez={"solana:mainnet":_.tWt,"solana:testnet":_.gTy,"solana:devnet":_.Rn0};class eW extends T{constructor({wallet:e,getActiveChain:t,requestedChains:r}){super(),this.type="ANNOUNCED",this.chain=p.o.CHAIN.SOLANA,this.provider=this,this.wallet=e,this.getActiveChain=t,this.requestedChains=r,this.name=eH.a.getConnectorName(e.name)||e.name,this.id=O.L.ConnectorExplorerIds[this.name]||this.name,this.explorerId=O.L.ConnectorExplorerIds[this.name],this.imageUrl=this.wallet.icon,this.bindEvents()}get chains(){return this.wallet.chains.map(e=>this.requestedChains.find(t=>t.id===e||t.id===ez[e]?.id)).filter(Boolean)}get publicKey(){let e=this.getAccount(!1);if(e)return new u.PublicKey(e.publicKey)}async connect(){let e=this.getWalletFeature(eL.u);await e.connect().catch(e=>{throw new h.vx(e)});let t=this.getAccount(!0),r=new u.PublicKey(t.publicKey);return this.emit("connect",r),t.address}async disconnect(){let e=this.getWalletFeature(eD.w);await e.disconnect(),this.emit("disconnect",void 0)}async signMessage(e){let t=this.getWalletFeature("solana:signMessage"),r=this.getAccount(!0),[n]=await t.signMessage({message:e,account:r});if(!n)throw new ej.K3("Empty result");return n.signature}async signTransaction(e){let t=this.getWalletFeature(eU),r=this.getAccount(!0),n=this.serializeTransaction(e),[i]=await t.signTransaction({account:r,transaction:new Uint8Array(n),chain:this.getActiveChainName()});if(!i)throw new ej.z4("Empty result");return(this.emit("pendingTransaction",void 0),(0,x.Y)(e))?u.VersionedTransaction.deserialize(i.signedTransaction):u.Transaction.from(i.signedTransaction)}async signAndSendTransaction(e,t){let r=this.getWalletFeature("solana:signAndSendTransaction"),n=this.getAccount(!0),[i]=await r.signAndSendTransaction({account:n,transaction:new Uint8Array(this.serializeTransaction(e)),options:{...t,preflightCommitment:(0,e$.i)(t?.preflightCommitment)},chain:this.getActiveChainName()});if(!i)throw new ej.UF("Empty result");return this.emit("pendingTransaction",void 0),d.A.encode(i.signature)}async sendTransaction(e,t,r){let n=await this.signTransaction(e);return await t.sendRawTransaction(n.serialize(),r)}async signAllTransactions(e){let t=this.getWalletFeature(eU),r=this.getAccount(!0),n=this.getActiveChainName();return(await t.signTransaction(...e.map(e=>({transaction:new Uint8Array(this.serializeTransaction(e)),account:r,chain:n})))).map(({signedTransaction:t},r)=>{let n=e[r];if(!n)throw new ej.z4("Invalid transaction signature response");return(this.emit("pendingTransaction",void 0),(0,x.Y)(n))?u.VersionedTransaction.deserialize(t):u.Transaction.from(t)})}async request(e){return Promise.reject(new B("request"))}async getAccounts(){return Promise.resolve(this.wallet.accounts.map(e=>({namespace:this.chain,address:e.address,type:"eoa"})))}serializeTransaction(e){return e.serialize({verifySignatures:!1})}getAccount(e){let t=this.wallet.accounts[0];if(e&&!t)throw new ej.fk;return t}getWalletFeature(e){if(!(e in this.wallet.features))throw new B(e);return this.wallet.features[e]}getActiveChainName(){let e=Object.entries(ez).find(([,e])=>e.id===this.getActiveChain()?.id);if(!e)throw Error("Invalid chain id");return e[0]}bindEvents(){this.getWalletFeature(eF.j).on("change",e=>
6883{if(e.accounts){let t=e.accounts[0];t&&this.emit("accountsChanged",new u.PublicKey(t.publicKey))}})}}let{get:eq,on:eV}=function(){if(i||(i=Object.freeze({register:eN,get:ek,on:eR}),"undefined"==typeof window))return i;let e=Object.freeze({register:eN});try{window.addEventListener("wallet-standard:register-wallet",({detail:t})=>t(e))}catch(e){console.error("wallet-standard:register-wallet event listener could not be added\n",e)}try{window.dispatchEvent(new eB(e))}catch(e){console.error("wallet-standard:app-ready event could not be dispatched\n",e)}return i}(),eG=[];function eK(e,t,r){return e.filter(e=>"WalletConnect"!==e.name&&(0,eS.Z)(e)).map(e=>new eW({wallet:e,requestedChains:t,getActiveChain:r}))}var eZ=r(44168).Buffer;let eJ=[p.o.CONNECTOR_ID.AUTH,p.o.CONNECTOR_ID.WALLET_CONNECT],eY=[{pattern:/Attempt to debit an account but found no record of a prior credit/iu,message:"Not enough SOL to cover fees or rent"},{pattern:/Insufficient funds for fee/iu,message:"Not enough SOL to cover fees or rent"},{pattern:/Transfer: insufficient lamports/iu,message:"Not enough SOL to cover this transfer"}];class eQ extends f.X{constructor(e={}){super({adapterType:p.o.ADAPTER_TYPES.SOLANA,namespace:p.o.CHAIN.SOLANA}),this.balancePromises={},this.connectionSettings=e.connectionSettings||"confirmed",this.wallets=e.wallets,this.registerWalletStandard=e.registerWalletStandard}construct(e){super.construct(e);let t=m.i.getActiveCaipNetworkId(),r=e.networks?.find(e=>e.caipNetworkId===t)||e.networks?.[0],n=r?.rpcUrls.default.http[0];n&&z.setConnection(new u.Connection(n,this.connectionSettings))}setAuthProvider(e){this.addConnector(new P({w3mFrameProvider:e,getActiveChain:()=>g.W.getCaipNetworkByNamespace(this.namespace),chains:this.getCaipNetworks()}))}syncConnectors(){y.H.state.projectId||b.h.open(E.R.ALERT_ERRORS.PROJECT_ID_NOT_CONFIGURED,"error");let e=()=>g.W.getActiveCaipNetwork(this.namespace);w.w.isClient()&&"coinbaseSolana"in window&&this.addConnector(new N({provider:window.coinbaseSolana,chains:this.getCaipNetworks(),getActiveChain:e})),function(e,t,r){let n=[eV("register",(...n)=>{r(...eG=[...eG,...eK(n,e,t)])}),eV("unregister",(...e)=>{r(...eG=eG.filter(t=>e.some(e=>e.name===t.wallet.name)))})];r(...eG=eK(eq(),e,t)),()=>n.forEach(e=>e())}(this.getCaipNetworks(),e,this.addConnector.bind(this))}async writeContract(){return Promise.resolve({hash:""})}async writeSolanaTransaction(e){let t=e.provider,r=z.state.connection;if(!r||!e.provider)throw Error("Connection is not set");let{blockhash:n,lastValidBlockHeight:i}=await r.getLatestBlockhash(),a=new u.Transaction({feePayer:t.publicKey,blockhash:n,lastValidBlockHeight:i});for(let t of e.instructions)a.add(new u.TransactionInstruction({keys:t.keys.map(e=>({pubkey:new u.PublicKey(e.pubkey),isSigner:e.isSigner,isWritable:e.isWritable})),programId:new u.PublicKey(t.programId),data:eZ.from(t.data,"hex")}));let s=await t.sendTransaction(a,r).catch(e=>{if(e instanceof u.SendTransactionError){let t=e?.transactionError?.message??e?.message??"",r=e?.logs?.join(" ")??"",n=`${t} ${r}`;for(let{pattern:e,message:t}of eY)if(e.test(n))throw Error(t)}throw e});return await new Promise(e=>{let t=setInterval(async()=>{let n=await r.getSignatureStatus(s);n?.value&&(clearInterval(t),e())},1e3)}),{hash:s}}async getCapabilities(){return Promise.resolve({})}async grantPermissions(){return Promise.resolve({})}async revokePermissions(){return Promise.resolve("0x")}async walletGetAssets(e){return Promise.resolve({})}async getAccounts(e){let t=this.connectors.find(t=>t.id===e.id);return t?{accounts:await t.getAccounts()}:{accounts:[]}}async signMessage(e){let t=e.provider;if(!t)throw Error("connectionControllerClient:signMessage - provider is undefined");let r=await t.signMessage(new TextEncoder().encode(e.message));return{signature:d.A.encode(r)}}async estimateGas(e){let t=z.state.connection;if(!t||!e.provider)throw Error("Connection is not set");let r=await eI({provider:e.provider,connection:t,to:"11111111111111111111111111111111",value:1});return{gas:BigInt(await r.getEstimatedFee(t)||0)}}async sendTransaction(e){let t=z.state.connection;if(!t||!e.provider)throw Error("Connection is not set");let r=e.provider,n=e.tokenMint?await eA({provider:r,connection:t,to:e.to,amount:Number(e.value),tokenMint:e.tokenMint}):await eI({provider:r,connection:t,to:e.to,value:Number.isNaN(Number(e.value))?0:Number(e.value)}),i=await r.sendTransaction(n,t).catch(e=>{if(e instanceof u.SendTransactionError){let t=e?.transactionError?.message??e?.message??"",r=e?.logs?.join(" ")??"",n=`${t} ${r}`;for(let{pattern:e,message:t}of eY)if(e.test(n))throw new h.T7(t)}throw e});return await new Promise(e=>{let r=setInterval(async()=>{let n=await t.getSignatureStatus(i);n?.value&&(clearInterval(r),e())},1e3)}),{hash:i}}parseUnits(){return 0n}formatUnits(){return""}async connect(e){let t=this.connectors.find(t=>
6883t.id===e.id);if(!t)throw Error("Provider not found");let r={...t,...e.id===p.o.CONNECTOR_ID.AUTH?{provider:t}:{}},n=e.rpcUrl||this.getCaipNetworks()?.find(t=>t.id===e.chainId)?.rpcUrls.default.http[0];if(!n)throw Error(`RPC URL not found for chainId: ${e.chainId}`);let i=this.getConnection({address:e.address,connectorId:t.id,connections:this.connections,connectors:this.connectors});if(i?.account)return this.emit("accountChanged",{address:i.account.address,chainId:i.caipNetwork?.id,connector:r}),{id:t.id,address:i.account.address,chainId:e.chainId,provider:t,type:t.type};let a=await t.connect({chainId:e.chainId,socialUri:e.socialUri});z.setConnection(new u.Connection(n,this.connectionSettings)),this.emit("accountChanged",{address:a,chainId:e.chainId,connector:r});let s=t.id===p.o.CONNECTOR_ID.AUTH,o=this.getCaipNetworks()?.find(t=>t.id===e.chainId);return this.addConnection({connectorId:t.id,accounts:[{address:a}],caipNetwork:o,auth:s?{name:m.i.getConnectedSocialProvider(),username:m.i.getConnectedSocialUsername()}:void 0}),t.id!==p.o.CONNECTOR_ID.WALLET_CONNECT&&this.listenSolanaProviderEvents(t.id,t.provider),{id:t.id,address:a,chainId:e.chainId,provider:t,type:t.type}}async getBalance(e){let t=e.address,r=this.getCaipNetworks()?.find(t=>t.id===e.chainId);if(!t)return Promise.resolve({balance:"0.00",symbol:"SOL"});let n=new u.Connection(r?.rpcUrls?.default?.http?.[0],this.connectionSettings),i=`${r?.caipNetworkId}:${e.address}`,a=this.balancePromises[i];if(a)return a;let s=m.i.getNativeBalanceCacheForCaipAddress(i);return s?{balance:s.balance,symbol:s.symbol}:(this.balancePromises[i]=new Promise(async r=>{try{let a=(await n.getBalance(new u.PublicKey(t))/A.w.LAMPORTS_PER_SOL).toString();if(m.i.updateNativeBalanceCache({caipAddress:i,balance:a,symbol:e.caipNetwork?.nativeCurrency.symbol||"SOL",timestamp:Date.now()}),!e.caipNetwork)throw Error("caipNetwork is required");r({balance:a,symbol:e.caipNetwork?.nativeCurrency.symbol})}catch(e){r({balance:"0.00",symbol:"SOL"})}}).finally(()=>{delete this.balancePromises[i]}),this.balancePromises[i]||{balance:"0.00",symbol:"SOL"})}async switchNetwork(e){await super.switchNetwork(e);let{caipNetwork:t}=e;t?.rpcUrls?.default?.http?.[0]&&z.setConnection(new u.Connection(t.rpcUrls.default.http[0],this.connectionSettings))}listenProviderEvents(){}listenSolanaProviderEvents(e,t){if(eJ.includes(e))return;let r=t=>{this.onAccountsChanged([t.toBase58()],e,!1)},n=()=>this.onDisconnect(e);this.providerHandlers[e]||(t.on("disconnect",n),t.on("accountsChanged",r),t.on("connect",r),this.providerHandlers[e]={provider:t,disconnect:n,accountsChanged:r,chainChanged:()=>void 0})}async setUniversalProvider(e){this.universalProvider=e;let t=p.o.CONNECTOR_ID.WALLET_CONNECT;v.k.listenWcProvider({universalProvider:e,namespace:p.o.CHAIN.SOLANA,onConnect:e=>this.onConnect(e,t),onDisconnect:()=>this.onDisconnect(t),onAccountsChanged:e=>this.onAccountsChanged(e,t,!1)});let n=new L({provider:e,chains:this.getCaipNetworks(),getActiveChain:()=>g.W.getCaipNetworkByNamespace(this.namespace)});if(this.registerWalletStandard){let{SolanaWalletConnectStandardWallet:t}=await r.e(2463).then(r.bind(r,52463));t.register(e)}return this.addConnector(n),Promise.resolve()}async connectWalletConnect(e){let t=await super.connectWalletConnect(e),r=this.getCaipNetworks()?.find(t=>t.id===e)?.rpcUrls.default.http[0],n=new u.Connection(r,this.connectionSettings);return z.setConnection(n),t}async disconnect(e){if(e.id){let t=this.connectors.find(t=>t.id===e.id);if(!t)throw Error("Provider not found");let r=this.connections.find(t=>C.y.isLowerCaseMatch(t.connectorId,e.id));return await t.provider.disconnect(),this.deleteConnection(t.id),0===this.connections.length?this.emit("disconnect"):this.emitFirstAvailableConnection(),{connections:r?[r]:[]}}return this.disconnectAll()}async syncConnection(e){return this.connect({...e,type:""})}async syncConnections({connectToFirstConnector:e,caipNetwork:t}){await Promise.all(this.connectors.filter(e=>{let{hasDisconnected:t,hasConnected:r}=C.y.getConnectorStorageInfo(e.id,this.namespace);return!t&&r}).map(async e=>{if(e.id===p.o.CONNECTOR_ID.WALLET_CONNECT){let r=v.k.getWalletConnectAccounts(this.universalProvider,this.namespace);r.length>0&&this.addConnection({connectorId:e.id,accounts:r.map(e=>({address:e.address})),caipNetwork:t})}else{let r=await e.connect({chainId:t?.id});r&&(this.addConnection({connectorId:e.id,accounts:[{address:r}],caipNetwork:t}
6883),this.listenSolanaProviderEvents(e.id,e.provider))}})),e&&this.emitFirstAvailableConnection()}getWalletConnectProvider(e){return new L({provider:e.provider,chains:e.caipNetworks,getActiveChain:()=>g.W.getCaipNetworkByNamespace(this.namespace)})}async disconnectAll(){return{connections:await Promise.all(this.connections.map(async e=>{let t=this.connectors.find(t=>C.y.isLowerCaseMatch(t.id,e.connectorId));if(!t)throw Error("Connector not found");return await this.disconnect({id:t.id}),e}))}}}},85021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyHash=s;let n=r(24998),i=r(18978),a=r(41636);async function s({address:e,hash:t,signature:r}){return(0,i.isAddressEqual)((0,n.getAddress)(e),await (0,a.recoverAddress)({hash:t,signature:r}))}},85158:(e,t,r)=>{"use strict";r.d(t,{kb:()=>s,vE:()=>l});var n=r(44168),i=r(12148),a=class extends i.b{socket;constructor(e,t,r){super(),this.socket=new window.WebSocket(e,r),this.socket.onopen=()=>this.emit("open"),this.socket.onmessage=e=>this.emit("message",e.data),this.socket.onerror=e=>this.emit("error",e),this.socket.onclose=e=>{this.emit("close",e.code,e.reason)}}send(e,t,r){let n=r||t;try{this.socket.send(e),n()}catch(e){n(e)}}close(e,t){this.socket.close(e,t)}addEventListener(e,t,r){this.socket.addEventListener(e,t,r)}};function s(e,t){return new a(e,t)}var o=class{encode(e){return JSON.stringify(e)}decode(e){return JSON.parse(e)}},l=class extends i.b{address;rpc_id;queue;options;autoconnect;ready;reconnect;reconnect_timer_id;reconnect_interval;max_reconnects;rest_options;current_reconnects;generate_request_id;socket;webSocketFactory;dataPack;constructor(e,t="ws://localhost:8080",{autoconnect:r=!0,reconnect:n=!0,reconnect_interval:i=1e3,max_reconnects:a=5,...s}={},l,c){super(),this.webSocketFactory=e,this.queue={},this.rpc_id=0,this.address=t,this.autoconnect=r,this.ready=!1,this.reconnect=n,this.reconnect_timer_id=void 0,this.reconnect_interval=i,this.max_reconnects=a,this.rest_options=s,this.current_reconnects=0,this.generate_request_id=l||(()=>"number"==typeof this.rpc_id?++this.rpc_id:Number(this.rpc_id)+1),c?this.dataPack=c:this.dataPack=new o,this.autoconnect&&this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}connect(){this.socket||this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}call(e,t,r,n){return n||"object"!=typeof r||(n=r,r=null),new Promise((i,a)=>{if(!this.ready)return a(Error("socket not ready"));let s=this.generate_request_id(e,t);this.socket.send(this.dataPack.encode({jsonrpc:"2.0",method:e,params:t||void 0,id:s}),n,e=>{if(e)return a(e);this.queue[s]={promise:[i,a]},r&&(this.queue[s].timeout=setTimeout(()=>{delete this.queue[s],a(Error("reply timeout"))},r))})})}async login(e){let t=await this.call("rpc.login",e);if(!t)throw Error("authentication failed");return t}async listMethods(){return await this.call("__listMethods")}notify(e,t){return new Promise((r,n)=>{if(!this.ready)return n(Error("socket not ready"));this.socket.send(this.dataPack.encode({jsonrpc:"2.0",method:e,params:t}),e=>{if(e)return n(e);r()})})}async subscribe(e){"string"==typeof e&&(e=[e]);let t=await this.call("rpc.on",e);if("string"==typeof e&&"ok"!==t[e])throw Error("Failed subscribing to an event '"+e+"' with: "+t[e]);return t}async unsubscribe(e){"string"==typeof e&&(e=[e]);let t=await this.call("rpc.off",e);if("string"==typeof e&&"ok"!==t[e])throw Error("Failed unsubscribing from an event with: "+t);return t}close(e,t){this.socket.close(e||1e3,t)}setAutoReconnect(e){this.reconnect=e}setReconnectInterval(e){this.reconnect_interval=e}setMaxReconnects(e){this.max_reconnects=e}_connect(e,t){clearTimeout(this.reconnect_timer_id),this.socket=this.webSocketFactory(e,t),this.socket.addEventListener("open",()=>{this.ready=!0,this.emit("open"),this.current_reconnects=0}),this.socket.addEventListener("message",({data:e})=>{e instanceof ArrayBuffer&&(e=n.Buffer.from(e).toString());try{e=this.dataPack.decode(e)}catch(e){return}if(e.notification&&this.listeners(e.notification).length){if(!Object.keys(e.params).length)return this.emit
6883(e.notification);let t=[e.notification];if(e.params.constructor===Object)t.push(e.params);else for(let r=0;r<e.params.length;r++)t.push(e.params[r]);return Promise.resolve().then(()=>{this.emit.apply(this,t)})}if(!this.queue[e.id])return e.method?Promise.resolve().then(()=>{this.emit(e.method,e?.params)}):void 0;"error"in e=="result"in e&&this.queue[e.id].promise[1](Error('Server response malformed. Response must include either "result" or "error", but not both.')),this.queue[e.id].timeout&&clearTimeout(this.queue[e.id].timeout),e.error?this.queue[e.id].promise[1](e.error):this.queue[e.id].promise[0](e.result),delete this.queue[e.id]}),this.socket.addEventListener("error",e=>this.emit("error",e)),this.socket.addEventListener("close",({code:r,reason:n})=>{this.ready&&setTimeout(()=>this.emit("close",r,n),0),this.ready=!1,this.socket=void 0,1e3!==r&&(this.current_reconnects++,this.reconnect&&(this.max_reconnects>this.current_reconnects||0===this.max_reconnects)&&(this.reconnect_timer_id=setTimeout(()=>this._connect(e,t),this.reconnect_interval)))})}}},85202:(e,t,r)=>{"use strict";r.d(t,{b:()=>o,v:()=>l});var n=r(20801);let i=[],a={autoConnect:!1,connecting:!1,connected:!1,disconnecting:!1,select(){s("call","select")},connect:()=>Promise.reject(s("call","connect")),disconnect:()=>Promise.reject(s("call","disconnect")),sendTransaction:()=>Promise.reject(s("call","sendTransaction")),signTransaction:()=>Promise.reject(s("call","signTransaction")),signAllTransactions:()=>Promise.reject(s("call","signAllTransactions")),signMessage:()=>Promise.reject(s("call","signMessage")),signIn:()=>Promise.reject(s("call","signIn"))};function s(e,t){let r=Error(`You have tried to ${e} "${t}" on a WalletContext without providing one. Make sure to render a WalletProvider as an ancestor of the component that uses WalletContext.`);return console.error(r),r}Object.defineProperty(a,"wallets",{get:()=>(s("read","wallets"),i)}),Object.defineProperty(a,"wallet",{get:()=>(s("read","wallet"),null)}),Object.defineProperty(a,"publicKey",{get:()=>(s("read","publicKey"),null)});let o=(0,n.createContext)(a);function l(){return(0,n.useContext)(o)}},85244:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHash=function(e){return(0,n.isHex)(e)&&32===(0,i.size)(e)};let n=r(80217),i=r(29813)},85460:(e,t,r)=>{"use strict";r.d(t,{s:()=>o});var n=r(20801),i=r(71618),a=r(91004);let s=new WeakMap;function o(e,t){let r=null==t?void 0:t.sync,o=(0,n.useMemo)(()=>e&&new WeakMap,[e]),l=(0,n.useRef)(void 0),c=!0,u=(0,n.useSyncExternalStore)((0,n.useCallback)(t=>{let n=(0,a.B1)(e,t,r);return t(),n},[e,r]),()=>{let t=(0,a.P9)(e);try{if(!c&&l.current&&!(0,i.Hq)(l.current,t,o,new WeakMap))return l.current}catch(e){}return t},()=>(0,a.P9)(e));c=!1,(0,n.useLayoutEffect)(()=>{l.current=u}),((e,t)=>{let r=(0,n.useRef)(void 0);(0,n.useEffect)(()=>{r.current=(0,i.JR)(e,t,!0)}),(0,n.useDebugValue)(r.current)})(u,o);let d=(0,n.useMemo)(()=>new WeakMap,[]);return(0,i.tz)(u,o,d,s)}},85583:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createClient=function(e){let{batch:t,chain:r,ccipRead:s,dataSuffix:o,key:l="base",name:c="Base Client",tokens:u,type:d="base"}=e,h=e.experimental_blockTag??("number"==typeof r?.experimental_preconfirmationTime?"pending":void 0),p=Math.min(Math.max(Math.floor((r?.blockTime??12e3)/2),500),4e3),f=e.pollingInterval??p,m=e.cacheTime??f,g=e.account?(0,n.parseAccount)(e.account):void 0,{config:y,request:b,value:w}=e.transport({account:g,chain:r,pollingInterval:f}),v={account:g,batch:t,cacheTime:m,ccipRead:s,chain:r,dataSuffix:o,key:l,name:c,pollingInterval:f,request:b,tokens:u,transport:{...y,...w},type:d,uid:(0,i.uid)(),...h?{experimental_blockTag:h}:{}};return Object.assign(v,{extend:function e(t){return r=>{let n=r(t);for(let e in v)delete n[e];let i={...t,...n};for(let e in n){let r=t[e],s=n[e];a(r)&&a(s)&&(i[e]={...r,...s})}return Object.assign(i,{extend:e(i)})}}(v)})},t.bindActionDecorators=function(e,t){let r=(r={})=>t(e,r);for(let n of["call","calls","callWithPeriod","estimateGas","prepare","simulate"])if(Object.hasOwn(t,n)){let i=t[n];r[n]=(t={})=>1===i.length?i(t):i(e,t)}for(let e of["extractEvent","extractEvents"])Object.hasOwn(t,e)&&(r[e]=t[e]);return r},t.rpcSchema=function(){return null};let n=r(83562),i=r(57191);function a(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}},85589:(e,t,r)=>{"use strict";r.d(t,{q:()=>n});let n="solana:signTransaction"},85885:(e,t,r)=>{"use strict";r.d(t,{$:()=>o});var n=r(97085),i=r(44582),a=r(98668);function s(e,t){return{address:(0,n.b)(e),storageKeys:t.map((e,t)=>((0,i.MR)((0,a.Lo)(e,32),"invalid slot",`storageKeys[${t}]`,e),e.toLowerCase()))}}function o(e){if(Array.isArray(e))return e.map((t,r)=>Array.isArray(t)?((0,i.MR)(2===t.length,"invalid slot set",`value[${r}]`,t),s(t[0],t[1])):((0,i.MR)(null!=t&&"object"==typeof t,"invali
6883d address-slot set","value",e),s(t.address,t.storageKeys)));(0,i.MR)(null!=e&&"object"==typeof e,"invalid access list","value",e);let t=Object.keys(e).map(t=>{let r=e[t].reduce((e,t)=>(e[t]=!0,e),{});return s(t,Object.keys(r).sort())});return t.sort((e,t)=>e.address.localeCompare(t.address)),t}},85926:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountTypeNotSupportedError=t.AccountNotFoundError=void 0;let n=r(45226);class i extends n.BaseError{constructor({docsPath:e}={}){super("Could not find an Account to execute with this Action.\nPlease provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client.",{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}t.AccountNotFoundError=i;class a extends n.BaseError{constructor({docsPath:e,metaMessages:t,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:e,metaMessages:t,name:"AccountTypeNotSupportedError"})}}t.AccountTypeNotSupportedError=a},86262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseCompactSignature=function(e){let{r:t,s:r}=n.secp256k1.Signature.fromCompact(e.slice(2,130));return{r:(0,i.numberToHex)(t,{size:32}),yParityAndS:(0,i.numberToHex)(r,{size:32})}};let n=r(6792),i=r(27083)},86301:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllowance=s;let n=r(91472),i=r(527),a=r(55498);async function s(e,t){let{account:r,decimals:n,spender:o,token:l,...c}=t,[u,{decimals:d}]=await Promise.all([(0,i.readContract)(e,{...c,...s.call(e,{account:r,spender:o,token:l})}),(0,a.resolveTokenWithDecimals)(e,{decimals:n,token:l})]);return(0,a.toAmount)(u,d)}(s||(t.getAllowance=s={})).call=function(e,t){return(0,a.defineCall)({address:(0,a.resolveToken)(e,t).address,abi:n.erc20Abi,functionName:"allowance",args:[t.account,t.spender]})}},86379:(e,t)=>{"use strict";async function r(e,{interval:t}){let r="hardhat"===e.mode?1e3*t:t;await e.request({method:"evm_setIntervalMining",params:[r]})}Object.defineProperty(t,"__esModule",{value:!0}),t.setIntervalMining=r},86737:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseError=void 0;let n=r(79422);class i extends Error{constructor(e,t={}){let r=t.cause instanceof i?t.cause.details:t.cause?.message?t.cause.message:t.details,a=t.cause instanceof i&&t.cause.docsPath||t.docsPath;super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: https://abitype.dev${a}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${n.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"}),t.cause&&(this.cause=t.cause),this.details=r,this.docsPath=a,this.metaMessages=t.metaMessages,this.shortMessage=e}}t.BaseError=i},86911:(e,t,r)=>{"use strict";function n(e,{dir:t="left"}={}){let r="string"==typeof e?e.replace("0x",""):e,i=0;for(let e=0;e<r.length-1;e++)if("0"===r["left"===t?e:r.length-e-1].toString())i++;else break;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}r.d(t,{B:()=>n})},86921:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(55284);r(79909);var s=r(46756),o=r(63412),l=r(91392);let c=(0,l.AH)` 6884 :host { 6885 display: inline-flex; 6886 justify-content: center; 6887 align-items: center; 6888 border-radius: ${({borderRadius:e})=>e[2]}; 6889 padding: ${({spacing:e})=>e[1]} !important; 6890 background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; 6891 position: relative; 6892 } 6893 6894 :host([data-padding='2']) { 6895 padding: ${({spacing:e})=>e[2]} !important; 6896 } 6897 6898 :host:after { 6899 content: ''; 6900 position: absolute; 6901 top: 0; 6902 left: 0; 6903 width: 100%; 6904 height: 100%; 6905 border-radius: ${({borderRadius:e})=>e[2]}; 6906 } 6907 6908 :host > wui-icon { 6909 z-index: 10; 6910 } 6911 6912 /* -- Colors --------------------------------------------------- */ 6913 :host([data-color='accent-primary']) { 6914 color: ${({tokens:e})=>e.core.iconAccentPrimary}; 6915 } 6916 6917 :host([data-color='accent-primary']):after { 6918 background-color: ${({tokens:e})=>e.core.foregroundAccent010}; 6919 } 6920 6921 :host([data-color='default']), 6922 :host([data-color='secondary']) { 6923 color: ${({tokens:e})=>e.theme.iconDefault}; 6924 } 6925 6926 :host([data-color='default']):after { 6927 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 6928 } 6929 6930 :host([data-color='secondary']):after { 6931 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 6932 } 6933 6934 :host([data-color='success']) { 6935 color: ${({tokens:e})=>e.core.iconSuccess}; 6936 } 6937 6938 :host([data-color='success']):after { 6939 background-color: ${({tokens:e})=>e.core.backgroundSuccess}; 6940 } 6941 6942 :host([data-color='error']) { 6943 color: ${({tokens:e})=>e.core.iconError}; 6944 } 6945 6946 :host([data-color='error']):after { 6947 background-color: ${({tokens:e})=>e.core.backgroundError}; 6948 } 6949 6950 :host([data-color='warning']) { 6951 color: ${({tokens:e})=>e.core.iconWarning}; 6952 } 6953 6954 :host([data-color='warning']):after { 6955 background-color: ${({tokens:e})=>e.core.backgroundWarning}; 6956 } 6957 6958 :host([data-color='inverse']) { 6959 color: ${({tokens:e})=>e.theme.iconInverse}; 6960 } 6961 6962 :host([data-color='inverse']):after { 6963 background-color: transparent; 6964 } 6965`;var u=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let d=class extends n.WF{constructor(){super(...arguments),this.icon="copy",this.size="md",this.padding="1",this.color="default"}render(){return this.dataset.padding=this.padding,this.dataset.color=this.color,(0,n.qy)` 6966 <wui-icon size=${(0,a.J)(this.size)} name=${this.icon} color="inherit"></wui-icon> 6967 `}};d.styles=[s.W5,s.fD,c],u([(0,i.MZ)()],d.prototype,"icon",void 0),u([(0,i.MZ)()],d.prototype,"size",void 0),u([(0,i.MZ)()],d.prototype,"padding",void 0),u([(0,i.MZ)()],d.prototype,"color",void 0),d=u([(0,o.E)("wui-icon-box")],d)},86987:(e,t,r)=>{"use strict";
6967Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=t.md5=t.MD5=t.sha1=t.SHA1=void 0;let n=r(57568),i=r(92565),a=Uint32Array.from([0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0]),s=new Uint32Array(80);class o extends n.HashMD{constructor(){super(64,20,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]}get(){let{A:e,B:t,C:r,D:n,E:i}=this;return[e,t,r,n,i]}set(e,t,r,n,i){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)s[r]=e.getUint32(t,!1);for(let e=16;e<80;e++)s[e]=(0,i.rotl)(s[e-3]^s[e-8]^s[e-14]^s[e-16],1);let{A:r,B:a,C:o,D:l,E:c}=this;for(let e=0;e<80;e++){let t,u;e<20?(t=(0,n.Chi)(a,o,l),u=0x5a827999):e<40?(t=a^o^l,u=0x6ed9eba1):e<60?(t=(0,n.Maj)(a,o,l),u=0x8f1bbcdc):(t=a^o^l,u=0xca62c1d6);let d=(0,i.rotl)(r,5)+t+c+u+s[e]|0;c=l,l=o,o=(0,i.rotl)(a,30),a=r,r=d}r=r+this.A|0,a=a+this.B|0,o=o+this.C|0,l=l+this.D|0,c=c+this.E|0,this.set(r,a,o,l,c)}roundClean(){(0,i.clean)(s)}destroy(){this.set(0,0,0,0,0),(0,i.clean)(this.buffer)}}t.SHA1=o,t.sha1=(0,i.createHasher)(()=>new o);let l=Array.from({length:64},(e,t)=>Math.floor(0x100000000*Math.abs(Math.sin(t+1)))),c=a.slice(0,4),u=new Uint32Array(16);class d extends n.HashMD{constructor(){super(64,16,8,!0),this.A=0|c[0],this.B=0|c[1],this.C=0|c[2],this.D=0|c[3]}get(){let{A:e,B:t,C:r,D:n}=this;return[e,t,r,n]}set(e,t,r,n){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n}process(e,t){for(let r=0;r<16;r++,t+=4)u[r]=e.getUint32(t,!0);let{A:r,B:a,C:s,D:o}=this;for(let e=0;e<64;e++){let t,c,d;e<16?(t=(0,n.Chi)(a,s,o),c=e,d=[7,12,17,22]):e<32?(t=(0,n.Chi)(o,a,s),c=(5*e+1)%16,d=[5,9,14,20]):e<48?(t=a^s^o,c=(3*e+5)%16,d=[4,11,16,23]):(t=s^(a|~o),c=7*e%16,d=[6,10,15,21]),t=t+r+l[e]+u[c],r=o,o=s,s=a,a+=(0,i.rotl)(t,d[e%4])}r=r+this.A|0,a=a+this.B|0,s=s+this.C|0,o=o+this.D|0,this.set(r,a,s,o)}roundClean(){(0,i.clean)(u)}destroy(){this.set(0,0,0,0),(0,i.clean)(this.buffer)}}t.MD5=d,t.md5=(0,i.createHasher)(()=>new d);let h=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),p=Uint8Array.from(Array(16).fill(0).map((e,t)=>t)),f=p.map(e=>(9*e+5)%16),m=(()=>{let e=[[p],[f]];for(let t=0;t<4;t++)for(let r of e)r.push(r[t].map(e=>h[e]));return e})(),g=m[0],y=m[1],b=[[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=>Uint8Array.from(e)),w=g.map((e,t)=>e.map(e=>b[t][e])),v=y.map((e,t)=>e.map(e=>b[t][e])),E=Uint32Array.from([0,0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xa953fd4e]),C=Uint32Array.from([0x50a28be6,0x5c4dd124,0x6d703ef3,0x7a6d76e9,0]);function A(e,t,r,n){return 0===e?t^r^n:1===e?t&r|~t&n:2===e?(t|~r)^n:3===e?t&n|r&~n:t^(r|~n)}let x=new Uint32Array(16);class I extends n.HashMD{constructor(){super(64,20,8,!0),this.h0=0x67452301,this.h1=-0x10325477,this.h2=-0x67452302,this.h3=0x10325476,this.h4=-0x3c2d1e10}get(){let{h0:e,h1:t,h2:r,h3:n,h4:i}=this;return[e,t,r,n,i]}set(e,t,r,n,i){this.h0=0|e,this.h1=0|t,this.h2=0|r,this.h3=0|n,this.h4=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)x[r]=e.getUint32(t,!0);let r=0|this.h0,n=r,a=0|this.h1,s=a,o=0|this.h2,l=o,c=0|this.h3,u=c,d=0|this.h4,h=d;for(let e=0;e<5;e++){let t=4-e,p=E[e],f=C[e],m=g[e],b=y[e],I=w[e],S=v[e];for(let t=0;t<16;t++){let n=(0,i.rotl)(r+A(e,a,o,c)+x[m[t]]+p,I[t])+d|0;r=d,d=c,c=0|(0,i.rotl)(o,10),o=a,a=n}for(let e=0;e<16;e++){let r=(0,i.rotl)(n+A(t,s,l,u)+x[b[e]]+f,S[e])+h|0;n=h,h=u,u=0|(0,i.rotl)(l,10),l=s,s=r}}this.set(this.h1+o+u|0,this.h2+c+h|0,this.h3+d+n|0,this.h4+r+s|0,this.h0+a+l|0)}roundClean(){(0,i.clean)(x)}destroy(){this.destroyed=!0,(0,i.clean)(this.buffer),this.set(0,0,0,0,0)}}t.RIPEMD160=I,t.ripemd160=(0,i.createHasher)(()=>new I)},87081:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupKzg=function(e,t){try{e.loadTrustedSetup(t)}catch(e){if(!e.message.includes("trusted setup is already loaded"))throw e}return(0,n.defineKzg)(e)};let n=r(60899)},87089:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zeroAddress=t.ethAddress=void 0,t.ethAddress="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",t.zeroAddress="0x0000000000000000000000000000000000000000"},87129:(e,t)=>
6967{var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=a(e,function(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var r in e)n.call(e,r)&&e[r]&&(t=a(t,r));return t}(r)))}return e}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(r=(function(){return i}).apply(t,[]))||(e.exports=r)}()},87721:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineFormatter=function(e,t){return({exclude:r,format:n})=>({exclude:r,format:(e,i)=>{let a=t(e,i);if(r)for(let e of r)delete a[e];return{...a,...n(e,i)}},type:e})}},87908:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.estimateGas=p;let n=r(83562),i=r(45226),a=r(32036),s=r(27083),o=r(62280),l=r(48674),c=r(53520),u=r(21672),d=r(61609),h=r(84593);async function p(e,t){let{account:r=e.account,prepare:p=!0}=t,f=r?(0,n.parseAccount)(r):void 0,m=Array.isArray(p)?p:f?.type!=="local"?["blobVersionedHashes"]:void 0;try{let r=await (async()=>t.to?t.to:t.authorizationList&&t.authorizationList.length>0?await (0,a.recoverAuthorizationAddress)({authorization:t.authorizationList[0]}).catch(()=>{throw new i.BaseError("`to` is required. Could not infer from `authorizationList`")}):void 0)(),{accessList:n,authorizationList:o,blobs:g,blobVersionedHashes:y,blockNumber:b,blockTag:w,data:v,gas:E,gasPrice:C,maxFeePerBlobGas:A,maxFeePerGas:x,maxPriorityFeePerGas:I,nonce:S,value:T,stateOverride:P,...O}=p?await (0,h.prepareTransactionRequest)(e,{...t,parameters:m,to:r}):t;if(E&&t.gas!==E)return E;let _=("bigint"==typeof b?(0,s.numberToHex)(b):void 0)||w,N=(0,u.serializeStateOverride)(P);(0,d.assertRequest)(t);let k=e.chain?.formatters?.transactionRequest?.format,R=(k||c.formatTransactionRequest)({...(0,l.extract)(O,{format:k}),account:f,accessList:n,authorizationList:o,blobs:g,blobVersionedHashes:y,data:v,gasPrice:C,maxFeePerBlobGas:A,maxFeePerGas:x,maxPriorityFeePerGas:I,nonce:S,to:r,value:T},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:N?[R,_??e.experimental_blockTag??"latest",N]:_?[R,_]:[R]}))}catch(r){throw(0,o.getEstimateGasError)(r,{...t,account:f,chain:e.chain})}}},88076:(e,t,r)=>{"use strict";r.d(t,{Af:()=>p,ZJ:()=>c,aT:()=>h});var n=r(81742),i=r(13640),a=r(41240),s=r(98213),o=r(42182);let l=new TextEncoder;function c(e,t={}){var r,n;return"number"==typeof e||"bigint"==typeof e?(r=e,n=t,h((0,o.cK)(r,n))):"boolean"==typeof e?function(e,t={}){let r=new Uint8Array(1);return(r[0]=Number(e),"number"==typeof t.size)?((0,s.Sl)(r,{size:t.size}),(0,a.eV)(r,{size:t.size})):r}(e,t):(0,i.q)(e)?h(e,t):p(e,t)}let u={zero:48,nine:57,A:65,F:70,a:97,f:102};function d(e){return e>=u.zero&&e<=u.nine?e-u.zero:e>=u.A&&e<=u.F?e-(u.A-10):e>=u.a&&e<=u.f?e-(u.a-10):void 0}function h(e,t={}){let r=e;t.size&&((0,s.Sl)(r,{size:t.size}),r=(0,a.eV)(r,{dir:"right",size:t.size}));let i=r.slice(2);i.length%2&&(i=`0${i}`);let o=i.length/2,l=new Uint8Array(o);for(let e=0,t=0;e<o;e++){let r=d(i.charCodeAt(t++)),a=d(i.charCodeAt(t++));if(void 0===r||void 0===a)throw new n.C(`Invalid byte sequence ("${i[t-2]}${i[t-1]}" in "${i}").`);l[e]=16*r+a}return l}function p(e,t={}){let r=l.encode(e);return"number"==typeof t.size?((0,s.Sl)(r,{size:t.size}),(0,a.eV)(r,{dir:"right",size:t.size})):r}},88239:(e,t,r)=>{"use strict";r.d(t,{R:()=>a});var n=r(15405),i=r(18627);let a={EmbeddedWalletAbortController:new AbortController,UniversalProviderErrors:{UNAUTHORIZED_DOMAIN_NOT_ALLOWED:{message:"Unauthorized: origin not allowed",alertErrorKey:"ORIGIN_NOT_ALLOWED"},JWT_VALIDATION_ERROR:{message:"JWT validation error: JWT Token is not yet valid",alertErrorKey:"JWT_TOKEN_NOT_VALID"},INVALID_KEY:{message:"Unauthorized: invalid key",alertErrorKey:"INVALID_PROJECT_ID"}},ALERT_ERRORS:{SWITCH_NETWORK_NOT_FOUND:{code:"APKT001",displayMessage:"Network Not Found",debugMessage:"The specified network is not recognized. Please ensure it is included in the `networks` array of your `createAppKit` configuration."},ORIGIN_NOT_ALLOWED:{code:"APKT002",displayMessage:"Invalid App Configuration",debugMessage:()=>`The origin ${(0,n.IP)()?window.origin:"unknown"} is not in your allow list. Please update your allowed domains at https://dashboard.reown.com. [PID: ${i.H.state.projectId}]`},IFRAME_LOAD_FAILED:{code:"APKT003",displayMessage:"Network Error: Wallet Load Failed",debugMessage:()=>"Failed to load the embedded wallet. This may be due to network issues or server downtime. Please check your network connection and try again shortly. Contact support if the issue persists."},IFRAME_REQUEST_TIMEOUT:{code:"APKT004",displayMessage:"Wallet Request Timeout",debugMessage:()=>"The request to the embedded wallet timed out. Please check your network connection and try again shortly. Contact support if the issue persists."},UNVERIFIED_DOMAIN:{code:"APKT005",displayMessage:"Unverified Domain",debugMessage:()=>"Embedded wallet load failed. Ensure your domain is verified in https://dashboard.reown.com."},JWT_TOKEN_NOT_VALID:{code:"APKT006",displayMessage:"Session Expired",debugMessage:"Your session is invali
6967d or expired. Please check your systemâs date and time settings, then reconnect."},INVALID_PROJECT_ID:{code:"APKT007",displayMessage:"Invalid Project ID",debugMessage:"The specified project ID is invalid. Please visit https://dashboard.reown.com to obtain a valid project ID."},PROJECT_ID_NOT_CONFIGURED:{code:"APKT008",displayMessage:"Project ID Missing",debugMessage:"No project ID is configured. You can create and configure a project ID at https://dashboard.reown.com."},SERVER_ERROR_APP_CONFIGURATION:{code:"APKT009",displayMessage:"Server Error",debugMessage:e=>`Unable to fetch App Configuration. ${e}. Please check your network connection and try again shortly. Contact support if the issue persists.`},RATE_LIMITED_APP_CONFIGURATION:{code:"APKT010",displayMessage:"Rate Limited",debugMessage:"You have been rate limited while retrieving App Configuration. Please wait a few minutes and try again. Contact support if the issue persists."}},ALERT_WARNINGS:{LOCAL_CONFIGURATION_IGNORED:{debugMessage:e=>`[Reown Config Notice] ${e}`},INACTIVE_NAMESPACE_NOT_CONNECTED:{code:"APKTW001",displayMessage:"Inactive Namespace Not Connected",debugMessage:(e,t)=>`An error occurred while connecting an inactive namespace ${e}: "${t}"`},INVALID_EMAIL:{code:"APKTW002",displayMessage:"Invalid Email Address",debugMessage:"Please enter a valid email address"}}}},88344:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatUnits=function(e,t){let r=e.toString(),n=r.startsWith("-");n&&(r=r.slice(1));let[i,a]=[(r=r.padStart(t,"0")).slice(0,r.length-t),r.slice(r.length-t)];return a=a.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${a?`.${a}`:""}`}},88432:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toBytes=function(e){return o(e,"Bytes")},t.toHex=function(e){return o(e,"Hex")},t.to=o,t.decodeRlpCursor=l,t.readLength=c,t.readList=u,t.from=d,t.fromBytes=function(e,t={}){let{as:r="Bytes"}=t;return d(e,{as:r})},t.fromHex=function(e,t={}){let{as:r="Hex"}=t;return d(e,{as:r})};let n=r(31837),i=r(53937),a=r(70259),s=r(1682);function o(e,t){let r=t??("string"==typeof e?"Hex":"Bytes"),i=(()=>{if("string"==typeof e){if(e.length>3&&e.length%2!=0)throw new a.InvalidLengthError(e);return n.fromHex(e)}return e})();return l(s.create(i,{recursiveReadLimit:1/0}),r)}function l(e,t="Hex"){if(0===e.bytes.length)return"Hex"===t?a.fromBytes(e.bytes):e.bytes;let r=e.readByte();if(r<128&&e.decrementPosition(1),r<192){let n=c(e,r,128),i=e.readBytes(n);return"Hex"===t?a.fromBytes(i):i}let n=c(e,r,192);return u(e,n,t)}function c(e,t,r){if(128===r&&t<128)return 1;if(t<=r+55)return t-r;if(t===r+55+1)return e.readUint8();if(t===r+55+2)return e.readUint16();if(t===r+55+3)return e.readUint24();if(t===r+55+4)return e.readUint32();throw new i.BaseError("Invalid RLP prefix")}function u(e,t,r){let n=e.position,i=[];for(;e.position-n<t;)i.push(l(e,r));return i}function d(e,t){let{as:r}=t,i=function e(t){return Array.isArray(t)?function(e){let t=e.reduce((e,t)=>e+t.length,0),r=h(t);return{length:t<=55?1+t:1+r+t,encode(n){for(let{encode:i}of(t<=55?n.pushByte(192+t):(n.pushByte(247+r),1===r?n.pushUint8(t):2===r?n.pushUint16(t):3===r?n.pushUint24(t):n.pushUint32(t)),e))i(n)}}}(t.map(t=>e(t))):function(e){let t="string"==typeof e?n.fromHex(e):e,r=h(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||(t.length<=55?e.pushByte(128+t.length):(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)}}}(t)}(e),o=s.create(new Uint8Array(i.length));return(i.encode(o),"Hex"===r)?a.fromBytes(o.bytes):o.bytes}function h(e){if(e<=255)return 1;if(e<=65535)return 2;if(e<=0xffffff)return 3;if(e<=0xffffffff)return 4;throw new i.BaseError("Length is too large.")}},88579:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationVersionState=void 0,function(e){e.UP_TO_DATE="UP_TO_DATE",e.OUTDATED="OUTDATED",e.UNKNOWN="UNKNOWN"}(r||(t.ImplementationVersionState=r={}))},88746:(e,t)=>{"use strict";
6967Object.defineProperty(t,"__esModule",{value:!0}),t.PermissionsError=t.PERMISSIONS_REQUEST_REJECTED=void 0,t.PERMISSIONS_REQUEST_REJECTED=4001;class r extends Error{constructor(e,t,n){super(e),this.code=t,this.data=n,Object.setPrototypeOf(this,r.prototype)}}t.PermissionsError=r},88786:(e,t)=>{let r=new Uint8Array(512),n=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)r[t]=e,n[e]=t,256&(e<<=1)&&(e^=285);for(let e=255;e<512;e++)r[e]=r[e-255]}(),t.log=function(e){if(e<1)throw Error("log("+e+")");return n[e]},t.exp=function(e){return r[e]},t.mul=function(e,t){return 0===e||0===t?0:r[n[e]+n[t]]}},88787:(e,t,r)=>{"use strict";r.d(t,{H:()=>a});var n=r(80407),i=r(24227);let a=(0,i.u$)(class extends i.WL{constructor(e){if(super(e),e.type!==i.OA.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){for(let r in this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e))),t)t[r]&&!this.nt?.has(r)&&this.st.add(r);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 n=!!t[e];n===this.st.has(e)||this.nt?.has(e)||(n?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return n.c0}})},89188:(e,t,r)=>{"use strict";r.d(t,{K1:()=>a,NH:()=>s,kg:()=>l,lj:()=>o});var n=r(82376),i=r(81920);function a(){let e=n.W.state.activeCaipNetwork?.chainNamespace||"eip155",t=n.W.state.activeCaipNetwork?.id||1,r=i.oU.NATIVE_TOKEN_ADDRESS[e];return`${e}:${t}:${r}`}function s(e){return i.oU.NATIVE_TOKEN_ADDRESS[e]}function o(e){return n.W.getAccountData(e)?.preferredAccountType}function l(e){return e?n.W.state.chains.get(e)?.networkState?.caipNetwork:n.W.state.activeCaipNetwork}},89221:()=>{},89372:(e,t)=>{"use strict";async function r(e,{id:t}){await e.request({method:"evm_revert",params:[t]})}Object.defineProperty(t,"__esModule",{value:!0}),t.revert=r},89381:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContract=function({abi:e,address:t,client:r}){let[p,f]=r?"public"in r&&"wallet"in r?[r.public,r.wallet]:"public"in r?[r.public,void 0]:"wallet"in r?[void 0,r.wallet]:[r,r]:[void 0,void 0],m=null!=p,g=null!=f,y={},b=!1,w=!1,v=!1;for(let t of e)if("function"===t.type?"view"===t.stateMutability||"pure"===t.stateMutability?b=!0:w=!0:"event"===t.type&&(v=!0),b&&w&&v)break;return m&&(b&&(y.read=new Proxy({},{get:(r,i)=>(...r)=>{let{args:a,options:s}=d(r);return(0,n.getAction)(p,o.readContract,"readContract")({abi:e,address:t,functionName:i,args:a,...s})}})),w&&(y.simulate=new Proxy({},{get:(r,i)=>(...r)=>{let{args:a,options:s}=d(r);return(0,n.getAction)(p,l.simulateContract,"simulateContract")({abi:e,address:t,functionName:i,args:a,...s})}})),v&&(y.createEventFilter=new Proxy({},{get:(r,a)=>(...r)=>{let{args:s,options:o}=h(r,e.find(e=>"event"===e.type&&e.name===a));return(0,n.getAction)(p,i.createContractEventFilter,"createContractEventFilter")({abi:e,address:t,eventName:a,args:s,...o})}}),y.getEvents=new Proxy({},{get:(r,i)=>(...r)=>{let{args:a,options:o}=h(r,e.find(e=>"event"===e.type&&e.name===i));return(0,n.getAction)(p,s.getContractEvents,"getContractEvents")({abi:e,address:t,eventName:i,args:a,...o})}}),y.watchEvent=new Proxy({},{get:(r,i)=>(...r)=>{let{args:a,options:s}=h(r,e.find(e=>"event"===e.type&&e.name===i));return(0,n.getAction)(p,c.watchContractEvent,"watchContractEvent")({abi:e,address:t,eventName:i,args:a,...s})}}))),g&&w&&(y.write=new Proxy({},{get:(r,i)=>(...r)=>{let{args:a,options:s}=d(r);return(0,n.getAction)(f,u.writeContract,"writeContract")({abi:e,address:t,functionName:i,args:a,...s})}})),(m||g)&&w&&(y.estimateGas=new Proxy({},{get:(r,i)=>(...r)=>{let{args:s,options:o}=d(r),l=p??f;return(0,n.getAction)(l,a.estimateContractGas,"estimateContractGas")({abi:e,address:t,functionName:i,args:s,...o,account:o.account??f.account})}})),y.address=t,y.abi=e,y},t.getFunctionParameters=d,t.getEventParameters=h;
6967let n=r(95847),i=r(90535),a=r(7746),s=r(24052),o=r(527),l=r(77081),c=r(48770),u=r(42350);function d(e){let t=e.length&&Array.isArray(e[0]);return{args:t?e[0]:[],options:(t?e[1]:e[0])??{}}}function h(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])??{}}}},89500:(e,t,r)=>{"use strict";r.d(t,{mN:()=>x,AH:()=>c,W3:()=>E,Ec:()=>C,iz:()=>l});let n=globalThis,i=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,a=Symbol(),s=new WeakMap;class o{constructor(e,t,r){if(this._$cssResult$=!0,r!==a)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(i&&void 0===e){let r=void 0!==t&&1===t.length;r&&(e=s.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&s.set(t,e))}return e}toString(){return this.cssText}}let l=e=>new o("string"==typeof e?e:e+"",void 0,a),c=(e,...t)=>new o(1===e.length?e[0]:t.reduce((t,r,n)=>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[n+1],e[0]),e,a),u=i?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return l(t)})(e):e,{is:d,defineProperty:h,getOwnPropertyDescriptor:p,getOwnPropertyNames:f,getOwnPropertySymbols:m,getPrototypeOf:g}=Object,y=globalThis,b=y.trustedTypes,w=b?b.emptyScript:"",v=y.reactiveElementPolyfillSupport,E={toAttribute(e,t){switch(t){case Boolean:e=e?w: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(e){r=null}}return r}},C=(e,t)=>!d(e,t),A={attribute:!0,type:String,converter:E,reflect:!1,useDefault:!1,hasChanged:C};Symbol.metadata??=Symbol("metadata"),y.litPropertyMetadata??=new WeakMap;class x 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=A){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&h(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){let{get:n,set:i}=p(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:n,set(t){let a=n?.call(this);i?.call(this,t),this.requestUpdate(e,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??A}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;let e=g(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){let e=this.properties;for(let t of[...f(e),...m(e)])this.createProperty(t,e[t])}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)}for(let[e,t]of(this._$Eh=new Map,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))for(let r of new Set(e.flat(1/0).reverse()))t.unshift(u(r));else void 0!==e&&t.push(u(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
6967=>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;for(let t of this.constructor.elementProperties.keys())this.hasOwnProperty(t)&&(e.set(t,this[t]),delete this[t]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(i)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let r of t){let t=document.createElement("style"),i=n.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=r.cssText,e.appendChild(t)}})(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)}_$ET(e,t){let r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){let i=(void 0!==r.converter?.toAttribute?r.converter:E).toAttribute(t,r.type);this._$Em=e,null==i?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(e,t){let r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){let e=r.getPropertyOptions(n),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:E;this._$Em=n;let a=i.fromAttribute(t,e.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){let n=this.constructor,i=this[e];if(!(((r??=n.getPropertyOptions(e)).hasChanged??C)(i,t)||r.useDefault&&r.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(n._$Eu(e,r))))return;this.C(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:n,wrapped:i},a){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||void 0!==a)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),!0===n&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){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){let{wrapped:e}=r,n=this[t];!0!==e||this._$AL.has(t)||void 0===n||this.C(t,void 0,r,n)}}let e=!1,t=this._$AL;try{(e=this.shouldUpdate(t))?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),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)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}}x.elementStyles=[],x.shadowRootOptions={mode:"open"},x.elementProperties=new Map,x.finalized=new Map,v?.({ReactiveElement:x}),(y.reactiveElementVersions??=[]).push("2.1.1")},89507:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.testActions=function({mode:e}){return t=>{let r=t.extend(()=>({mode:e}));return{dropTransaction:e=>(0,n.dropTransaction)(r,e),dumpState:()=>(0,i.dumpState)(r),getAutomine:()=>(0,a.getAutomine)(r),getTxpoolContent:()=>(0,s.getTxpoolContent)(r),getTxpoolStatus:()=>(0,o.getTxpoolStatus)(r),impersonateAccount:e=>(0,l.impersonateAccount)(r,e),increaseTime:e=>(0,c.increaseTime)(r,e),inspectTxpool:()=>(0,u.inspectTxpool)(r),loadState:e=>(0,d.loadState)(r,e),mine:e=>(0,h.mine)(r,e),removeBlockTimestampInterval:()=>(0,p.removeBlockTimestampInterval)(r),reset:e=>(0,f.reset)(r,e),revert:e=>(0,m.revert)(r,e),sendUnsignedTransaction:e=>(0,g.sendUnsignedTransaction)(r,e),setAutomine:e=>(0,y.setAutomine)(r,e),setBalance:e=>(0,b.setBalance)(r,e),setBlockGasLimit:e=>(0,w.setBlockGasLimit)(r,e),setBlockTimestampInterval:e=>(0,v.setBlockTimestampInterval)(r,e),setCode:e=>(0,E.setCode)(r,e),setCoinbase:e=>(0,C.setCoinbase)(r,e),setIntervalMining:e=>(0,A.setIntervalMining)(r,e),setLoggingEnabled:e=>(0,x.setLoggingEnabled)(r,e),setMinGasPrice:e=>(0,I.setMinGasPrice)(r,e),setNextBlockBaseFeePerGas:e=>(0,S.setNextBlockBaseFeePerGas)(r,e),setNextBlockTimestamp:e=>(0,T.setNextBlockTimestamp)(r,e),setNonce:e=>
6967(0,P.setNonce)(r,e),setRpcUrl:e=>(0,O.setRpcUrl)(r,e),setStorageAt:e=>(0,_.setStorageAt)(r,e),snapshot:()=>(0,N.snapshot)(r),stopImpersonatingAccount:e=>(0,k.stopImpersonatingAccount)(r,e)}}};let n=r(62277),i=r(97533),a=r(71114),s=r(39081),o=r(51418),l=r(8526),c=r(14671),u=r(81124),d=r(9943),h=r(18893),p=r(9996),f=r(36737),m=r(89372),g=r(8045),y=r(7246),b=r(94934),w=r(46243),v=r(15748),E=r(77147),C=r(62866),A=r(86379),x=r(19016),I=r(97932),S=r(75003),T=r(14116),P=r(98817),O=r(61318),_=r(12734),N=r(53318),k=r(44759)},89560:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.withResolvers=function(){let e=()=>void 0,t=()=>void 0;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}},89596:(e,t,r)=>{"use strict";function n(e){return Uint8Array.from(atob(e),e=>e.charCodeAt(0))}function i(e){if(e.length<8192)return btoa(String.fromCharCode(...e));let t="";for(var r=0;r<e.length;r+=8192)t+=String.fromCharCode(...e.slice(r,r+8192));return btoa(t)}r.d(t,{E:()=>n,n:()=>i})},89802:function(e){e.exports={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])+"]"}}},90165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DER=t.DERErr=void 0,t.weierstrassPoints=f,t.weierstrass=function(e){let r=function(e){let t=(0,n.validateBasic)(e);return(0,a.validateObject)(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:o,n:d,nByteLength:h,nBitLength:p}=r,m=o.BYTES+1,g=2*o.BYTES+1;function y(e){return(0,i.mod)(e,d)}function b(e){return(0,i.invert)(e,d)}let{ProjectivePoint:w,normPrivateKeyToScalar:v,weierstrassEquation:E,isWithinCurveOrder:C}=f({...r,toBytes(e,t,r){let n=t.toAffine(),i=o.toBytes(n.x),s=a.concatBytes;return((0,a.abool)("isCompressed",r),r)?s(Uint8Array.from([t.hasEvenY()?2:3]),i):s(Uint8Array.from([4]),i,o.toBytes(n.y))},fromBytes(e){let t=e.length,r=e[0],n=e.subarray(1);if(t===m&&(2===r||3===r)){let e,t=(0,a.bytesToNumberBE)(n);if(!(0,a.inRange)(t,u,o.ORDER))throw Error("Point is not on curve");let i=E(t);try{e=o.sqrt(i)}catch(e){throw Error("Point is not on curve"+(e instanceof Error?": "+e.message:""))}return(1&r)==1!=((e&u)===u)&&(e=o.neg(e)),{x:t,y:e}}if(t===g&&4===r)return{x:o.fromBytes(n.subarray(0,o.BYTES)),y:o.fromBytes(n.subarray(o.BYTES,2*o.BYTES))};throw Error("invalid Point, expected length of "+m+", or uncompressed "+g+", got "+t)}}),A=(e,t,r)=>(0,a.bytesToNumberBE)(e.slice(t,r));class x{constructor(e,t,r){(0,a.aInRange)("r",e,u,d),(0,a.aInRange)("s",t,u,d),this.r=e,this.s=t,null!=r&&(this.recovery=r),Object.freeze(this)}static fromCompact(e){return new x(A(e=(0,a.ensureBytes)("compactSignature",e,2*h),0,h),A(e,h,2*h))}static fromDER(e){let{r,s:n}=t.DER.toSig((0,a.ensureBytes)("DER",e));return new x(r,n)}assertValidity(){}addRecoveryBit(e){return new x(this.r,this.s,e)}recoverPublicKey(e){let{r:t,s:n,recovery:i}=this,s=T((0,a.ensureBytes)("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw Error("recovery id invalid");let c=2===i||3===i?t+r.n:t;if(c>=o.ORDER)throw Error("recovery id 2 or 3 invalid");let u=(1&i)==0?"02":"03",d=w.fromHex(u+l(c,o.BYTES)),h=b(c),p=y(-s*h),f=y(n*h),m=w.BASE.multiplyAndAddUnsafe(d,p,f);if(!m)throw Error("point at infinify");return m.assertValidity(),m}hasHighS(){return this.s>d>>u}normalizeS(){return this.hasHighS()?new x(this.r,y(-this.s),this.recovery):this}toDERRawBytes(){return(0,a.hexToBytes)(this.toDERHex())}toDERHex(){return t.DER.hexFromSig(this)}toCompactRawBytes(){return(0,a.hexToBytes)(this.toCompactHex())}toCompactHex(){return l(this.r,h)+l(this.s,h)}}function I(e){if("bigint"==typeof e)return!1;if(e instanceof w)return!0;let t=(0,a.ensureBytes)("key",e).length,n=o.BYTES,i=n+1;if(!r.allowedPrivateKeyLengths&&h!==i)return t===i||t===2*n+1}let S=r.bits2int||function(e){if(e.length>8192)throw Error("input is too large");let t=(0,a.bytesToNumberBE)(e),r=8*e.length-p;return r>0?t>>BigInt(r):t},T=r.bits2int_modN||function(e){return y(S(e))},P=(0,a.bitMask)(p);function O(e){return(0,a.aInRange)("num < 2^"+p,e,c,P),(0,a.numberToBytesBE)(e,h)}let _={lowS:r.lowS,prehash:!1},N={lowS:r.lowS,prehash:!1};return w.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(e,t=!0){return w.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(!0===I(e))throw Error("first arg must be private key");if(!1===I(t))throw Error("second arg must be public key");return w.fromHex(t).multiply(v(e)).toRawBytes(r)},sign:function(e,t,n=_){let{seed:i,k2sig:l}=function(e,t,n=_){if(["recovered","canonical"].some(e=>e in n))throw Error("sign() legacy options not supported");let{hash:i,randomBytes:l}=r,{lowS:h,prehash:p,extraEntropy:f}=n;null==h&&(h=!0),e=(0,a.ensureBytes)("msgHash",e),s(n),p&&(e=(0,a.ensureBytes)("prehashed msgHash",i(e)));let m=T(e),g=v(t),E=[O(g),O(m)];if(null!=f&&!1!==f){let e=!0===f?l(o.BYTES):f;E.push((0,a.ensureBytes)("extraEntropy",e))}return{seed:(0,a.concatBytes)(...E),k2sig:function(e){var t;let r=S(e);if(!C(r))return;let n=b(r),i=w.BASE.multiply(r).toAffine(),a=y(i.x);if(a===c)return;let s=y(n*y(m+a*g));if(s===c)return;let o=2*(i.x!==a)|Number(i.y&u),l=s;return h&&s>d>>u&&(l=(t=s)>d>>u?y(-t):t,o^=1),new x(a,l,o)}}}
6967(e,t,n);return(0,a.createHmacDrbg)(r.hash.outputLen,r.nByteLength,r.hmac)(i,l)},verify:function(e,n,i,o=N){let l,c;n=(0,a.ensureBytes)("msgHash",n),i=(0,a.ensureBytes)("publicKey",i);let{lowS:u,prehash:d,format:h}=o;if(s(o),"strict"in o)throw Error("options.strict was renamed to lowS");if(void 0!==h&&"compact"!==h&&"der"!==h)throw Error("format must be compact or der");let p="string"==typeof e||(0,a.isBytes)(e),f=!p&&!h&&"object"==typeof e&&null!==e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!p&&!f)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");try{if(f&&(c=new x(e.r,e.s)),p){try{"compact"!==h&&(c=x.fromDER(e))}catch(e){if(!(e instanceof t.DER.Err))throw e}c||"der"===h||(c=x.fromCompact(e))}l=w.fromHex(i)}catch(e){return!1}if(!c||u&&c.hasHighS())return!1;d&&(n=r.hash(n));let{r:m,s:g}=c,v=T(n),E=b(g),C=y(v*E),A=y(m*E),I=w.BASE.multiplyAndAddUnsafe(l,C,A)?.toAffine();return!!I&&y(I.x)===m},ProjectivePoint:w,Signature:x,utils:{isValidPrivateKey(e){try{return v(e),!0}catch(e){return!1}},normPrivateKeyToScalar:v,randomPrivateKey:()=>{let e=(0,i.getMinHashLength)(r.n);return(0,i.mapHashToField)(r.randomBytes(e),r.n)},precompute:(e=8,t=w.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}},t.SWUFpSqrtRatio=m,t.mapToCurveSimpleSWU=function(e,t){if((0,i.validateField)(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw Error("mapToCurveSimpleSWU: invalid opts");let r=m(e,t.Z);if(!e.isOdd)throw Error("Fp.isOdd is not implemented!");return n=>{let a,s,o,l,c,u,d,h;a=e.sqr(n),a=e.mul(a,t.Z),s=e.sqr(a),s=e.add(s,a),o=e.add(s,e.ONE),o=e.mul(o,t.B),l=e.cmov(t.Z,e.neg(s),!e.eql(s,e.ZERO)),l=e.mul(l,t.A),s=e.sqr(o),u=e.sqr(l),c=e.mul(u,t.A),s=e.add(s,c),s=e.mul(s,o),u=e.mul(u,l),c=e.mul(u,t.B),s=e.add(s,c),d=e.mul(a,o);let{isValid:p,value:f}=r(s,u);h=e.mul(a,n),h=e.mul(h,f),d=e.cmov(d,o,p),h=e.cmov(h,f,p);let m=e.isOdd(n)===e.isOdd(h);h=e.cmov(e.neg(h),h,m);let g=(0,i.FpInvertBatch)(e,[l],!0)[0];return{x:d=e.mul(d,g),y:h}}};let n=r(81846),i=r(83935),a=r(56196);function s(e){void 0!==e.lowS&&(0,a.abool)("lowS",e.lowS),void 0!==e.prehash&&(0,a.abool)("prehash",e.prehash)}class o extends Error{constructor(e=""){super(e)}}function l(e,t){return(0,a.bytesToHex)((0,a.numberToBytesBE)(e,t))}t.DERErr=o,t.DER={Err:o,_tlv:{encode:(e,r)=>{let{Err:n}=t.DER;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(1&r.length)throw new n("tlv.encode: unpadded data");let i=r.length/2,s=(0,a.numberToHexUnpadded)(i);if(s.length/2&128)throw new n("tlv.encode: long form length too big");let o=i>127?(0,a.numberToHexUnpadded)(s.length/2|128):"";return(0,a.numberToHexUnpadded)(e)+o+s+r},decode(e,r){let{Err:n}=t.DER,i=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(r.length<2||r[i++]!==e)throw new n("tlv.decode: wrong tlv");let a=r[i++],s=0;if(128&a){let e=127&a;if(!e)throw new n("tlv.decode(long): indefinite length not supported");if(e>4)throw new n("tlv.decode(long): byte length is too big");let t=r.subarray(i,i+e);if(t.length!==e)throw new n("tlv.decode: length bytes not complete");if(0===t[0])throw new n("tlv.decode(long): zero leftmost byte");for(let e of t)s=s<<8|e;if(i+=e,s<128)throw new n("tlv.decode(long): not minimal encoding")}else s=a;let o=r.subarray(i,i+s);if(o.length!==s)throw new n("tlv.decode: wrong value length");return{v:o,l:r.subarray(i+s)}}},_int:{encode(e){let{Err:r}=t.DER;if(e<c)throw new r("integer: negative integers are not allowed");let n=(0,a.numberToHexUnpadded)(e);if(8&Number.parseInt(n[0],16)&&(n="00"+n),1&n.length)throw new r("unexpected DER parsing assertion: unpadded hex");return n},decode(e){let{Err:r}=t.DER;if(128&e[0])throw new r("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new r("invalid signature integer: unnecessary leading zero");return(0,a.bytesToNumberBE)(e)}},toSig(e){let{Err:r,_int:n,_tlv:i}=t.DER,s=(0,a.ensureBytes)("signature",e),{v:o,l:l}=i.decode(48,s);if(l.length)throw new r("invalid signature: left bytes after parsing");let{v:c,l:u}=i.decode(2,o),{v:d,l:h}=i.decode(2,u);if(h.length)throw new r("invalid signature: left bytes after parsing");return{r:n.decode(c),s:n.decode(d)}},hexFromSig(e){let{_tlv:r,_int:n}=t.DER,i=r.encode(2,n.encode(e.r)),a=r.encode(2,n.encode(e.s));return r.encode(48,i+a)}};let c=BigInt(0),u=BigInt(1),d=BigInt(2),h=BigInt(3),p=BigInt(4);function f(e){let t=function(e){let t=(0,n.validateBasic)(e);(0,a.validateObject)(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});let{endo:r,Fp:i,a:s}=t;if(r){if(!i.eql(s,i.ZERO))throw Error("invalid endo: CURVE.a must be 0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}(e),{Fp:r}=t,s=(0,i.Field)(t.n,t.nBitLength),o=t.toBytes||((e,t,n)=>{let i=t.toAffine();return(0,a.concatBytes)(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),l=t.fromBytes||(e=>{let t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function d(e){let{a:n,b:i}
6967=t,a=r.sqr(e),s=r.mul(a,e);return r.add(r.add(s,r.mul(e,n)),i)}function f(e,t){let n=r.sqr(t),i=d(e);return r.eql(n,i)}if(!f(t.Gx,t.Gy))throw Error("bad curve params: generator point");let m=r.mul(r.pow(t.a,h),p),g=r.mul(r.sqr(t.b),BigInt(27));if(r.is0(r.add(m,g)))throw Error("bad curve params: a or b");function y(e){let r,{allowedPrivateKeyLengths:n,nByteLength:s,wrapPrivateKey:o,n:l}=t;if(n&&"bigint"!=typeof e){if((0,a.isBytes)(e)&&(e=(0,a.bytesToHex)(e)),"string"!=typeof e||!n.includes(e.length))throw Error("invalid private key");e=e.padStart(2*s,"0")}try{r="bigint"==typeof e?e:(0,a.bytesToNumberBE)((0,a.ensureBytes)("private key",e,s))}catch(t){throw Error("invalid private key, expected hex or "+s+" bytes, got "+typeof e)}return o&&(r=(0,i.mod)(r,l)),(0,a.aInRange)("private key",r,u,l),r}function b(e){if(!(e instanceof E))throw Error("ProjectivePoint expected")}let w=(0,a.memoized)((e,t)=>{let{px:n,py:i,pz:a}=e;if(r.eql(a,r.ONE))return{x:n,y:i};let s=e.is0();null==t&&(t=s?r.ONE:r.inv(a));let o=r.mul(n,t),l=r.mul(i,t),c=r.mul(a,t);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw Error("invZ was invalid");return{x:o,y:l}}),v=(0,a.memoized)(e=>{if(e.is0()){if(t.allowInfinityPoint&&!r.is0(e.py))return;throw Error("bad point: ZERO")}let{x:n,y:i}=e.toAffine();if(!r.isValid(n)||!r.isValid(i))throw Error("bad point: x or y not FE");if(!f(n,i))throw Error("bad point: equation left != right");if(!e.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});class E{constructor(e,t,n){if(null==e||!r.isValid(e))throw Error("x required");if(null==t||!r.isValid(t)||r.is0(t))throw Error("y required");if(null==n||!r.isValid(n))throw Error("z required");this.px=e,this.py=t,this.pz=n,Object.freeze(this)}static fromAffine(e){let{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw Error("invalid affine point");if(e instanceof E)throw Error("projective point not allowed");let i=e=>r.eql(e,r.ZERO);return i(t)&&i(n)?E.ZERO:new E(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=(0,i.FpInvertBatch)(r,e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(E.fromAffine)}static fromHex(e){let t=E.fromAffine(l((0,a.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return E.BASE.multiply(y(e))}static msm(e,t){return(0,n.pippenger)(E,s,e,t)}_setWindowSize(e){x.setWindowSize(this,e)}assertValidity(){v(this)}hasEvenY(){let{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw Error("Field doesn't support isOdd")}equals(e){b(e);let{px:t,py:n,pz:i}=this,{px:a,py:s,pz:o}=e,l=r.eql(r.mul(t,o),r.mul(a,i)),c=r.eql(r.mul(n,o),r.mul(s,i));return l&&c}negate(){return new E(this.px,r.neg(this.py),this.pz)}double(){let{a:e,b:n}=t,i=r.mul(n,h),{px:a,py:s,pz:o}=this,l=r.ZERO,c=r.ZERO,u=r.ZERO,d=r.mul(a,a),p=r.mul(s,s),f=r.mul(o,o),m=r.mul(a,s);return m=r.add(m,m),u=r.mul(a,o),u=r.add(u,u),l=r.mul(e,u),c=r.mul(i,f),c=r.add(l,c),l=r.sub(p,c),c=r.add(p,c),c=r.mul(l,c),l=r.mul(m,l),u=r.mul(i,u),f=r.mul(e,f),m=r.sub(d,f),m=r.mul(e,m),m=r.add(m,u),u=r.add(d,d),d=r.add(u,d),d=r.add(d,f),d=r.mul(d,m),c=r.add(c,d),f=r.mul(s,o),f=r.add(f,f),d=r.mul(f,m),l=r.sub(l,d),u=r.mul(f,p),u=r.add(u,u),new E(l,c,u=r.add(u,u))}add(e){b(e);let{px:n,py:i,pz:a}=this,{px:s,py:o,pz:l}=e,c=r.ZERO,u=r.ZERO,d=r.ZERO,p=t.a,f=r.mul(t.b,h),m=r.mul(n,s),g=r.mul(i,o),y=r.mul(a,l),w=r.add(n,i),v=r.add(s,o);w=r.mul(w,v),v=r.add(m,g),w=r.sub(w,v),v=r.add(n,a);let C=r.add(s,l);return v=r.mul(v,C),C=r.add(m,y),v=r.sub(v,C),C=r.add(i,a),c=r.add(o,l),C=r.mul(C,c),c=r.add(g,y),C=r.sub(C,c),d=r.mul(p,v),c=r.mul(f,y),d=r.add(c,d),c=r.sub(g,d),d=r.add(g,d),u=r.mul(c,d),g=r.add(m,m),g=r.add(g,m),y=r.mul(p,y),v=r.mul(f,v),g=r.add(g,y),y=r.sub(m,y),y=r.mul(p,y),v=r.add(v,y),m=r.mul(g,v),u=r.add(u,m),m=r.mul(C,v),c=r.mul(w,c),c=r.sub(c,m),m=r.mul(w,g),d=r.mul(C,d),new E(c,u,d=r.add(d,m))}subtract(e){return this.add(e.negate())}is0(){return this.equals(E.ZERO)}wNAF(e){return x.wNAFCached(this,e,E.normalizeZ)}multiplyUnsafe(e){let{endo:n,n:i}=t;(0,a.aInRange)("scalar",e,c,i);let s=E.ZERO;if(e===c)return s;if(this.is0()||e===u)return this;if(!n||x.hasPrecomputes(this))return x.wNAFCachedUnsafe(this,e,E.normalizeZ);
6967let{k1neg:o,k1:l,k2neg:d,k2:h}=n.splitScalar(e),p=s,f=s,m=this;for(;l>c||h>c;)l&u&&(p=p.add(m)),h&u&&(f=f.add(m)),m=m.double(),l>>=u,h>>=u;return o&&(p=p.negate()),d&&(f=f.negate()),f=new E(r.mul(f.px,n.beta),f.py,f.pz),p.add(f)}multiply(e){let n,i,{endo:s,n:o}=t;if((0,a.aInRange)("scalar",e,u,o),s){let{k1neg:t,k1:a,k2neg:o,k2:l}=s.splitScalar(e),{p:c,f:u}=this.wNAF(a),{p:d,f:h}=this.wNAF(l);c=x.constTimeNegate(t,c),d=x.constTimeNegate(o,d),d=new E(r.mul(d.px,s.beta),d.py,d.pz),n=c.add(d),i=u.add(h)}else{let{p:t,f:r}=this.wNAF(e);n=t,i=r}return E.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){let n=E.BASE,i=(e,t)=>t!==c&&t!==u&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),a=i(this,t).add(i(e,r));return a.is0()?void 0:a}toAffine(e){return w(this,e)}isTorsionFree(){let{h:e,isTorsionFree:r}=t;if(e===u)return!0;if(r)return r(E,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:e,clearCofactor:r}=t;return e===u?this:r?r(E,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return(0,a.abool)("isCompressed",e),this.assertValidity(),o(E,this,e)}toHex(e=!0){return(0,a.abool)("isCompressed",e),(0,a.bytesToHex)(this.toRawBytes(e))}}E.BASE=new E(t.Gx,t.Gy,r.ONE),E.ZERO=new E(r.ZERO,r.ONE,r.ZERO);let{endo:C,nBitLength:A}=t,x=(0,n.wNAF)(E,C?Math.ceil(A/2):A);return{CURVE:t,ProjectivePoint:E,normPrivateKeyToScalar:y,weierstrassEquation:d,isWithinCurveOrder:function(e){return(0,a.inRange)(e,u,t.n)}}}function m(e,t){let r=e.ORDER,n=c;for(let e=r-u;e%d===c;e/=d)n+=u;let i=n,a=d<<i-u-u,s=a*d,o=(r-u)/s,l=(o-u)/d,f=s-u,m=e.pow(t,o),g=e.pow(t,(o+u)/d),y=(t,r)=>{let n=m,s=e.pow(r,f),o=e.sqr(s);o=e.mul(o,r);let c=e.mul(t,o);c=e.pow(c,l),c=e.mul(c,s),s=e.mul(c,r),o=e.mul(c,t);let h=e.mul(o,s);c=e.pow(h,a);let p=e.eql(c,e.ONE);s=e.mul(o,g),c=e.mul(h,n),o=e.cmov(s,o,p),h=e.cmov(c,h,p);for(let t=i;t>u;t--){let r=t-d;r=d<<r-u;let i=e.pow(h,r),a=e.eql(i,e.ONE);s=e.mul(o,n),n=e.mul(n,n),i=e.mul(h,n),o=e.cmov(s,o,a),h=e.cmov(i,h,a)}return{isValid:p,value:o}};if(e.ORDER%p===h){let r=(e.ORDER-h)/p,n=e.sqrt(e.neg(t));y=(t,i)=>{let a=e.sqr(i),s=e.mul(t,i);a=e.mul(a,s);let o=e.pow(a,r);o=e.mul(o,s);let l=e.mul(o,n),c=e.mul(e.sqr(o),i),u=e.eql(c,t),d=e.cmov(l,o,u);return{isValid:u,value:d}}}return y}},90228:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=void 0;let n=r(86987);t.RIPEMD160=n.RIPEMD160,t.ripemd160=n.ripemd160},90295:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceType=void 0,function(e){e.ANDROID="ANDROID",e.IOS="IOS",e.WEB="WEB"}(r||(t.DeviceType=r={}))},90411:(e,t,r)=>{"use strict";r.d(t,{F:()=>l}),r(49135);var n=r(57873),i=r(25340),a=r(57217),s=r(82376),o=r(18627);class l{constructor({provider:e,namespace:t}){this.id=n.o.CONNECTOR_ID.WALLET_CONNECT,this.name="WalletConnect",this.type="WALLET_CONNECT",this.imageId="ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400",this.getCaipNetworks=s.W.getCaipNetworks.bind(s.W),this.caipNetworks=this.getCaipNetworks(),this.provider=e,this.chain=t}get chains(){return this.getCaipNetworks()}async connectWalletConnect(){if(!await this.authenticate()){let e=this.getCaipNetworks(),t=o.H.state.universalProviderConfigOverride,r=a.k.createNamespaces(e,t);await this.provider.connect({optionalNamespaces:r})}return{clientId:await this.provider.client.core.crypto.getClientId(),session:this.provider.session}}async disconnect(){await this.provider.disconnect()}async authenticate(){let e=this.chains.map(e=>e.caipNetworkId);return i.U.universalProviderAuthenticate({universalProvider:this.provider,chains:e,methods:c})}}let c=["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","wallet_getCallsStatus","wallet_sendCalls","wallet_getCapabilities","wallet_grantPermissions","wallet_revokePermissions","wallet_getAssets"]},90535:(e,t,r)=>{"use strict";
6967Object.defineProperty(t,"__esModule",{value:!0}),t.createContractEventFilter=s;let n=r(61794),i=r(27083),a=r(98182);async function s(e,t){let{address:r,abi:s,args:o,eventName:l,fromBlock:c,strict:u,toBlock:d}=t,h=(0,a.createFilterRequestScope)(e,{method:"eth_newFilter"}),p=l?(0,n.encodeEventTopics)({abi:s,args:o,eventName:l}):void 0,f=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:"bigint"==typeof c?(0,i.numberToHex)(c):c,toBlock:"bigint"==typeof d?(0,i.numberToHex)(d):d,topics:p}]});return{abi:s,args:o,eventName:l,id:f,request:h(f),strict:!!u,type:"event"}}},90615:(e,t,r)=>{var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r.g&&r.g,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==r.g&&r.g||{},i={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};if(i.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function o(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function c(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i.iterable&&(t[Symbol.iterator]=function(){return t}),t}function u(e){this.map={},e instanceof u?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function d(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}}function h(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function p(e){var t=new FileReader,r=h(t);return t.readAsArrayBuffer(e),r}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){if(this.bodyUsed=this.bodyUsed,this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(i.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(i.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(i.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else{var t;i.arrayBuffer&&i.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||s(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e)}else this._noBody=!0,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):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var e=d(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)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=d(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(i.blob)return this.blob().then(p);throw Error("could not read as ArrayBuffer")},this.text=function(){var e,t,r,n,i,a=d(this);if(a)return a;
6967if(this._bodyBlob)return e=this._bodyBlob,r=h(t=new FileReader),i=(n=/charset=([A-Za-z0-9_-]+)/.exec(e.type))?n[1]:"utf-8",t.readAsText(e,i),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(!this._bodyFormData)return Promise.resolve(this._bodyText);throw Error("could not read FormData body as text")},i.formData&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}u.prototype.append=function(e,t){e=o(e),t=l(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},u.prototype.delete=function(e){delete this.map[o(e)]},u.prototype.get=function(e){return e=o(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(o(e))},u.prototype.set=function(e,t){this.map[o(e)]=l(t)},u.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},u.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),c(e)},u.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),c(e)},u.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),c(e)},i.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);var g=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function y(e,t){if(!(this instanceof y))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,i,a=(t=t||{}).body;if(e instanceof y){if(e.bodyUsed)throw TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new u(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,a||null==e._bodyInit||(a=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 u(t.headers)),this.method=(i=(r=t.method||this.method||"GET").toUpperCase(),g.indexOf(i)>-1?i:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in n)return new AbortController().signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(a),("GET"===this.method||"HEAD"===this.method)&&("no-store"===t.cache||"no-cache"===t.cache)){var s=/([?&])_=[^&]*/;s.test(this.url)?this.url=this.url.replace(s,"$1_="+new Date().getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+new Date().getTime()}}function b(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}}),t}function w(e,t){if(!(this instanceof w))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new u(t.headers),this.url=t.url||"",this._initBody(e)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},m.call(y.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var v=[301,302,303,307,308];w.redirect=function(e,t){if(-1===v.indexOf(t))throw RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=n.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function E(e,r){return new Promise(function(a,s){var c=new y(e,r);if(c.signal&&c.signal.aborted)return s(new t.DOMException("Aborted","AbortError"));var d=new XMLHttpRequest;function h(){d.abort()}if(d.onload=function(){var e,t,r={statusText:d.statusText,headers:(e=d.getAllResponseHeaders()||"",t=new u,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}
6967).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();try{t.append(n,i)}catch(e){console.warn("Response "+e.message)}}}),t)};0===c.url.indexOf("file://")&&(d.status<200||d.status>599)?r.status=200:r.status=d.status,r.url="responseURL"in d?d.responseURL:r.headers.get("X-Request-URL");var n="response"in d?d.response:d.responseText;setTimeout(function(){a(new w(n,r))},0)},d.onerror=function(){setTimeout(function(){s(TypeError("Network request failed"))},0)},d.ontimeout=function(){setTimeout(function(){s(TypeError("Network request timed out"))},0)},d.onabort=function(){setTimeout(function(){s(new t.DOMException("Aborted","AbortError"))},0)},d.open(c.method,function(e){try{return""===e&&n.location.href?n.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?d.withCredentials=!0:"omit"===c.credentials&&(d.withCredentials=!1),"responseType"in d&&(i.blob?d.responseType="blob":i.arrayBuffer&&(d.responseType="arraybuffer")),r&&"object"==typeof r.headers&&!(r.headers instanceof u||n.Headers&&r.headers instanceof n.Headers)){var p=[];Object.getOwnPropertyNames(r.headers).forEach(function(e){p.push(o(e)),d.setRequestHeader(e,l(r.headers[e]))}),c.headers.forEach(function(e,t){-1===p.indexOf(t)&&d.setRequestHeader(t,e)})}else c.headers.forEach(function(e,t){d.setRequestHeader(t,e)});c.signal&&(c.signal.addEventListener("abort",h),d.onreadystatechange=function(){4===d.readyState&&c.signal.removeEventListener("abort",h)}),d.send(void 0===c._bodyInit?null:c._bodyInit)})}E.polyfill=!0,n.fetch||(n.fetch=E,n.Headers=u,n.Request=y,n.Response=w),t.Headers=u,t.Request=y,t.Response=w,t.fetch=E,Object.defineProperty(t,"__esModule",{value:!0})}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var a=n.fetch?n:i;(t=a.fetch).default=a.fetch,t.fetch=a.fetch,t.Headers=a.Headers,t.Request=a.Request,t.Response=a.Response,e.exports=t},90769:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionConfirmations=s;let n=r(95847),i=r(27697),a=r(38149);async function s(e,{hash:t,transactionReceipt:r}){let[s,o]=await Promise.all([(0,n.getAction)(e,i.getBlockNumber,"getBlockNumber")({}),t?(0,n.getAction)(e,a.getTransaction,"getTransaction")({hash:t}):void 0]),l=r?.blockNumber||o?.blockNumber;return l?s-l+1n:0n}},91004:(e,t,r)=>{"use strict";r.d(t,{B1:()=>h,BX:()=>function e(t={}){let r,a,l;if(!i(t))throw Error("object required");let h=u.get(t);if(h)return h;let p=c[0],f=new Set,m=(e,t=++c[0])=>{p!==t&&(g=p=t,f.forEach(r=>r(e,t)))},g=p,y=e=>(t,r)=>{let n=[...t];n[1]=[e,...n[1]],m(n,r)},b=new Map,w=!0,v=new Proxy(t,(r=()=>w,a=(e,t)=>{let r=!o.has(t)&&s.get(t);if(r){if(b.has(e))throw Error("prop listener already exists");if(f.size){let t=r[2](y(e));b.set(e,[r,t])}else b.set(e,[r])}},l=e=>{var t;let r=b.get(e);r&&(b.delete(e),null==(t=r[1])||t.call(r))},{deleteProperty(e,t){let r=Reflect.get(e,t);l(t);let n=Reflect.deleteProperty(e,t);return n&&m(["delete",[t],r]),n},set(t,c,h,p){let f,g=!r()&&Reflect.has(t,c),y=Reflect.get(t,c,p);if(g&&(d(y,h)||u.has(h)&&d(y,u.get(h))))return!0;l(c),i(h)&&(h=(0,n.Ai)(h)||h);let b=!s.has(h)&&i(f=h)&&!o.has(f)&&(Array.isArray(f)||!(Symbol.iterator in f))&&!(f instanceof WeakMap)&&!(f instanceof WeakSet)&&!(f instanceof Error)&&!(f instanceof Number)&&!(f instanceof Date)&&!(f instanceof String)&&!(f instanceof RegExp)&&!(f instanceof ArrayBuffer)&&!(f instanceof Promise)?e(h):h;return a(c,b),Reflect.set(t,c,b,p),m(["set",[c],h,y]),!0}}));u.set(t,v);let E=[t,(e=c[0])=>(g!==e&&(g=e,b.forEach(([t])=>{let r=t[1](e);r>p&&(p=r)})),p),e=>(f.add(e),1===f.size&&b.forEach(([e,t],r)=>{if(t)throw Error("remove already exists");let n=e[2](y(r));b.set(r,[e,n])}),()=>{f.delete(e),0===f.size&&b.forEach(([e,t],r)=>{t&&(t(),b.set(r,[e]))})})];return s.set(v,E),Reflect.ownKeys(t).forEach(e=>{let r=Object.getOwnPropertyDescriptor(t,e);"value"in r&&r.writable&&(v[e]=t[e])}),w=!1,v},KR:()=>f,P9:()=>p,h2:()=>m});var n=r(71618);let i=e=>"object"==typeof e&&null!==e,a=(e,t)=>{let r=l.get(e);if((null==r?void 0:r[0])===t)return r[1];let i=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return(0,n.OC)(i,!0),l.set(e,[t,i]),Reflect.ownKeys(e).forEach(t=>{if(Object.getOwnPropertyDescriptor(i,t))return;let r=Reflect.get(e,t),{enumerable:l}=Reflect.getOwnPropertyDescriptor(e,t),c={value:r,enumerable:l,configurable:!0};if(o.has(r))(0,n.OC)(r,!1);else if(s.has(r)){let[e,t]=s.get(r);c.value=a(e,t())}Object.defineProperty(i,t,c)}),Object.preventExtensions(i)},s=new WeakMap,o=new WeakSet,l=new WeakMap,c=[1],u=new WeakMap,d=Object.is;function h(e,t,r){let n,i=s.get(e);i||console.warn("Please use proxy object");let a=[],o=i[2],l=!1,c=o(e=>{if(a.push(e),r)return void t(a.splice(0));
6967n||(n=Promise.resolve().then(()=>{n=void 0,l&&t(a.splice(0))}))});return l=!0,()=>{l=!1,c()}}function p(e){let t=s.get(e);t||console.warn("Please use proxy object");let[r,n]=t;return a(r,n())}function f(e){return o.add(e),e}function m(){return{proxyStateMap:s,refSet:o,snapCache:l,versionHolder:c,proxyCache:u}}},91161:(e,t,r)=>{"use strict";r.d(t,{H2:()=>s,Ty:()=>i,u:()=>o,xO:()=>a});var n=r(81742);class i extends n.C{constructor({max:e,min:t,signed:r,size:n,value:i}){super(`Number "${i}" is not in safe ${n?`${8*n}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}class a extends n.C{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.`,{name:"InvalidBytesBooleanError"})}}class s extends n.C{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}n.C,n.C,n.C,n.C;class o extends n.C{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}},91315:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidSelectorSizeError=t.NotFoundError=t.AmbiguityError=void 0,t.format=function(e){return n.formatAbiItem(e)},t.from=function(e,t={}){let{prepare:r=!0}=t,i=Array.isArray(e)||"string"==typeof e?n.parseAbiItem(e):e;return{...i,...r?{hash:d(i)}:{}}},t.fromAbi=l,t.getSelector=c,t.getSignature=u,t.getSignatureHash=d;let n=r(65222),i=r(53937),a=r(45810),s=r(70259),o=r(70313);function l(e,t,r){let n,{args:i=[],prepare:a=!0}=r??{},l=s.validate(t,{strict:!1}),u=e.filter(e=>l?"function"===e.type||"error"===e.type?c(e)===s.slice(t,0,4):"event"===e.type&&d(e)===t:"name"in e&&e.name===t);if(0===u.length)throw new p({name:t});if(1===u.length)return{...u[0],...a?{hash:d(u[0])}:{}};for(let e of u){if("inputs"in e){if(!i||0===i.length){if(!e.inputs||0===e.inputs.length)return{...e,...a?{hash:d(e)}:{}};continue}if(e.inputs&&0!==e.inputs.length&&e.inputs.length===i.length&&i.every((t,r)=>{let n="inputs"in e&&e.inputs[r];return!!n&&o.isArgOfType(t,n)})){if(n&&"inputs"in n&&n.inputs){let t=o.getAmbiguousTypes(e.inputs,n.inputs,i);if(t)throw new h({abiItem:e,type:t[0]},{abiItem:n,type:t[1]})}n=e}}}let f=(()=>{if(n)return n;let[e,...t]=u;return{...e,overloads:t}})();if(!f)throw new p({name:t});return{...f,...a?{hash:d(f)}:{}}}function c(...e){let t=(()=>{if(Array.isArray(e[0])){let[t,r]=e;return l(t,r)}return e[0]})();return s.slice(d(t),0,4)}function u(...e){let t=(()=>{if(Array.isArray(e[0])){let[t,r]=e;return l(t,r)}return e[0]})(),r="string"==typeof t?t:n.formatAbiItem(t);return o.normalizeSignature(r)}function d(...e){let t=(()=>{if(Array.isArray(e[0])){let[t,r]=e;return l(t,r)}return e[0]})();return"string"!=typeof t&&"hash"in t&&t.hash?t.hash:a.keccak256(s.fromString(u(t)))}class h extends i.BaseError{constructor(e,t){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${e.type}\` in \`${o.normalizeSignature(n.formatAbiItem(e.abiItem))}\`, and`,`\`${t.type}\` in \`${o.normalizeSignature(n.formatAbiItem(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:"AbiItem.AmbiguityError"})}}t.AmbiguityError=h;class p extends i.BaseError{constructor({name:e,data:t,type:r="item"}){super(`ABI ${r}${e?` with name "${e}"`:t?` with data "${t}"`:""} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}t.NotFoundError=p;class f extends i.BaseError{constructor({data:e}){super(`Selector size is invalid. Expected 4 bytes. Received ${s.size(e)} bytes ("${e}").`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.InvalidSelectorSizeError"})}}t.InvalidSelectorSizeError=f},91392:(e,t,r)=>{"use strict";r.d(t,{AH:()=>c,CV:()=>o,f:()=>l});var n=r(56059),i=r(62457);let a="--apkt";function s(e){if(!e)return{};let t={};return t["font-family"]=e["--apkt-font-family"]??e["--w3m-font-family"]??"KHTeka",t.accent=e["--apkt-accent"]??e["--w3m-accent"]??"#0988F0",t["color-mix"]=e["--apkt-color-mix"]??e["--w3m-color-mix"]??"#000",t["color-mix-strength"]=e["--apkt-color-mix-strength"]??e["--w3m-color-mix-strength"]??0,t["font-size-master"]=e["--apkt-font-size-master"]??e["--w3m-font-size-master"]??"10px",t["border-radius-master"]=e["--apkt-border-radius-master"]??e["--w3m-border-radius-master"]??"4px",void 0!==e["--apkt-z-index"]?t["z-index"]=e["--apkt-z-index"]:void 0!==e["--w3m-z-index"]&&(t["z-index"]=e["--w3m-z-index"]),t}let o={createCSSVariables(e){let t={},r={};return!function e(t,r,n=""){for(let[i,s]of Object.entries(t)){let t=n?`${n}-${i}`:i;s&&"object"==typeof s&&Object.keys(s).length?(r[i]={},e(s,r[i],t)):"string"==typeof s&&(r[i]=`${a}-${t}`)}}(e,t),!function e(t,r){for(let[n,i]of Object.entries(t))i&&"object"==typeof i?(r[n]={},e(i,r[n])):"string"==typeof i&&(r[n]=`var(${i})`)}(t,r),{cssVariables:t,cssVariablesVarPrefix:r}},assignCSSVariables(e,t){let r={};return!function e(t,n,i){for(let[s,o]of Object.entries(t)){let t=i?`${i}-${s}`:s,l=n[s];o&&"object"==typeof o?e(o,l,t):"string"==typeof l&&(r[`${a}-${t}`]=l)}}(e,t),r},createRootStyles(e,t){let r={...i.R7,tokens:{...i.R7.tokens,theme:"light"===e?i.LU.light:i.LU.dark}},{cssVariables:n}=o.createCSSVariables(r),a=o.assignCSSVariables(n,r),s=o.generateW3MVariables(t),l=o.generateW3MOverrides(t),c=o.generateScaledVariables(t),u=o.generateBaseVariables(a),d={...a,...u,...s,...l,...c},h=o.applyColorMixToVariables(t,d),p=Object.entries({...d,...h}).map(([e,t])=>`${e}:${t.replace("/[:;{}</>]/g","")};`).join("");return`:root {${p}}`},generateW3MVariables(e){if(!e)return{};let t=s(e),r={};return r["--w3m-font-family"]=t["font-family"],r["--w3m-accent"]=t.accent,r["--w3m-color-mix"]=t["color-mix"],r["--w3m-color-mix-strength"]=`${t["color-mix-strength"]}%`,r["--w3m-font-size-master"]=t["font-size-master"],r["--w3m-border-radius-master"]=t["border-radius-master"],r},generateW3MOverrides(e){if(!e)return{};let t=s(e),r={};if(e["--apkt-accent"]||e["--w3m-accent"]){let e=t.accent;r["--apkt-tokens-core-iconAccentPrimary"]=e,r["--apkt-tokens-core-borderAccentPrimary"]=e,r["--apkt-tokens-core-textAccentPrimary"]=e,r["--apkt-tokens-core-backgroundAccentPrimary"]=e}return(e["--apkt-font-family"]||e["--w3m-font-family"])&&(r["--apkt-fontFamily-regular"]=t["font-family"]),void 0!==t["z-index"]&&(r["--apkt-tokens-core-zIndex"]=`${t["z-index"]}`),r},generateScaledVariables(e){if(!e)return{};let t=s(e),r={};if(e["--apkt-font-size-master"]||e["--w3m-font-size-master"]){let e=parseFloat(t["font-size-master"].replace("px",""));r["--apkt-textSize-h1"]=`${5*Number(e)}px`,r["--apkt-textSize-h2"]=`${4.4*Number(e)}px`,r["--apkt-textSize-h3"]=`${3.8*Number(e)}px`,r["--apkt-textSize-h4"]=`${3.2*Number(e)}px`,r["--apkt-textSize-h5"]=`${2.6*Number(e)}px`,r["--apkt-textSize-h6"]=`${2*Number(e)}px`,r["--apkt-textSize-large"]=`${1.6*Number(e)}px`,r["--apkt-textSize-medium"]=`${1.4*Number(e)}px`,r["--apkt-textSize-small"]=`${1.2*Number(e)}px`}if(e["--apkt-border-radius-master"]||e["--w3m-border-radius-master"]){let e=parseFloat(t["border-radius-master"].replace("px",""));r["--apkt-borderRadius-1"]=`${Number(e)}px`,r["--apkt-borderRadius-2"]=`${2*Number(e)}px`,r["--apkt-borderRadius-3"]=`${3*Number(e)}px`,r["--apkt-borderRadius-4"]=`${4*Number(e)}px`,r["--apkt-borderRadius-5"]=`${5*Number(e)}px`,r["--apkt-borderRadius-6"]=`${6*Number(e)}px`,r["--apkt-borderRadius-8"]=`${8*Number(e)}px`,r["--apkt-borderRadius-16"]=`${16*Number(e)}px`,r["--apkt-borderRadius-20"]=`${20*Number(e)}px`,r["--apkt-borderRadius-32"]=`${32*Number(e)}px`,r["--apkt-borderRadius-64"]=`${64*Number(e)}px`,r["--apkt-borderRadius-128"]=`${128*Number(e)}px`}return r},generateColorMixCSS(e,t){if(!e?.["--w3m-color-mix"]||!e["--w3m-color-mix-strength"])return"";let r=e["--w3m-color-mix"],n=e["--w3m-color-mix-strength"];
6967if(!n||0===n)return"";let i=Object.keys(t||{}).filter(e=>{let t=e.includes("-tokens-core-background")||e.includes("-tokens-core-text")||e.includes("-tokens-core-border")||e.includes("-tokens-core-foreground")||e.includes("-tokens-core-icon")||e.includes("-tokens-theme-background")||e.includes("-tokens-theme-text")||e.includes("-tokens-theme-border")||e.includes("-tokens-theme-foreground")||e.includes("-tokens-theme-icon"),r=e.includes("-borderRadius-")||e.includes("-spacing-")||e.includes("-textSize-")||e.includes("-fontFamily-")||e.includes("-fontWeight-")||e.includes("-typography-")||e.includes("-duration-")||e.includes("-ease-")||e.includes("-path-")||e.includes("-width-")||e.includes("-height-")||e.includes("-visual-size-")||e.includes("-modal-width")||e.includes("-cover");return t&&!r});if(0===i.length)return"";let a=i.map(e=>{let i=t?.[e]||"";return i.includes("color-mix")||i.startsWith("#")||i.startsWith("rgb")?`${e}: color-mix(in srgb, ${r} ${n}%, ${i});`:`${e}: color-mix(in srgb, ${r} ${n}%, var(${e}-base, ${i}));`}).join("");return` @supports (background: color-mix(in srgb, white 50%, black)) { 6968 :root { 6969 ${a} 6970 } 6971 }`},generateBaseVariables(e){let t={},r=e["--apkt-tokens-theme-backgroundPrimary"];r&&(t["--apkt-tokens-theme-backgroundPrimary-base"]=r);let n=e["--apkt-tokens-core-backgroundAccentPrimary"];return n&&(t["--apkt-tokens-core-backgroundAccentPrimary-base"]=n),t},applyColorMixToVariables(e,t){let r={};t?.["--apkt-tokens-theme-backgroundPrimary"]&&(r["--apkt-tokens-theme-backgroundPrimary"]="var(--apkt-tokens-theme-backgroundPrimary-base)"),t?.["--apkt-tokens-core-backgroundAccentPrimary"]&&(r["--apkt-tokens-core-backgroundAccentPrimary"]="var(--apkt-tokens-core-backgroundAccentPrimary-base)");let n=s(e),i=n["color-mix"],a=n["color-mix-strength"];if(!a||0===a)return r;let o=Object.keys(t||{}).filter(e=>{let t=e.includes("-tokens-core-background")||e.includes("-tokens-core-text")||e.includes("-tokens-core-border")||e.includes("-tokens-core-foreground")||e.includes("-tokens-core-icon")||e.includes("-tokens-theme-background")||e.includes("-tokens-theme-text")||e.includes("-tokens-theme-border")||e.includes("-tokens-theme-foreground")||e.includes("-tokens-theme-icon")||e.includes("-tokens-theme-overlay"),r=e.includes("-borderRadius-")||e.includes("-spacing-")||e.includes("-textSize-")||e.includes("-fontFamily-")||e.includes("-fontWeight-")||e.includes("-typography-")||e.includes("-duration-")||e.includes("-ease-")||e.includes("-path-")||e.includes("-width-")||e.includes("-height-")||e.includes("-visual-size-")||e.includes("-modal-width")||e.includes("-cover");return t&&!r});return 0===o.length||o.forEach(e=>{let n=t?.[e]||"";e.endsWith("-base")||("--apkt-tokens-theme-backgroundPrimary"===e||"--apkt-tokens-core-backgroundAccentPrimary"===e?r[e]=`color-mix(in srgb, ${i} ${a}%, var(${e}-base))`:n.includes("color-mix")||n.startsWith("#")||n.startsWith("rgb")?r[e]=`color-mix(in srgb, ${i} ${a}%, ${n})`:r[e]=`color-mix(in srgb, ${i} ${a}%, var(${e}-base, ${n}))`)}),r}},{cssVariablesVarPrefix:l}=o.createCSSVariables(i.R7);function c(e,...t){return(0,n.AH)(e,...t.map(e=>"function"==typeof e?(0,n.iz)(e(l)):(0,n.iz)(e)))}},91472:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.erc4626Abi=t.erc721Abi=t.erc1155Abi=t.erc20Abi_bytes32=t.erc20Abi=t.erc6492SignatureValidatorAbi=t.erc1271Abi=t.addressResolverAbi=t.textResolverAbi=t.universalResolverReverseAbi=t.universalResolverResolveAbi=t.batchGatewayAbi=t.multicall3Abi=void 0,t.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"},{inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],t.batchGatewayAbi=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}];let r=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"}
6971,{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}];t.universalResolverResolveAbi=[...r,{name:"resolveWithGateways",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"}]}],t.universalResolverReverseAbi=[...r,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],t.textResolverAbi=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],t.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"}]}],t.erc1271Abi=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],t.erc6492SignatureValidatorAbi=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],t.erc20Abi=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],t.erc20Abi_bytes32=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],t.erc1155Abi=[{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC1155InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}
6971],name:"ERC1155InvalidApprover",type:"error"},{inputs:[{internalType:"uint256",name:"idsLength",type:"uint256"},{internalType:"uint256",name:"valuesLength",type:"uint256"}],name:"ERC1155InvalidArrayLength",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC1155InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC1155InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC1155InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"address",name:"owner",type:"address"}],name:"ERC1155MissingApprovalForAll",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],t.erc721Abi=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"event",name:"ApprovalForAll",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"operator",type:"address"},{indexed:!1,name:"approved",type:"bool"}]}
6971,{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"payable",inputs:[{name:"spender",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"getApproved",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"address"}]},{type:"function",name:"isApprovedForAll",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"operator",type:"address"}],outputs:[{type:"bool"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"ownerOf",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"owner",type:"address"}]},{type:"function",name:"safeTransferFrom",stateMutability:"payable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"safeTransferFrom",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"data",type:"bytes"}],outputs:[]},{type:"function",name:"setApprovalForAll",stateMutability:"nonpayable",inputs:[{name:"operator",type:"address"},{name:"approved",type:"bool"}],outputs:[]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"index",type:"uint256"}],outputs:[{type:"uint256"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"index",type:"uint256"}],outputs:[{name:"tokenId",type:"uint256"}]},{type:"function",name:"tokenURI",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transferFrom",stateMutability:"payable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],t.erc4626Abi=[{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!0,name:"owner",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Withdraw",type:"event"},{inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],name:"allowance",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],name:"approve",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"asset",outputs:[{name:"assetTokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"convertToAssets",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"convertToShares",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"}],name:"deposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxDeposit",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxMint",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxRedeem",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxWithdraw",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"}],name:"mint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewDeposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewMint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewRedeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewWithdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"redeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"totalAssets",outputs:[{name:"totalManagedAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transfer",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"withdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"}]},91753:(e,t,r)=>{"use strict";r.d(t,{L:()=>a});var n=r(57873),i=r(41776);let a={ConnectorExplorerIds:{[n.o.CONNECTOR_ID.COINBASE]:"d0ca99ff52b99abc48743dad0f7fc891e041be73574f7fac4afe5d4bb83845c8",[n.o.CONNECTOR_ID.COINBASE_SDK]:"d0ca99ff52b99abc48743dad0f7fc891e041be73574f7fac4afe5d4bb83845c8",[n.o.CONNECTOR_ID.BASE_ACCOUNT]:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",[n.o.CONNECTOR_ID.SAFE]:"225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f",[n.o.CONNECTOR_ID.LEDGER]:"19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927",[n.o.CONNECTOR_ID.OKX]:"971e689d0a5be527bac79629b4ee9b925e82208e5168b733496
6971a09c0faed0709",[i.o.METMASK_CONNECTOR_NAME]:"c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96",[i.o.TRUST_CONNECTOR_NAME]:"4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0",[i.o.SOLFLARE_CONNECTOR_NAME]:"1ca0bdd4747578705b1939af023d120677c64fe6ca76add81fda36e350605e79",[i.o.PHANTOM_CONNECTOR_NAME]:"a797aa35c0fadbfc1a53e7f675162ed5226968b44a19ee3d24385c64d1d3c393",[i.o.COIN98_CONNECTOR_NAME]:"2a3c89040ac3b723a1972a33a125b1db11e258a6975d3a61252cd64e6ea5ea01",[i.o.MAGIC_EDEN_CONNECTOR_NAME]:"8b830a2b724a9c3fbab63af6f55ed29c9dfa8a55e732dc88c80a196a2ba136c6",[i.o.BACKPACK_CONNECTOR_NAME]:"2bd8c14e035c2d48f184aaa168559e86b0e3433228d3c4075900a221785019b0",[i.o.BITGET_CONNECTOR_NAME]:"38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662",[i.o.FRONTIER_CONNECTOR_NAME]:"85db431492aa2e8672e93f4ea7acf10c88b97b867b0d373107af63dc4880f041",[i.o.XVERSE_CONNECTOR_NAME]:"2a87d74ae02e10bdd1f51f7ce6c4e1cc53cd5f2c0b6b5ad0d7b3007d2b13de7b",[i.o.LEATHER_CONNECTOR_NAME]:"483afe1df1df63daf313109971ff3ef8356ddf1cc4e45877d205eee0b7893a13",[i.o.OKX_CONNECTOR_NAME]:"971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709",[i.o.BINANCE_CONNECTOR_NAME]:"2fafea35bb471d22889ccb49c08d99dd0a18a37982602c33f696a5723934ba25"},NetworkImageIds:{1:"ba0ba0cd-17c6-4806-ad93-f9d174f17900",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",5e3:"e86fae9b-b770-4eea-e520-150e12c81100",295:"6a97d510-cac8-4e58-c7ce-e8681b044c00",0xaa36a7:"e909ea0a-f92a-4512-c8fc-748044ea6800",84532:"a18a7ecd-e307-4360-4746-283182228e00",1301:"4eeea7ef-0014-4649-5d1d-07271a80f600",130:"2257980a-3463-48c6-cbac-a42d2a956e00",10143:"0a728e83-bacb-46db-7844-948f05434900",143:"0a728e83-bacb-46db-7844-948f05434900",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",0x4e454152:"3ff73439-a619-4894-9262-4470c773a100",2020:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00",2021:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00",80094:"e329c2c9-59b0-4a02-83e4-212ff3779900",2741:"fc2427d1-5af9-4a9c-8da5-6f94627cd900","5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":"a1b58899-f671-4276-6a5e-56ca5bd59700","4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z":"a1b58899-f671-4276-6a5e-56ca5bd59700",EtWTRABZaYq6iMfeYKouRu166VU2xqa1:"a1b58899-f671-4276-6a5e-56ca5bd59700","000000000019d6689c085ae165831e93":"0b4838db-0161-4ffe-022d-532bf03dba00","000000000933ea01ad0ee984209779ba":"39354064-d79b-420b-065d-f980c4b78200","00000008819873e925422c1ff0f99f7c":"b3406e4a-bbfc-44fb-e3a6-89673c78b700","-239":"20f673c0-095e-49b2-07cf-eb5049dcf600","-3":"20f673c0-095e-49b2-07cf-eb5049dcf600","0x2b6653dc":"3502bb86-cc4e-420f-a387-59ea63a28b00","0x94a9059e":"3502bb86-cc4e-420f-a387-59ea63a28b00","0xcd8690dc":"3502bb86-cc4e-420f-a387-59ea63a28b00"},ConnectorImageIds:{[n.o.CONNECTOR_ID.COINBASE]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[n.o.CONNECTOR_ID.COINBASE_SDK]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[n.o.CONNECTOR_ID.BASE_ACCOUNT]:"bba2c8be-7fd1-463e-42b1-796ecb0ad200",[n.o.CONNECTOR_ID.SAFE]:"461db637-8616-43ce-035a-d89b8a1d5800",[n.o.CONNECTOR_ID.LEDGER]:"54a1aa77-d202-4f8d-0fb2-5d2bb6db0300",[n.o.CONNECTOR_ID.WALLET_CONNECT]:"ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400",[n.o.CONNECTOR_ID.INJECTED]:"07ba87ed-43aa-4adf-4540-9e6a2b9cae00"},ConnectorNamesMap:{[n.o.CONNECTOR_ID.INJECTED]:"Browser Wallet",[n.o.CONNECTOR_ID.WALLET_CONNECT]:"WalletConnect",[n.o.CONNECTOR_ID.COINBASE]:"Coinbase",[n.o.CONNECTOR_ID.COINBASE_SDK]:"Coinbase",[n.o.CONNECTOR_ID.BASE_ACCOUNT]:"Base Account",[n.o.CONNECTOR_ID.LEDGER]:"Ledger",[n.o.CONNECTOR_ID.SAFE]:"Safe"},ConnectorTypesMap:{[n.o.CONNECTOR_ID.INJECTED]:"INJECTED",[n.o.CONNECTOR_ID.WALLET_CONNECT]:"WALLET_CONNECT",[n.o.CONNECTOR_ID.EIP6963]:"ANNOUNCED",[n.o.CONNECTOR_ID.AUTH]:"AUTH",[n.o.CONNECTOR_ID.COINBASE]:"EXTERNAL",[n.o.CONNECTOR_ID.COINBASE_SDK]:"EXTERNAL",[n.o.CONNECTOR_ID.BASE_ACCOUNT]:"EXTERNAL",[i.o.CONNECTOR_TYPE_AUTH]:"AUTH"}
6971,WalletConnectRpcChainIds:[1,5,0xaa36a7,10,420,42161,421613,137,80001,42220,0x4e454152,0x4e454153,56,97,43114,43113,100,8453,84531,7777777,999,324,280]}},92093:e=>{function t(e){if(!e||e<1)throw 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)}t.prototype.set=function(e,t,r,n){let i=e*this.size+t;this.data[i]=r,n&&(this.reservedBit[i]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},92139:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeSignature=function(e){let t=!0,r="",i=0,a="",s=!1;for(let n=0;n<e.length;n++){let o=e[n];if(["(",")",","].includes(o)&&(t=!0),"("===o&&i++,")"===o&&i--,t){if(0===i){if(" "===o&&["event","function",""].includes(a))a="";else if(a+=o,")"===o){s=!0;break}continue}if(" "===o){","!==e[n-1]&&","!==r&&",("!==r&&(r="",t=!1);continue}a+=o,r+=o}}if(!s)throw new n.BaseError("Unable to normalize signature.");return a};let n=r(45226)},92391:(e,t,r)=>{"use strict";r.d(t,{S:()=>I});var n=r(74764),i=r(20471),a=r(16040);let[s,o,l]=[[],[],[]],c=BigInt(0),u=BigInt(1),d=BigInt(2),h=BigInt(7),p=BigInt(256),f=BigInt(113);for(let e=0,t=u,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),o.push((e+1)*(e+2)/2%64);let i=c;for(let e=0;e<7;e++)(t=(t<<u^(t>>h)*f)%p)&d&&(i^=u<<(u<<BigInt(e))-u);l.push(i)}let[m,g]=(0,i.lD)(l,!0),y=(e,t,r)=>r>32?(0,i.WM)(e,t,r):(0,i.P5)(e,t,r),b=(e,t,r)=>r>32?(0,i.im)(e,t,r):(0,i.B4)(e,t,r);class w extends a.Vw{constructor(e,t,r,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.ai)(r),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,a.DH)(this.state)}keccak(){!function(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){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 n=(t+8)%10,i=(t+2)%10,a=r[i],s=r[i+1],o=y(a,s,1)^r[n],l=b(a,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=o,e[t+r+1]^=l}let t=e[2],i=e[3];for(let r=0;r<24;r++){let n=o[r],a=y(t,i,n),l=b(t,i,n),c=s[r];t=e[c],i=e[c+1],e[c]=a,e[c+1]=l}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=m[n],e[1]^=g[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,n.t2)(this);let{blockLen:t,state:r}=this,i=(e=(0,a.ZJ)(e)).length;for(let n=0;n<i;){let a=Math.min(t-this.pos,i-n);for(let t=0;t<a;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:n}=this;e[r]^=t,(128&t)!=0&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.t2)(this,!1),(0,n.ee)(e),this.finish();let t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();let a=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+a),n),this.posOut+=a,n+=a}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.ai)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.CG)(e,this),this.finished)throw 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(e){let{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:a}=this;return e||(e=new w(t,r,n,a,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=a,e.destroyed=this.destroyed,e}}let v=(0,a.ld)(()=>new w(136,1,32));var E=r(98668);let C=!1,A=function(e){return v(e)},x=A;function I(e){let t=(0,E.q5)(e,"data");return(0,E.c$)(x(t))}I._=A,I.lock=function(){C=!0},I.register=function(e){if(C)throw TypeError("keccak256 is locked");x=e},Object.freeze(I)},92565:(e,t,r)=>{"use strict";
6971Object.defineProperty(t,"__esModule",{value:!0}),t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.Hash=t.nextTick=t.swap32IfBE=t.byteSwapIfBE=t.swap8IfBE=t.isLE=void 0,t.isBytes=i,t.anumber=a,t.abytes=s,t.ahash=function(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.createHasher");a(e.outputLen),a(e.blockLen)},t.aexists=function(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")},t.aoutput=function(e,t){s(e);let r=t.outputLen;if(e.length<r)throw Error("digestInto() expects output buffer of length at least "+r)},t.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},t.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))},t.clean=function(...e){for(let t=0;t<e.length;t++)e[t].fill(0)},t.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)},t.rotr=function(e,t){return e<<32-t|e>>>t},t.rotl=function(e,t){return e<<t|e>>>32-t>>>0},t.byteSwap=o,t.byteSwap32=l,t.bytesToHex=function(e){if(s(e),c)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=u[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);if(c)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){let r=h(e.charCodeAt(i)),a=h(e.charCodeAt(i+1));if(void 0===r||void 0===a)throw Error('hex string expected, got non-hex character "'+(e[i]+e[i+1])+'" at index '+i);n[t]=16*r+a}return n},t.asyncLoop=p,t.utf8ToBytes=f,t.bytesToUtf8=function(e){return new TextDecoder().decode(e)},t.toBytes=m,t.kdfInputToBytes=function(e){return"string"==typeof e&&(e=f(e)),s(e),e},t.concatBytes=function(...e){let t=0;for(let r=0;r<e.length;r++){let n=e[r];s(n),t+=n.length}let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let i=e[t];r.set(i,n),n+=i.length}return r},t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==({}).toString.call(t))throw Error("options should be object or undefined");return Object.assign(e,t)},t.createHasher=y,t.createOptHasher=b,t.createXOFer=w,t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));if(n.crypto&&"function"==typeof n.crypto.randomBytes)return Uint8Array.from(n.crypto.randomBytes(e));throw Error("crypto.getRandomValues must be defined")};let n=r(39365);function i(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function a(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function s(e,...t){if(!i(e))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function o(e){return e<<24&0xff000000|e<<8&0xff0000|e>>>8&65280|e>>>24&255}function l(e){for(let t=0;t<e.length;t++)e[t]=o(e[t]);return e}t.isLE=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0],t.swap8IfBE=t.isLE?e=>e:e=>o(e),t.byteSwapIfBE=t.swap8IfBE,t.swap32IfBE=t.isLE?e=>e:l;let c="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,u=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),d={_0:48,_9:57,A:65,F:70,a:97,f:102};function h(e){return e>=d._0&&e<=d._9?e-d._0:e>=d.A&&e<=d.F?e-(d.A-10):e>=d.a&&e<=d.f?e-(d.a-10):void 0}async function p(e,r,n){let i=Date.now();for(let a=0;a<e;a++){n(a);let e=Date.now()-i;e>=0&&e<r||(await (0,t.nextTick)(),i+=e)}}function f(e){if("string"!=typeof e)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function m(e){return"string"==typeof e&&(e=f(e)),s(e),e}t.nextTick=async()=>{};class g{}function y(e){let t=t=>e().update(m(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function b(e){let t=(t,r)=>e(r).update(m(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}function w(e){let t=(t,r)=>e(r).update(m(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}t.Hash=g,t.wrapConstructor=y,t.wrapConstructorWithOpts=b,t.wrapXOFConstructorWithOpts=w},92723:(e,t,r)=>{"use strict";
6971Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=s;let n=r(24998),i=r(18978),a=r(97236);async function s(e){let{address:t,domain:r,message:s,primaryType:o,signature:l,types:c}=e;return(0,i.isAddressEqual)((0,n.getAddress)(t),await (0,a.recoverTypedDataAddress)({domain:r,message:s,primaryType:o,signature:l,types:c}))}},92898:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidChecksumError=t.InvalidInputError=t.InvalidAddressError=void 0,t.assert=c,t.checksum=u,t.from=d,t.fromPublicKey=function(e,t={}){let r=s.keccak256(`0x${o.toHex(e).slice(4)}`).substring(26);return d(`0x${r}`,t)},t.isEqual=function(e,t){return c(e,{strict:!1}),c(t,{strict:!1}),e.toLowerCase()===t.toLowerCase()},t.validate=function(e,t={}){let{strict:r=!0}=t??{};try{return c(e,{strict:r}),!0}catch{return!1}};let n=r(31837),i=r(65341),a=r(53937),s=r(45810),o=r(39306),l=/^0x[a-fA-F0-9]{40}$/;function c(e,t={}){let{strict:r=!0}=t;if(!l.test(e))throw new h({address:e,cause:new p});if(r){if(e.toLowerCase()===e)return;if(u(e)!==e)throw new h({address:e,cause:new f})}}function u(e){if(i.checksum.has(e))return i.checksum.get(e);c(e,{strict:!1});let t=e.substring(2).toLowerCase(),r=s.keccak256(n.fromString(t),{as:"Bytes"}),a=t.split("");for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&a[e]&&(a[e]=a[e].toUpperCase()),(15&r[e>>1])>=8&&a[e+1]&&(a[e+1]=a[e+1].toUpperCase());let o=`0x${a.join("")}`;return i.checksum.set(e,o),o}function d(e,t={}){let{checksum:r=!1}=t;return(c(e),r)?u(e):e}class h extends a.BaseError{constructor({address:e,cause:t}){super(`Address "${e}" is invalid.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}t.InvalidAddressError=h;class p extends a.BaseError{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}t.InvalidInputError=p;class f extends a.BaseError{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}t.InvalidChecksumError=f},92918:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.socketClientCache=void 0,t.getSocketRpcClient=o;let n=r(17208),i=r(58856),a=r(61580),s=r(84642);async function o(e){let{getSocket:r,keepAlive:o=!0,key:l="socket",reconnect:c=!0,url:u}=e,{interval:d=3e4}="object"==typeof o?o:{},{attempts:h=5,delay:p=2e3}="object"==typeof c?c:{},f=JSON.stringify({keepAlive:o,key:l,url:u,reconnect:c}),m=t.socketClientCache.get(f);if(m)return m;let g=0,{schedule:y}=(0,i.createBatchScheduler)({id:f,fn:async()=>{let e,i,l,y,b=new Map,w=new Map,v=!1,E=!1;function C(){c&&!E&&g<h?v||(v=!0,g++,i?.close(),y=setTimeout(async()=>{if(y=void 0,E){v=!1;return}await A().catch(console.error),v=!1},p)):(b.clear(),w.clear())}async function A(){let t=await r({onClose(){for(let e of b.values())e.onError?.(new n.SocketClosedError({url:u}));for(let e of w.values())e.onError?.(new n.SocketClosedError({url:u}));C()},onError(t){for(let r of(e=t,b.values()))r.onError?.(e);for(let t of w.values())t.onError?.(e);C()},onOpen(){e=void 0,g=0},onResponse(e){let t="eth_subscription"===e.method,r=t?e.params.subscription:e.id,n=t?w:b,i=n.get(r);i&&i.onResponse(e),t||n.delete(r)}});if(E)return t.close(),t;if(i=t,o&&(l&&clearInterval(l),l=setInterval(()=>i.ping?.(),d)),c&&w.size>0)for(let[e,{onResponse:t,body:r,onError:n}]of w.entries())r&&(w.delete(e),m?.request({body:r,onResponse:t,onError:n}));return t}return await A(),e=void 0,m={close(){E=!0,l&&clearInterval(l),y&&(clearTimeout(y),y=void 0,v=!1),i.close(),t.socketClientCache.delete(f)},get socket(){return i},request({body:t,onError:r,onResponse:n}){e&&r&&r(e);let a=t.id??s.idCache.take(),o=e=>{("number"!=typeof e.id||a===e.id)&&("eth_subscribe"===t.method&&"string"==typeof e.result&&w.set(e.result,{onResponse:o,onError:r,body:t}),n(e))};"eth_unsubscribe"===t.method&&w.delete(t.params?.[0]),b.set(a,{onResponse:o,onError:r});try{i.request({body:{jsonrpc:"2.0",id:a,...t}})}catch(e){r?.(e)}},requestAsync({body:e,timeout:t=1e4}){return(0,a.withTimeout)(()=>new Promise((t,r)=>this.request({body:e,onError:r,onResponse:t})),{errorInstance:new n.TimeoutError({body:e,url:u}),timeout:t})},requests:b,subscriptions:w,url:u},t.socketClientCache.set(f,m),[m]}}),[b,[w]]=await y();return w}t.socketClientCache=new Map},93040:(e,t,r)=>{"use strict";
6971Object.defineProperty(t,"__esModule",{value:!0}),t.parseAbi=function(e){let t=(0,i.parseStructs)(e),r=[],s=e.length;for(let i=0;i<s;i++){let s=e[i];(0,n.isStructSignature)(s)||r.push((0,a.parseSignature)(s,t))}return r};let n=r(25065),i=r(8912),a=r(20295)},93107:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transferSync=o;let n=r(88344),i=r(98065),a=r(55498),s=r(17732);async function o(e,t){let{amount:r,token:o,throwOnReceiptRevert:l=!0}=t,{decimals:c}=(0,a.resolveToken)(e,{token:o}),u=(0,a.resolveAmountDecimals)(r,c),d=await s.transfer.inner(i.writeContractSync,e,{...t,throwOnReceiptRevert:l}),{args:h}=s.transfer.extractEvent(d.logs);return{...h,...void 0===u?{}:{decimals:u,formatted:(0,n.formatUnits)(h.value,u)},receipt:d}}},93346:(e,t,r)=>{"use strict";r.d(t,{$f:()=>p,V1:()=>d,cz:()=>u,lZ:()=>h,nj:()=>g,ro:()=>c,sP:()=>f});var n=r(52335),i=r(18627);let a={eip155:{native:{assetNamespace:"slip44",assetReference:"60"},defaultTokenNamespace:"erc20"},solana:{native:{assetNamespace:"slip44",assetReference:"501"},defaultTokenNamespace:"token"}},s={56:"714",204:"714"};class o extends Error{}async function l(e,t){let r=function(){let{sdkType:e,sdkVersion:t,projectId:r}=i.H.getSnapshot(),n=new URL("https://rpc.walletconnect.org/v1/json-rpc");return n.searchParams.set("projectId",r),n.searchParams.set("st",e),n.searchParams.set("sv",t),n.searchParams.set("source","fund-wallet"),n.toString()}(),{projectId:n}=i.H.getSnapshot(),a={jsonrpc:"2.0",id:1,method:e,params:{...t||{},projectId:n}},s=await fetch(r,{method:"POST",body:JSON.stringify(a),headers:{"Content-Type":"application/json"}}),l=await s.json();if(l.error)throw new o(l.error.message);return l}async function c(e){return(await l("reown_getExchanges",e)).result}async function u(e){return(await l("reown_getExchangePayUrl",e)).result}async function d(e){return(await l("reown_getExchangeBuyStatus",e)).result}function h(e,t){let{chainNamespace:r,chainId:i}=n.C.parseCaipNetworkId(e),o=a[r];if(!o)throw Error(`Unsupported chain namespace for CAIP-19 formatting: ${r}`);let l=o.native.assetNamespace,c=o.native.assetReference;"native"!==t?(l=o.defaultTokenNamespace,c=t):"eip155"===r&&s[i]&&(c=s[i]);let u=`${r}:${i}`;return`${u}/${l}:${c}`}let p={network:"eip155:8453",asset:"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},f={network:"eip155:84532",asset:"0x036CbD53842c5426634e7929541eC2318f3dCF7e",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},m={ethereumETH:{network:"eip155:1",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},baseETH:{network:"eip155:8453",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},baseUSDC:p,baseSepoliaETH:{network:"eip155:84532",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},ethereumUSDC:{network:"eip155:1",asset:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},arbitrumUSDC:{network:"eip155:42161",asset:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},polygonUSDC:{network:"eip155:137",asset:"0x2791bca1f2de4661ed88a30c99a7a9449aa84174",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},solanaUSDC:{network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},ethereumUSDT:{network:"eip155:1",asset:"0xdAC17F958D2ee523a2206206994597C13D831ec7",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},optimismUSDT:{network:"eip155:10",asset:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},arbitrumUSDT:{network:"eip155:42161",asset:"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},polygonUSDT:{network:"eip155:137",asset:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},solanaUSDT:{network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},solanaSOL:{network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"native",metadata:{name:"Solana",symbol:"SOL",decimals:9}}};function g(e){return Object.values(m).filter(t=>t.network===e)}},93771:(e,t,r)=>{"use strict";
6971Object.defineProperty(t,"__esModule",{value:!0}),t.defineTransaction=t.transactionType=void 0,t.formatTransaction=a;let n=r(14972),i=r(87721);function a(e,r){let i={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,...null!=e.blockTimestamp&&{blockTimestamp:BigInt(e.blockTimestamp)},chainId:e.chainId?(0,n.hexToNumber)(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?(0,n.hexToNumber)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?t.transactionType[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 e.authorizationList&&(i.authorizationList=e.authorizationList.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))),i.yParity=(()=>{if(e.yParity)return Number(e.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)}})(),"legacy"===i.type&&(delete i.accessList,delete i.maxFeePerBlobGas,delete i.maxFeePerGas,delete i.maxPriorityFeePerGas,delete i.yParity),"eip2930"===i.type&&(delete i.maxFeePerBlobGas,delete i.maxFeePerGas,delete i.maxPriorityFeePerGas),"eip1559"===i.type&&delete i.maxFeePerBlobGas,i}t.transactionType={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"},t.defineTransaction=(0,i.defineFormatter)("transaction",a)},93939:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBytes=function(e){return!!e&&"object"==typeof e&&"BYTES_PER_ELEMENT"in e&&1===e.BYTES_PER_ELEMENT&&"Uint8Array"===e.constructor.name}},94029:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBlockReceipts=s;let n=r(99112),i=r(27083),a=r(63178);async function s(e,{blockHash:t,blockNumber:r,blockTag:o=e.experimental_blockTag??"latest"}={}){let l=void 0!==r?(0,i.numberToHex)(r):void 0,c=await e.request({method:"eth_getBlockReceipts",params:[t||l||o]},{dedupe:!!(t||l)});if(!c)throw new n.BlockNotFoundError({blockHash:t,blockNumber:r});let u=e.chain?.formatters?.transactionReceipt?.format||a.formatTransactionReceipt;return c.map(e=>u(e,"getBlockReceipts"))}},94034:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zeroHash=t.erc6492MagicBytes=void 0,t.erc6492MagicBytes="0x6492649264926492649264926492649264926492649264926492649264926492",t.zeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"},94056:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw 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 a(e,t,r){if(a.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"))}"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{d="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(63514).Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function o(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function l(e,t,r,i){for(var a=0,s=0,o=Math.min(e.length,r),l=t;l<o;l++){var c=e.charCodeAt(l)-48;a*=i,s=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&s<i,"Invalid character"),a+=s}return a}function c(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return 0>e.cmp(t)?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<0x4000000?(this.words=[0x3ffffff&e],this.length=1):e<0x10000000000000?(this.words=[0x3ffffff&e,e/0x4000000&0x3ffffff],this.length=2):(n(e<0x20000000000000),this.words=[0x3ffffff&e,e/0x4000000&0x3ffffff,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=Array(this.length);for(var i,a,s=0;s<this.length;s++)this.words[s]=0;var o=0;if("be"===r)for(s=e.length-1,i=0;s>=0;s-=3)a=e[s]|e[s-1]<<8|e[s-2]<<16,this.words[i]|=a<<o&0x3ffffff,this.words[i+1]=a>>>
vendor: 37,882 bytes, line 6971
697126-o&0x3ffffff,(o+=24)>=26&&(o-=26,i++);else if("le"===r)for(s=0,i=0;s<e.length;s+=3)a=e[s]|e[s+1]<<8|e[s+2]<<16,this.words[i]|=a<<o&0x3ffffff,this.words[i+1]=a>>>26-o&0x3ffffff,(o+=24)>=26&&(o-=26,i++);return this._strip()},a.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var n,i=0;i<this.length;i++)this.words[i]=0;var a=0,s=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=o(e,t,i)<<a,this.words[s]|=0x3ffffff&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=o(e,t,i)<<a,this.words[s]|=0x3ffffff&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;this._strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=0x3ffffff;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,s=a%n,o=Math.min(a,a-s)+r,c=0,u=r;u<o;u+=n)c=l(e,u,u+n,t),this.imuln(i),this.words[0]+c<0x4000000?this.words[0]+=c:this._iaddn(c);if(0!==s){var d=1;for(c=l(e,u,e.length,t),u=0;u<s;u++)d*=t;this.imuln(d),this.words[0]+c<0x4000000?this.words[0]+=c:this._iaddn(c)}this._strip()},a.prototype.copy=function(e){e.words=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},a.prototype._move=function(e){c(e,this)},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(e){a.prototype.inspect=u}else a.prototype.inspect=u;function u(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d,h=["","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"],p=[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],f=[0,0,0x2000000,0x290d741,0x1000000,0x2e90edd,0x39aa400,0x267bf47,0x1000000,0x290d741,1e7,0x12959c3,0x222c000,0x3bd7765,7529536,0xadcea1,0x1000000,0x1704f61,0x206fc40,0x2cddcf9,64e6,4084101,5153632,6436343,7962624,9765625,0xb54ba0,0xdaf26b,0x1069c00,0x138f9ad,243e5,0x1b4d89f,0x2000000,0x25528a1,0x2b54a20,0x3216b93,0x39aa400];function m(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],s=i*a,o=0x3ffffff&s,l=s/0x4000000|0;r.words[0]=o;for(var c=1;c<n;c++){for(var u=l>>>26,d=0x3ffffff&l,h=Math.min(c,t.length-1),p=Math.max(0,c-e.length+1);p<=h;p++){var f=c-p|0;u+=(s=(i=0|e.words[f])*(a=0|t.words[p])+d)/0x4000000|0,d=0x3ffffff&s}r.words[c]=0|d,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r._strip()}a.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){for(var r="",i=0,a=0,s=0;s<this.length;s++){var o=this.words[s],l=((o<<i|a)&0xffffff).toString(16);a=o>>>24-i&0xffffff,(i+=2)>=26&&(i-=26,s--),r=0!==a||s!==this.length-1?h[6-l.length]+l+r:l+r}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=p[e],u=f[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modrn(u).toString(e);r=(d=d.idivn(u)).isZero()?m+r:h[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=0x4000000*this.words[1]:3===this.length&&1===this.words[2]?e+=0x10000000000000+0x4000000*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16,2)},d&&(a.prototype.toBuffer=function(e,t){return this.toArrayLike(d,e,t)}),a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0");var s=e.allocUnsafe?e.allocUnsafe(a):new e(a);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},a.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,a=0;i<this.length;i++){var s=this.words[i]<<a|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===a?(r<e.length&&(e[r++]=s>>24&255),n=0,a=0):(n=s>>>24,a+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},a.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,a=0;i<this.length;i++){var s=this.words[i]<<a|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===a?(r>=0&&(e[r--]=s>>24&255),n=0,a=0):(n=s>>>24,a+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.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},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return(8191&t)==0&&(r+=13,t>>>=13),(127&t)==0&&(r+=7,t>>>=7),(15&t)==0&&(r+=4,t>>>=4),(3&t)==0&&(r+=2,t>>>=2),(1&t)==0&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},a.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},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.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()},a.prototype.ior=function(e){return n((this.negative|e.negative)==0),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.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()},a.prototype.iand=function(e){return n((this.negative|e.negative)==0),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){this.length>e.length?(t=this,r=e):(t=e,r=this);for(var t,r,n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},a.prototype.ixor=function(e){return n((this.negative|e.negative)==0),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=0x3ffffff&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&0x3ffffff>>26-r),this._strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<<i:this.words[r]=this.words[r]&~(1<<i),this._strip()},a.prototype.iadd=function(e){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,n=e):(r=e,n=this);for(var t,r,n,i=0,a=0;a<n.length;a++)t=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=0x3ffffff&t,i=t>>>26;for(;0!==i&&a<r.length;a++)t=(0|r.words[a])+i,this.words[a]=0x3ffffff&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.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)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,r,n=this.iadd(e);return e.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(t=this,r=e):(t=e,r=this);for(var a=0,s=0;s<r.length;s++)a=(n=(0|t.words[s])-(0|r.words[s])+a)>>26,this.words[s]=0x3ffffff&n;for(;0!==a&&s<t.length;s++)a=(n=(0|t.words[s])+a)>>26,this.words[s]=0x3ffffff&n;if(0===a&&s<t.length&&t!==this)for(;s<t.length;s++)this.words[s]=t.words[s];return this.length=Math.max(this.length,s),t!==this&&(this.negative=1),this._strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,r){var n,i,a,s=e.words,o=t.words,l=r.words,c=0,u=0|s[0],d=8191&u,h=u>>>13,p=0|s[1],f=8191&p,m=p>>>13,g=0|s[2],y=8191&g,b=g>>>13,w=0|s[3],v=8191&w,E=w>>>13,C=0|s[4],A=8191&C,x=C>>>13,I=0|s[5],S=8191&I,T=I>>>13,P=0|s[6],O=8191&P,_=P>>>13,N=0|s[7],k=8191&N,R=N>>>13,M=0|s[8],B=8191&M,j=M>>>13,U=0|s[9],$=8191&U,L=U>>>13,D=0|o[0],F=8191&D,H=D>>>13,z=0|o[1],W=8191&z,q=z>>>13,V=0|o[2],G=8191&V,K=V>>>13,Z=0|o[3],J=8191&Z,Y=Z>>>13,Q=0|o[4],X=8191&Q,ee=Q>>>13,et=0|o[5],er=8191&et,en=et>>>13,ei=0|o[6],ea=8191&ei,es=ei>>>13,eo=0|o[7],el=8191&eo,ec=eo>>>13,eu=0|o[8],ed=8191&eu,eh=eu>>>13,ep=0|o[9],ef=8191&ep,em=ep>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(d,F);var eg=(c+n|0)+((8191&(i=(i=Math.imul(d,H))+Math.imul(h,F)|0))<<13)|0;c=((a=Math.imul(h,H))+(i>>>13)|0)+(eg>>>26)|0,eg&=0x3ffffff,n=Math.imul(f,F),i=(i=Math.imul(f,H))+Math.imul(m,F)|0,a=Math.imul(m,H),n=n+Math.imul(d,W)|0;var ey=(c+n|0)+((8191&(i=(i=i+Math.imul(d,q)|0)+Math.imul(h,W)|0))<<13)|0;c=((a=a+Math.imul(h,q)|0)+(i>>>13)|0)+(ey>>>26)|0,ey&=0x3ffffff,n=Math.imul(y,F),i=(i=Math.imul(y,H))+Math.imul(b,F)|0,a=Math.imul(b,H),n=n+Math.imul(f,W)|0,i=(i=i+Math.imul(f,q)|0)+Math.imul(m,W)|0,a=a+Math.imul(m,q)|0,n=n+Math.imul(d,G)|0;var eb=(c+n|0)+((8191&(i=(i=i+Math.imul(d,K)|0)+Math.imul(h,G)|0))<<13)|0;c=((a=a+Math.imul(h,K)|0)+(i>>>13)|0)+(eb>>>26)|0,eb&=0x3ffffff,n=Math.imul(v,F),i=(i=Math.imul(v,H))+Math.imul(E,F)|0,a=Math.imul(E,H),n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,W)|0,a=a+Math.imul(b,q)|0,n=n+Math.imul(f,G)|0,i=(i=i+Math.imul(f,K)|0)+Math.imul(m,G)|0,a=a+Math.imul(m,K)|0,n=n+Math.imul(d,J)|0;var ew=(c+n|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(h,J)|0))<<13)|0;c=((a=a+Math.imul(h,Y)|0)+(i>>>13)|0)+(ew>>>26)|0,ew&=0x3ffffff,n=Math.imul(A,F),i=(i=Math.imul(A,H))+Math.imul(x,F)|0,a=Math.imul(x,H),n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,q)|0)+Math.imul(E,W)|0,a=a+Math.imul(E,q)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(b,G)|0,a=a+Math.imul(b,K)|0,n=n+Math.imul(f,J)|0,i=(i=i+Math.imul(f,Y)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,n=n+Math.imul(d,X)|0;var ev=(c+n|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(h,X)|0))<<13)|0;c=((a=a+Math.imul(h,ee)|0)+(i>>>13)|0)+(ev>>>26)|0,ev&=0x3ffffff,n=Math.imul(S,F),i=(i=Math.imul(S,H))+Math.imul(T,F)|0,a=Math.imul(T,H),n=n+Math.imul(A,W)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(x,W)|0,a=a+Math.imul(x,q)|0,n=n+Math.imul(v,G)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(E,G)|0,a=a+Math.imul(E,K)|0,n=n+Math.imul(y,J)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(b,J)|0,a=a+Math.imul(b,Y)|0,n=n+Math.imul(f,X)|0,i=(i=i+Math.imul(f,ee)|0)+Math.imul(m,X)|0,a=a+Math.imul(m,ee)|0,n=n+Math.imul(d,er)|0;var eE=(c+n|0)+((8191&(i=(i=i+Math.imul(d,en)|0)+Math.imul(h,er)|0))<<13)|0;c=((a=a+Math.imul(h,en)|0)+(i>>>13)|0)+(eE>>>26)|0,eE&=0x3ffffff,n=Math.imul(O,F),i=(i=Math.imul(O,H))+Math.imul(_,F)|0,a=Math.imul(_,H),n=n+Math.imul(S,W)|0,i=(i=i+Math.imul(S,q)|0)+Math.imul(T,W)|0,a=a+Math.imul(T,q)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(x,G)|0,a=a+Math.imul(x,K)|0,n=n+Math.imul(v,J)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(E,J)|0,a=a+Math.imul(E,Y)|0,n=n+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,X)|0,a=a+Math.imul(b,ee)|0,n=n+Math.imul(f,er)|0,i=(i=i+Math.imul(f,en)|0)+Math.imul(m,er)|0,a=a+Math.imul(m,en)|0,n=n+Math.imul(d,ea)|0;var eC=(c+n|0)+((8191&(i=(i=i+Math.imul(d,es)|0)+Math.imul(h,ea)|0))<<13)|0;c=((a=a+Math.imul(h,es)|0)+(i>>>13)|0)+(eC>>>26)|0,eC&=0x3ffffff,n=Math.imul(k,F),i=(i=Math.imul(k,H))+Math.imul(R,F)|0,a=Math.imul(R,H),n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,q)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,q)|0,n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(T,G)|0,a=a+Math.imul(T,K)|0,n=n+Math.imul(A,J)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(x,J)|0,a=a+Math.imul(x,Y)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(E,X)|0,a=a+Math.imul(E,ee)|0,n=n+Math.imul(y,er)|0,i=(i=i+Math.imul(y,en)|0)+Math.imul(b,er)|0,a=a+Math.imul(b,en)|0,n=n+Math.imul(f,ea)|0,i=(i=i+Math.imul(f,es)|0)+Math.imul(m,ea)|0,a=a+Math.imul(m,es)|0,n=n+Math.imul(d,el)|0;var eA=(c+n|0)+((8191&(i=(i=i+Math.imul(d,ec)|0)+Math.imul(h,el)|0))<<13)|0;c=((a=a+Math.imul(h,ec)|0)+(i>>>13)|0)+(eA>>>26)|0,eA&=0x3ffffff,n=Math.imul(B,F),i=(i=Math.imul(B,H))+Math.imul(j,F)|0,a=Math.imul(j,H),n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,q)|0)+Math.imul(R,W)|0,a=a+Math.imul(R,q)|0,n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(_,G)|0,a=a+Math.imul(_,K)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(T,J)|0,a=a+Math.imul(T,Y)|0,n=n+Math.imul(A,X)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(x,X)|0,a=a+Math.imul(x,ee)|0,n=n+Math.imul(v,er)|0,i=(i=i+Math.imul(v,en)|0)+Math.imul(E,er)|0,a=a+Math.imul(E,en)|0,n=n+Math.imul(y,ea)|0,i=(i=i+Math.imul(y,es)|0)+Math.imul(b,ea)|0,a=a+Math.imul(b,es)|0,n=n+Math.imul(f,el)|0,i=(i=i+Math.imul(f,ec)|0)+Math.imul(m,el)|0,a=a+Math.imul(m,ec)|0,n=n+Math.imul(d,ed)|0;var ex=(c+n|0)+((8191&(i=(i=i+Math.imul(d,eh)|0)+Math.imul(h,ed)|0))<<13)|0;c=((a=a+Math.imul(h,eh)|0)+(i>>>13)|0)+(ex>>>26)|0,ex&=0x3ffffff,n=Math.imul($,F),i=(i=Math.imul($,H))+Math.imul(L,F)|0,a=Math.imul(L,H),n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,q)|0)+Math.imul(j,W)|0,a=a+Math.imul(j,q)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(R,G)|0,a=a+Math.imul(R,K)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,Y)|0,n=n+Math.imul(S,X)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(T,X)|0,a=a+Math.imul(T,ee)|0,n=n+Math.imul(A,er)|0,i=(i=i+Math.imul(A,en)|0)+Math.imul(x,er)|0,a=a+Math.imul(x,en)|0,n=n+Math.imul(v,ea)|0,i=(i=i+Math.imul(v,es)|0)+Math.imul(E,ea)|0,a=a+Math.imul(E,es)|0,n=n+Math.imul(y,el)|0,i=(i=i+Math.imul(y,ec)|0)+Math.imul(b,el)|0,a=a+Math.imul(b,ec)|0,n=n+Math.imul(f,ed)|0,i=(i=i+Math.imul(f,eh)|0)+Math.imul(m,ed)|0,a=a+Math.imul(m,eh)|0,n=n+Math.imul(d,ef)|0;var eI=(c+n|0)+((8191&(i=(i=i+Math.imul(d,em)|0)+Math.imul(h,ef)|0))<<13)|0;c=((a=a+Math.imul(h,em)|0)+(i>>>13)|0)+(eI>>>26)|0,eI&=0x3ffffff,n=Math.imul($,W),i=(i=Math.imul($,q))+Math.imul(L,W)|0,a=Math.imul(L,q),n=n+Math.imul(B,G)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(j,G)|0,a=a+Math.imul(j,K)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,n=n+Math.imul(O,X)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(_,X)|0,a=a+Math.imul(_,ee)|0,n=n+Math.imul(S,er)|0,i=(i=i+Math.imul(S,en)|0)+Math.imul(T,er)|0,a=a+Math.imul(T,en)|0,n=n+Math.imul(A,ea)|0,i=(i=i+Math.imul(A,es)|0)+Math.imul(x,ea)|0,a=a+Math.imul(x,es)|0,n=n+Math.imul(v,el)|0,i=(i=i+Math.imul(v,ec)|0)+Math.imul(E,el)|0,a=a+Math.imul(E,ec)|0,n=n+Math.imul(y,ed)|0,i=(i=i+Math.imul(y,eh)|0)+Math.imul(b,ed)|0,a=a+Math.imul(b,eh)|0,n=n+Math.imul(f,ef)|0;var eS=(c+n|0)+((8191&(i=(i=i+Math.imul(f,em)|0)+Math.imul(m,ef)|0))<<13)|0;c=((a=a+Math.imul(m,em)|0)+(i>>>13)|0)+(eS>>>26)|0,eS&=0x3ffffff,n=Math.imul($,G),i=(i=Math.imul($,K))+Math.imul(L,G)|0,a=Math.imul(L,K),n=n+Math.imul(B,J)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(j,J)|0,a=a+Math.imul(j,Y)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(R,X)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(O,er)|0,i=(i=i+Math.imul(O,en)|0)+Math.imul(_,er)|0,a=a+Math.imul(_,en)|0,n=n+Math.imul(S,ea)|0,i=(i=i+Math.imul(S,es)|0)+Math.imul(T,ea)|0,a=a+Math.imul(T,es)|0,n=n+Math.imul(A,el)|0,i=(i=i+Math.imul(A,ec)|0)+Math.imul(x,el)|0,a=a+Math.imul(x,ec)|0,n=n+Math.imul(v,ed)|0,i=(i=i+Math.imul(v,eh)|0)+Math.imul(E,ed)|0,a=a+Math.imul(E,eh)|0,n=n+Math.imul(y,ef)|0;var eT=(c+n|0)+((8191&(i=(i=i+Math.imul(y,em)|0)+Math.imul(b,ef)|0))<<13)|0;c=((a=a+Math.imul(b,em)|0)+(i>>>13)|0)+(eT>>>26)|0,eT&=0x3ffffff,n=Math.imul($,J),i=(i=Math.imul($,Y))+Math.imul(L,J)|0,a=Math.imul(L,Y),n=n+Math.imul(B,X)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(j,X)|0,a=a+Math.imul(j,ee)|0,n=n+Math.imul(k,er)|0,i=(i=i+Math.imul(k,en)|0)+Math.imul(R,er)|0,a=a+Math.imul(R,en)|0,n=n+Math.imul(O,ea)|0,i=(i=i+Math.imul(O,es)|0)+Math.imul(_,ea)|0,a=a+Math.imul(_,es)|0,n=n+Math.imul(S,el)|0,i=(i=i+Math.imul(S,ec)|0)+Math.imul(T,el)|0,a=a+Math.imul(T,ec)|0,n=n+Math.imul(A,ed)|0,i=(i=i+Math.imul(A,eh)|0)+Math.imul(x,ed)|0,a=a+Math.imul(x,eh)|0,n=n+Math.imul(v,ef)|0;var eP=(c+n|0)+((8191&(i=(i=i+Math.imul(v,em)|0)+Math.imul(E,ef)|0))<<13)|0;c=((a=a+Math.imul(E,em)|0)+(i>>>13)|0)+(eP>>>26)|0,eP&=0x3ffffff,n=Math.imul($,X),i=(i=Math.imul($,ee))+Math.imul(L,X)|0,a=Math.imul(L,ee),n=n+Math.imul(B,er)|0,i=(i=i+Math.imul(B,en)|0)+Math.imul(j,er)|0,a=a+Math.imul(j,en)|0,n=n+Math.imul(k,ea)|0,i=(i=i+Math.imul(k,es)|0)+Math.imul(R,ea)|0,a=a+Math.imul(R,es)|0,n=n+Math.imul(O,el)|0,i=(i=i+Math.imul(O,ec)|0)+Math.imul(_,el)|0,a=a+Math.imul(_,ec)|0,n=n+Math.imul(S,ed)|0,i=(i=i+Math.imul(S,eh)|0)+Math.imul(T,ed)|0,a=a+Math.imul(T,eh)|0,n=n+Math.imul(A,ef)|0;var eO=(c+n|0)+((8191&(i=(i=i+Math.imul(A,em)|0)+Math.imul(x,ef)|0))<<13)|0;c=((a=a+Math.imul(x,em)|0)+(i>>>13)|0)+(eO>>>26)|0,eO&=0x3ffffff,n=Math.imul($,er),i=(i=Math.imul($,en))+Math.imul(L,er)|0,a=Math.imul(L,en),n=n+Math.imul(B,ea)|0,i=(i=i+Math.imul(B,es)|0)+Math.imul(j,ea)|0,a=a+Math.imul(j,es)|0,n=n+Math.imul(k,el)|0,i=(i=i+Math.imul(k,ec)|0)+Math.imul(R,el)|0,a=a+Math.imul(R,ec)|0,n=n+Math.imul(O,ed)|0,i=(i=i+Math.imul(O,eh)|0)+Math.imul(_,ed)|0,a=a+Math.imul(_,eh)|0,n=n+Math.imul(S,ef)|0;var e_=(c+n|0)+((8191&(i=(i=i+Math.imul(S,em)|0)+Math.imul(T,ef)|0))<<13)|0;c=((a=a+Math.imul(T,em)|0)+(i>>>13)|0)+(e_>>>26)|0,e_&=0x3ffffff,n=Math.imul($,ea),i=(i=Math.imul($,es))+Math.imul(L,ea)|0,a=Math.imul(L,es),n=n+Math.imul(B,el)|0,i=(i=i+Math.imul(B,ec)|0)+Math.imul(j,el)|0,a=a+Math.imul(j,ec)|0,n=n+Math.imul(k,ed)|0,i=(i=i+Math.imul(k,eh)|0)+Math.imul(R,ed)|0,a=a+Math.imul(R,eh)|0,n=n+Math.imul(O,ef)|0;var eN=(c+n|0)+((8191&(i=(i=i+Math.imul(O,em)|0)+Math.imul(_,ef)|0))<<13)|0;c=((a=a+Math.imul(_,em)|0)+(i>>>13)|0)+(eN>>>26)|0,eN&=0x3ffffff,n=Math.imul($,el),i=(i=Math.imul($,ec))+Math.imul(L,el)|0,a=Math.imul(L,ec),n=n+Math.imul(B,ed)|0,i=(i=i+Math.imul(B,eh)|0)+Math.imul(j,ed)|0,a=a+Math.imul(j,eh)|0,n=n+Math.imul(k,ef)|0;var ek=(c+n|0)+((8191&(i=(i=i+Math.imul(k,em)|0)+Math.imul(R,ef)|0))<<13)|0;c=((a=a+Math.imul(R,em)|0)+(i>>>13)|0)+(ek>>>26)|0,ek&=0x3ffffff,n=Math.imul($,ed),i=(i=Math.imul($,eh))+Math.imul(L,ed)|0,a=Math.imul(L,eh),n=n+Math.imul(B,ef)|0;var eR=(c+n|0)+((8191&(i=(i=i+Math.imul(B,em)|0)+Math.imul(j,ef)|0))<<13)|0;c=((a=a+Math.imul(j,em)|0)+(i>>>13)|0)+(eR>>>26)|0,eR&=0x3ffffff,n=Math.imul($,ef);var eM=(c+n|0)+((8191&(i=(i=Math.imul($,em))+Math.imul(L,ef)|0))<<13)|0;return c=((a=Math.imul(L,em))+(i>>>13)|0)+(eM>>>26)|0,eM&=0x3ffffff,l[0]=eg,l[1]=ey,l[2]=eb,l[3]=ew,l[4]=ev,l[5]=eE,l[6]=eC,l[7]=eA,l[8]=ex,l[9]=eI,l[10]=eS,l[11]=eT,l[12]=eP,l[13]=eO,l[14]=e_,l[15]=eN,l[16]=ek,l[17]=eR,l[18]=eM,0!==c&&(l[19]=c,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var s=i;i=0;for(var o=0x3ffffff&n,l=Math.min(a,t.length-1),c=Math.max(0,a-e.length+1);c<=l;c++){var u=a-c,d=(0|e.words[u])*(0|t.words[c]),h=0x3ffffff&d;s=s+(d/0x4000000|0)|0,o=0x3ffffff&(h=h+o|0),i+=(s=s+(h>>>26)|0)>>>26,s&=0x3ffffff}r.words[a]=o,n=s,s=i}return 0!==n?r.words[a]=n:r.length--,r._strip()}function b(e,t){this.x=e,this.y=t}Math.imul||(g=m),a.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return 10===this.length&&10===e.length?r=g(this,e,t):n<63?r=m(this,e,t):r=y(this,e,t),r},b.prototype.makeRBT=function(e){for(var t=Array(e),r=a.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},b.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},b.prototype.permute=function(e,t,r,n,i,a){for(var s=0;s<a;s++)n[s]=t[e[s]],i[s]=r[e[s]]},b.prototype.transform=function(e,t,r,n,i,a){this.permute(a,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var o=s<<1,l=Math.cos(2*Math.PI/o),c=Math.sin(2*Math.PI/o),u=0;u<i;u+=o)for(var d=l,h=c,p=0;p<s;p++){var f=r[u+p],m=n[u+p],g=r[u+p+s],y=n[u+p+s],b=d*g-h*y;y=d*y+h*g,g=b,r[u+p]=f+g,n[u+p]=m+y,r[u+p+s]=f-g,n[u+p+s]=m-y,p!==o&&(b=l*d-c*h,h=l*h+c*d,d=b)}},b.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},b.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},b.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=0x3ffffff&i,r=i<0x4000000?0:i/0x4000000|0}return e},b.prototype.convert13b=function(e,t,r,i){for(var a=0,s=0;s<t;s++)a+=0|e[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===a),n((-8192&a)==0)},b.prototype.stub=function(e){for(var t=Array(e),r=0;r<e;r++)t[r]=0;return t},b.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),a=this.stub(n),s=Array(n),o=Array(n),l=Array(n),c=Array(n),u=Array(n),d=Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,c,n),this.transform(s,a,o,l,n,i),this.transform(c,a,u,d,n,i);for(var p=0;p<n;p++){var f=o[p]*u[p]-l[p]*d[p];l[p]=o[p]*d[p]+l[p]*u[p],o[p]=f}return this.conjugate(o,l,n),this.transform(o,l,h,a,n,i),this.conjugate(h,a,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=Array(this.length+e.length),y(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<0x4000000);for(var r=0,i=0;i<this.length;i++){var a=(0|this.words[i])*e,s=(0x3ffffff&a)+(0x3ffffff&r);r>>=26,r+=(a/0x4000000|0)+(s>>>26),this.words[i]=0x3ffffff&s}return 0!==r&&(this.words[i]=r,this.length++),this.length=0===e?1:this.length,t?this.ineg():this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=0x3ffffff>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var o=this.words[t]&a,l=(0|this.words[t])-o<<r;this.words[t]=l|s,s=o>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},a.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){n("number"==typeof e&&e>=0);var i=t?(t-t%26)/26:0,a=e%26,s=Math.min((e-a)/26,this.length),o=0x3ffffff^0x3ffffff>>>a<<a;if(i-=s,i=Math.max(0,i),r){for(var l=0;l<s;l++)r.words[l]=this.words[l];r.length=s}if(0===s);else if(this.length>s)for(this.length-=s,l=0;l<this.length;l++)this.words[l]=this.words[l+s];else this.words[0]=0,this.length=1;var c=0;for(l=this.length-1;l>=0&&(0!==c||l>=i);l--){var u=0|this.words[l];this.words[l]=c<<26-a|u>>>a,c=u&o}return r&&0!==c&&(r.words[r.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;return!(this.length<=r)&&!!(this.words[r]&1<<t)},a.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;return(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)?this:(0!==t&&r++,this.length=Math.min(r,this.length),0!==t&&(this.words[this.length-1]&=0x3ffffff^0x3ffffff>>>t<<t),this._strip())},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return(n("number"==typeof e),n(e<0x4000000),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.negative=0,this.isubn(e),this.negative=1),this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=0x4000000;t++)this.words[t]-=0x4000000,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<0x4000000),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]+=0x4000000,this.words[t+1]-=1;return this._strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var i,a,s=e.length+r;this._expand(s);var o=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+o;var l=(0|e.words[i])*t;a-=0x3ffffff&l,o=(a>>26)-(l/0x4000000|0),this.words[i+r]=0x3ffffff&a}for(;i<this.length-r;i++)o=(a=(0|this.words[i+r])+o)>>26,this.words[i+r]=0x3ffffff&a;if(0===o)return this._strip();for(n(-1===o),o=0,i=0;i<this.length;i++)o=(a=-(0|this.words[i])+o)>>26,this.words[i]=0x3ffffff&a;return this.negative=1,this._strip()},a.prototype._wordDiv=function(e,t){var r,n=this.length-e.length,i=this.clone(),s=e,o=0|s.words[s.length-1];0!=(n=26-this._countBits(o))&&(s=s.ushln(n),i.iushln(n),o=0|s.words[s.length-1]);var l=i.length-s.length;if("mod"!==t){(r=new a(null)).length=l+1,r.words=Array(r.length);for(var c=0;c<r.length;c++)r.words[c]=0}var u=i.clone()._ishlnsubmul(s,1,l);0===u.negative&&(i=u,r&&(r.words[l]=1));for(var d=l-1;d>=0;d--){var h=(0|i.words[s.length+d])*0x4000000+(0|i.words[s.length+d-1]);for(h=Math.min(h/o|0,0x3ffffff),i._ishlnsubmul(s,h,d);0!==i.negative;)h--,i.negative=0,i._ishlnsubmul(s,1,d),i.isZero()||(i.negative^=1);r&&(r.words[d]=h)}return r&&r._strip(),i._strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},a.prototype.divmod=function(e,t,r){var i,s,o;return(n(!e.isZero()),this.isZero())?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(i=o.div.neg()),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(i=o.div.neg()),{div:i,mod:o.mod}):(this.negative&e.negative)!=0?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):e.length>this.length||0>this.cmp(e)?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modrn(e.words[0]))}:this._wordDiv(e,t)},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.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,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=0x3ffffff);for(var r=0x4000000%e,i=0,a=this.length-1;a>=0;a--)i=(r*i+(0|this.words[a]))%e;return t?-i:i},a.prototype.modn=function(e){return this.modrn(e)},a.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=0x3ffffff);for(var r=0,i=this.length-1;i>=0;i--){var a=(0|this.words[i])+0x4000000*r;this.words[i]=a/e|0,r=a%e}return this._strip(),t?this.ineg():this},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),s=new a(0),o=new a(0),l=new a(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var h=0,p=1;(t.words[0]&p)==0&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(u),s.isub(d)),i.iushrn(1),s.iushrn(1);for(var f=0,m=1;(r.words[0]&m)==0&&f<26;++f,m<<=1);if(f>0)for(r.iushrn(f);f-- >0;)(o.isOdd()||l.isOdd())&&(o.iadd(u),l.isub(d)),o.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(o),s.isub(l)):(r.isub(t),o.isub(i),l.isub(s))}return{a:o,b:l,gcd:r.iushln(c)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t,r=this,i=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var s=new a(1),o=new a(0),l=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var c=0,u=1;(r.words[0]&u)==0&&c<26;++c,u<<=1);if(c>0)for(r.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var d=0,h=1;(i.words[0]&h)==0&&d<26;++d,h<<=1);if(d>0)for(i.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);r.cmp(i)>=0?(r.isub(i),s.isub(o)):(i.isub(r),o.isub(s))}return 0>(t=0===r.cmpn(1)?s:o).cmpn(0)&&t.iadd(e),t},a.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 n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return(1&this.words[0])==0},a.prototype.isOdd=function(){return(1&this.words[0])==1},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];o+=a,a=o>>>26,o&=0x3ffffff,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=0x3ffffff,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.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},a.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 n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return -1===this.cmpn(e)},a.prototype.lt=function(e){return -1===this.cmp(e)},a.prototype.lten=function(e){return 0>=this.cmpn(e)},a.prototype.lte=function(e){return 0>=this.cmp(e)},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new I(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(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 a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function C(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function I(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){I.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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 a(null);return e.words=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 n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>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(E,v),E.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9){e.words[0]=0,e.length=1;return}var i=e.words[9];for(n=10,t.words[t.length++]=4194303&i;n<e.length;n++){var a=0|e.words[n];e.words[n-10]=(4194303&a)<<4|i>>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},E.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 n=0|e.words[r];t+=977*n,e.words[r]=0x3ffffff&t,t=64*n+(t/0x4000000|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(C,v),i(A,v),i(x,v),x.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;
6971r++){var n=(0|e.words[r])*19+t,i=0x3ffffff&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){var t;if(w[e])return w[e];if("k256"===e)t=new E;else if("p224"===e)t=new C;else if("p192"===e)t=new A;else if("p25519"===e)t=new x;else throw Error("Unknown prime "+e);return w[e]=t,t},I.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},I.prototype._verify2=function(e,t){n((e.negative|t.negative)==0,"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},I.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},I.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},I.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)},I.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},I.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},I.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},I.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},I.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},I.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},I.prototype.isqr=function(e){return this.imul(e,e.clone())},I.prototype.sqr=function(e){return this.mul(e,e)},I.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var o=new a(1).toRed(this),l=o.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var d=this.pow(u,i),h=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),f=s;0!==p.cmp(o);){for(var m=p,g=0;0!==m.cmp(o);g++)m=m.redSqr();n(g<f);var y=this.pow(d,new a(1).iushln(f-g-1));h=h.redMul(y),d=y.redSqr(),p=p.redMul(d),f=g}return h},I.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},I.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=Array(16);r[0]=new a(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,o=0,l=t.bitLength()%26;for(0===l&&(l=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],u=l-1;u>=0;u--){var d=c>>u&1;if(i!==r[0]&&(i=this.sqr(i)),0===d&&0===s){o=0;continue}s<<=1,s|=d,(4==++o||0===n&&0===u)&&(i=this.mul(i,r[s]),o=0,s=0)}l=26}return i},I.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},I.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new S(e)},i(S,I),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):0>i.cmpn(0)&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):0>i.cmpn(0)&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},94115:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyMessage=s;let n=r(95847),i=r(39091),a=r(83712);async function s(e,{address:t,message:r,factory:s,factoryData:o,signature:l,...c}){let u=(0,i.hashMessage)(r);return(0,n.getAction)(e,a.verifyHash,"verifyHash")({address:t,factory:s,factoryData:o,hash:u,signature:l,...c})}},94622:(e,t,r)=>{"use strict";r.d(t,{$C:()=>a,tG:()=>o});var n=r(44582),i=r(97085);function a(e){return e&&"function"==typeof e.getAddress}async function s(e,t){let r=await t;return(null==r||"0x0000000000000000000000000000000000000000"===r)&&((0,n.vA)("string"!=typeof e,"unconfigured name","UNCONFIGURED_NAME",{value:e}),(0,n.MR)(!1,"invalid AddressLike value;
6971 did not resolve to a value address","target",e)),(0,i.b)(r)}function o(e,t){return"string"==typeof e?e.match(/^0x[0-9a-f]{40}$/i)?(0,i.b)(e):((0,n.vA)(null!=t,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),s(e,t.resolveName(e))):a(e)?s(e,e.getAddress()):e&&"function"==typeof e.then?s(e,e):void(0,n.MR)(!1,"unsupported addressable value","target",e)}},94934:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setBalance=i;let n=r(27083);async function i(e,{address:t,value:r}){"ganache"===e.mode?await e.request({method:"evm_setAccountBalance",params:[t,(0,n.numberToHex)(r)]}):await e.request({method:`${e.mode}_setBalance`,params:[t,(0,n.numberToHex)(r)]})}},95216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.approve=c;let n=r(91472),i=r(4466),a=r(7746),s=r(77081),o=r(42350),l=r(55498);async function c(e,t){return c.inner(o.writeContract,e,t)}!function(e){async function t(t,r,n){return await t(r,{...n,...e.call(r,n)})}async function r(t,r){return(0,a.estimateContractGas)(t,{...(0,l.pickWriteParameters)(r),...e.call(t,r)})}async function o(t,r){return(0,s.simulateContract)(t,{...(0,l.pickWriteParameters)(r),...e.call(t,r)})}e.inner=t,e.call=function(e,t){return(0,l.defineCall)(function(e,t){let{amount:r,spender:i,token:a}=t,{address:s,decimals:o}=(0,l.resolveToken)(e,{token:a});return{abi:n.erc20Abi,address:s,args:[i,(0,l.toBaseUnits)(r,o)],functionName:"approve"}}(e,t))},e.estimateGas=r,e.simulate=o,e.extractEvent=function(e){let[t]=(0,i.parseEventLogs)({abi:n.erc20Abi,logs:e,eventName:"Approval",strict:!0});if(!t)throw Error("`Approval` event not found.");return t}}(c||(t.approve=c={}))},95613:(e,t,r)=>{"use strict";function n(e,t){let r=e.toString(),n=r.startsWith("-");n&&(r=r.slice(1));let[i,a]=[(r=r.padStart(t,"0")).slice(0,r.length-t),r.slice(r.length-t)];return a=a.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${a?`.${a}`:""}`}r.d(t,{J:()=>n})},95672:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toBlobs=function(e){let t=e.to??("string"==typeof e.data?"hex":"bytes"),r="string"==typeof e.data?(0,o.hexToBytes)(e.data):e.data,c=(0,s.size)(r);if(!c)throw new i.EmptyBlobError;if(c>n.maxBytesPerTransaction)throw new i.BlobSizeTooLargeError({maxSize:n.maxBytesPerTransaction,size:c});let u=[],d=!0,h=0;for(;d;){let e=(0,a.createCursor)(new Uint8Array(n.bytesPerBlob)),t=0;for(;t<n.fieldElementsPerBlob;){let i=r.slice(h,h+(n.bytesPerFieldElement-1));if(e.pushByte(0),e.pushBytes(i),i.length<31){e.pushByte(128),d=!1;break}t++,h+=31}u.push(e)}return"bytes"===t?u.map(e=>e.bytes):u.map(e=>(0,l.bytesToHex)(e.bytes))};let n=r(72356),i=r(73592),a=r(60469),s=r(29813),o=r(60037),l=r(27083)},95702:(e,t,r)=>{"use strict";var n=r(42186);r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},95847:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAction=function(e,t,r){let n=e[t.name];if("function"==typeof n)return n;let i=e[r];return"function"==typeof i?i:r=>t(e,r)}},95859:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0});let a=r(53938);class s{constructor(e=null,t=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer="undefined"==typeof window,this.isValidMessage=({origin:e,data:t,source:r})=>{let n=!t,i=!this.isServer&&r===window.parent,a=void 0!==t.version&&parseInt(t.version.split(".")[0]),s=!0;return Array.isArray(this.allowedOrigins)&&(s=void 0!==this.allowedOrigins.find(t=>t.test(e))),!n&&i&&"number"==typeof a&&a>=1&&s},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)=>
6971{let r=a.MessageFormatter.makeRequest(e,t);if(this.isServer)throw Error("Window doesn't exist");return window.parent.postMessage(r,"*"),new Promise((e,t)=>{this.callbacks.set(r.id,r=>{if(!r.success)return void t(Error(r.error));e(r)})})},this.allowedOrigins=e,this.debugMode=t,this.isServer||window.addEventListener("message",this.onParentMessage)}}t.default=s,i(r(25609),t)},95987:(e,t,r)=>{"use strict";r.d(t,{z:()=>s});var n=r(91004),i=r(36442);let a=(0,n.BX)({loading:!1,open:!1,selectedNetworkId:void 0,activeChain:void 0,initialized:!1,connectingWallet:void 0}),s={state:a,subscribe:e=>(0,n.B1)(a,()=>e(a)),subscribeOpen:e=>(0,i.u$)(a,"open",e),set(e){Object.assign(a,{...a,...e})}}},96180:(e,t,r)=>{"use strict";r.d(t,{A9:()=>D});var n=r(20801),i=r(4767),a=r(85460),s=r(32590),o=r(82376),l=r(13434),c=r(53984),u=r(26274),d=r(91004),h=r(36442),p=r(33432),f=r(77909),m=r(79561),g=r(55036);let y={SECURE_SITE_ORIGIN:(void 0!==g&&void 0!==g.env?g.env.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",Socials:["google","github","apple","facebook","x","discord","farcaster"],Email:"email",WalletButtonsIds:{coinbase:"d0ca99ff52b99abc48743dad0f7fc891e041be73574f7fac4afe5d4bb83845c8",metamask:"c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96",trust:"4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0",okx:"971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709",bitget:"38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662",binance:"8a0ee50d1f22f6651afcae7eb4253e52a3310b90af5daef78a8c4929a9bb99d4",uniswap:"c03dfee351b6fcc421b4494ea33b9d4b92a984f87aa76d1663bb28705e95034a",safepal:"0b415a746fb9ee99cce155c2ceca0c6f6061b1dbca2d722b3ba16381d0562150",rainbow:"1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369",bybit:"15c8b91ade1a4e58f3ce4e7a0dd7f42b47db0c8df7e0d84f63eb39bcb96c4e0f",tokenpocket:"20459438007b75f4f4acb98bf29aa3b800550309646d375da5fd4aac6c2a2c66",ledger:"19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927","timeless-x":"344d0e58b139eb1b6da0c29ea71d52a8eace8b57897c6098cb9b46012665c193",safe:"225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f",zerion:"ecc4036f814562b41a5268adc86270fba1365471402006302e70169465b7ac18",oneinch:"c286eebc742a537cd1d6818363e9dc53b21759a1e8e5d9b263d0c03ec7703576","crypto-com":"f2436c67184f158d1beda5df53298ee84abfc367581e4505134b5bcf5f46697d",imtoken:"ef333840daf915aafdc4a004525502d6d49d77bd9c65e0642dbaefb3c2893bef",kraken:"18450873727504ae9315a084fa7624b5297d2fe5880f0982979c17345a138277",ronin:"541d5dcd4ede02f3afaf75bf8e3e4c4f1fb09edb5fa6c4377ebf31c2785d9adf",robinhood:"8837dd9413b1d9b585ee937d27a816590248386d9dbf59f5cd3422dbbb65683e",exodus:"e9ff15be73584489ca4a66f64d32c4537711797e30b6660dbcb71ea72a42b1f4",argent:"bc949c5d968ae81310268bf9193f9c9fb7bb4e1283e1284af8f2bd4992535fd6",jupiter:"0ef262ca2a56b88d179c93a21383fee4e135bd7bc6680e5c2356ff8e38301037",solflare:"1ca0bdd4747578705b1939af023d120677c64fe6ca76add81fda36e350605e79",phantom:"a797aa35c0fadbfc1a53e7f675162ed5226968b44a19ee3d24385c64d1d3c393",coin98:"2a3c89040ac3b723a1972a33a125b1db11e258a6975d3a61252cd64e6ea5ea01","magic-eden":"8b830a2b724a9c3fbab63af6f55ed29c9dfa8a55e732dc88c80a196a2ba136c6",backpack:"2bd8c14e035c2d48f184aaa168559e86b0e3433228d3c4075900a221785019b0",frontier:"85db431492aa2e8672e93f4ea7acf10c88b97b867b0d373107af63dc4880f041",xverse:"2a87d74ae02e10bdd1f51f7ce6c4e1cc53cd5f2c0b6b5ad0d7b3007d2b13de7b",leather:"483afe1df1df63daf313109971ff3ef8356ddf1cc4e45877d205eee0b7893a13",haha:"719bd888109f5e8dd23419b20e749900ce4d2fc6858cf588395f19c82fd036b3","ambire-wallet":"2c81da3add65899baeac53758a07e652eea46dbb5195b8074772c62a77bbf568",bitpay:"b4678fefcc469583ed4ef58a5bd90ce86208b82803f3c45f2de3e0973d268835","blade-wallet":"a9104b630bac1929ad9ac2a73a17ed4beead1889341f307bff502f89b46c8501",brave:"163d2cf19babf05eb8962e9748f9ebe613ed52ebf9c8107c9a0f104bfcf161b3",coinstats:"bcaec16e531fb5f6dc690d7b70d570421e0209af9a0fe77c6419d516fe0098c2","kresus-superapp":"56bec983b47c8b6eb774890c1c8ae9d95334e10bdb126ab6c11dfaf56fb2b31c","plena-app":"9654c004e02e492c30904a820154e239886edbf4d66bc5d372060809ef4c9111",status:"af9a6dfff9e63977bbde28fb23518834f08b696fe8bff6dd6827acad1814c6be","tomo-wallet":"5e4a8cc31d062b78a7ad9e017135574809b01c4dbbf30e4dbb467ddd43025618",valora:"d01c7758d741b363e637a817a09bcf5
697179feae4db9f5bb16f599fdd1f66e2f974","zengo-wallet":"9414d5a85c8f4eabc1b5b15ebe0cd399e1a2a9d35643ab0ad22a6e4a32f596f0"}},b=p.w.getApiUrl(),w=new f.Z({baseUrl:b,clientId:null}),v=(0,d.BX)({walletButtons:[],fetching:!1}),E={state:v,subscribeKey:(e,t)=>(0,h.u$)(v,e,t),async fetchWalletButtons(){if(v.fetching)return;v.fetching=!0;let e=Object.values(y.WalletButtonsIds),{data:t}=await w.get({path:"/getWallets",params:{...m.N._getSdkProperties(),page:"1",entries:String(e.length),include:e?.join(",")}}),r=t.map(e=>e.image_id).filter(Boolean);await Promise.allSettled(r.map(e=>m.N._fetchWalletImage(e))),v.walletButtons=t}},C=(0,d.BX)({ready:!1,pending:!1}),A={state:C,setReady(e){C.ready=e},setPending(e){C.pending=e},setError(e){C.error=e},setData(e){C.data=e}},x={getWalletButton(e){let t=y.WalletButtonsIds;if(e in t)return E.state.walletButtons.find(r=>r.id===t[e])},isWalletButtonReady:e=>!(e in y.WalletButtonsIds)||!!x.getWalletButton(e)};var I=r(56059),S=r(81767),T=r(55284),P=r(28877),O=r(2076);r(79909),r(39909),r(48054),r(83627);var _=r(46756),N=r(63412),k=r(91392);let R=(0,k.AH)` 6972 @keyframes shake { 6973 0% { 6974 transform: translateX(0); 6975 } 6976 25% { 6977 transform: translateX(3px); 6978 } 6979 50% { 6980 transform: translateX(-3px); 6981 } 6982 75% { 6983 transform: translateX(3px); 6984 } 6985 100% { 6986 transform: translateX(0); 6987 } 6988 } 6989 6990 :host > button { 6991 display: inline-flex; 6992 justify-content: center; 6993 align-items: center; 6994 background-color: ${({tokens:e})=>e.theme.backgroundInvert}; 6995 gap: ${({spacing:e})=>e[1]}; 6996 border: none; 6997 transition: border-radius ${({durations:e})=>e.lg} 6998 ${({easings:e})=>e["ease-out-power-2"]}; 6999 will-change: border-radius; 7000 color: ${({tokens:e})=>e.theme.textInvert}; 7001 } 7002 7003 :host > button > wui-text { 7004 text-transform: capitalize; 7005 } 7006 7007 :host > button > wui-image { 7008 border-radius: ${({borderRadius:e})=>e[1]}; 7009 } 7010 7011 :host([data-error='true']) > button > wui-icon { 7012 color: ${({tokens:e})=>e.core.textError}; 7013 } 7014 7015 :host([data-error='true']) > button { 7016 animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; 7017 } 7018 7019 /* -- Size states ----------------------------------------------------------- */ 7020 :host > button[data-size='lg'] { 7021 padding-top: ${({spacing:e})=>e[4]}; 7022 padding-bottom: ${({spacing:e})=>e[4]}; 7023 padding-left: ${({spacing:e})=>e[5]}; 7024 padding-right: ${({spacing:e})=>e[5]}; 7025 border-radius: ${({borderRadius:e})=>e[4]}; 7026 height: 52px; 7027 7028 wui-image { 7029 height: 20px; 7030 width: 20px; 7031 } 7032 } 7033 7034 :host > button[data-size='md'] { 7035 padding-top: ${({spacing:e})=>e[3]}; 7036 padding-bottom: ${({spacing:e})=>e[3]}; 7037 padding-left: ${({spacing:e})=>e[4]}; 7038 padding-right: ${({spacing:e})=>e[4]}; 7039 border-radius: ${({borderRadius:e})=>e[3]}; 7040 height: 40px; 7041 7042 wui-image { 7043 height: 16px; 7044 width: 16px; 7045 } 7046 } 7047 7048 :host > button[data-size='sm'] { 7049 padding-top: ${({spacing:e})=>e[2]}; 7050 padding-bottom: ${({spacing:e})=>e[2]}; 7051 padding-left: ${({spacing:e})=>e[3]}; 7052 padding-right: ${({spacing:e})=>e[3]}; 7053 border-radius: ${({borderRadius:e})=>e[2]}; 7054 height: 30px; 7055 7056 wui-image { 7057 height: 12px; 7058 width: 12px; 7059 } 7060 } 7061 7062 /* -- Hover & Active states ----------------------------------------------------------- */ 7063 @media (hover: hover) { 7064 button:hover:enabled, 7065 button:active:enabled { 7066 border-radius: ${({borderRadius:e})=>e[16]}; 7067 } 7068 } 7069 7070 /* -- Disabled state --------------------------------------------------- */ 7071 :host > button:disabled { 7072 cursor: default; 7073 } 7074 7075 :host > button:disabled wui-image, 7076 :host > button:disabled wui-icon, 7077 :host > button:disabled wui-text { 7078 opacity: 0.5; 7079 } 7080`;var M=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let B={lg:"lg-medium",md:"md-medium",sm:"sm-medium"},j={lg:"xl",md:"lg",sm:"md"},U=class extends I.WF{constructor(){super(...arguments),this.imageSrc="",this.name="",this.size="md",this.walletConnect=!1,this.loading=!1,this.error=!1,this.disabled=!1}render(){return this.dataset.error=`${this.error}`,(0,I.qy)` 7081 <button ?disabled=${this.disabled} data-size=${this.size} data-error=${this.error}>
7082 ${this.leftViewTemplate()} ${this.rightViewTemplate()} 7083 </button> 7084 `}leftViewTemplate(){return this.error?(0,I.qy)`<wui-icon name="warningCircle" iconColor="inherit" size="md"></wui-icon>`:this.loading?(0,I.qy)`<wui-loading-spinner size="lg" color="inherit"></wui-loading-spinner>`:this.imageSrc?(0,I.qy)`<wui-image src=${this.imageSrc} alt=${(0,T.J)(this.name)}></wui-image>`:this.icon?(0,I.qy)`<wui-icon 7085 size=${j[this.size]} 7086 color="inherit" 7087 name=${this.icon} 7088 ></wui-icon>`:null}rightViewTemplate(){return(0,I.qy)` 7089 <wui-text variant=${B[this.size]} color="inherit" 7090 >${this.name||"Unknown"} 7091 </wui-text> 7092 `}};U.styles=[_.W5,_.fD,R],M([(0,S.MZ)()],U.prototype,"imageSrc",void 0),M([(0,S.MZ)()],U.prototype,"name",void 0),M([(0,S.MZ)()],U.prototype,"size",void 0),M([(0,S.MZ)({type:Boolean})],U.prototype,"walletConnect",void 0),M([(0,S.MZ)()],U.prototype,"icon",void 0),M([(0,S.MZ)({type:Boolean})],U.prototype,"loading",void 0),M([(0,S.MZ)({type:Boolean})],U.prototype,"error",void 0),M([(0,S.MZ)({type:Boolean})],U.prototype,"disabled",void 0),U=M([(0,N.E)("wui-wallet-button")],U);var $=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let L=class extends I.WF{constructor(){super(),this.unsubscribe=[],this.wallet="metamask",this.connectors=s.a.state.connectors,this.loading=!1,this.error=!1,this.ready=x.isWalletButtonReady(this.wallet),this.modalLoading=c.W.state.loading,this.unsubscribe.push(c.W.subscribeKey("loading",e=>this.modalLoading=e),s.a.subscribeKey("connectors",e=>this.connectors=e),E.subscribeKey("walletButtons",()=>{this.ready=x.isWalletButtonReady(this.wallet)}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}connectedCallback(){super.connectedCallback(),this.caipAddress=this.namespace?o.W.state.chains.get(this.namespace)?.accountState?.caipAddress:o.W.state.activeCaipAddress}firstUpdated(){x.isWalletButtonReady(this.wallet)||E.fetchWalletButtons(),this.namespace?this.unsubscribe.push(o.W.subscribeChainProp("accountState",e=>{this.caipAddress=e?.caipAddress},this.namespace)):this.unsubscribe.push(o.W.subscribeKey("activeCaipAddress",e=>this.caipAddress=e))}render(){let e=this.namespace||o.W.state.activeChain;if("email"===this.wallet)return this.emailTemplate();if(y.Socials.some(e=>e===this.wallet))return this.socialTemplate();let t=x.getWalletButton(this.wallet),r=t&&e?s.a.getConnector({id:t.id,namespace:e}):void 0;return r?this.externalTemplate(r):this.walletButtonTemplate()}walletButtonTemplate(){let e="walletConnect"===this.wallet,t=e?this.loading:this.loading||!this.ready,r=x.getWalletButton(this.wallet),n=P.$.getWalletImageById(r?.image_id),i="walletConnect"===this.wallet?"WalletConnect":r?.name;return(0,I.qy)` 7093 <wui-wallet-button 7094 data-testid="apkt-wallet-button" 7095 name=${!this.ready&&!e||this.modalLoading?"Loading...":(0,T.J)(i)} 7096 @click=${async()=>{this.loading=!0,await l.g.connectWalletConnect({walletConnect:"walletConnect"===this.wallet,connector:this.connectors.find(e=>"walletConnect"===e.id),onOpen(e){c.W.open({view:e?"AllWallets":"ConnectingWalletConnect",data:e?void 0:{wallet:r}})},onConnect(){u.I.replace("Connect")}}).catch(()=>{}).finally(()=>this.loading=!1)}} 7097 .icon=${(0,T.J)("walletConnect"===this.wallet?"walletConnectInvert":void 0)} 7098 .imageSrc=${(0,T.J)(n)} 7099 ?disabled=${!!this.caipAddress||t||this.modalLoading} 7100 ?loading=${t||this.modalLoading} 7101 ></wui-wallet-button> 7102 `}externalTemplate(e){let t=x.getWalletButton(this.wallet),r=P.$.getWalletImageById(t?.
7102image_id),n=P.$.getConnectorImage(e);return(0,I.qy)` 7103 <wui-wallet-button 7104 data-testid="apkt-wallet-button-external" 7105 name=${this.modalLoading?"Loading...":(0,T.J)(e.name)} 7106 @click=${async()=>{this.loading=!0,this.error=!1,await l.g.connectExternal(e).catch(()=>this.error=!0).finally(()=>this.loading=!1)}} 7107 .imageSrc=${(0,T.J)(r??n)} 7108 ?disabled=${!!this.caipAddress||this.loading||this.modalLoading} 7109 ?loading=${this.loading||this.modalLoading} 7110 ?error=${this.error} 7111 ></wui-wallet-button> 7112 `}socialTemplate(){return(0,I.qy)`<wui-wallet-button 7113 data-testid="apkt-wallet-button-social" 7114 name=${this.modalLoading?"Loading...":this.wallet} 7115 @click=${()=>(this.loading=!0,this.error=!1,l.g.connectSocial({social:this.wallet,namespace:this.namespace,onOpenFarcaster(){c.W.open({view:"ConnectingFarcaster"})},onConnect(){u.I.push("Connect")}}).catch(()=>this.error=!0).finally(()=>this.loading=!1))} 7116 .icon=${this.wallet} 7117 ?disabled=${!!this.caipAddress||this.loading||this.modalLoading} 7118 ?loading=${this.loading||this.modalLoading} 7119 ?error=${this.error} 7120 ></wui-wallet-button>`}emailTemplate(){return(0,I.qy)`<wui-wallet-button 7121 data-testid="apkt-wallet-button-email" 7122 name=${this.modalLoading?"Loading...":"Email"} 7123 @click=${async()=>{this.loading=!0,this.error=!1,await l.g.connectEmail({namespace:this.namespace,onOpen(){c.W.open({view:"EmailLogin"})},onConnect(){u.I.push("Connect")}}).catch(()=>this.error=!0).finally(()=>this.loading=!1)}} 7124 .icon=${"mail"} 7125 .iconSize=${"lg"} 7126 ?disabled=${!!this.caipAddress||this.loading||this.modalLoading} 7127 ?loading=${this.loading||this.modalLoading} 7128 ?error=${this.error} 7129 ></wui-wallet-button>`}};function D(e){let{connectors:t}=(0,a.s)(s.a.state),{pending:r,ready:i,error:d,data:h}=(0,a.s)(A.state),{namespace:p,onSuccess:f,onError:m}=e??{};(0,n.useEffect)(()=>{i||E.fetchWalletButtons().then(()=>{E.state.walletButtons.length&&A.setReady(!0)})},[i]),(0,n.useEffect)(()=>o.W.subscribeKey("activeCaipAddress",e=>{e&&(A.setError(void 0),A.setPending(!1))}),[]),(0,n.useEffect)(()=>E.subscribeKey("walletButtons",e=>{e.length&&A.setReady(!0)}),[]);let g=(0,n.useCallback)(e=>{A.setData(e),f?.(e)},[f]),b=(0,n.useCallback)(e=>{let t=e instanceof Error?e:Error("Something went wrong");A.setError(t),m?.(t)},[m]);return{data:h,error:d,isReady:i,isPending:r,isError:!!d,isSuccess:!!h,connect:(0,n.useCallback)(async e=>{try{if(A.setPending(!0),A.setError(void 0),e===y.Email)return void await l.g.connectEmail({namespace:p,onOpen(){c.W.open({view:"EmailLogin"})}}).then(g);if(y.Socials.some(t=>t===e))return void await l.g.connectSocial({social:e,namespace:p,onOpenFarcaster(){c.W.open({view:"ConnectingFarcaster"})},onConnect(){u.I.push("Connect")}}).then(g);let r=x.getWalletButton(e),n=r&&p?s.a.getConnector({id:r.id,namespace:p}):void 0;if(n)return void await l.g.connectExternal(n).then(g);await l.g.connectWalletConnect({walletConnect:"walletConnect"===e,connector:t.find(e=>"walletConnect"===e.id),onOpen(e){c.W.open({view:e?"AllWallets":"ConnectingWalletConnect",data:e?void 0:{wallet:r}})},onConnect(){u.I.replace("Connect")}}).then(g)}catch(e){b(e)}finally{A.setPending(!1)}},[p,t,g,b])}}$([(0,S.MZ)()],L.prototype,"wallet",void 0),$([(0,S.MZ)()],L.prototype,"namespace",void 0),$([(0,S.wk)()],L.prototype,"connectors",void 0),$([(0,S.wk)()],L.prototype,"caipAddress",void 0),$([(0,S.wk)()],L.prototype,"loading",void 0),$([(0,S.wk)()],L.prototype,"error",void 0),$([(0,S.wk)()],L.prototype,"ready",void 0),$([(0,S.wk)()],L.prototype,"modalLoading",void 0),L=$([(0,O.EM)("appkit-wallet-button")],L),(0,i.a)({tagName:"appkit-wallet-button",elementClass:L,react:n})},96312:(e,t,r)=>{"use strict";let n;r.d(t,{L:()=>a});let i=256;function a(e=11){if(!n||i+e>512){n="",i=0;for(let e=0;e<256;e++)n+=(256+256*Math.random()|0).toString(16).substring(1)}return n.substring(i,i+++e)}},96574:(e,t,r)=>{"use strict";var n=r(56059),i=r(81767),a=r(55284),s=r(99736);r(79909),r(83627);var o=r(46756),l=r(63412),c=r(91392);let u=(0,c.AH)` 7130 :host { 7131 position: relative; 7132 width: 100%; 7133 display: inline-flex; 7134 flex-direction: column; 7135 gap: ${({spacing:e})=>e[3]}; 7136 color: ${({tokens:e})=>e.theme.textPrimary}; 7137 caret-color: ${({tokens:e})=>e.core.textAccentPrimary}; 7138 } 7139 7140 .wui-input-text-container { 7141 position: relative; 7142 display: flex; 7143 } 7144 7145 input { 7146 width: 100%; 7147 border-radius: ${({borderRadius:e})=>e[4]}; 7148 color: inherit; 7149 background: transparent; 7150 border: 1px solid ${({tokens:e})=>e.theme.borderPrimary}; 7151 caret-color: ${({tokens:e})=>e.core.textAccentPrimary}; 7152 padding: ${({spacing:e})=>e[3]} ${({spacing:e})=>e[3]} 7153 ${({spacing:e})=>e[3]} ${({spacing:e})=>e[10]}; 7154 font-size: ${({textSize:e})=>e.large}; 7155 line-height: ${({typography:e})=>e["lg-regular"].lineHeight}; 7156 letter-spacing: ${({typography:e})=>e["lg-regular"].letterSpacing}; 7157 font-weight: ${({fontWeight:e})=>e.regular}; 7158 font-family: ${({fontFamily:e})=>e.regular}; 7159 } 7160 7161 input[data-size='lg'] { 7162 padding: ${({spacing:e})=>e[4]} ${({spacing:e})=>e[3]} 7163 ${({spacing:e})=>e[4]} ${({spacing:e})=>e[10]}; 7164 } 7165 7166 @media (hover: hover) and (pointer: fine) { 7167 input:hover:enabled { 7168 border: 1px solid ${({tokens:e})=>e.theme.borderSecondary}; 7169 } 7170 } 7171 7172 input:disabled { 7173 cursor: unset; 7174 border: 1px solid ${({tokens:e})=>e.theme.borderPrimary}; 7175 } 7176 7177 input::placeholder { 7178 color: ${({tokens:e})=>e.theme.textSecondary}; 7179 } 7180 7181 input:focus:enabled { 7182 border: 1px solid ${({tokens:e})=>e.theme.borderSecondary}; 7183 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 7184 -webkit-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040}; 7185 -moz-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040}; 7186 box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040}; 7187 } 7188 7189 div.wui-input-text-container:has(input:disabled) { 7190 opacity: 0.5; 7191 } 7192 7193 wui-icon.wui-input-text-left-icon { 7194 position: absolute; 7195 top: 50%; 7196 transform: translateY(-50%); 7197 pointer-events: none; 7198 left: ${({spacing:e})=>e[4]}; 7199 color: ${({tokens:e})=>e.theme.iconDefault}; 7200 } 7201 7202 button.wui-input-text-submit-button { 7203 position: absolute; 7204 top: 50%; 7205 transform: translateY(-50%); 7206 right: ${({spacing:e})=>e[3]}; 7207 width: 24px; 7208 height: 24px; 7209 border: none; 7210 background: transparent; 7211 border-radius: ${({borderRadius:e})=>e[2]}; 7212 color: ${({tokens:e})=>e.core.textAccentPrimary}; 7213 } 7214 7215 button.wui-input-text-submit-button:disabled { 7216 opacity: 1; 7217 } 7218 7219 button.wui-input-text-submit-button.loading wui-icon { 7220 animation: spin 1s linear infinite; 7221 } 7222 7223 button.wui-input-text-submit-button:hover { 7224 background: ${({tokens:e})=>e.core.foregroundAccent010}; 7225 } 7226 7227 input:has(+ .wui-input-text-submit-button) { 7228 padding-right: ${({spacing:e})=>e[12]}; 7229 } 7230 7231 input[type='number'] { 7232 -moz-appearance: textfield; 7233 } 7234 7235 input[type='search']::-webkit-search-decoration, 7236 input[type='search']::-webkit-search-cancel-button, 7237 input[type='search']::-webkit-search-results-button, 7238 input[type='search']::-webkit-search-results-decoration { 7239 -webkit-appearance: none; 7240 } 7241 7242 /* -- Keyframes --------------------------------------------------- */ 7243 @keyframes spin { 7244 from { 7245 transform: rotate(0deg); 7246 } 7247 to { 7248 transform: rotate(360deg); 7249 } 7250 } 7251`;var d=function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};let h=class extends n.WF{constructor(){super(...arguments),this.inputElementRef=(0,s._)(),this.disabled=!1,this.loading=!1,this.placeholder="",this.type="text",this.value="",this.size="md"}render(){return(0,n.qy)` <div class="wui-input-text-container"> 7252 ${this.templateLeftIcon()} 7253 <input 7254 data-size=${this.size} 7255 ${(0,s.K)(this.inputElementRef)} 7256 data-testid="wui-input-text" 7257 type=${this.type} 7258 enterkeyhint=${(0,a.J)(this.enterKeyHint)} 7259 ?disabled=${this.disabled} 7260 placeholder=${this.placeholder}
7261 @input=${this.dispatchInputChangeEvent.bind(this)} 7262 @keydown=${this.onKeyDown} 7263 .value=${this.value||""} 7264 /> 7265 ${this.templateSubmitButton()} 7266 <slot class="wui-input-text-slot"></slot> 7267 </div> 7268 ${this.templateError()} ${this.templateWarning()}`}templateLeftIcon(){return this.icon?(0,n.qy)`<wui-icon 7269 class="wui-input-text-left-icon" 7270 size="md" 7271 data-size=${this.size} 7272 color="inherit" 7273 name=${this.icon} 7274 ></wui-icon>`:null}templateSubmitButton(){return this.onSubmit?(0,n.qy)`<button 7275 class="wui-input-text-submit-button ${this.loading?"loading":""}" 7276 @click=${this.onSubmit?.bind(this)} 7277 ?disabled=${this.disabled||this.loading} 7278 > 7279 ${this.loading?(0,n.qy)`<wui-icon name="spinner" size="md"></wui-icon>`:(0,n.qy)`<wui-icon name="chevronRight" size="md"></wui-icon>`} 7280 </button>`:null}templateError(){return this.errorText?(0,n.qy)`<wui-text variant="sm-regular" color="error">${this.errorText}</wui-text>`:null}templateWarning(){return this.warningText?(0,n.qy)`<wui-text variant="sm-regular" color="warning">${this.warningText}</wui-text>`:null}dispatchInputChangeEvent(){this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value?.value,bubbles:!0,composed:!0}))}};h.styles=[o.W5,o.fD,u],d([(0,i.MZ)()],h.prototype,"icon",void 0),d([(0,i.MZ)({type:Boolean})],h.prototype,"disabled",void 0),d([(0,i.MZ)({type:Boolean})],h.prototype,"loading",void 0),d([(0,i.MZ)()],h.prototype,"placeholder",void 0),d([(0,i.MZ)()],h.prototype,"type",void 0),d([(0,i.MZ)()],h.prototype,"value",void 0),d([(0,i.MZ)()],h.prototype,"errorText",void 0),d([(0,i.MZ)()],h.prototype,"warningText",void 0),d([(0,i.MZ)()],h.prototype,"onSubmit",void 0),d([(0,i.MZ)()],h.prototype,"size",void 0),d([(0,i.MZ)({attribute:!1})],h.prototype,"onKeyDown",void 0),h=d([(0,l.E)("wui-input-text")],h)},96788:(e,t,r)=>{"use strict";let n,i;r.d(t,{N:()=>g,d:()=>u});var a,s=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},o=function(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r};let l=new Set,c={};function u(){if(i||(i=Object.freeze({register:d,get:h,on:p}),"undefined"==typeof window))return i;let e=Object.freeze({register:d});try{window.addEventListener("wallet-standard:register-wallet",({detail:t})=>t(e))}catch(e){console.error("wallet-standard:register-wallet event listener could not be added\n",e)}try{window.dispatchEvent(new m(e))}catch(e){console.error("wallet-standard:app-ready event could not be dispatched\n",e)}return i}function d(...e){return(e=e.filter(e=>!l.has(e))).length?(e.forEach(e=>{n=void 0,l.add(e)}),c.register?.forEach(t=>f(()=>t(...e))),function(){e.forEach(e=>{n=void 0,l.delete(e)}),c.unregister?.forEach(t=>f(()=>t(...e)))}):()=>{}}function h(){return n||(n=[...l]),n}function p(e,t){return c[e]?.push(t)||(c[e]=[t]),function(){c[e]=c[e]?.filter(e=>t!==e)}}function f(e){try{e()}catch(e){console.error(e)}}class m extends Event{get detail(){return s(this,a,"f")}get type(){return"wallet-standard:app-ready"}constructor(e){super("wallet-standard:app-ready",{bubbles:!1,cancelable:!1,composed:!1}),a.set(this,void 0),o(this,a,e,"f")}preventDefault(){throw Error("preventDefault cannot be called")}stopImmediatePropagation(){throw Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw Error("stopPropagation cannot be called")}}function g(){if(i||(i=u(),"undefined"==typeof window))return i;let e=window.navigator.wallets||[];if(!Array.isArray(e))return console.error("window.navigator.wallets is not an array"),i;let{register:t}=i,r=(...e)=>
7280e.forEach(e=>f(()=>e({register:t})));try{Object.defineProperty(window.navigator,"wallets",{value:Object.freeze({push:r})})}catch(e){return console.error("window.navigator.wallets could not be set"),i}return r(...e),i}a=new WeakMap},96923:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineChain=function(e){let t={formatters:void 0,fees:void 0,serializers:void 0,...e};return Object.assign(t,{extend:function e(t){return r=>{let n="function"==typeof r?r(t):r,i={...t,...n};return Object.assign(i,{extend:e(i)})}}(t)})},t.extendSchema=function(){return{}}},97085:(e,t,r)=>{"use strict";r.d(t,{b:()=>d});var n=r(92391),i=r(98668),a=r(44582);let s=BigInt(0),o=BigInt(36);function l(e){let t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);let a=(0,i.q5)((0,n.S)(r));for(let e=0;e<40;e+=2)a[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&a[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}let c={};for(let e=0;e<10;e++)c[String(e)]=String(e);for(let e=0;e<26;e++)c[String.fromCharCode(65+e)]=String(10+e);let u=function(){let e={};for(let t=0;t<36;t++)e["0123456789abcdefghijklmnopqrstuvwxyz"[t]]=BigInt(t);return e}();function d(e){if((0,a.MR)("string"==typeof e,"invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith("0x")||(e="0x"+e);let t=l(e);return(0,a.MR)(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,"bad address checksum","address",e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){(0,a.MR)(e.substring(2,4)===function(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map(e=>c[e]).join("");for(;t.length>=15;){let e=t.substring(0,15);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}(e),"bad icap checksum","address",e);let t=(function(e){e=e.toLowerCase();let t=s;for(let r=0;r<e.length;r++)t=t*o+u[e[r]];return t})(e.substring(4)).toString(16);for(;t.length<40;)t="0"+t;return l("0x"+t)}(0,a.MR)(!1,"invalid address","address",e)}},97099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsText=f;let n=r(91472),i=r(72431),a=r(25230),s=r(77362),o=r(27083),l=r(61145),c=r(57660),u=r(2205),d=r(1690),h=r(95847),p=r(527);async function f(e,t){let{blockNumber:r,blockTag:f,key:m,name:g,gatewayUrls:y,strict:b}=t,{chain:w}=e,v=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!w)throw Error("client chain not configured. universalResolverAddress is required.");return(0,s.getChainContractAddress)({blockNumber:r,chain:w,contract:"ensUniversalResolver"})})(),E=w?.ensTlds;if(E&&!E.some(e=>g.endsWith(e)))return null;try{let t={address:v,abi:n.universalResolverResolveAbi,args:[(0,o.toHex)((0,d.packetToBytes)(g)),(0,a.encodeFunctionData)({abi:n.textResolverAbi,functionName:"text",args:[(0,u.namehash)(g),m]}),y??[c.localBatchGatewayUrl]],functionName:"resolveWithGateways",blockNumber:r,blockTag:f},s=(0,h.getAction)(e,p.readContract,"readContract"),l=await s(t);if("0x"===l[0])return null;let b=(0,i.decodeFunctionResult)({abi:n.textResolverAbi,functionName:"text",data:l[0]});return""===b?null:b}catch(e){if(b)throw e;if((0,l.isNullUniversalResolverError)(e))return null;throw e}}},97236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTypedDataAddress=a;let n=r(52548),i=r(41636);async function a(e){let{domain:t,message:r,primaryType:a,signature:s,types:o}=e;return(0,i.recoverAddress)({hash:(0,n.hashTypedData)({domain:t,message:r,primaryType:a,types:o}),signature:s})}},97262:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseSiweMessage=function(e){let{scheme:t,statement:i,...a}=e.match(r)?.groups??{},{chainId:s,expirationTime:o,issuedAt:l,notBefore:c,requestId:u,...d}=e.match(n)?.groups??{},h=e.split("Resources:")[1]?.split("\n- ").slice(1);return{...a,...d,...s?{chainId:Number(s)}:{},...o?{expirationTime:new Date(o)}:{},...l?{issuedAt:new Date(l)}:{},...c?{notBefore:new Date(c)}:{},...u?{requestId:u}:{},...h?{resources:h}:{},...t?{scheme:t}:{},...i?{statement:i}:{}}};let r=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,n=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/},97379:(e,t,r)=>{"use strict";r.d(t,{_:()=>i});var n=r(56059);let i=(0,n.JW)` 7281 <svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewB
7281ox="0 0 10 10"> 7282 <path d="M8.37651 0H1.62309C0.381381 0 -0.405611 1.33944 0.219059 2.42225L4.38701 9.64649C4.659 10.1182 5.3406 10.1182 5.61259 9.64649L9.78139 2.42225C10.4052 1.34117 9.61822 0 8.37736 0H8.37651ZM4.38362 7.48005L3.47591 5.72329L1.2857 1.80606C1.14121 1.55534 1.31968 1.23405 1.62225 1.23405H4.38278V7.4809L4.38362 7.48005ZM8.71221 1.80521L6.52284 5.72414L5.61513 7.48005V1.2332H8.37566C8.67823 1.2332 8.85669 1.55449 8.71221 1.80521Z" fill="var(--apkt-tokens-theme-textPrimary)" /> 7283</svg> 7284`},97446:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.minInt144=t.minInt136=t.minInt128=t.minInt120=t.minInt112=t.minInt104=t.minInt96=t.minInt88=t.minInt80=t.minInt72=t.minInt64=t.minInt56=t.minInt48=t.minInt40=t.minInt32=t.minInt24=t.minInt16=t.minInt8=t.maxInt256=t.maxInt248=t.maxInt240=t.maxInt232=t.maxInt224=t.maxInt216=t.maxInt208=t.maxInt200=t.maxInt192=t.maxInt184=t.maxInt176=t.maxInt168=t.maxInt160=t.maxInt152=t.maxInt144=t.maxInt136=t.maxInt128=t.maxInt120=t.maxInt112=t.maxInt104=t.maxInt96=t.maxInt88=t.maxInt80=t.maxInt72=t.maxInt64=t.maxInt56=t.maxInt48=t.maxInt40=t.maxInt32=t.maxInt24=t.maxInt16=t.maxInt8=void 0,t.maxUint256=t.maxUint248=t.maxUint240=t.maxUint232=t.maxUint224=t.maxUint216=t.maxUint208=t.maxUint200=t.maxUint192=t.maxUint184=t.maxUint176=t.maxUint168=t.maxUint160=t.maxUint152=t.maxUint144=t.maxUint136=t.maxUint128=t.maxUint120=t.maxUint112=t.maxUint104=t.maxUint96=t.maxUint88=t.maxUint80=t.maxUint72=t.maxUint64=t.maxUint56=t.maxUint48=t.maxUint40=t.maxUint32=t.maxUint24=t.maxUint16=t.maxUint8=t.minInt256=t.minInt248=t.minInt240=t.minInt232=t.minInt224=t.minInt216=t.minInt208=t.minInt200=t.minInt192=t.minInt184=t.minInt176=t.minInt168=t.minInt160=t.minInt152=void 0,t.maxInt8=2n**(8n-1n)-1n,t.maxInt16=2n**(16n-1n)-1n,t.maxInt24=2n**(24n-1n)-1n,t.maxInt32=2n**(32n-1n)-1n,t.maxInt40=2n**(40n-1n)-1n,t.maxInt48=2n**(48n-1n)-1n,t.maxInt56=2n**(56n-1n)-1n,t.maxInt64=2n**(64n-1n)-1n,t.maxInt72=2n**(72n-1n)-1n,t.maxInt80=2n**(80n-1n)-1n,t.maxInt88=2n**(88n-1n)-1n,t.maxInt96=2n**(96n-1n)-1n,t.maxInt104=2n**(104n-1n)-1n,t.maxInt112=2n**(112n-1n)-1n,t.maxInt120=2n**(120n-1n)-1n,t.maxInt128=2n**(128n-1n)-1n,t.maxInt136=2n**(136n-1n)-1n,t.maxInt144=2n**(144n-1n)-1n,t.maxInt152=2n**(152n-1n)-1n,t.maxInt160=2n**(160n-1n)-1n,t.maxInt168=2n**(168n-1n)-1n,t.maxInt176=2n**(176n-1n)-1n,t.maxInt184=2n**(184n-1n)-1n,t.maxInt192=2n**(192n-1n)-1n,t.maxInt200=2n**(200n-1n)-1n,t.maxInt208=2n**(208n-1n)-1n,t.maxInt216=2n**(216n-1n)-1n,t.maxInt224=2n**(224n-1n)-1n,t.maxInt232=2n**(232n-1n)-1n,t.maxInt240=2n**(240n-1n)-1n,t.maxInt248=2n**(248n-1n)-1n,t.maxInt256=2n**(256n-1n)-1n,t.minInt8=-(2n**(8n-1n)),t.minInt16=-(2n**(16n-1n)),t.minInt24=-(2n**(24n-1n)),t.minInt32=-(2n**(32n-1n)),t.minInt40=-(2n**(40n-1n)),t.minInt48=-(2n**(48n-1n)),t.minInt56=-(2n**(56n-1n)),t.minInt64=-(2n**(64n-1n)),t.minInt72=-(2n**(72n-1n)),t.minInt80=-(2n**(80n-1n)),t.minInt88=-(2n**(88n-1n)),t.minInt96=-(2n**(96n-1n)),t.minInt104=-(2n**(104n-1n)),t.minInt112=-(2n**(112n-1n)),t.minInt120=-(2n**(120n-1n)),t.minInt128=-(2n**(128n-1n)),t.minInt136=-(2n**(136n-1n)),t.minInt144=-(2n**(144n-1n)),t.minInt152=-(2n**(152n-1n)),t.minInt160=-(2n**(160n-1n)),t.minInt168=-(2n**(168n-1n)),t.minInt176=-(2n**(176n-1n)),t.minInt184=-(2n**(184n-1n)),t.minInt192=-(2n**(192n-1n)),t.minInt200=-(2n**(200n-1n)),t.minInt208=-(2n**(208n-1n)),t.minInt216=-(2n**(216n-1n)),t.minInt224=-(2n**(224n-1n)),t.minInt232=-(2n**(232n-1n)),t.minInt240=-(2n**(240n-1n)),t.minInt248=-(2n**(248n-1n)),t.minInt256=-(2n**(256n-1n)),t.maxUint8=2n**8n-1n,t.maxUint16=2n**16n-1n,t.maxUint24=2n**24n-1n,t.maxUint32=2n**32n-1n,t.maxUint40=2n**40n-1n,t.maxUint48=2n**48n-1n,t.maxUint56=2n**56n-1n,t.maxUint64=2n**64n-1n,t.maxUint72=2n**72n-1n,t.maxUint80=2n**80n-1n,t.maxUint88=2n**88n-1n,t.maxUint96=2n**96n-1n,t.maxUint104=2n**104n-1n,t.maxUint112=2n**112n-1n,t.maxUint120=2n**120n-1n,t.maxUint128=2n**128n-1n,t.maxUint136=2n**136n-1n,t.maxUint144=2n**144n-1n,t.maxUint152=2n**152n-1n,t.maxUint160=2n**160n-1n,t.maxUint168=2n**168n-1n,t.maxUint176=2n**176n-1n,t.maxUint184=2n**184n-1n,t.maxUint192=2n**192n-1n,t.maxUint200=2n**200n-1n,t.maxUint208=2n**208n-1n,t.maxUint216=2n**216n-1n,t.maxUint224=2n**224n-1n,t.maxUint232=2n**232n-1n,t.maxUint240=2n**240n-1n,t.maxUint248=2n**248n-1n,t.maxUint256=2n**256n-1n},97514:(e,t,r)=>{"use strict";
7284Object.defineProperty(t,"__esModule",{value:!0}),t.getFilterChanges=a;let n=r(4466),i=r(10205);async function a(e,{filter:t}){let r="strict"in t&&t.strict,a=await t.request({method:"eth_getFilterChanges",params:[t.id]});if("string"==typeof a[0])return a;let s=a.map(e=>(0,i.formatLog)(e));return"abi"in t&&t.abi?(0,n.parseEventLogs)({abi:t.abi,logs:s,strict:r}):s}},97527:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.SHA224=t.sha256=t.SHA256=void 0;let n=r(82104);t.SHA256=n.SHA256,t.sha256=n.sha256,t.SHA224=n.SHA224,t.sha224=n.sha224},97533:(e,t)=>{"use strict";async function r(e){return e.request({method:`${e.mode}_dumpState`})}Object.defineProperty(t,"__esModule",{value:!0}),t.dumpState=r},97857:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeTypedData=function(e){let{domain:t,message:r,primaryType:n,types:i}=e,a=(e,t)=>{let r={...t};for(let t of e){let{name:e,type:n}=t;"address"===n&&(r[e]=r[e].toLowerCase())}return r},s=i.EIP712Domain&&t?a(i.EIP712Domain,t):{},o=(()=>{if("EIP712Domain"!==n)return a(i[n],r)})();return(0,d.stringify)({domain:s,message:o,primaryType:n,types:i})},t.validateTypedData=function(e){let{domain:t,message:r,primaryType:u,types:d}=e,h=(e,t)=>{for(let r of e){let{name:e,type:u}=r,p=t[e],f=u.match(c.integerRegex);if(f&&("number"==typeof p||"bigint"==typeof p)){let[e,t,r]=f;(0,l.numberToHex)(p,{signed:"int"===t,size:Number.parseInt(r,10)/8})}if("address"===u&&"string"==typeof p&&!(0,s.isAddress)(p))throw new i.InvalidAddressError({address:p});let m=u.match(c.bytesRegex);if(m){let[e,t]=m;if(t&&(0,o.size)(p)!==Number.parseInt(t,10))throw new n.BytesSizeMismatchError({expectedSize:Number.parseInt(t,10),givenSize:(0,o.size)(p)})}let g=d[u];g&&(function(e){if("address"===e||"bool"===e||"string"===e||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new a.InvalidStructTypeError({type:e})}(u),h(g,p))}};if(d.EIP712Domain&&t){if("object"!=typeof t)throw new a.InvalidDomainError({domain:t});h(d.EIP712Domain,t)}if("EIP712Domain"!==u)if(d[u])h(d[u],r);else throw new a.InvalidPrimaryTypeError({primaryType:u,types:d})},t.getTypesForEIP712Domain=h,t.domainSeparator=function({domain:e}){return(0,u.hashDomain)({domain:e,types:{EIP712Domain:h({domain:e})}})};let n=r(82311),i=r(9301),a=r(31941),s=r(63402),o=r(29813),l=r(27083),c=r(46398),u=r(52548),d=r(68508);function h({domain:e}){return["string"==typeof e?.name&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},("number"==typeof e?.chainId||"bigint"==typeof e?.chainId)&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}},97914:(e,t,r)=>{"use strict";r.d(t,{O:()=>l,u:()=>c});let n=/^(?!.*(^(?!@)|[-.@])($|[-.@]))(?:[a-z0-9-]{0,63}(?:\.[a-z0-9-]{0,63})*)?@[a-z0-9-]{0,63}$/i,i=/^(?!.*(^|[-.])($|[-.]))(?:[a-z0-9-]{0,63}\.)+sui$/i;var a=r(34410);let s=/^([a-z0-9]+(?:-[a-z0-9]+)*)$/,o=/^\d+$/,l=e=>{let t=e.split("/");if(t.length<2||t.length>3)return!1;let[r,a,l]=t;return(void 0===l||!!o.test(l))&&!!function(e){return!(e.length>235)&&(e.includes("@")?n.test(e):i.test(e))}(r)&&s.test(a)&&a.length<64},c=e=>{for(let t of e.split(/::|<|>|,/))if(t.includes("/")&&!l(t))return!1;return(0,a.mm)(e)}},97932:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setMinGasPrice=i;let n=r(27083);async function i(e,{gasPrice:t}){await e.request({method:`${e.mode}_setMinGasPrice`,params:[(0,n.numberToHex)(t)]})}},98065:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.writeContractSync=a;let n=r(57150),i=r(42350);async function a(e,t){return i.writeContract.internal(e,n.sendTransactionSync,"sendTransactionSync",t)}},98182:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFilterRequestScope=function(e,{method:t}){let r={};return"fallback"===e.transport.type&&e.transport.onResponse?.(({method:e,response:n,status:i,transport:a})=>{"success"===i&&t===e&&(r[n]=a.request)}),t=>r[t]||e.request}},98213:(e,t,r)=>{"use strict";r.d(t,{IQ:()=>d,ME:()=>u,Nx:()=>c,Sl:()=>o,uU:()=>l});var n=r(91161),i=r(50102),a=r(86911),s=r(88076);function o(e,{size:t}){if((0,i.E)(e)>t)throw new n.u({givenSize:(0,i.E)(e),maxSize:t})}function l(e,t={}){let{signed:r}=t;t.size&&o(e,{size:t.size});let n=BigInt(e);if(!r)return n;let i=(e.length-2)/2;return n<=(1n<<8n*BigInt(i)-1n)-1n?n:n-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function c(e,t={}){let r=e;if(t.size&&(o(r,{size:t.size}),r=(0,a.B)(r)),"0x00"===(0,a.B)(r))return!1;if("0x01"===(0,a.B)(r))return!0;throw new n.H2(r)}function u(e,t={}){let r=l(e,t),i=Number(r);
7284if(!Number.isSafeInteger(i))throw new n.Ty({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${r}n`});return i}function d(e,t={}){let r=(0,s.aT)(e);return t.size&&(o(r,{size:t.size}),r=(0,a.B)(r,{dir:"right"})),new TextDecoder().decode(r)}},98232:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.simulateCalls=p;let n=r(620),i=r(33440),a=r(83562),s=r(87089),o=r(13894),l=r(45226),c=r(25230),u=r(59865),d=r(77899),h=r(64057);async function p(e,t){let{blockNumber:r,blockTag:p,calls:f,stateOverrides:m,traceAssetChanges:g,traceTransfers:y,validation:b}=t,w=t.account?(0,a.parseAccount)(t.account):void 0;if(g&&!w)throw new l.BaseError("`account` is required when `traceAssetChanges` is true");let v=w?n.encode(n.from("constructor(bytes, bytes)"),{bytecode:o.deploylessCallViaBytecodeBytecode,args:["0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033",i.encodeData(i.from("function getBalance(address)"),[w.address])]}):void 0,E=g?await Promise.all(t.calls.map(async t=>{if(!t.data&&!t.abi)return;let{accessList:r}=await (0,d.createAccessList)(e,{account:w.address,...t,data:t.abi?(0,c.encodeFunctionData)(t):t.data});return r.map(({address:e,storageKeys:t})=>t.length>0?e:null)})).then(e=>e.flat().filter(Boolean)):[],C=await (0,h.simulateBlocks)(e,{blockNumber:r,blockTag:p,blocks:[...g?[{calls:[{data:v}],stateOverrides:m},{calls:E.map((e,t)=>({abi:[i.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[w.address],to:e,from:s.zeroAddress,nonce:t})),stateOverrides:[{address:s.zeroAddress,nonce:0}]}]:[],{calls:[...f,{to:s.zeroAddress}].map(e=>({...e,from:w?.address})),stateOverrides:m},...g?[{calls:[{data:v}]},{calls:E.map((e,t)=>({abi:[i.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[w.address],to:e,from:s.zeroAddress,nonce:t})),stateOverrides:[{address:s.zeroAddress,nonce:0}]},{calls:E.map((e,t)=>({to:e,abi:[i.from("function decimals() returns (uint256)")],functionName:"decimals",from:s.zeroAddress,nonce:t})),stateOverrides:[{address:s.zeroAddress,nonce:0}]},{calls:E.map((e,t)=>({to:e,abi:[i.from("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:s.zeroAddress,nonce:t})),stateOverrides:[{address:s.zeroAddress,nonce:0}]},{calls:E.map((e,t)=>({to:e,abi:[i.from("function symbol() returns (string)")],functionName:"symbol",from:s.zeroAddress,nonce:t})),stateOverrides:[{address:s.zeroAddress,nonce:0}]}]:[]],traceTransfers:y,validation:b}),A=g?C[2]:C[0],[x,I,,S,T,P,O,_]=g?C:[],{calls:N,...k}=A,R=N.slice(0,-1)??[],M=[...x?.calls??[],...I?.calls??[]].map(e=>"success"===e.status?(0,u.hexToBigInt)(e.data):null),B=[...S?.calls??[],...T?.calls??[]].map(e=>"success"===e.status?(0,u.hexToBigInt)(e.data):null),j=(P?.calls??[]).map(e=>"success"===e.status?e.result:null),U=(_?.calls??[]).map(e=>"success"===e.status?e.result:null),$=(O?.calls??[]).map(e=>"success"===e.status?e.result:null),L=[];for(let[e,t]of B.entries()){let r=M[e];if("bigint"!=typeof t||"bigint"!=typeof r)continue;let n=j[e-1],i=U[e-1],a=$[e-1],o=0===e?{address:s.ethAddress,decimals:18,symbol:"ETH"}:{address:E[e-1],decimals:a||n?Number(n??1):void 0,symbol:i??void 0};L.some(e=>e.token.address===o.address)||L.push({token:o,value:{pre:r,post:t,diff:t-r}})}return{assetChanges:L,block:k,results:R}}},98407:(e,t)=>{function r(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");
7284if(t.length<3||5===t.length||t.length>8)throw 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("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});let t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:n,scale:n?4:i,margin:t,color:{dark:r(e.color.dark||"#000000ff"),light:r(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,r){let n=t.getScale(e,r);return Math.floor((e+2*r.margin)*n)},t.qrToImageData=function(e,r,n){let i=r.modules.size,a=r.modules.data,s=t.getScale(i,n),o=Math.floor((i+2*n.margin)*s),l=n.margin*s,c=[n.color.light,n.color.dark];for(let t=0;t<o;t++)for(let r=0;r<o;r++){let u=(t*o+r)*4,d=n.color.light;t>=l&&r>=l&&t<o-l&&r<o-l&&(d=c[+!!a[Math.floor((t-l)/s)*i+Math.floor((r-l)/s)]]),e[u++]=d.r,e[u++]=d.g,e[u++]=d.b,e[u]=d.a}}},98668:(e,t,r)=>{"use strict";r.d(t,{Lm:()=>s,Lo:()=>o,X_:()=>g,ZG:()=>p,c$:()=>u,f:()=>l,nx:()=>m,pO:()=>h,q5:()=>a,xW:()=>d});var n=r(44582);function i(e,t,r){if(e instanceof Uint8Array)return r?new Uint8Array(e):e;if("string"==typeof e&&e.length%2==0&&e.match(/^0x[0-9a-f]*$/i)){let t=new Uint8Array((e.length-2)/2),r=2;for(let n=0;n<t.length;n++)t[n]=parseInt(e.substring(r,r+2),16),r+=2;return t}(0,n.MR)(!1,"invalid BytesLike value",t||"value",e)}function a(e,t){return i(e,t,!1)}function s(e,t){return i(e,t,!0)}function o(e,t){return"string"==typeof e&&!!e.match(/^0x[0-9A-Fa-f]*$/)&&("number"!=typeof t||e.length===2+2*t)&&(!0!==t||e.length%2==0)}function l(e){return o(e,!0)||e instanceof Uint8Array}let c="0123456789abcdef";function u(e){let t=a(e),r="0x";for(let e=0;e<t.length;e++){let n=t[e];r+=c[(240&n)>>4]+c[15&n]}return r}function d(e){return"0x"+e.map(e=>u(e).substring(2)).join("")}function h(e){return o(e,!0)?(e.length-2)/2:a(e).length}function p(e,t,r){let i=a(e);return null!=r&&r>i.length&&(0,n.vA)(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:i,length:i.length,offset:r}),u(i.slice(null==t?0:t,null==r?i.length:r))}function f(e,t,r){let i=a(e);(0,n.vA)(t>=i.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(i),length:t,offset:t+1});let s=new Uint8Array(t);return s.fill(0),r?s.set(i,t-i.length):s.set(i,0),u(s)}function m(e,t){return f(e,t,!0)}function g(e,t){return f(e,t,!1)}},98787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeErc6492Signature=function(e){let{address:t,data:r,signature:o,to:l="hex"}=e,c=(0,a.concatHex)([(0,i.encodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],[t,r,o]),n.erc6492MagicBytes]);return"hex"===l?c:(0,s.hexToBytes)(c)};let n=r(94034),i=r(66008),a=r(26504),s=r(60037)},98817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setNonce=i;let n=r(27083);async function i(e,{address:t,nonce:r}){await e.request({method:`${e.mode}_setNonce`,params:[t,(0,n.numberToHex)(r)]})}},98837:(e,t,r)=>{"use strict";var n=r(44168).Buffer;t.k5=function(e){{let t=n.from(e);t.reverse();let r=t.toString("hex");return 0===r.length?BigInt(0):BigInt(`0x${r}`)}},t.cI=function(e){{let t=e.toString("hex");return 0===t.length?BigInt(0):BigInt(`0x${t}`)}},t.Bq=function(e,t){{let r=e.toString(16),i=n.from(r.padStart(2*t,"0").slice(0,2*t),"hex");return i.reverse(),i}},t.zy=function(e,t){{let r=e.toString(16);return n.from(r.padStart(2*t,"0").slice(0,2*t),"hex")}}},98976:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signTransaction=d;let n=r(83562),i=r(85926),a=r(81557),s=r(27083),o=r(53520),l=r(95847),c=r(61609),u=r(80517);async function d(e,t){let{account:r=e.account,chain:d=e.chain,...h}=t;if(!r)throw new i.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTransaction"});let p=(0,n.parseAccount)(r);(0,c.assertRequest)({account:p,...t});let f=await (0,l.getAction)(e,u.getChainId,"getChainId")({});null!==d&&(0,a.assertCurrentChain)({currentChainId:f,chain:d});let m=d?.formatters||e.chain?.formatters,g=m?.transactionRequest?.format||o.formatTransactionRequest;return p.signTransaction?p.signTransaction({...h,account:p,chainId:f}
7284,{serializer:e.chain?.serializers?.transaction}):await e.request({method:"eth_signTransaction",params:[{...g({...h,account:p},"signTransaction"),chainId:(0,s.numberToHex)(f),from:p.address}]},{retryCount:0})}},99112:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockNotFoundError=void 0;let n=r(45226);class i extends n.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.`,{name:"BlockNotFoundError"})}}t.BlockNotFoundError=i},99294:(e,t,r)=>{"use strict";r.d(t,{C:()=>s});var n=r(20801),i=r(76195);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}var s=n.memo(n.forwardRef(function(e,t){var r=i.z.getPTI(e);return n.createElement("svg",a({ref:t,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),n.createElement("path",{d:"M10.7838 1.51351H9.83783V0.567568C9.83783 0.417039 9.77804 0.272676 9.6716 0.166237C9.56516 0.0597971 9.42079 0 9.27027 0C9.11974 0 8.97538 0.0597971 8.86894 0.166237C8.7625 0.272676 8.7027 0.417039 8.7027 0.567568V1.51351H5.29729V0.567568C5.29729 0.417039 5.2375 0.272676 5.13106 0.166237C5.02462 0.0597971 4.88025 0 4.72973 0C4.5792 0 4.43484 0.0597971 4.3284 0.166237C4.22196 0.272676 4.16216 0.417039 4.16216 0.567568V1.51351H3.21621C2.66428 1.51351 2.13494 1.73277 1.74467 2.12305C1.35439 2.51333 1.13513 3.04266 1.13513 3.59459V11.9189C1.13513 12.4709 1.35439 13.0002 1.74467 13.3905C2.13494 13.7807 2.66428 14 3.21621 14H10.7838C11.3357 14 11.865 13.7807 12.2553 13.3905C12.6456 13.0002 12.8649 12.4709 12.8649 11.9189V3.59459C12.8649 3.04266 12.6456 2.51333 12.2553 2.12305C11.865 1.73277 11.3357 1.51351 10.7838 1.51351ZM3.21621 2.64865H4.16216V3.59459C4.16216 3.74512 4.22196 3.88949 4.3284 3.99593C4.43484 4.10237 4.5792 4.16216 4.72973 4.16216C4.88025 4.16216 5.02462 4.10237 5.13106 3.99593C5.2375 3.88949 5.29729 3.74512 5.29729 3.59459V2.64865H8.7027V3.59459C8.7027 3.74512 8.7625 3.88949 8.86894 3.99593C8.97538 4.10237 9.11974 4.16216 9.27027 4.16216C9.42079 4.16216 9.56516 4.10237 9.6716 3.99593C9.77804 3.88949 9.83783 3.74512 9.83783 3.59459V2.64865H10.7838C11.0347 2.64865 11.2753 2.74831 11.4527 2.92571C11.6301 3.10311 11.7297 3.34371 11.7297 3.59459V5.67568H2.27027V3.59459C2.27027 3.34371 2.36993 3.10311 2.54733 2.92571C2.72473 2.74831 2.96533 2.64865 3.21621 2.64865ZM10.7838 12.8649H3.21621C2.96533 12.8649 2.72473 12.7652 2.54733 12.5878C2.36993 12.4104 2.27027 12.1698 2.27027 11.9189V6.81081H11.7297V11.9189C11.7297 12.1698 11.6301 12.4104 11.4527 12.5878C11.2753 12.7652 11.0347 12.8649 10.7838 12.8649Z",fill:"currentColor"}))}));s.displayName="CalendarIcon"},99323:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.SafeMessageStatus=t.SafeMessageListItemType=void 0,function(e){e.DATE_LABEL="DATE_LABEL",e.MESSAGE="MESSAGE"}(r||(t.SafeMessageListItemType=r={})),function(e){e.NEEDS_CONFIRMATION="NEEDS_CONFIRMATION",e.CONFIRMED="CONFIRMED"}(n||(t.SafeMessageStatus=n={}))},99347:(e,t,r)=>{"use strict";r.d(t,{Q:()=>s});let n={transactionHash:/^0x(?:[A-Fa-f0-9]{64})$/u,signedMessage:/^0x(?:[a-fA-F0-9]{62,})$/u};var i=r(47482),a=r(11558);let s={checkIfAllowedToTriggerEmail(){let e=a.o.get(i.s1.LAST_EMAIL_LOGIN_TIME);if(e){let t=Date.now()-Number(e);if(t<3e4){let e=Math.ceil((3e4-t)/1e3);throw Error(`Please try again after ${e} seconds`)}}},getTimeToNextEmailLogin(){let e=a.o.get(i.s1.LAST_EMAIL_LOGIN_TIME);if(e){let t=Date.now()-Number(e);if(t<3e4)return Math.ceil((3e4-t)/1e3)}return 0},checkIfRequestExists:e=>i.Vl.NOT_SAFE_RPC_METHODS.includes(e.method)||i.Vl.SAFE_RPC_METHODS.includes(e.method),getResponseType:e=>"string"==typeof e&&(e?.match(n.transactionHash)||e?.match(n.signedMessage))?i.s1.RPC_RESPONSE_TYPE_TX:i.s1.RPC_RESPONSE_TYPE_OBJECT,checkIfRequestIsSafe:e=>i.Vl.SAFE_RPC_METHODS.includes(e.method),isClient:"undefined"!=typeof window}},99506:(e,t,r)=>{"use strict";
7284Object.defineProperty(t,"__esModule",{value:!0}),t.createPendingTransactionFilter=i;let n=r(98182);async function i(e){let t=(0,n.createFilterRequestScope)(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:t(r),type:"transaction"}}},99727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.from=o,t.fromRpc=l,t.fromRpcList=function(e){return e.map(l)},t.fromTuple=c,t.fromTupleList=function(e){let t=[];for(let r of e)t.push(c(r));return t},t.getSignPayload=function(e){return u(e,{presign:!0})},t.hash=u,t.toRpc=d,t.toRpcList=function(e){return e.map(d)},t.toTuple=h,t.toTupleList=function(e){if(!e||0===e.length)return[];let t=[];for(let r of e)t.push(h(r));return t};let n=r(45810),i=r(70259),a=r(88432),s=r(42288);function o(e,t={}){return"string"==typeof e.chainId?l(e):{...e,...t.signature}}function l(e){let{address:t,chainId:r,nonce:n}=e,i=s.extract(e);return{address:t,chainId:Number(r),nonce:BigInt(n),...i}}function c(e){let[t,r,n,i,a,l]=e,c={address:r,chainId:"0x"===t?0:Number(t),nonce:"0x"===n?0n:BigInt(n)};return i&&a&&l&&(c={...c,...s.fromTuple([i,a,l])}),o(c)}function u(e,t={}){let{presign:r}=t;return n.keccak256(i.concat("0x05",a.fromHex(h(r?{address:e.address,chainId:e.chainId,nonce:e.nonce}:e))))}function d(e){let{address:t,chainId:r,nonce:n,...a}=e;return{address:t,chainId:i.fromNumber(r),nonce:i.fromNumber(n),...s.toRpc(a)}}function h(e){let{address:t,chainId:r,nonce:n}=e,a=s.extract(e);return[r?i.fromNumber(r):"0x",t,n?i.fromNumber(n):"0x",...a?s.toTuple(a):[]]}},99736:(e,t,r)=>{"use strict";r.d(t,{_:()=>p,K:()=>g});var n=r(80407);let{I:i}=n.ge;var a=r(24227);let s=(e,t)=>{let r=e._$AN;if(void 0===r)return!1;for(let e of r)e._$AO?.(t,!1),s(e,t);return!0},o=e=>{let t,r;do{if(void 0===(t=e._$AM))break;(r=t._$AN).delete(e),e=t}while(0===r?.size)},l=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),d(t)}};function c(e){void 0!==this._$AN?(o(this),this._$AM=e,l(this)):this._$AM=e}function u(e,t=!1,r=0){let n=this._$AH,i=this._$AN;if(void 0!==i&&0!==i.size)if(t)if(Array.isArray(n))for(let e=r;e<n.length;e++)s(n[e],!1),o(n[e]);else null!=n&&(s(n,!1),o(n));else s(this,e)}let d=e=>{e.type==a.OA.CHILD&&(e._$AP??=u,e._$AQ??=c)};class h extends a.WL{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),l(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(s(this,e),o(this))}setValue(e){if(void 0===this._$Ct.strings)this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}let p=()=>new f;class f{}let m=new WeakMap,g=(0,a.u$)(class extends h{render(e){return n.s6}update(e,[t]){let r=t!==this.G;return r&&void 0!==this.G&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),n.s6}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){let t=this.ht??globalThis,r=m.get(t);void 0===r&&(r=new WeakMap,m.set(t,r)),void 0!==r.get(this.G)&&this.G.call(this.ht,void 0),r.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return"function"==typeof this.G?m.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}})},99817:(e,t,r)=>{"use strict";function n(e,t){let r=e?.["--apkt-accent"]??e?.["--w3m-accent"];return"light"===t?{"--w3m-accent":r||"hsla(231, 100%, 70%, 1)","--w3m-background":"#fff"}:{"--w3m-accent":r||"hsla(230, 100%, 67%, 1)","--w3m-background":"#202020"}}r.d(t,{o:()=>n})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.