PageSourceSearch

https://superbowl-onchain.vercel.app/_next/static/chunks/435-378c541ccf98d745.js

js superbowl-onchain.vercel.app collected 2026-10-03 07:49:32 UTC 58,312 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[435],{95742:function(e,t,n){n.d(t,{ZP:function(){return J}});var r,i=n(54146);let a=Symbol("Comlink.proxy"),s=Symbol("Comlink.endpoint"),o=Symbol("Comlink.releaseProxy"),c=Symbol("Comlink.finalizer"),u=Symbol("Comlink.thrown"),l=e=>"object"==typeof e&&null!==e||"function"==typeof e,d=new Map([["proxy",{canHandle:e=>l(e)&&e[a],serialize(e){let{port1:t,port2:n}=new MessageChannel;return function e(t,n=globalThis,r=["*"]){n.addEventListener("message",function i(s){let o;if(!s||!s.data)return;if(!function(e,t){for(let n of e)if(t===n||"*"===n||n instanceof RegExp&&n.test(t))return!0;return!1}(r,s.origin)){console.warn(`Invalid origin '${s.origin}' for comlink proxy`);return}let{id:l,type:d,path:f}=Object.assign({path:[]},s.data),p=(s.data.argumentList||[]).map(P);try{var b,m;let n=f.slice(0,-1).reduce((e,t)=>e[t],t),r=f.reduce((e,t)=>e[t],t);switch(d){case"GET":o=r;break;case"SET":n[f.slice(-1)[0]]=P(s.data.value),o=!0;break;case"APPLY":o=r.apply(n,p);break;case"CONSTRUCT":b=new r(...p),o=Object.assign(b,{[a]:!0});break;case"ENDPOINT":{let{port1:n,port2:r}=new MessageChannel;e(t,r),m=[n],g.set(n,m),o=n}break;case"RELEASE":o=void 0;break;default:return}}catch(e){o={value:e,[u]:0}}Promise.resolve(o).catch(e=>({value:e,[u]:0})).then(e=>{let[r,a]=w(e);n.postMessage(Object.assign(Object.assign({},r),{id:l}),a),"RELEASE"===d&&(n.removeEventListener("message",i),h(n),c in t&&"function"==typeof t[c]&&t[c]())}).catch(e=>{let[t,r]=w({value:TypeError("Unserializable return value"),[u]:0});n.postMessage(Object.assign(Object.assign({},t),{id:l}),r)})}),n.start&&n.start()}(e,t),[n,[n]]},deserialize:e=>(e.start(),f(e))}],["throw",{canHandle:e=>l(e)&&u in e,serialize:({value:e})=>[e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[]],deserialize(e){if(e.isError)throw Object.assign(Error(e.value.message),e.value);throw e.value}}]]);function h(e){"MessagePort"===e.constructor.name&&e.close()}function f(e,t){let n=new Map;return e.addEventListener("message",function(e){let{data:t}=e;if(!t||!t.id)return;let r=n.get(t.id);if(r)try{r(t)}finally{n.delete(t.id)}}),function e(t,n,r=[],i=function(){}){let a=!1,c=new Proxy(i,{get(i,s){if(p(a),s===o)return()=>{y&&y.unregister(c),b(t),n.clear(),a=!0};if("then"===s){if(0===r.length)return{then:()=>c};let e=C(t,n,{type:"GET",path:r.map(e=>e.toString())}).then(P);return e.then.bind(e)}return e(t,n,[...r,s])},set(e,i,s){p(a);let[o,c]=w(s);return C(t,n,{type:"SET",path:[...r,i].map(e=>e.toString()),value:o},c).then(P)},apply(i,o,c){p(a);let u=r[r.length-1];if(u===s)return C(t,n,{type:"ENDPOINT"}).then(P);if("bind"===u)return e(t,n,r.slice(0,-1));let[l,d]=v(c);return C(t,n,{type:"APPLY",path:r.map(e=>e.toString()),argumentList:l},d).then(P)},construct(e,i){p(a);let[s,o]=v(i);return C(t,n,{type:"CONSTRUCT",path:r.map(e=>e.toString()),argumentList:s},o).then(P)}});return function(e,t){let n=(m.get(t)||0)+1;m.set(t,n),y&&y.register(e,t,e)}(c,t),c}(e,n,[],t)}function p(e){if(e)throw Error("Proxy has been released and is not useable")}function b(e){return C(e,new Map,{type:"RELEASE"}).then(()=>{h(e)})}let m=new WeakMap,y="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{let t=(m.get(e)||0)-1;m.set(e,t),0===t&&b(e)});function v(e){var t;let n=e.map(w);return[n.map(e=>e[0]),(t=n.map(e=>e[1]),Array.prototype.concat.apply([],t))]}let g=new WeakMap;function w(e){for(let[t,n]of d)if(n.canHandle(e)){let[r,i]=n.serialize(e);return[{type:"HANDLER",name:t,value:r},i]}return[{type:"RAW",value:e},g.get(e)||[]]}function P(e){switch(e.type){case"HANDLER":return d.get(e.name).deserialize(e.value);case"RAW":return e.value}}function C(e,t,n,r){return new Promise(i=>{let a=[,,,,].fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-");t.set(a,i),e.start&&e.start(),e.postMessage(Object.assign({id:a},n),r)})}let O=f((null==window?void 0:window.ReactNativeWebView)?{postMessage:e=>{console.debug("[webview:req]",e),window.ReactNativeWebView.postMessage(JSON.stringify(e))},addEventListener:function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];document.addEventListener("FarcasterFrameCallback",t,...r)},removeEventListener:(e,t)=>{document.removeEventListener("FarcasterFrameCallback",t)}}:function(e,t=globalThis,n="*"){return{postMessage:(t,r)=>e.postMessage(t,n,r),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}(null!==(r=null==window?void 0:window.parent)&&void 0!==r?r:window));
vendor: 1,397 bytes, line 1
1class E extends Error{constructor(e,t={}){let n=(()=>{if(t.cause instanceof E){if(t.cause.details)return t.cause.details;if(t.cause.shortMessage)return t.cause.shortMessage}return t.cause?.message?t.cause.message:t.details})(),r=t.cause instanceof E&&t.cause.docsPath||t.docsPath,i=`https://oxlib.sh${r??""}`;super([e||"An error occurred.",...t.metaMessages?["",...t.metaMessages]:[],...n||r?["",n?`Details: ${n}`:void 0,r?`See: ${i}`: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,"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,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:"[email protected]"}),this.cause=t.cause,this.details=n,this.docs=i,this.docsPath=r,this.shortMessage=e}walk(e){return function e(t,n){return n?.(t)?t:t&&"object"==typeof t&&"cause"in t&&t.cause?e(t.cause,n):n?null:t}(this,e)}}
1class x extends Error{constructor(e){let{code:t,message:n,data:r}=e;super(n),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.BaseError"}),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}),this.code=t,this.data=r}}class S extends x{constructor(e={}){super({message:"Missing or invalid parameters.",...e,code:S.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.InvalidInputError"})}}Object.defineProperty(S,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class j extends x{constructor(e={}){super({message:"Requested resource not found.",...e,code:j.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.ResourceNotFoundError"})}}Object.defineProperty(j,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class I extends x{constructor(e={}){super({message:"Requested resource not available.",...e,code:I.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.ResourceUnavailableError"})}}Object.defineProperty(I,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class q extends x{constructor(e={}){super({message:"Transaction creation failed.",...e,code:q.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.TransactionRejectedError"})}}Object.defineProperty(q,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class R extends x{constructor(e={}){super({message:"Method is not implemented.",...e,code:R.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.MethodNotSupportedError"})}}Object.defineProperty(R,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class A extends x{constructor(e={}){super({message:"Rate limit exceeded.",...e,code:A.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.LimitExceededError"})}}Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class M extends x{constructor(e={}){super({message:"JSON-RPC version not supported.",...e,code:M.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.VersionNotSupportedError"})}}Object.defineProperty(M,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class F extends x{constructor(e={}){super({message:"Input is not a valid JSON-RPC request.",...e,code:F.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.InvalidRequestError"})}}Object.defineProperty(F,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class k extends x{constructor(e={}){super({message:"Method does not exist.",...e,code:k.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.MethodNotFoundError"})}}Object.defineProperty(k,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class T extends x{constructor(e={}){super({message:"Invalid method parameters.",...e,code:T.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.InvalidParamsError"})}}Object.defineProperty(T,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class L extends x{constructor(e={}){super({message:"Internal JSON-RPC error.",...e,code:L.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.InternalErrorError"})}}Object.defineProperty(L,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class N extends x{constructor(e={}){super({message:"Failed to parse JSON-RPC response.",...e,code:N.code}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcResponse.ParseError"})}}Object.defineProperty(N,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});
1class D extends Error{constructor(e,t){super(t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),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}}class U extends D{constructor({message:e="The user rejected the request."}={}){super(4001,e),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.UserRejectedRequestError"})}}Object.defineProperty(U,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class G extends D{constructor({message:e="The requested method and/or account has not been authorized by the user."}={}){super(4100,e),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.UnauthorizedError"})}}Object.defineProperty(G,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class Q extends D{constructor({message:e="The provider does not support the requested method."}={}){super(4200,e),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.UnsupportedMethodError"})}}Object.defineProperty(Q,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class B extends D{constructor({message:e="The provider is disconnected from all chains."}={}){super(4900,e),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.DisconnectedError"})}}Object.defineProperty(B,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class _ extends D{constructor({message:e="The provider is not connected to the requested chain."}={}){super(4901,e),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.ChainDisconnectedError"})}}Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});
1class H extends E{constructor(){super("`provider` is undefined."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Provider.IsUndefinedError"})}}let V=function(){let e=new i.v;return{get eventNames(){return e.eventNames.bind(e)},get listenerCount(){return e.listenerCount.bind(e)},get listeners(){return e.listeners.bind(e)},addListener:e.addListener.bind(e),emit:e.emit.bind(e),off:e.off.bind(e),on:e.on.bind(e),once:e.once.bind(e),removeAllListeners:e.removeAllListeners.bind(e),removeListener:e.removeListener.bind(e)}}(),K=function(e={}){let t=e.id??0;return{prepare:e=>({...{id:t++,...e},jsonrpc:"2.0"}),get id(){return t}}}(),z=function(e,t={}){let{includeEvents:n=!0}=t;if(!e)throw new H;return{...n?{on:e.on?.bind(e),removeListener:e.removeListener?.bind(e)}:{},async request(t){let n=await e.request(t);return n&&"object"==typeof n&&"jsonrpc"in n?function(e,t={}){let{raw:n=!1}=t;if(n)return e;if(e.error){let{code:t}=e.error;throw new(t===L.code?L:t===S.code?S:t===T.code?T:t===F.code?F:t===A.code?A:t===k.code?k:t===R.code?R:t===N.code?N:t===j.code?j:t===I.code?I:t===q.code?q:t===M.code?M:x)(e.error)}return e.result}(n):n}}}({...V,request:async e=>await O.ethProviderRequest(K.prepare(e))});"undefined"!=typeof document&&document.addEventListener("FarcasterFrameEvent",e=>{MessageEvent});let W=function(){let e=new i.v;return{get eventNames(){return e.eventNames.bind(e)},get listenerCount(){return e.listenerCount.bind(e)},get listeners(){return e.listeners.bind(e)},addListener:e.addListener.bind(e),emit:e.emit.bind(e),off:e.off.bind(e),on:e.on.bind(e),once:e.once.bind(e),removeAllListeners:e.removeAllListeners.bind(e),removeListener:e.removeListener.bind(e)}}(),$={...W,context:O.context,actions:{setPrimaryButton:O.setPrimaryButton.bind(O),ready:O.ready.bind(O),close:O.close.bind(O),openUrl:O.openUrl.bind(O)},wallet:{ethProvider:z}};"undefined"!=typeof document&&document.addEventListener("FarcasterFrameEvent",e=>{e instanceof MessageEvent&&"primaryButtonClicked"===e.data.type&&W.emit("primaryButtonClicked")});var J=$},74745:function(e,t,n){n.d(t,{Ag:function(){return r.A}}),n(53489);var r=n(19440);n(61439)},95207:function(e,t,n){n.d(t,{a:function(){return l}});var r=n(27319),i=n(17897),a=n(69621),s=n(87675),o=n(45775),c=n(39028),u=n(92106);function l(e){var t;let d,h,f,p,b,m,y,v;let g=null===(t=e.isNewChainsStale)||void 0===t||t;return(0,r.K)(t=>({id:"walletConnect",name:"WalletConnect",type:l.type,async setup(){let e=await this.getProvider().catch(()=>null);e&&(b||(b=this.onConnect.bind(this),e.on("connect",b)),y||(y=this.onSessionDelete.bind(this),e.on("session_delete",y)))},async connect(){let{chainId:e,...n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let c=await this.getProvider();if(!c)throw new i.M;m||(m=this.onDisplayUri,c.on("display_uri",m));let u=e;if(!u){var r,a,s;let e=null!==(s=await (null===(r=t.storage)||void 0===r?void 0:r.getItem("state")))&&void 0!==s?s:{};u=t.chains.some(t=>t.id===e.chainId)?e.chainId:null===(a=t.chains[0])||void 0===a?void 0:a.id}if(!u)throw Error("No chains found on connector.");let l=await this.isChainsStale();if(c.session&&l&&await c.disconnect(),!c.session||l){let e=t.chains.filter(e=>e.id!==u).map(e=>e.id);await c.connect({optionalChains:[u,...e],..."pairingTopic"in n?{pairingTopic:n.pairingTopic}:{}}),this.setRequestedChainsIds(t.chains.map(e=>e.id))}let d=(await c.enable()).map(e=>(0,o.K)(e)),h=await this.getChainId();return m&&(c.removeListener("display_uri",m),m=void 0),b&&(c.removeListener("connect",b),b=void 0),f||(f=this.onAccountsChanged.bind(this),c.on("accountsChanged",f)),p||(p=this.onChainChanged.bind(this),c.on("chainChanged",p)),v||(v=this.onDisconnect.bind(this),c.on("disconnect",v)),y||(y=this.onSessionDelete.bind(this),c.on("session_delete",y)),{accounts:d,chainId:h}}catch(e){if(/(user rejected|connection request reset)/i.test(null==e?void 0:e.message))throw new c.ab(e);throw e}},async disconnect(){let e=await this.getProvider();try{await (null==e?void 0:e.disconnect())}catch(e){if(!/No matching key/i.test(e.message))throw e}finally{p&&(null==e||e.removeListener("chainChanged",p),p=void 0),v&&(null==e||e.removeListener("disconnect",v),v=void 0),b||(b=this.onConnect.bind(this),null==e||e.on("connect",b)),f&&(null==e||e.removeListener("accountsChanged",f),f=void 0),y&&(null==e||e.removeListener("session_delete",y),y=void 0),this.setRequestedChainsIds([])}},async getAccounts(){return(await this.getProvider()).accounts.map(e=>(0,o.K)(e))},async getProvider(){var r;let{chainId:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};async function s(){var r;let i=t.chains.map(e=>e.id);if(!i.length)return;let{EthereumProvider:s}=await Promise.all([n.e(1595),n.e(4108),n.e(8764),n.e(6861),n.e(451),n.e(9034)]).then(n.bind(n,96205));return await s.init({...e,disableProviderPing:!0,optionalChains:i,projectId:e.projectId,rpcMap:Object.fromEntries(t.chains.map(e=>{let[n]=(0,a.N)({chain:e,transports:t.transports});return[e.id,n]})),showQrModal:null===(r=e.showQrModal)||void 0===r||r})}return d||(h||(h=s()),null==(d=await h)||d.events.setMaxListeners(Number.POSITIVE_INFINITY)),i&&await (null===(r=this.switchChain)||void 0===r?void 0:r.call(this,{chainId:i})),d},async getChainId(){return(await this.getProvider()).chainId},async isAuthorized(){try{let[e,t]=await Promise.all([this.getAccounts(),this.getProvider()]);if(!e.length)return!1;if(await this.isChainsStale()&&t.session)return await t.disconnect().catch(()=>{}),!1;return!0}catch(e){return!1}},async switchChain(e){let{addEthereumChainParameter:n,chainId:r}=e,a=await this.getProvider();if(!a)throw new i.M;let o=t.chains.find(e=>e.id===r);if(!o)throw new c.x3(new s.X4);try{await Promise.all([new Promise(e=>{let n=i=>{let{chainId:a}=i;a===r&&(t.emitter.off("change",n),e())};t.emitter.on("change",n)}),a.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,u.eC)(r)}]})]);let e=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...e,r]),o}catch(e){if(/(user rejected)/i.test(e.message))throw new c.ab(e);try{var l,d,h,f,p;let e,t;e=(null==n?void 0:n.blockExplorerUrls)?n.blockExplorerUrls:(null===(l=o.blockExplorers)||void 0===l?void 0:l.default.url)?[null===(d=o.blockExplorers)||void 0===d?void 0:d.default.url]:[],t=(null==n?void 0:null===(h=n.rpcUrls)||void 0===h?void 0:h.length)?n.rpcUrls:[...o.rpcUrls.default.http];let i={blockExplorerUrls:e,chainId:(0,u.eC)(r),chainName:null!==(f=null==n?void 0:n.chainName)&&void 0!==f?f:
1o.name,iconUrls:null==n?void 0:n.iconUrls,nativeCurrency:null!==(p=null==n?void 0:n.nativeCurrency)&&void 0!==p?p:o.nativeCurrency,rpcUrls:t};await a.request({method:"wallet_addEthereumChain",params:[i]});let s=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...s,r]),o}catch(e){throw new c.ab(e)}}},onAccountsChanged(e){0===e.length?this.onDisconnect():t.emitter.emit("change",{accounts:e.map(e=>(0,o.K)(e))})},onChainChanged(e){let n=Number(e);t.emitter.emit("change",{chainId:n})},async onConnect(e){let n=Number(e.chainId),r=await this.getAccounts();t.emitter.emit("connect",{accounts:r,chainId:n})},async onDisconnect(e){this.setRequestedChainsIds([]),t.emitter.emit("disconnect");let n=await this.getProvider();f&&(n.removeListener("accountsChanged",f),f=void 0),p&&(n.removeListener("chainChanged",p),p=void 0),v&&(n.removeListener("disconnect",v),v=void 0),y&&(n.removeListener("session_delete",y),y=void 0),b||(b=this.onConnect.bind(this),n.on("connect",b))},onDisplayUri(e){t.emitter.emit("message",{type:"display_uri",data:e})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){var e,t,n;if(!d)return[];let r=null===(n=d.session)||void 0===n?void 0:null===(t=n.namespaces.eip155)||void 0===t?void 0:null===(e=t.accounts)||void 0===e?void 0:e.map(e=>Number.parseInt(e.split(":")[1]||""));return null!=r?r:[]},async getRequestedChainsIds(){var e,n;return null!==(n=await (null===(e=t.storage)||void 0===e?void 0:e.getItem(this.requestedChainsStorageKey)))&&void 0!==n?n:[]},async isChainsStale(){if(!g)return!1;let e=t.chains.map(e=>e.id),n=this.getNamespaceChainsIds();if(n.length&&!n.some(t=>e.includes(t)))return!1;let r=await this.getRequestedChainsIds();return!e.every(e=>r.includes(e))},async setRequestedChainsIds(e){var n;await (null===(n=t.storage)||void 0===n?void 0:n.setItem(this.requestedChainsStorageKey,e))},get requestedChainsStorageKey(){return"".concat(this.id,".requestedChains")}}))}l.type="walletConnect"},44702:function(e,t,n){async function r(e,t){return e({method:"eth_getCode",params:[t.address,t.blockTag||"latest"]})}n.d(t,{c:function(){return s}});var i=n(98511);let a=new WeakMap;function s(e){if(a.has(e))return a.get(e);let t=(async()=>{let t=(0,i.getRpcClient)(e),n=await r(t,{address:e.address,blockTag:"latest"});return"0x"===n&&a.delete(e),n})();return a.set(e,t),t}},50541:function(e,t,n){n.d(t,{w:function(){return ep}});var r=n(85893),i=n(67294);let a={async getItem(e){try{if("undefined"!=typeof window&&window.localStorage)return localStorage.getItem(e)}catch{}return null},async setItem(e,t){try{"undefined"!=typeof window&&window.localStorage&&localStorage.setItem(e,t)}catch{}},async removeItem(e){"undefined"!=typeof window&&window.localStorage&&localStorage.removeItem(e)}};var s=n(95810);function o(e,t,n=!0){n&&e();let r=t.map(t=>t.subscribe(()=>{e()}));return()=>{for(let e of r)e()}}var c=n(83339),u=n(75100);let l="tw:connected-wallet-params";async function d(e,t){let n;let r=await e.getItem(l);if(r){try{n=JSON.parse(r)}catch{n={}}delete n[t],e.setItem(l,(0,u.P)(n))}}var h=n(88615),f=n(99910);async function p({client:e,ecosystem:t,data:n}){let r=(0,f.NX)(e,t),i={source:"sdk",...n};return r(`${(0,h.TS)("analytics")}/event`,{method:"POST",body:(0,u.P)(i)}).catch(()=>{})}async function b(e){let{client:t,ecosystem:n,walletType:r,walletAddress:i,chainId:a}=e;return p({client:t,ecosystem:n,data:{source:"connectWallet",action:"connect",walletType:r,walletAddress:i,chainId:a}})}var m=n(57621),y=n(90766),v=n(60689),g=n(49329);let w="thirdweb:connected-wallet-ids",P="thirdweb:active-wallet-id",C="thirdweb:active-chain";async function O(e){try{let t=await e.getItem(w);if(t)return JSON.parse(t);return[]}catch{return[]}}async function E(e){try{let t=await e.getItem(P);if(t)return t}catch{}return null}let x=async(e,t,r,i)=>{let a=e.getAccount();if(!a)throw Error("Cannot set a wallet without an account as active");let o=function(e){let t,r,i,a;let o=function(){let e=new Map;return{subscribe:(t,n)=>(e.has(t)?e.get(t)?.add(n):e.set(t,new Set([n])),()=>{let r=e.get(t);r&&r.delete(n)}),emit(t,n){let r=e.get(t);if(r)for(let e of r)e(n)}}}();return{id:"smart",subscribe:o.subscribe,getChain(){if(a)return a=(0,s.rT)(a.id)||a},getConfig:()=>e,getAccount:()=>r,getAdminAccount:()=>i,autoConnect:async i=>{let{connectSmartAccount:s}=await Promise.all([n.e(2947),n.e(3253)]).then(n.bind(n,63253)),[o,c]=await s(i,e);return t=i,r=o,a=c,b({client:i.client,walletType:"smart",walletAddress:r.address,chainId:a.id}),r},connect:async s=>{let{connectSmartAccount:c}=await Promise.all([n.e(2947),n.e(3253)]).then(n.bind(n,63253)),[u,l]=await c(s,e);return i=s.personalAccount,t=s,r=u,a=l,b({client:s.client,walletType:"smart",walletAddress:r.address,chainId:a.id}),o.emit("accountChanged",r),r},disconnect:async()=>
1{if(r){let{disconnectSmartAccount:e}=await Promise.all([n.e(2947),n.e(3253)]).then(n.bind(n,63253));await e(r)}r=void 0,i=void 0,a=void 0,o.emit("disconnect",void 0)},switchChain:async i=>{if(!t)throw Error("Cannot switch chain without a previous connection");if(!await (0,y.T)(i)){let n=(0,m.u)({address:e.factoryAddress||(0,g.yc)(e.overrides?.entrypointAddress),chain:i,client:t.client});if(!await (0,v.isContractDeployed)(n))throw Error(`Factory contract not deployed on chain: ${i.id}`)}let{connectSmartAccount:s}=await Promise.all([n.e(2947),n.e(3253)]).then(n.bind(n,63253)),[c,u]=await s({...t,chain:i},e);r=c,a=u,o.emit("chainChanged",i)}}}(r);await o.connect({personalAccount:a,client:t,chain:r.chain});let c=e.subscribe("disconnect",()=>{u()}),u=()=>{c(),i(o)};return o};var S="undefined"==typeof window||"Deno"in globalThis;function j(){}function I(e,t){return"function"==typeof e?e(t):e}function q(e,t){let{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(r){if(t.queryHash!==A(s,t.options))return!1}else if(!F(t.queryKey,s))return!1}if("all"!==n){let e=t.isActive();if("active"===n&&!e||"inactive"===n&&e)return!1}return("boolean"!=typeof o||t.isStale()===o)&&(!i||i===t.state.fetchStatus)&&(!a||!!a(t))}function R(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(M(t.options.mutationKey)!==M(a))return!1}else if(!F(t.options.mutationKey,a))return!1}return(!r||t.state.status===r)&&(!i||!!i(t))}function A(e,t){return(t?.queryKeyHashFn||M)(e)}function M(e){return JSON.stringify(e,(e,t)=>L(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function F(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(n=>!F(e[n],t[n]))}function k(e,t){if(e===t)return e;let n=T(e)&&T(t);if(n||L(e)&&L(t)){let r=n?e:Object.keys(e),i=r.length,a=n?t:Object.keys(t),s=a.length,o=n?[]:{},c=0;for(let i=0;i<s;i++){let s=n?i:a[i];(!n&&r.includes(s)||n)&&void 0===e[s]&&void 0===t[s]?(o[s]=void 0,c++):(o[s]=k(e[s],t[s]),o[s]===e[s]&&void 0!==e[s]&&c++)}return i===s&&c===i?e:o}return t}function T(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function L(e){if(!N(e))return!1;let t=e.constructor;if(void 0===t)return!0;let n=t.prototype;return!!(N(n)&&n.hasOwnProperty("isPrototypeOf"))&&Object.getPrototypeOf(e)===Object.prototype}function N(e){return"[object Object]"===Object.prototype.toString.call(e)}function D(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function U(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var G=Symbol();function Q(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==G?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}var B=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=e=>setTimeout(e,0),a=r=>{t?e.push(r):i(()=>{n(r)})},s=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{--t||s()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}(),_=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},H=new class extends _{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!S&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:globalThis.document?.visibilityState!=="hidden"}},V=new class extends _{#r=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!S&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n
1)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#r!==e&&(this.#r=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#r}};function K(e){return Math.min(1e3*2**e,3e4)}function z(e){return(e??"online")!=="online"||V.isOnline()}var W=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function $(e){return e instanceof W}function J(e){let t,n=!1,r=0,i=!1,a=function(){let e,t;let n=new Promise((n,r)=>{e=n,t=r});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch(()=>{}),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}(),s=()=>H.isFocused()&&("always"===e.networkMode||V.isOnline())&&e.canRun(),o=()=>z(e.networkMode)&&e.canRun(),c=n=>{i||(i=!0,e.onSuccess?.(n),t?.(),a.resolve(n))},u=n=>{i||(i=!0,e.onError?.(n),t?.(),a.reject(n))},l=()=>new Promise(n=>{t=e=>{(i||s())&&n(e)},e.onPause?.()}).then(()=>{t=void 0,i||e.onContinue?.()}),d=()=>{let t;if(i)return;let a=0===r?e.initialPromise:void 0;try{t=a??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(c).catch(t=>{if(i)return;let a=e.retry??(S?0:3),o=e.retryDelay??K,c="function"==typeof o?o(r,t):o,h=!0===a||"number"==typeof a&&r<a||"function"==typeof a&&a(r,t);if(n||!h){u(t);return}r++,e.onFail?.(r,t),new Promise(e=>{setTimeout(e,c)}).then(()=>s()?void 0:l()).then(()=>{n?u(t):d()})})};return{promise:a,cancel:t=>{i||(u(new W(t)),e.abort?.())},continue:()=>(t?.(),a),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:o,start:()=>(o()?d():l().then(d),a)}}var X=class{#i;destroy(){this.clearGcTimeout()}scheduleGc(){var e;this.clearGcTimeout(),"number"==typeof(e=this.gcTime)&&e>=0&&e!==1/0&&(this.#i=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(S?1/0:3e5))}clearGcTimeout(){this.#i&&(clearTimeout(this.#i),this.#i=void 0)}},Y=class extends X{#a;#s;#o;#c;#u;#l;constructor(e){super(),this.#l=!1,this.#u=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#a=function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=e.state??this.#a,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#c?.promise}setOptions(e){this.options={...this.#u,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#o.remove(this)}setData(e,t){var n,r;let i=(n=this.state.data,"function"==typeof(r=this.options).structuralSharing?r.structuralSharing(n,e):!1!==r.structuralSharing?k(n,e):e);return this.#d({data:i,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),i}setState(e,t){this.#d({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#c?.promise;return this.#c?.cancel(e),t?t.then(j).catch(j):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#a)}isActive(){return this.observers.some(e=>{var t;return!1!==("function"==typeof(t=e.options.enabled)?t(this):t)})}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===G||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!Math.max(this.state.dataUpdatedAt+(e||0)-Date.now(),0)}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#c?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#c?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#o.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#c&&(this.#l?this.#c.cancel({revert:!0}):this.#c.cancelRetry()),this.scheduleGc()),this.#o.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#d({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#c)return this.#c.continueRetry(),this.#c.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#l=!0,n.signal)}
1)},i={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{let e=Q(this.options,t),n={queryKey:this.queryKey,meta:this.meta};return(r(n),this.#l=!1,this.options.persister)?this.options.persister(e,n,this):e(n)}};r(i),this.options.behavior?.onFetch(i,this),this.#s=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==i.fetchOptions?.meta)&&this.#d({type:"fetch",meta:i.fetchOptions?.meta});let a=e=>{$(e)&&e.silent||this.#d({type:"error",error:e}),$(e)||(this.#o.config.onError?.(e,this),this.#o.config.onSettled?.(this.state.data,e,this)),this.scheduleGc()};return this.#c=J({initialPromise:t?.initialPromise,fn:i.fetchFn,abort:n.abort.bind(n),onSuccess:e=>{if(void 0===e){a(Error(`${this.queryHash} data is undefined`));return}try{this.setData(e)}catch(e){a(e);return}this.#o.config.onSuccess?.(e,this),this.#o.config.onSettled?.(e,this.state.error,this),this.scheduleGc()},onError:a,onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}),this.#c.start()}#d(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":var n;return{...t,...(n=t.data,{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:z(this.options.networkMode)?"fetching":"paused",...void 0===n&&{error:null,status:"pending"}}),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let r=e.error;if($(r)&&r.revert&&this.#s)return{...this.#s,fetchStatus:"idle"};return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),B.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#o.notify({query:this,type:"updated",action:e})})}},Z=class extends _{constructor(e={}){super(),this.config=e,this.#h=new Map}#h;build(e,t,n){let r=t.queryKey,i=t.queryHash??A(r,t),a=this.get(i);return a||(a=new Y({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#h.has(e.queryHash)||(this.#h.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#h.get(e.queryHash);t&&(e.destroy(),t===e&&this.#h.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){B.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#h.get(e)}getAll(){return[...this.#h.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>q(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>q(e,t)):t}notify(e){B.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){B.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){B.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ee=class extends X{#f;#p;#c;constructor(e){super(),this.mutationId=e.mutationId,this.#p=e.mutationCache,this.#f=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#f.includes(e)||(this.#f.push(e),this.clearGcTimeout(),this.#p.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#f=this.#f.filter(t=>t!==e),this.scheduleGc(),this.#p.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#f.length||("pending"===this.state.status?this.scheduleGc():this.#p.remove(this))}continue(){return this.#c?.continue()??this.execute(this.state.variables)}async execute(e){this.#c=J({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#p.canRun(this)});let t="pending"===this.state.status,n=!this.#c.canStart();try{if(!t){this.#d({type:"pending",variables:e,isPaused:n}),await this.#p.config.onMutate?.(e,this);let t=await this.options.onMutate?.(e);t!==this.state.context&&this.#d({type:"pending",context:t,variables:e,isPaused:n})}let r=await this.#c.start();return await this.#p.config.onSuccess?.(r,e,this.state.context,this),await this.options.onSuccess?.(r,e,this.state.context),await this.#p.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,e,this.state.context),this.#d({type:"success",data:r}),r}catch(t){try{throw await this.#p.config.onError?.(t,e,this.state.context,this),await this.options.onError?.(t,e,this.state.context),await this.#p.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,t,e,this.state.context),t}finally{this.#d({type:"error",error:t})}}finally{this.#p.runNext(this)}}#d(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};
1case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),B.batch(()=>{this.#f.forEach(t=>{t.onMutationUpdate(e)}),this.#p.notify({mutation:this,type:"updated",action:e})})}},et=class extends _{constructor(e={}){super(),this.config=e,this.#b=new Set,this.#m=new Map,this.#y=0}#b;#m;#y;build(e,t,n){let r=new ee({mutationCache:this,mutationId:++this.#y,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#b.add(e);let t=en(e);if("string"==typeof t){let n=this.#m.get(t);n?n.push(e):this.#m.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#b.delete(e)){let t=en(e);if("string"==typeof t){let n=this.#m.get(t);if(n){if(n.length>1){let t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&this.#m.delete(t)}}}this.notify({type:"removed",mutation:e})}canRun(e){let t=en(e);if("string"!=typeof t)return!0;{let n=this.#m.get(t),r=n?.find(e=>"pending"===e.state.status);return!r||r===e}}runNext(e){let t=en(e);if("string"!=typeof t)return Promise.resolve();{let n=this.#m.get(t)?.find(t=>
1t!==e&&t.state.isPaused);return n?.continue()??Promise.resolve()}}clear(){B.batch(()=>{this.#b.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#b.clear(),this.#m.clear()})}getAll(){return Array.from(this.#b)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>R(t,e))}findAll(e={}){return this.getAll().filter(t=>R(e,t))}notify(e){B.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return B.batch(()=>Promise.all(e.map(e=>e.continue().catch(j))))}};function en(e){return e.options.scope?.id}function er(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],s=t.state.data?.pageParams||[],o={pages:[],pageParams:[]},c=0,u=async()=>{let n=!1,u=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",()=>{n=!0}),t.signal)})},l=Q(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);let a={queryKey:t.queryKey,pageParam:r,direction:i?"backward":"forward",meta:t.options.meta};u(a);let s=await l(a),{maxPages:o}=t.options,c=i?U:D;return{pages:c(e.pages,s,o),pageParams:c(e.pageParams,r,o)}};if(i&&a.length){let e="backward"===i,t={pages:a,pageParams:s},n=(e?function(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}:ei)(r,t);o=await d(t,n,e)}else{let t=e??a.length;do{let e=0===c?s[0]??r.initialPageParam:ei(r,o);if(c>0&&null==e)break;o=await d(o,e),c++}while(c<t)}return o};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function ei(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}var ea=class{#v;#p;#u;#g;#w;#P;#C;#O;constructor(e={}){this.#v=e.queryCache||new Z,this.#p=e.mutationCache||new et,this.#u=e.defaultOptions||{},this.#g=new Map,this.#w=new Map,this.#P=0}mount(){this.#P++,1===this.#P&&(this.#C=H.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#v.onFocus())}),this.#O=V.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#v.onOnline())}))}unmount(){this.#P--,0===this.#P&&(this.#C?.(),this.#C=void 0,this.#O?.(),this.#O=void 0)}isFetching(e){return this.#v.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#p.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#v.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#v.build(this,t),r=n.state.data;return void 0===r?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(I(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#v.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#v.get(r.queryHash),a=i?.state.data,s="function"==typeof t?t(a):t;if(void 0!==s)return this.#v.build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return B.batch(()=>this.#v.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#v.get(t.queryHash)?.state}removeQueries(e){let t=this.#v;B.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#v,r={type:"active",...e};return B.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){let n={revert:!0,...t};return Promise.all(B.batch(()=>this.#v.findAll(e).map(e=>e.cancel(n)))).then(j).catch(j)}invalidateQueries(e,t={}){return B.batch(()=>{if(this.#v.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")return Promise.resolve();let n={...e,type:e?.refetchType??e?.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(B.batch(()=>this.#v.findAll(e).filter(e=>!e.isDisabled()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(j)),"paused"===e.state.fetchStatus?Promise.resolve():t}
1))).then(j)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let n=this.#v.build(this,t);return n.isStaleByTime(I(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(j).catch(j)}fetchInfiniteQuery(e){return e.behavior=er(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(j).catch(j)}ensureInfiniteQueryData(e){return e.behavior=er(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return V.isOnline()?this.#p.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#v}getMutationCache(){return this.#p}getDefaultOptions(){return this.#u}setDefaultOptions(e){this.#u=e}setQueryDefaults(e,t){this.#g.set(M(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#g.values()],n={};return t.forEach(t=>{F(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#w.set(M(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#w.values()],n={};return t.forEach(t=>{F(e,t.mutationKey)&&(n={...n,...t.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#u.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=A(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===G&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#u.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#v.clear(),this.#p.clear()}},es=i.createContext(void 0),eo=({client:e,children:t})=>(i.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,r.jsx)(es.Provider,{value:e,children:t})),ec=n(70),eu=n(96033);function el(e,t){return!function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){let r,i;if(t.constructor!==n.constructor)return!1;if(Array.isArray(t)&&Array.isArray(n)){if((r=t.length)!==n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();let a=Object.keys(t);if((r=a.length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;0!=i--;){let r=a[i];if(r&&!e(t[r],n[r]))return!1}return!0}return t!=t&&n!=n}(e,t)?k(e,t):e}let ed=(0,i.createContext)(()=>{}),eh=(0,i.createContext)(void 0);function ef(e){let[t,n]=(0,i.useState)(null),[a]=(0,i.useState)(()=>new ea({defaultOptions:{mutations:{onSettled:(e,t,n)=>{(0,eu.L)(n,["__contract"])&&(0,eu.L)(n.__contract,["address","chain"])&&"string"==typeof n.__contract.address&&(0,eu.L)(e,["transactionHash"])&&(0,eu.L)(n,["client","chain"])&&(0,ec.h)({transactionHash:e.transactionHash,client:n.client,chain:n.chain}).catch(e=>{console.error("[Transaction Error]",e)}).then(()=>{var e;return Promise.all([a.invalidateQueries({queryKey:["readContract",n.__contract?.chain.id,n.__contract?.address]}),(e=n.__contract?.chain.id,a.invalidateQueries({queryKey:e?["walletBalance",e]:["walletBalance"]}))])})}},queries:{staleTime:6e4,structuralSharing:el}}}));return(0,r.jsx)(eh.Provider,{value:e.manager,children:(0,r.jsxs)(eo,{client:a,children:[(0,r.jsx)(ed.Provider,{value:n,children:e.children}),t]})})}function ep(e){let t=(0,i.useMemo)(()=>e.connectionManager||function(e){let t=(0,c.M)(void 0),n=(0,c.M)(void 0),r=(0,c.M)(void 0),i=(0,c.M)("disconnected"),a=(0,c.M)(new Map);o(()=>{(0,s.vr)([...a.getValue().values()])},[a]),o(()=>{let e=r.getValue();if(!e)return;let t=a.getValue().get(e.id);t&&t!==e&&r.setValue(t)},[a,r]);let l=(0,c.M)(new Map),h=(0,c.M)(!1),f=function(e,t){let n=new Set,r=e(),i=()=>{for(let e of n)e()},a=e=>{r=e,i()};for(let n of t)n.subscribe(()=>{a(e())});return{getValue:()=>r,subscribe:e=>(n.add(e),()=>{n.delete(e)})}}(()=>Array.from(l.getValue().values()),[l]),p=e=>{let t=l.getValue();if(t.has(e.id))return;let n=new Map(t);n.set(e.id,e),l.setValue(n)},b=e=>{let t=new Map(l.getValue());t.delete(e.id),l.setValue(t)},m=a=>{d(e,a.id),b(a),t.getValue()===a&&(e.removeItem(P),n.setValue(void 0),r.setValue(void 0),t.setValue(void 0),i.setValue("disconnected"))},y=async(t,n)=>{if(!t.getAccount())throw Error("Cannot set a wallet without an account as active");let r=await (async()=>n?.accountAbstraction&&!function(e){let t=e?.getConfig();return void 0!==e&&("smart"===e.id||"inApp"===e.id&&!!t&&"smartAccount"in t||("string"==typeof e?e.startsWith("ecosystem."):e.id.startsWith("ecosystem."))&&!!t&&"smartAccount"in t)}(t)?await x(t,n.client,n.accountAbstraction,m):t)();return await e.setItem(P,t.id),p(t),g(r),t.subscribe("accountChanged",async()=>{let e=await y(t,n);n?.onConnect?.(e)}),r},v=async(e,t)=>{let n=await y(e,t);return t?.onConnect?.(n),n},g=e=>{let a=e.getAccount();if(!a)throw Error("Cannot set a wallet without an account as active");p(e),t.setValue(e),n.setValue(a),r.setValue(e.getChain()),i.setValue("connected");let s=e.subscribe("accountChanged",e=>{n.setValue(e)}),o=e.subscribe("chainChanged",e=>r.setValue(e)),c=e.subscribe("disconnect",()=>{u()}),u=()=>{m(e),s(),o(),c()}},S=async t=>{g(t),"smart"!==t.id&&await e.setItem(P,t.id)};o(()=>{let t=r.getValue();t?e.setItem(C,(0,u.P)(t)):e.removeItem(C)},[r],!1),o(async()=>{let t=await O(e)||[],n=f.getValue().map(e=>e?.id).filter(e=>!!e);e.setItem(w,(0,u.P)(Array.from(new Set([...t,...n]))))},[f],!1);let j=async n=>{let i=t.getValue();if(!i)throw Error("No active wallet found");if(!i.switchChain)throw Error("Wallet does not support switching chains");if("smart"===i.id){let t=await E(e);if(t){let e=f.getValue().find(e=>e.id===t);e&&await e.switchChain(n)}await i.switchChain(n),g(i)}else await i.switchChain(n);r.setValue(i.getChain())};return{activeWalletStore:t,activeAccountStore:n,connectedWallets:f,addConnectedWallet:p,disconnectWallet:e=>{m(e),e.disconnect()}
1,setActiveWallet:S,connect:v,handleConnection:y,activeWalletChainStore:r,switchActiveWalletChain:j,activeWalletConnectionStatusStore:i,isAutoConnecting:h,removeConnectedWallet:b,defineChains:function(e){let t=a.getValue();if(e.every(e=>{let n=t.get(e.id);return(0,u.P)(n)===(0,u.P)(e)}))return;let n=new Map(t);for(let t of e)n.set(t.id,t);a.setValue(n)}}}(a),[e.connectionManager]);return(0,r.jsx)(ef,{manager:t,children:e.children})}},83339:function(e,t,n){n.d(t,{M:function(){return r}});function r(e){let t=new Set,n=e,r=()=>{for(let e of t)e()};return{getValue:()=>n,setValue(e){e!==n&&(n=e,r())},subscribe:e=>(t.add(e),()=>{t.delete(e)})}}},70:function(e,t,n){n.d(t,{h:function(){return h}});var r=n(38568),i=n(60365);let a={"0x0":"reverted","0x1":"success"};async function s(e,t){let n=await e({method:"eth_getTransactionReceipt",params:[t.hash]});if(!n)throw Error("Transaction receipt not found.");return function(e){let t={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(e=>(function(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}})(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,r.ly)(e.transactionIndex):null,status:e.status?a[e.status]:null,type:e.type?i.c8[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}(n)}var o=n(98511),c=n(75403);async function u(e){let t=await e({method:"eth_blockNumber"});return(0,c.y_)(t)}let l=new Map,d=new Map;function h(e){let{transactionHash:t,chain:n,client:r}=e,i=n.id,a=`${i}:tx_${t}`,c=e.maxBlocksWaitTime??100;if(d.has(a))return d.get(a);let h=new Promise((e,i)=>{t||i(Error("Transaction has no transactionHash to wait for, did you execute it?"));let a=(0,o.getRpcClient)({client:r,chain:n}),d=-1,h=function(e){let{client:t,chain:n,onNewBlockNumber:r,overPollRatio:i,latestBlockNumber:a,onError:s}=e,c=n.id,d=l.get(c);return d||(d=function(e,t,n,r){let i,a,s=[],c=[],l=!1,d=(0,o.getRpcClient)({client:e,chain:t});async function h(){var e;if(!l)return;try{let e=await u(d);if(!i||e>i){let t=[];if(i)for(let n=i+1n;n<=e;n++)t.push(BigInt(n));else t=[e];i=e;let n=new Date().getTime();if(a){let e=(n-a)/t.length;c.push(e),c=c.slice(-10)}for(let e of(a=n,t))for(let t of s)t(e)}}catch(e){r?r(e):console.error(`[watchBlockNumber]: Failed to poll for latest block number: ${e}`)}let t=function(e){for(;e.length<10;)e.unshift(1e3);return e.reduce((e,t)=>e+t,0)/e.length}(c);await (e=Math.max(500,Math.min(5e3,Math.max(500,t)))/(n??2),new Promise(t=>setTimeout(t,e))),h()}return function(e,t){return s.push(e),l||(i=t,l=!0,h()),function(){0===(s=s.filter(t=>t!==e)).length&&(i=void 0,a=void 0,l=!1)}}}(t,n,i,s),l.set(c,d)),d(r,a)}({client:r,chain:n,onNewBlockNumber:async()=>{if(++d>=c){h(),i(Error(`Transaction not found after ${c} blocks`));return}try{let n=await s(a,{hash:t});h(),e(n)}catch{}}})}).finally(()=>{d.delete(a)});return d.set(a,h),h}},90766:function(e,t,n){n.d(t,{T:function(){return r}});async function r(e){if(1337===e.id||31337===e.id)return!1;if(324===e.id||300===e.id||302===e.id||11124===e.id||282===e.id||388===e.id||4654===e.id||333271===e.id||37111===e.id||978658===e.id||531050104===e.id||4457845===e.id||2741===e.id||240===e.id||61166===e.id||555271===e.id)return!0;try{let{getChainMetadata:t}=await Promise.resolve().then(n.bind(n,95810)),r=await t(e);return"zksync_stack"===r.stackType}catch{return!1}}},60689:function(e,t,n){n.d(t,{isContractDeployed:function(){return a}});var r=n(44702);let i=new WeakSet;async function a(e){if(i.has(e))return!0;let t="0x"!==await (0,r.c)(e);return t&&i.add(e),t}},96033:function(e,t,n){n.d(t,{L:function(){return r}});function r(e,t=[]){return"object"==typeof e&&null!==e&&t.every(t=>t in e)}},49329:function(e,t,n){n.d(t,{Ex:function(){return s},JK:function(){return o},Ld:function(){return a},Rg:function(){return l},X_:function(){return c},bI:function(){return d},yc:function(){return u}});var r=n(4159),i=n(88615);let a="0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c",s="0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",o="0x0000000071727De22E5E9d8BAf0edAc6f37da032",c=50000n,u=e=>"v0.7"===d(e||s)?"0x4be0ddfebca9a5a4a617dee4dece99e7c862dceb":"0x85e23b94e7F5E9cC1fF78BCe78cfb15B81f0DF00",l=e=>{let t=(0,i.gc)().bundler;return t.startsWith("localhost:")?`http://${t}/v2?chain=${e.id}`:`https://${e.id}.${t}/v2`},d=e=>{let t=(0,r.Kn)(e);if(t===s)return"v0.6";if(t===o)return"v0.7";throw Error("Unknown paymaster version")}},60365:function(e,t,n){n.d(t,{Tr:function(){return a},c8:function(){return i}});var r=n(38568);let i={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function a(e){let t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,r.ly)(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,r.ly)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?i[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&&(t.authorizationList=e.authorizationList.map(e=>({contractAddress:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))),t.yParity=(()=>
vendor: 457 bytes, line 1
1{if(e.yParity)return Number(e.yParity);if("bigint"==typeof t.v){if(0n===t.v||27n===t.v)return 0;if(1n===t.v||28n===t.v)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),"eip1559"===t.type&&delete t.maxFeePerBlobGas,t}}}]);

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.