PageSourceSearch

https://ropewalk.ai/_nuxt/YIcK5mCM.js

js ropewalk.ai collected 2026-10-04 08:48:09 UTC 133,946 bytes, 9 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./mkwhES5o.js","./C7rMs0VH.js","./BSkuAcN_.js","./l4C9NMIh.js","./DBATLGkU.js","./h0S_6rT-.js","./B3c2erOl.js","./CpZS6rWy.js","./entry.CWv5HPux.css","./Dkw55FxL.js","./PDETlo0q.js","./BniwAP0G.js","./C4R15-Vr.js","./BPRMtz6u.js","./mf1ue7NN.js","./_NfdDj1P.js","./cB2vfAm7.js","./CATab8NB.js","./BGp4VDwc.js","./_E0t1bkO.js","./yv42iqqs.js","./BZFwE5KO.js","./CTDahmF8.js","./Be2aJkTz.js","./DxjEPaVT.js","./Ve-CtsTV.js","./BIUoEUl3.js","./AGleksi-.js","./7ohF3EyX.js","./3MiRDEv2.js","./BB6uTMF5.js","./XlM2ZTGe.js","./BGXB0mVV.js","./DIwirM5T.js","./DJ7fpMin.js","./DynGsxCk.js","./-RLepPWM.js","./D2G3i07Q.js","./BgzGUjBO.js","./TGroBBFr.js","./xStnNnlI.js","./Bs7SQsRn.js","./hlTiqTPe.js","./LA7tM4y5.js","./H-Ckw-g_.js","./Caj0LqM-.js","./Bz5QQgeN.js","./PuKmsKR3.js"])))=>i.map(i=>d[i]);
2import{ak as oe,aX as yr}from"./CpZS6rWy.js";import{a8 as R,q as F,al as q,x as k,n as Pe,a6 as cn,o as mt,aj as vr,az as br,ai as Mr,ae as Ir}from"./BSkuAcN_.js";import{E as Cr}from"./BPRMtz6u.js";import{p as un,c as dn,e as hn,b as ln,s as fn,o as pn,a as mn}from"./XlM2ZTGe.js";import{p as gn,b as wn,m as yn}from"./3MiRDEv2.js";import{b as Ge,a as zr}from"./cB2vfAm7.js";import{w as xt,r as gt}from"./7ohF3EyX.js";const _r="2.22.1",Dr=()=>`@wagmi/core@${_r}`;var Ui=function(e,t,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(e):i?i.value:t.get(e)},He,qi;let $t=class bt extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return Dr()}constructor(t,n={}){super(),He.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const i=n.cause instanceof bt?n.cause.details:n.cause?.message?n.cause.message:n.details,r=n.cause instanceof bt&&n.cause.docsPath||n.docsPath;this.message=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...r?[`Docs: ${this.docsBaseUrl}${r}.html${n.docsSlug?`#${n.docsSlug}`:""}`]:[],...i?[`Details: ${i}`]:[],`Version: ${this.version}`].join(`
3`),n.cause&&(this.cause=n.cause),this.details=i,this.docsPath=r,this.metaMessages=n.metaMessages,this.shortMessage=t}walk(t){return Ui(this,He,"m",qi).call(this,this,t)}};He=new WeakSet,qi=function e(t,n){return n?.(t)?t:t.cause?Ui(this,He,"m",e).call(this,t.cause,n):t};class ee extends $t{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class Nr extends $t{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class H extends $t{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}Lt.type="injected";function Lt(e={}){const{shimDisconnect:t=!0,unstable_shimAsyncInject:n}=e;function i(){const u=e.target;if(typeof u=="function"){const c=u();if(c)return c}return typeof u=="object"?u:typeof u=="string"?{...jr[u]??{id:u,name:`${u[0].toUpperCase()}${u.slice(1)}`,provider:`is${u[0].toUpperCase()}${u.slice(1)}`}}:{id:"injected",name:"Injected",provider(c){return c?.ethereum}}}let r,o,s,a;return u=>({get icon(){return i().icon},get id(){return i().id},get name(){return i().name},get supportsSimulation(){return!0},type:Lt.type,async setup(){const c=await this.getProvider();c?.on&&e.target&&(s||(s=this.onConnect.bind(this),c.on("connect",s)),r||(r=this.onAccountsChanged.bind(this),c.on("accountsChanged",r)))},async connect({chainId:c,isReconnecting:d,withCapabilities:m}={}){const l=await this.getProvider();if(!l)throw new H;let p=[];if(d)p=await this.getAccounts().catch(()=>[]);else if(t)try{p=(await l.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0]?.caveats?.[0]?.value?.map(g=>R(g)),p.length>0&&(p=await this.getAccounts())}catch(w){const g=w;if(g.code===k.code)throw new k(g);if(g.code===Pe.code)throw g}try{!p?.length&&!d&&(p=(await l.request({method:"eth_requestAccounts"})).map(C=>R(C))),s&&(l.removeListener("connect",s),s=void 0),r||(r=this.onAccountsChanged.bind(this),l.on("accountsChanged",r)),o||(o=this.onChainChanged.bind(this),l.on("chainChanged",o)),a||(a=this.onDisconnect.bind(this),l.on("disconnect",a));let w=await this.getChainId();return c&&w!==c&&(w=(await this.switchChain({chainId:c}).catch(C=>{if(C.code===k.code)throw C;return{id:w}}))?.id??w),t&&await u.storage?.removeItem(`${this.id}.disconnected`),e.target||await u.storage?.setItem("injected.connected",!0),{accounts:m?p.map(g=>({address:g,capabilities:{}})):p,chainId:w}}catch(w){const g=w;throw g.code===k.code?new k(g):g.code===Pe.code?new Pe(g):g}},async disconnect(){const c=await this.getProvider();if(!c)throw new H;o&&(c.removeListener("chainChanged",o),o=void 0),a&&(c.removeListener("disconnect",a),a=void 0),s||(s=this.onConnect.bind(this),c.on("connect",s));try{await xt(()=>c.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}t&&await u.storage?.setItem(`${this.id}.disconnected`,!0),e.target||await u.storage?.removeItem("injected.connected")},async getAccounts(){const c=await this.getProvider();if(!c)throw new H;return(await c.request({method:"eth_accounts"})).map(m=>R(m))},async getChainId(){const c=await this.getProvider();if(!c)throw new H;const d=await c.request({method:"eth_chainId"});return Number(d)}
3,async getProvider(){if(typeof window>"u")return;let c;const d=i();return typeof d.provider=="function"?c=d.provider(window):typeof d.provider=="string"?c=We(window,d.provider):c=d.provider,c&&!c.removeListener&&("off"in c&&typeof c.off=="function"?c.removeListener=c.off:c.removeListener=()=>{}),c},async isAuthorized(){try{if(t&&await u.storage?.getItem(`${this.id}.disconnected`)||!e.target&&!await u.storage?.getItem("injected.connected"))return!1;if(!await this.getProvider()){if(n!==void 0&&n!==!1){const l=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",l),!!await this.getProvider()),p=typeof n=="number"?n:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(g=>window.addEventListener("ethereum#initialized",()=>g(l()),{once:!0}))]:[],new Promise(g=>setTimeout(()=>g(l()),p))]))return!0}throw new H}return!!(await Ge(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:c,chainId:d}){const m=await this.getProvider();if(!m)throw new H;const l=u.chains.find(w=>w.id===d);if(!l)throw new F(new ee);const p=new Promise(w=>{const g=(C=>{"chainId"in C&&C.chainId===d&&(u.emitter.off("change",g),w())});u.emitter.on("change",g)});try{return await Promise.all([m.request({method:"wallet_switchEthereumChain",params:[{chainId:q(d)}]}).then(async()=>{await this.getChainId()===d&&u.emitter.emit("change",{chainId:d})}),p]),l}catch(w){const g=w;if(g.code===4902||g?.data?.originalError?.code===4902)try{const{default:C,..._}=l.blockExplorers??{};let N;c?.blockExplorerUrls?N=c.blockExplorerUrls:C&&(N=[C.url,...Object.values(_).map(L=>L.url)]);let z;c?.rpcUrls?.length?z=c.rpcUrls:z=[l.rpcUrls.default?.http[0]??""];const T={blockExplorerUrls:N,chainId:q(d),chainName:c?.chainName??l.name,iconUrls:c?.iconUrls,nativeCurrency:c?.nativeCurrency??l.nativeCurrency,rpcUrls:z};return await Promise.all([m.request({method:"wallet_addEthereumChain",params:[T]}).then(async()=>{if(await this.getChainId()===d)u.emitter.emit("change",{chainId:d});else throw new k(new Error("User rejected switch after adding network."))}),p]),l}catch(C){throw new k(C)}throw g.code===k.code?new k(g):new F(g)}},async onAccountsChanged(c){if(c.length===0)this.onDisconnect();else if(u.emitter.listenerCount("connect")){const d=(await this.getChainId()).toString();this.onConnect({chainId:d}),t&&await u.storage?.removeItem(`${this.id}.disconnected`)}else u.emitter.emit("change",{accounts:c.map(d=>R(d))})},onChainChanged(c){const d=Number(c);u.emitter.emit("change",{chainId:d})},async onConnect(c){const d=await this.getAccounts();if(d.length===0)return;const m=Number(c.chainId);u.emitter.emit("connect",{accounts:d,chainId:m});const l=await this.getProvider();l&&(s&&(l.removeListener("connect",s),s=void 0),r||(r=this.onAccountsChanged.bind(this),l.on("accountsChanged",r)),o||(o=this.onChainChanged.bind(this),l.on("chainChanged",o)),a||(a=this.onDisconnect.bind(this),l.on("disconnect",a)))},async onDisconnect(c){const d=await this.getProvider();c&&c.code===1013&&d&&(await this.getAccounts()).length||(u.emitter.emit("disconnect"),d&&(o&&
3(d.removeListener("chainChanged",o),o=void 0),a&&(d.removeListener("disconnect",a),a=void 0),s||(s=this.onConnect.bind(this),d.on("connect",s))))}})}const jr={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(e){return e?.coinbaseWalletExtension?e.coinbaseWalletExtension:We(e,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(e){return We(e,t=>{if(!t.isMetaMask||t.isBraveWallet&&!t._events&&!t._state)return!1;const n=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"];for(const i of n)if(t[i])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(e){return e?.phantom?.ethereum?e.phantom?.ethereum:We(e,"isPhantom")}}};function We(e,t){function n(r){return typeof t=="function"?t(r):typeof t=="string"?r[t]:!0}const i=e.ethereum;if(i?.providers)return i.providers.find(r=>n(r));if(i&&n(i))return i}Ut.type="mock";function Ut(e){const t=new Map,n=e.features??{defaultConnected:!1};let i=n.defaultConnected,r;return o=>({id:"mock",name:"Mock Connector",type:Ut.type,async setup(){r=o.chains[0].id},async connect({chainId:s,withCapabilities:a}={}){if(n.connectError)throw typeof n.connectError=="boolean"?new k(new Error("Failed to connect.")):n.connectError;const c=await(await this.getProvider()).request({method:"eth_requestAccounts"});let d=await this.getChainId();return s&&d!==s&&(d=(await this.switchChain({chainId:s})).id),i=!0,{accounts:a?c.map(m=>({address:R(m),capabilities:{foo:{bar:m}}})):c.map(m=>R(m)),chainId:d}},async disconnect(){i=!1},async getAccounts(){if(!i)throw new Nr;return(await(await this.getProvider()).request({method:"eth_accounts"})).map(u=>R(u))},async getChainId(){const a=await(await this.getProvider()).request({method:"eth_chainId"});return cn(a,"number")},async isAuthorized(){return!n.reconnect||!i?!1:!!(await this.getAccounts()).length},async switchChain({chainId:s}){const a=await this.getProvider(),u=o.chains.find(c=>c.id===s);if(!u)throw new F(new ee);return await a.request({method:"wallet_switchEthereumChain",params:[{chainId:q(s)}]}),u},onAccountsChanged(s){s.length===0?this.onDisconnect():o.emitter.emit("change",{accounts:s.map(a=>R(a))})},onChainChanged(s){const a=Number(s);o.emitter.emit("change",{chainId:a})},async onDisconnect(s){o.emitter.emit("disconnect"),i=!1},async getProvider({chainId:s}={}){const u=(o.chains.find(d=>d.id===s)??o.chains[0]).rpcUrls.default.http[0];return zr({request:async({method:d,params:m})=>{if(d==="eth_chainId")return q(r);if(d==="eth_requestAccounts")return e.accounts;if(d==="eth_signTypedData_v4"&&n.signTypedDataError)throw typeof n.signTypedDataError=="boolean"?new k(new Error("Failed to sign typed data.")):n.signTypedDataError;if(d==="wallet_switchEthereumChain"){if(n.switchChainError)throw typeof n.switchChainError=="boolean"?new k(new Error("Failed to switch chain.")):n.switchChainError;r=cn(m[0].chainId,"number"),this.onChainChanged(r.toString());return}if(d==="wallet_watchAsset"){if(n.watchAssetError)throw typeof n.watchAssetError=="boolean"?new k(new Error("Failed to switch chain.")):n.watchAssetError;return i}if(d==="wallet_getCapabilities")return{"0x2105":{paymasterService:{supported:m[0]==="0x95132632579b073D12a6673e18Ab05777a6B86f8"},sessionKeys:{supported:!0}},"0x14A34":{paymasterService:{supported:m[0]==="0x95132632579b073D12a6673e18Ab05777a6B86f8"}}};if(d==="wallet_sendCalls"){const g=[],C=m[0].calls,_=m[0].from;for(const z of C){const{result:T,error:L}=await gt.http(u,{body:{method:"eth_sendTransaction",params:[{...z,...typeof _<"u"?{from:_}:{}}]}});if(L)throw new mt({body:{method:d,params:m},error:L,url:u});g.push(T)}const N=vr(br(JSON.stringify(C)));return t.set(N,g),{id:N}}if(d==="wallet_getCallsStatus"){const g=t.get(m[0]);if(!g)return{atomic:!1,chainId:"0x1",id:m[0],status:100,receipts:[],version:"2.0.0"};const _=(await Promise.all(g.map(async N=>{const{result:z,error:T}=await gt.http(u,{body:{method:"eth_getTransactionReceipt",params:[N],id:0}});if(T)throw new mt({body:{method:d,params:m},error:T,url:u});return z?{blockHash:z.blockHash,blockNumber:z.blockNumber,gasUsed:z.gasUsed,logs:z.logs,status:z.status,transactionHash:z.transactionHash}:null}))).filter(N=>N!==null);return _.length===0?{atomic:!1,chainId:"0x1",id:m[0],status:100,receipts:[],version:"2.0.0"}:{atomic:!1,chainId:"0x1",id:m[0],status:200,receipts:_,version:"2.0.0"}}if(d==="wallet_showCallsStatus")return;if(d==="personal_sign"){if(n.signMessageError)throw typeof n.signMessageError=="boolean"?new k(new Error("Failed to sign message.")):n.signMessageError;d="eth_sign",m=[m[1],m[0]]}const l={method:d,params:m},{error:p,result:w}=await gt.http(u,{body:l});if(p)throw new mt({body:l,error:p,url:u});return w}})({retryCount:0})}})}function Zi(e){const{chain:t}=e,n=t.rpcUrls.default.http[0];if(!e.transports)return[n];const i=e.transports?.[t.id]?.({chain:t});return(i?.value?.transports||[i]).map(({value:o})=>o?.url||n)}function Pr(e={}){let t,n,i,r;return o=>({id:"baseAccount",name:"Base Account",rdns:"app.base.account",type:"baseAccount",async connect({chainId:s,withCapabilities:a,...u}={}){try{const c=await this.getProvider(),d=s??o.chains[0]?.id;if(!d)throw new ee;const m=await c.request({method:"wallet_connect",params:[{capabilities:"capabilities"in u&&u.capabilities?u.capabilities:{},chainIds:[q(d),...o.chains.filter(w=>w.id!==d).map(w=>q(w.id))]}]}),l=m.accounts.map(w=>
3({address:R(w.address),capabilities:w.capabilities??{}}));let p=Number(m.chainIds[0]);return n||(n=this.onAccountsChanged.bind(this),c.on("accountsChanged",n)),i||(i=this.onChainChanged.bind(this),c.on("chainChanged",i)),r||(r=this.onDisconnect.bind(this),c.on("disconnect",r)),s&&p!==s&&(p=(await this.switchChain({chainId:s}).catch(g=>{if(g.code===k.code)throw g;return{id:p}}))?.id??p),{accounts:a?l:l.map(w=>w.address),chainId:p}}catch(c){throw/(user closed modal|accounts received is empty|user denied account|request rejected)/i.test(c.message)?new k(c):c}},async disconnect(){const s=await this.getProvider();n&&(s.removeListener("accountsChanged",n),n=void 0),i&&(s.removeListener("chainChanged",i),i=void 0),r&&(s.removeListener("disconnect",r),r=void 0),s.disconnect()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(a=>R(a))},async getChainId(){const a=await(await this.getProvider()).request({method:"eth_chainId"});return Number(a)},async getProvider(){if(!t){const s=typeof e.preference=="string"?{options:e.preference}:{...e.preference,options:e.preference?.options??"all"},{createBaseAccountSDK:a}=await oe(async()=>{const{createBaseAccountSDK:c}=await import("./mkwhES5o.js");return{createBaseAccountSDK:c}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]),import.meta.url);t=a({...e,appChainIds:o.chains.map(c=>c.id),preference:s}).getProvider()}return t},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:s,chainId:a}){const u=o.chains.find(d=>d.id===a);if(!u)throw new F(new ee);const c=await this.getProvider();try{return await c.request({method:"wallet_switchEthereumChain",params:[{chainId:q(u.id)}]}),u}catch(d){if(d.code===4902)try{let m;s?.blockExplorerUrls?m=s.blockExplorerUrls:m=u.blockExplorers?.default.url?[u.blockExplorers?.default.url]:[];let l;s?.rpcUrls?.length?l=s.rpcUrls:l=[u.rpcUrls.default?.http[0]??""];const p={blockExplorerUrls:m,chainId:q(a),chainName:s?.chainName??u.name,iconUrls:s?.iconUrls,nativeCurrency:s?.nativeCurrency??u.nativeCurrency,rpcUrls:l};return await c.request({method:"wallet_addEthereumChain",params:[p]}),u}catch(m){throw new k(m)}throw new F(d)}},onAccountsChanged(s){s.length===0?this.onDisconnect():o.emitter.emit("change",{accounts:s.map(a=>R(a))})},onChainChanged(s){const a=Number(s);o.emitter.emit("change",{chainId:a})},async onDisconnect(s){o.emitter.emit("disconnect");const a=await this.getProvider();n&&(a.removeListener("accountsChanged",n),n=void 0),i&&(a.removeListener("chainChanged",i),i=void 0),r&&(a.removeListener("disconnect",r),r=void 0)}})}ut.type="coinbaseWallet";function ut(e={}){return e.version==="3"||e.headlessMode?Or(e):Ar(e)}function Ar(e){let t,n,i,r;return o=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",rdns:"com.coinbase.wallet",type:ut.type,async connect({chainId:s,withCapabilities:a,...u}={}){try{const c=await this.getProvider(),d=(await c.request({method:"eth_requestAccounts",params:"instantOnboarding"in u&&u.instantOnboarding?[{onboarding:"instant"}]:[]})).map(l=>R(l));n||(n=this.onAccountsChanged.bind(this),c.on("accountsChanged",n)),i||(i=this.onChainChanged.bind(this),c.on("chainChanged",i)),r||(r=this.onDisconnect.bind(this),c.on("disconnect",r));let m=await this.getChainId();return s&&m!==s&&(m=(await this.switchChain({chainId:s}).catch(p=>{if(p.code===k.code)throw p;return{id:m}}))?.id??m),{accounts:a?d.map(l=>({address:l,capabilities:{}})):d,chainId:m}}catch(c){throw/(user closed modal|accounts received is empty|user denied account|request rejected)/i.test(c.message)?new k(c):c}},async disconnect(){const s=await this.getProvider();n&&(s.removeListener("accountsChanged",n),n=void 0),i&&(s.removeListener("chainChanged",i),i=void 0),r&&(s.removeListener("disconnect",r),r=void 0),s.disconnect(),s.close?.()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(a=>R(a))},async getChainId(){const a=await(await this.getProvider()).request({method:"eth_chainId"});return Number(a)}
3,async getProvider(){if(!t){const s=typeof e.preference=="string"?{options:e.preference}:{...e.preference,options:e.preference?.options??"all"},{createCoinbaseWalletSDK:a}=await oe(async()=>{const{createCoinbaseWalletSDK:c}=await import("./DynGsxCk.js");return{createCoinbaseWalletSDK:c}},__vite__mapDeps([35,1,2,3,4,5,6,7,8,9,10,11,12,13,29,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,33,34]),import.meta.url);t=a({...e,appChainIds:o.chains.map(c=>c.id),preference:s}).getProvider()}return t},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:s,chainId:a}){const u=o.chains.find(d=>d.id===a);if(!u)throw new F(new ee);const c=await this.getProvider();try{return await c.request({method:"wallet_switchEthereumChain",params:[{chainId:q(u.id)}]}),u}catch(d){if(d.code===4902)try{let m;s?.blockExplorerUrls?m=s.blockExplorerUrls:m=u.blockExplorers?.default.url?[u.blockExplorers?.default.url]:[];let l;s?.rpcUrls?.length?l=s.rpcUrls:l=[u.rpcUrls.default?.http[0]??""];const p={blockExplorerUrls:m,chainId:q(a),chainName:s?.chainName??u.name,iconUrls:s?.iconUrls,nativeCurrency:s?.nativeCurrency??u.nativeCurrency,rpcUrls:l};return await c.request({method:"wallet_addEthereumChain",params:[p]}),u}catch(m){throw new k(m)}throw new F(d)}},onAccountsChanged(s){s.length===0?this.onDisconnect():o.emitter.emit("change",{accounts:s.map(a=>R(a))})},onChainChanged(s){const a=Number(s);o.emitter.emit("change",{chainId:a})},async onDisconnect(s){o.emitter.emit("disconnect");const a=await this.getProvider();n&&(a.removeListener("accountsChanged",n),n=void 0),i&&(a.removeListener("chainChanged",i),i=void 0),r&&(a.removeListener("disconnect",r),r=void 0)}})}function Or(e){let n,i,r,o,s;return a=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",rdns:"com.coinbase.wallet",type:ut.type,async connect({chainId:u,withCapabilities:c}={}){try{const d=await this.getProvider(),m=(await d.request({method:"eth_requestAccounts"})).map(p=>R(p));r||(r=this.onAccountsChanged.bind(this),d.on("accountsChanged",r)),o||(o=this.onChainChanged.bind(this),d.on("chainChanged",o)),s||(s=this.onDisconnect.bind(this),d.on("disconnect",s));let l=await this.getChainId();return u&&l!==u&&(l=(await this.switchChain({chainId:u}).catch(w=>{if(w.code===k.code)throw w;return{id:l}}))?.id??l),{accounts:c?m.map(p=>({address:p,capabilities:{}})):m,chainId:l}}catch(d){throw/(user closed modal|accounts received is empty|user denied account)/i.test(d.message)?new k(d):d}},async disconnect(){const u=await this.getProvider();r&&(u.removeListener("accountsChanged",r),r=void 0),o&&(u.removeListener("chainChanged",o),o=void 0),s&&(u.removeListener("disconnect",s),s=void 0),u.disconnect(),u.close()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(c=>R(c))},async getChainId(){const c=await(await this.getProvider()).request({method:"eth_chainId"});return Number(c)}
3,async getProvider(){if(!i){const u=await(async()=>{const{default:p}=await oe(async()=>{const{default:w}=await import("./-RLepPWM.js").then(g=>g.i);return{default:w}},__vite__mapDeps([36,7,8,13,12,37]),import.meta.url);return typeof p!="function"&&typeof p.default=="function"?p.default:p})();n=new u({...e,reloadOnDisconnect:!1});const c=n.walletExtension?.getChainId(),d=a.chains.find(p=>e.chainId?p.id===e.chainId:p.id===c)||a.chains[0],m=e.chainId||d?.id,l=e.jsonRpcUrl||d?.rpcUrls.default.http[0];i=n.makeWeb3Provider(l,m)}return i},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:u,chainId:c}){const d=a.chains.find(l=>l.id===c);if(!d)throw new F(new ee);const m=await this.getProvider();try{return await m.request({method:"wallet_switchEthereumChain",params:[{chainId:q(d.id)}]}),d}catch(l){if(l.code===4902)try{let p;u?.blockExplorerUrls?p=u.blockExplorerUrls:p=d.blockExplorers?.default.url?[d.blockExplorers?.default.url]:[];let w;u?.rpcUrls?.length?w=u.rpcUrls:w=[d.rpcUrls.default?.http[0]??""];const g={blockExplorerUrls:p,chainId:q(c),chainName:u?.chainName??d.name,iconUrls:u?.iconUrls,nativeCurrency:u?.nativeCurrency??d.nativeCurrency,rpcUrls:w};return await m.request({method:"wallet_addEthereumChain",params:[g]}),d}catch(p){throw new k(p)}throw new F(l)}},onAccountsChanged(u){u.length===0?this.onDisconnect():a.emitter.emit("change",{accounts:u.map(c=>R(c))})},onChainChanged(u){const c=Number(u);a.emitter.emit("change",{chainId:c})},async onDisconnect(u){a.emitter.emit("disconnect");const c=await this.getProvider();r&&(c.removeListener("accountsChanged",r),r=void 0),o&&(c.removeListener("chainChanged",o),o=void 0),s&&(c.removeListener("disconnect",s),s=void 0)}})}class Sr extends TypeError{constructor(t,n){let i;const{message:r,explanation:o,...s}=t,{path:a}=t,u=a.length===0?r:`At path: ${a.join(".")} -- ${r}`;super(o??u),o!=null&&(this.cause=u),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>i??(i=[t,...n()])}}function kr(e){return te(e)&&typeof e[Symbol.iterator]=="function"}function te(e){return typeof e=="object"&&e!==null}function ne(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function Er(e){const{done:t,value:n}=e.next();return t?void 0:n}function Rr(e,t,n,i){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:r,branch:o}=t,{type:s}=n,{refinement:a,message:u=`Expected a value of type \`${s}\`${a?` with refinement \`${a}\``:""}, but received: \`${ne(i)}\``}=e;return{value:i,type:s,refinement:a,key:r[r.length-1],path:r,branch:o,...e,message:u}}function*Mt(e,t,n,i){kr(e)||(e=[e]);for(const r of e){const o=Rr(r,t,n,i);o&&(yield o)}}function*qt(e,t,n={}){const{path:i=[],branch:r=[e],coerce:o=!1,mask:s=!1}=n,a={path:i,branch:r};if(o&&(e=t.coercer(e,a),s&&t.type!=="type"&&te(t.schema)&&te(e)&&!Array.isArray(e)))for(const c in e)t.schema[c]===void 0&&delete e[c];let u="valid";for(const c of t.validator(e,a))c.explanation=n.message,u="not_valid",yield[c,void 0];for(let[c,d,m]of t.entries(e,a)){const l=qt(d,m,{path:c===void 0?i:[...i,c],branch:c===void 0?r:[...r,d],coerce:o,mask:s,message:n.message});for(const p of l)p[0]?(u=p[0].refinement===null||p[0].refinement===void 0?"not_valid":"not_refined",yield[p[0],void 0]):o&&(d=p[1],c===void 0?e=d:e instanceof Map?e.set(c,d):e instanceof Set?e.add(d):te(e)&&(d!==void 0||c in e)&&(e[c]=d))}if(u!=="not_valid")for(const c of t.refiner(e,a))c.explanation=n.message,u="not_refined",yield[c,void 0];u==="valid"&&(yield[void 0,e])}class X{constructor(t){const{type:n,schema:i,validator:r,refiner:o,coercer:s=u=>u,entries:a=function*(){}}=t;this.type=n,this.schema=i,this.entries=a,this.coercer=s,r?this.validator=(u,c)=>{const d=r(u,c);return Mt(d,c,this,u)}:this.validator=()=>[],o?this.refiner=(u,c)=>{const d=o(u,c);return Mt(d,c,this,u)}:this.refiner=()=>[]}assert(t,n){return xr(t,this,n)}create(t,n){return Yi(t,this,n)}is(t){return dt(t,this)}mask(t,n){return $r(t,this,n)}validate(t,n={}){return Te(t,this,n)}}const vn="EXACT_OPTIONAL";class Tr extends X{constructor(t){super({...t,type:`exact optional ${t.type}`}),this.brand=vn}static isExactOptional(t){return te(t)&&"brand"in t&&t.brand===vn}}function xr(e,t,n){const i=Te(e,t,{message:n});if(i[0])throw i[0]}
3function Yi(e,t,n){const i=Te(e,t,{coerce:!0,message:n});if(i[0])throw i[0];return i[1]}function $r(e,t,n){const i=Te(e,t,{coerce:!0,mask:!0,message:n});if(i[0])throw i[0];return i[1]}function dt(e,t){return!Te(e,t)[0]}function Te(e,t,n={}){const i=qt(e,t,n),r=Er(i);return r[0]?[new Sr(r[0],function*(){for(const a of i)a[0]&&(yield a[0])}),void 0]:[void 0,r[1]]}function we(e,t){return new X({type:e,schema:null,validator:t})}function Lr(){return we("any",()=>!0)}function Ur(e){return new X({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,i]of t.entries())yield[n,i,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${ne(t)}`}})}function qr(){return we("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${ne(e)}`)}function Zr(e){const t=ne(e);return new X({type:"literal",schema:e,validator(n){return n===e||`Expected the literal \`${t}\`, but received: ${ne(n)}`}})}function Yr(){return we("never",()=>!1)}function Vr(e){return new X({...e,validator:(t,n)=>t===null||e.validator(t,n),refiner:(t,n)=>t===null||e.refiner(t,n)})}function Qr(){return we("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${ne(e)}`)}function Vi(e){const t=e?Object.keys(e):[],n=Yr();return new X({type:"object",schema:e??null,*entries(i){if(e&&te(i)){const r=new Set(Object.keys(i));for(const o of t){r.delete(o);const s=e[o];Tr.isExactOptional(s)&&!Object.prototype.hasOwnProperty.call(i,o)||(yield[o,i[o],e[o]])}for(const o of r)yield[o,i[o],n]}},validator(i){return te(i)||`Expected an object, but received: ${ne(i)}`},coercer(i){return te(i)?{...i}:i}})}function bn(e){return new X({...e,validator:(t,n)=>t===void 0||e.validator(t,n),refiner:(t,n)=>t===void 0||e.refiner(t,n)})}function Wr(e,t){return new X({type:"record",schema:null,*entries(n){if(te(n))for(const i in n){const r=n[i];yield[i,i,e],yield[i,r,t]}},validator(n){return te(n)||`Expected an object, but received: ${ne(n)}`}})}function Ie(){return we("string",e=>typeof e=="string"||`Expected a string, but received: ${ne(e)}`)}function Zt(e){const t=e.map(n=>n.type).join(" | ");return new X({type:"union",schema:null,coercer(n){for(const i of e){const[r,o]=i.validate(n,{coerce:!0});if(!r)return o}return n},validator(n,i){const r=[];for(const o of e){const[...s]=qt(n,o,i),[a]=s;if(!a?.[0])return[];for(const[u]of s)u&&r.push(u)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${ne(n)}`,...r]}})}function Fr(){return we("unknown",()=>!0)}function Kr(e,t,n){return new X({...e,coercer:(i,r)=>dt(i,t)?e.coercer(n(i,r),r):e.coercer(i,r)})}function Br(e,t,n){return new X({...e,*refiner(i,r){yield*e.refiner(i,r);const o=n(i,r),s=Mt(o,r,e,i);for(const a of s)yield{...a,refinement:t}}})}function Se(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}const xe=(e,t)=>Object.hasOwnProperty.call(e,t);var wt;(function(e){e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date"})(wt=wt||(wt={}));function Gr(e){if(typeof e!="object"||e===null)return!1;try{let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch{return!1}}const $e=e=>Vi(e);function Mn({path:e,branch:t}){const n=e[e.length-1];return xe(t[t.length-2],n)}function Je(e){return new X({...e,type:`optional ${e.type}`,validator:(t,n)=>!Mn(n)||e.validator(t,n),refiner:(t,n)=>!Mn(n)||e.refiner(t,n)})}function It(e){if(e===null||typeof e=="boolean"||typeof e=="string"||typeof e=="number"&&Number.isFinite(e))return!0;if(typeof e=="object"){let t=!0;if(Array.isArray(e)){for(let i=0;i<e.length;i++)if(!It(e[i])){t=!1;break}return t}const n=Object.entries(e);for(let i=0;i<n.length;i++)if(typeof n[i][0]!="string"||!It(n[i][1])){t=!1;break}return t}return!1}const In=we("JSON",e=>It(e)),ke=Kr(In,Br(Lr(),"JSON",e=>dt(e,In)),e=>JSON.parse(JSON.stringify(e,(t,n)=>{if(!(t==="__proto__"||t==="constructor"))return n})));function Ct(e){try{return Hr(e),!0}catch{return!1}}function Hr(e){return Yi(e,ke)}const Jr="2.0",Le=Zr(Jr),ht=Vr(Zt([Qr(),Ie()])),Yt=$e({code:qr(),message:Ie(),data:Je(ke),stack:Je(Ie())}),Qi=Zt([Wr(Ie(),ke),Ur(ke)]);
3$e({id:ht,jsonrpc:Le,method:Ie(),params:Je(Qi)});$e({jsonrpc:Le,method:Ie(),params:Je(Qi)});Vi({id:ht,jsonrpc:Le,result:bn(Fr()),error:bn(Yt)});const Xr=$e({id:ht,jsonrpc:Le,result:ke}),es=$e({id:ht,jsonrpc:Le,error:Yt});Zt([Xr,es]);function Wi(e){return dt(e,Yt)}var yt,Cn;function ts(){if(Cn)return yt;Cn=1,yt=o,o.default=o,o.stable=c,o.stableStringify=c;var e="[...]",t="[Circular]",n=[],i=[];function r(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function o(l,p,w,g){typeof g>"u"&&(g=r()),a(l,"",0,[],void 0,0,g);var C;try{i.length===0?C=JSON.stringify(l,p,w):C=JSON.stringify(l,m(p),w)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;n.length!==0;){var _=n.pop();_.length===4?Object.defineProperty(_[0],_[1],_[3]):_[0][_[1]]=_[2]}}return C}function s(l,p,w,g){var C=Object.getOwnPropertyDescriptor(g,w);C.get!==void 0?C.configurable?(Object.defineProperty(g,w,{value:l}),n.push([g,w,p,C])):i.push([p,w,l]):(g[w]=l,n.push([g,w,p]))}function a(l,p,w,g,C,_,N){_+=1;var z;if(typeof l=="object"&&l!==null){for(z=0;z<g.length;z++)if(g[z]===l){s(t,l,p,C);return}if(typeof N.depthLimit<"u"&&_>N.depthLimit){s(e,l,p,C);return}if(typeof N.edgesLimit<"u"&&w+1>N.edgesLimit){s(e,l,p,C);return}if(g.push(l),Array.isArray(l))for(z=0;z<l.length;z++)a(l[z],z,z,g,l,_,N);else{var T=Object.keys(l);for(z=0;z<T.length;z++){var L=T[z];a(l[L],L,z,g,l,_,N)}}g.pop()}}function u(l,p){return l<p?-1:l>p?1:0}function c(l,p,w,g){typeof g>"u"&&(g=r());var C=d(l,"",0,[],void 0,0,g)||l,_;try{i.length===0?_=JSON.stringify(C,p,w):_=JSON.stringify(C,m(p),w)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;n.length!==0;){var N=n.pop();N.length===4?Object.defineProperty(N[0],N[1],N[3]):N[0][N[1]]=N[2]}}return _}function d(l,p,w,g,C,_,N){_+=1;var z;if(typeof l=="object"&&l!==null){for(z=0;z<g.length;z++)if(g[z]===l){s(t,l,p,C);return}try{if(typeof l.toJSON=="function")return}catch{return}if(typeof N.depthLimit<"u"&&_>N.depthLimit){s(e,l,p,C);return}if(typeof N.edgesLimit<"u"&&w+1>N.edgesLimit){s(e,l,p,C);return}if(g.push(l),Array.isArray(l))for(z=0;z<l.length;z++)d(l[z],z,z,g,l,_,N);else{var T={},L=Object.keys(l).sort(u);for(z=0;z<L.length;z++){var ye=L[z];d(l[ye],ye,z,g,l,_,N),T[ye]=l[ye]}if(typeof C<"u")n.push([C,p,l]),C[p]=T;else return T}g.pop()}}function m(l){return l=typeof l<"u"?l:function(p,w){return w},function(p,w){if(i.length>0)for(var g=0;g<i.length;g++){var C=i[g];if(C[1]===p&&C[0]===w){w=C[2],i.splice(g,1);break}}return l.call(this,p,w)}}return yt}var ns=ts();const is=yr(ns),W={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},zn={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}},_n=W.rpc.internal,rs="Unspecified error message. This is a bug, please report it.",ss={code:_n,message:Vt(_n)},os="Unspecified server error.";
3function Vt(e,t=rs){if(as(e)){const n=e.toString();if(xe(zn,n))return zn[n].message;if(hs(e))return os}return t}function as(e){return Number.isInteger(e)}function cs(e,{fallbackError:t=ss,shouldIncludeStack:n=!0,shouldPreserveMessage:i=!0}={}){if(!Wi(t))throw new Error("Must provide fallback error with integer number code and string message.");const r=us(e,t,i);return n||delete r.stack,r}function us(e,t,n){if(e&&typeof e=="object"&&"serialize"in e&&typeof e.serialize=="function")return e.serialize();if(Wi(e))return e;const i=ds(e),r=Fi(e);return{...t,...n&&i&&{message:i},data:{cause:r}}}function ds(e){if(Se(e)&&xe(e,"message")&&typeof e.message=="string"&&e.message.length>0)return e.message}function hs(e){return e>=-32099&&e<=-32e3}function Fi(e){return Array.isArray(e)?e.map(t=>Ct(t)?t:Se(t)?Dn(t):null):Se(e)?Dn(e):Ct(e)?e:null}function Dn(e){return Object.getOwnPropertyNames(e).reduce((t,n)=>{const i=e[n];return Ct(i)&&(t[n]=i),t},{})}function ls(e){return Se(e)&&xe(e,"cause")&&Se(e.cause)}function fs(e){return e?.__esModule?e.default:e}const ps=fs(is);
3class Ki extends Error{constructor(t,n,i){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!n||typeof n!="string")throw new Error('"message" must be a non-empty string.');ls(i)?(super(n,{cause:i.cause}),xe(this,"cause")||Object.assign(this,{cause:i.cause})):super(n),i!==void 0&&(this.data=i),this.code=t}serialize(){const t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data,Gr(this.data)&&(t.data.cause=Fi(this.data.cause))),this.stack&&(t.stack=this.stack),t}toString(){return ps(this.serialize(),gs,2)}}class Bi extends Ki{constructor(t,n,i){if(!ms(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,n,i)}}function ms(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function gs(e,t){if(t!=="[Circular]")return t}const K={parse:e=>J(W.rpc.parse,e),invalidRequest:e=>J(W.rpc.invalidRequest,e),invalidParams:e=>J(W.rpc.invalidParams,e),methodNotFound:e=>J(W.rpc.methodNotFound,e),internal:e=>J(W.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code 
3<= -32005');return J(t,e)},invalidInput:e=>J(W.rpc.invalidInput,e),resourceNotFound:e=>J(W.rpc.resourceNotFound,e),resourceUnavailable:e=>J(W.rpc.resourceUnavailable,e),transactionRejected:e=>J(W.rpc.transactionRejected,e),methodNotSupported:e=>J(W.rpc.methodNotSupported,e),limitExceeded:e=>J(W.rpc.limitExceeded,e)},de={userRejectedRequest:e=>Ne(W.provider.userRejectedRequest,e),unauthorized:e=>Ne(W.provider.unauthorized,e),unsupportedMethod:e=>Ne(W.provider.unsupportedMethod,e),disconnected:e=>Ne(W.provider.disconnected,e),chainDisconnected:e=>Ne(W.provider.chainDisconnected,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:n,data:i}=e;if(!n||typeof n!="string")throw new Error('"message" must be a nonempty string');return new Bi(t,n,i)}};function J(e,t){const[n,i]=Gi(t);return new Ki(e,n??Vt(e),i)}function Ne(e,t){const[n,i]=Gi(t);return new Bi(e,n??Vt(e),i)}function Gi(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:n}=e;
3if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t??void 0,n]}}return[]}var ws={version:"0.3.2"},ys="https://keys.gemini.com",vs=ys,bs=ws.version,Ee=42161,Ms={ARBITRUM_ONE:42161,BASE:8453,ETHEREUM:1,OP_MAINNET:10,POLYGON:137},Is={ARBITRUM_SEPOLIA:421614,BASE_SEPOLIA:84532,OP_SEPOLIA:11155420,POLYGON_AMOY:80002,SEPOLIA:11155111},Cs=[...Object.values(Ms),...Object.values(Is)];function qe(e){return{[yn.id]:yn.rpcUrls.default.http[0],[mn.id]:mn.rpcUrls.default.http[0],[pn.id]:pn.rpcUrls.default.http[0],[wn.id]:wn.rpcUrls.default.http[0],[gn.id]:gn.rpcUrls.default.http[0],[fn.id]:fn.rpcUrls.default.http[0],[ln.id]:ln.rpcUrls.default.http[0],[hn.id]:hn.rpcUrls.default.http[0],[dn.id]:dn.rpcUrls.default.http[0],[un.id]:un.rpcUrls.default.http[0]}[e]}var zs=class extends Cr{},Nn=420,jn=650,_s=e=>{const t=(window.innerWidth-Nn)/2+window.screenX,n=(window.innerHeight-jn)/2+window.screenY,i=`wallet_${window?.crypto?.randomUUID()}`,r=window.open(e,i,`width=${Nn}, height=${jn}, left=${t}, top=${n}`);if(r?.focus(),!r)throw K.internal("Pop up window failed to open");return r},Ds=e=>{e&&!e.closed&&(e.opener?.focus(),e.close())},Fe=e=>`0x${BigInt(e).toString(16)}`,Ns=e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString()+"n":n,2),js=class{constructor({appMetadata:e,onDisconnectCallback:t}){this.popup=null,this.listeners=new Map,this.postMessage=async n=>{(await this.waitForPopupLoaded()).postMessage(n,this.url.origin)},this.postRequestAndWaitForResponse=async n=>{const i=this.onMessage(({requestId:r})=>r===n.requestId);return this.postMessage(n),await i},this.onMessage=n=>new Promise((i,r)=>{const o=s=>{if(s.origin!==this.url.origin)return;const a=s.data;n(a)&&(i(a),window.removeEventListener("message",o),this.listeners.delete(o))};window.addEventListener("message",o),this.listeners.set(o,{reject:r})}),this.onRequestCancelled=()=>{Ds(this.popup),this.popup=null,this.listeners.forEach(({reject:n},i)=>{n(de.userRejectedRequest()),window.removeEventListener("message",i)}),this.listeners.clear()},this.waitForPopupLoaded=()=>this.popup&&!this.popup.closed?(this.popup.focus(),Promise.resolve(this.popup)):(this.popup=_s(this.url),this.onMessage(({event:n})=>n==="POPUP_UNLOADED").then(this.onRequestCancelled).catch(()=>{}),this.onMessage(({event:n})=>n==="SDK_DISCONNECT").then(()=>{this.onDisconnectCallback?.(),this.onRequestCancelled()}).catch(()=>{}),this.onMessage(({event:n})=>n==="POPUP_LOADED").then(n=>{this.postMessage({chainId:Ee,data:{appMetadata:this.appMetadata,origin:window.location.origin,sdkVersion:bs},event:"POPUP_APP_CONTEXT",origin:window.location.origin,requestId:n.requestId})}).then(()=>{if(!this.popup)throw K.internal();return this.popup})),this.url=new URL(vs),this.appMetadata=e,this.onDisconnectCallback=t}},vt={},Hi=class{constructor({scope:e="@gemini",module:t="wallet"}={}){this.scope=e,this.module=t}scopedKey(e){return`${this.scope}.${this.module}.${e}`}async storeObject(e,t){const n=Ns(t);await this.setItem(e,n)}async loadObject(e,t){const n=await this.getItem(e);if(!n)return await this.storeObject(e,t),t;try{return JSON.parse(n)}catch{return t}}async setItem(e,t){const n=this.scopedKey(e);try{localStorage.setItem(n,t)}catch{vt[n]=t}}async getItem(e){const t=this.scopedKey(e);try{return localStorage.getItem(t)}catch{return vt[t]||null}}async removeItem(e){const t=this.scopedKey(e);try{localStorage.removeItem(t)}catch{delete vt[t]}}async removeItems(e){await Promise.all(e.map(t=>this.removeItem(t)))}},Ke="eth-accounts",zt="eth-active-chain",ue="call-batches";function Ps(e){return Cs.includes(e)}var Pn=class{constructor({appMetadata:e,chain:t,onDisconnectCallback:n,storage:i}){this.accounts=[],this.chain={id:Ee},this.communicator=new js({appMetadata:e,onDisconnectCallback:n}),this.storage=i||new Hi;const r=t?.id??Ee,o=t?.rpcUrl??qe(r),s={id:r,rpcUrl:o};this.initPromise=this.initializeFromStorage(s)}async initializeFromStorage(e){const t={...e,rpcUrl:e.rpcUrl||qe(e.id)},[n,i]=await Promise.all([this.storage.loadObject(zt,t),this.storage.loadObject(Ke,this.accounts)]);this.chain={...n,rpcUrl:n.rpcUrl||qe(n.id)},this.accounts=i}async ensureInitialized(){await this.initPromise}async connect(){await this.ensureInitialized();const e=await this.sendMessageToPopup({chainId:this.chain.id,event:"SDK_CONNECT",origin:window.location.origin});return this.accounts=e.data.address?[e.data.address]:[],await this.storage.storeObject(Ke,this.accounts),this.accounts}async disconnect(){await this.ensureInitialized(),this.accounts=[],await this.storage.storeObject(Ke,this.accounts)}async switchChain({id:e}){return await this.ensureInitialized(),Ps(e)?(this.chain={id:e,rpcUrl:qe(e)},await this.storage.storeObject(zt,this.chain),null):(await this.sendMessageToPopup({chainId:this.chain.id,data:e,event:"SDK_SWITCH_CHAIN",origin:window.location.origin})).data.error??"Unsupported chain."}async sendTransaction(e){return await this.ensureInitialized(),(await this.sendMessageToPopup({chainId:this.chain.id,data:e,event:"SDK_SEND_TRANSACTION",origin:window.location.origin})).data}async signData({message:e}){return await this.ensureInitialized(),(await this.sendMessageToPopup({chainId:this.chain.id,data:{message:e},event:"SDK_SIGN_DATA",origin:window.location.origin})).data}async signTypedData({message:e,types:t,primaryType:n,domain:i}){return await this.ensureInitialized(),(await this.sendMessageToPopup({chainId:this.chain.id,data:{domain:i,message:e,primaryType:n,types:t},event:"SDK_SIGN_TYPED_DATA",origin:window.location.origin})).data}async openSettings(){await this.ensureInitialized(),await this.sendMessageToPopup({chainId:this.chain.id,data:{},event:"SDK_OPEN_SETTINGS",origin:window.location.origin})}getCapabilities(e){const t={},n=e?.map(i=>parseInt(i,16))||[this.chain.id];for(const i of n){const r=Fe(i);t[r]={atomic:{status:"supported"},paymasterService:{supported:!0}
3}}return t}async sendCalls(e){await this.ensureInitialized();const t=window?.crypto?.randomUUID()||`batch-${Date.now()}-${Math.random()}`,n=parseInt(e.chainId,16);if(n!==this.chain.id)throw new Error(`Chain mismatch. Expected ${this.chain.id}, got ${n}`);if(!e.calls||e.calls.length===0)throw new Error("No calls provided");const i={calls:e.calls,capabilities:e.capabilities,chainId:e.chainId,from:e.from,id:t,status:"pending",timestamp:Date.now()},r=await this.storage.loadObject(ue,{});r[t]=i,await this.storage.storeObject(ue,r);try{const o=await this.sendMessageToPopup({chainId:this.chain.id,data:{calls:e.calls},event:"SDK_SEND_BATCH_CALLS",origin:window.location.origin});if(o.data.error)throw new Error(o.data.error);return i.transactionHash=o.data.hash,i.status="pending",r[t]=i,await this.storage.storeObject(ue,r),{capabilities:{caip345:{caip2:`eip155:${n}`,transactionHashes:[o.data.hash]}},id:t}}catch(o){throw i.status="failed",r[t]=i,await this.storage.storeObject(ue,r),o}}async getCallsStatus(e){await this.ensureInitialized();const t=await this.storage.loadObject(ue,{}),n=t[e];if(!n)throw new Error(`Unknown bundle ID: ${e}`);if(n.transactionHash&&this.chain.rpcUrl)try{const s=(await(await fetch(this.chain.rpcUrl,{body:JSON.stringify({id:1,jsonrpc:"2.0",method:"eth_getTransactionReceipt",params:[n.transactionHash]}),headers:{"Content-Type":"application/json"},method:"POST"})).json()).result;if(s){const a=s.status==="0x1"?"confirmed":"reverted";return n.status=a,t[e]=n,await this.storage.storeObject(ue,t),{atomic:!0,chainId:n.chainId,id:e,receipts:[{blockHash:s.blockHash,blockNumber:s.blockNumber,gasUsed:s.gasUsed,logs:s.logs.map(u=>({address:u.address,data:u.data,topics:u.topics})),status:a==="confirmed"?"success":"reverted",transactionHash:s.transactionHash}],status:a==="confirmed"?200:500,version:"2.0.0"}}}catch{}let i;switch(n.status){case"pending":i=100;break;case"confirmed":i=200;break;case"failed":i=400;break;case"reverted":i=500;break;default:i=100}return{atomic:!0,chainId:n.chainId,id:e,status:i,version:"2.0.0"}}async showCallsStatus(e){if(await this.ensureInitialized(),!(await this.storage.loadObject(ue,{}))[e])throw new Error(`Unknown bundle ID: ${e}`)}sendMessageToPopup(e){return this.communicator.postRequestAndWaitForResponse({...e,requestId:window?.crypto?.randomUUID()})}},As=async(e,t)=>{const n={...e,id:window?.crypto?.randomUUID(),jsonrpc:"2.0"},i=await window.fetch(t,{body:JSON.stringify(n),headers:{"Content-Type":"application/json"},method:"POST",mode:"cors"}),{result:r,error:o}=await i.json();if(o)throw o;return r};function Os(e){if(!e||typeof e!="object"||Array.isArray(e))throw K.invalidParams({message:"Expected a single, non-array, object argument."});const{method:t,params:n}=e;if(typeof t!="string"||t.length===0)throw K.invalidParams({message:"'args.method' must be a non-empty string."});if(n!==void 0&&!Array.isArray(n)&&(typeof n!="object"||n===null))throw K.invalidParams({message:"'args.params' must be an object or array if provided."})}function Ss(e){const t=["value","gas","gasPrice","maxPriorityFeePerGas","maxFeePerGas"],n={...e};for(const i of t){if(!(i in e))continue;const r=e[i];typeof r!="bigint"&&Mr(r)&&(n[i]=BigInt(r))}return n}var ks=class extends zs{constructor(e){super(),this.wallet=null,this.config=e;const t=e.onDisconnectCallback;this.wallet=new Pn({...e,onDisconnectCallback:()=>{t?.(),this.disconnect()}})}async request(e){try{if(Os(e),!this.wallet?.accounts?.length)switch(e.method){case"eth_requestAccounts":{if(!this.wallet){const i=this.config.onDisconnectCallback;this.wallet=new Pn({...this.config,onDisconnectCallback:()=>{i?.(),this.disconnect()}})}await this.wallet.connect(),this.emit("accountsChanged",this.wallet.accounts);break}case"net_version":return Ee;case"eth_chainId":return Fe(Ee);default:throw de.unauthorized()}let t,n;switch(e.method){case"eth_requestAccounts":case"eth_accounts":t=this.wallet.accounts;break;case"net_version":t=this.wallet.chain.id;break;case"eth_chainId":t=Fe(this.wallet.chain.id);break;case"personal_sign":case"wallet_sign":if(n=e.params,t=await this.wallet.signData({account:n[1],message:n[0]}),t.error)throw K.transactionRejected(t.error);t=t.hash;break;case"eth_sendTransaction":case"wallet_sendTransaction":if(n=e.params,n=Ss(n[0]),t=await this.wallet.sendTransaction(n),t.error)throw K.transactionRejected(t.error);t=t.hash;break;case"wallet_switchEthereumChain":{const i=e.params;let r;if(Array.isArray(i)&&i[0]?.chainId)r=parseInt(i[0].chainId,16);else if(i&&typeof i=="object"&&"id"in i&&Number.isInteger(i.id))r=i.id;else throw K.invalidParams("Invalid chain id argument. Expected [{ chainId: hex_string }] or { id: number }.");if(t=await this.wallet.switchChain({id:r}),t)throw de.custom({code:4902,message:t});
3await this.emit("chainChanged",Fe(r));break}case"eth_signTypedData_v1":case"eth_signTypedData_v2":case"eth_signTypedData_v3":case"eth_signTypedData_v4":case"eth_signTypedData":{n=e.params;const i=JSON.parse(n[1]);if(t=await this.wallet.signTypedData({account:n[0],domain:i.domain,message:i.message,primaryType:i.primaryType,types:i.types}),t.error)throw K.transactionRejected(t.error);t=t.hash;break}case"wallet_getCapabilities":{const i=Array.isArray(e.params)?e.params:void 0;t=this.getCapabilities(i);break}case"wallet_sendCalls":{n=e.params,t=await this.sendCalls(n[0]);break}case"wallet_getCallsStatus":{n=e.params,t=await this.getCallsStatus(n[0]);break}case"wallet_showCallsStatus":{n=e.params,await this.showCallsStatus(n[0]),t=null;break}case"eth_ecRecover":case"eth_subscribe":case"eth_unsubscribe":case"personal_ecRecover":case"eth_signTransaction":case"wallet_watchAsset":case"wallet_grantPermissions":throw K.methodNotSupported("Not yet implemented.");case"eth_sign":case"eth_coinbase":case"wallet_addEthereumChain":throw K.methodNotSupported();default:if(!this.wallet.chain.rpcUrl)throw K.internal(`RPC URL missing for current chain (${this.wallet.chain.id})`);return As(e,this.wallet.chain.rpcUrl)}return t}catch(t){const{code:n}=t;return n===W.provider.unauthorized&&this.disconnect(),Promise.reject(cs(t))}}async openSettings(){await this.wallet?.openSettings()}getCapabilities(e){if(!this.wallet)throw de.unauthorized();const t=e?.[0];return this.wallet.getCapabilities(t)}async sendCalls(e){if(!this.wallet)throw de.unauthorized();try{return await this.wallet.sendCalls(e)}catch(t){throw K.transactionRejected(t instanceof Error?t.message:String(t))}}async getCallsStatus(e){if(!this.wallet)throw de.unauthorized();try{return await this.wallet.getCallsStatus(e)}catch(t){throw K.invalidParams(t instanceof Error?t.message:String(t))}}async showCallsStatus(e){if(!this.wallet)throw de.unauthorized();try{await this.wallet.showCallsStatus(e)}catch(t){throw K.invalidParams(t instanceof Error?t.message:String(t))}}async disconnect(){if(this.wallet){const e=this.config.storage||new Hi;await e.removeItem(Ke),await e.removeItem(zt)}this.wallet=null,this.config.onDisconnectCallback?.(),await this.emit("disconnect","User initiated disconnection"),await this.emit("accountsChanged",[])}};Qt.type="gemini";function Qt(e={}){let t,n,i,r;return o=>({id:"gemini",name:"Gemini Wallet",type:Qt.type,icon:"https://keys.gemini.com/images/gemini-wallet-logo.svg",async connect({chainId:s,withCapabilities:a}={}){try{const u=await this.getProvider(),c=await u.request({method:"eth_requestAccounts"});n||(n=this.onAccountsChanged.bind(this),u.on("accountsChanged",n)),i||(i=this.onChainChanged.bind(this),u.on("chainChanged",i)),r||(r=this.onDisconnect.bind(this),u.on("disconnect",r));let d=await this.getChainId();return s&&d!==s&&(d=(await this.switchChain({chainId:s}).catch(l=>{if(l.code===k.code)throw l;return{id:d}}))?.id??d),{accounts:a?c.map(m=>({address:m,capabilities:{}})):c,chainId:d}}catch(u){throw/(user closed modal|accounts received is empty|user denied account|request rejected)/i.test(u.message)?new k(u):u}},async disconnect(){const s=await this.getProvider();n&&(s.removeListener("accountsChanged",n),n=void 0),i&&(s.removeListener("chainChanged",i),i=void 0),r&&(s.removeListener("disconnect",r),r=void 0),await s.disconnect()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(u=>R(u))},async getChainId(){const a=await(await this.getProvider()).request({method:"eth_chainId"});return Number(a)},async getProvider(){return t||(t=new ks({appMetadata:e.appMetadata??{},chain:{id:o.chains[0]?.id??1,rpcUrl:o.chains[0]?.rpcUrls?.default?.http[0]}})),t},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({chainId:s}){const a=o.chains.find(c=>c.id===s);if(!a)throw new F(new ee);const u=await this.getProvider();try{return await u.request({method:"wallet_switchEthereumChain",params:[{chainId:q(s)}]}),a}catch(c){throw new F(c)}},onAccountsChanged(s){s.length===0?this.onDisconnect():o.emitter.emit("change",{accounts:s.map(a=>R(a))})},onChainChanged(s){const a=Number(s);o.emitter.emit("change",{chainId:a})},async onDisconnect(){o.emitter.emit("disconnect");const s=await this.getProvider();n&&(s.removeListener("accountsChanged",n),n=void 0),i&&(s.removeListener("chainChanged",i),i=void 0),r&&(s.removeListener("disconnect",r),r=void 0)}})}Wt.type="metaMask";function Wt(e={}){let t,n,i,r,o,s,a,u;return c=>({id:"metaMaskSDK",name:"MetaMask",rdns:["io.metamask","io.metamask.mobile"],type:Wt.type,async setup(){const d=await this.getProvider();d?.on&&(s||(s=this.onConnect.bind(this),d.on("connect",s)),r||(r=this.onAccountsChanged.bind(this),d.on("accountsChanged",r)))},async connect({chainId:d,isReconnecting:m,withCapabilities:l}={}){const p=await this.getProvider();a||(a=this.onDisplayUri,p.on("display_uri",a));let w=[];m&&(w=await this.getAccounts().catch(()=>[]));try{let g,C;w?.length||(e.connectAndSign||e.connectWith?(e.connectAndSign?g=await t.connectAndSign({msg:e.connectAndSign}):e.connectWith&&(C=await t.connectWith({method:e.connectWith.method,params:e.connectWith.params})),w=await this.getAccounts()):w=(await t.connect()).map(z=>R(z)));let _=await this.getChainId();return d&&_!==d&&(_=(await this.switchChain({chainId:d}).catch(z=>{if(z.code===k.code)throw z;return{id:_}}))?.id??_),a&&(p.removeListener("display_uri",a),a=void 0),g?p.emit("connectAndSign",{accounts:w,chainId:_,signResponse:g}):C&&p.emit("connectWith",{accounts:w,chainId:_,connectWithResponse:C}),s&&(p.removeListener("connect",s),s=void 0),r||(r=this.onAccountsChanged.bind(this),p.on("accountsChanged",r)),o||(o=this.onChainChanged.bind(this),p.on("chainChanged",o)),u||(u=this.onDisconnect.bind(this),p.on("disconnect",u)),{accounts:l?w.map(N=>({address:N,capabilities:{}})):w,chainId:_}}catch(g){const C=g;throw C.code===k.code?new k(C):C.code===Pe.code?new Pe(C):C}},async disconnect(){const d=await this.getProvider();o&&(d.removeListener("chainChanged",o),o=void 0),u&&(d.removeListener("disconnect",u),u=void 0),s||(s=this.onConnect.bind(this),d.on("connect",s)),await t.terminate()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(l=>R(l))},async getChainId(){const d=await this.getProvider(),m=d.getChainId()||await d?.request({method:"eth_chainId"});return Number(m)},async getProvider(){async function d(){const m=await(async()=>{const{default:g}=await oe(async()=>{const{default:C}=await import("./BgzGUjBO.js");return{default:C}},__vite__mapDeps([38,7,8]),import.meta.url);return typeof g!="function"&&typeof g.default=="function"?g.default:g})(),l={};for(const g of c.chains)l[q(g.id)]=Zi({chain:g,transports:c.transports})?.[0];
3t=new m({_source:"wagmi",forceDeleteProvider:!1,forceInjectProvider:!1,injectProvider:!1,...e,readonlyRPCMap:l,dappMetadata:{...e.dappMetadata,name:e.dappMetadata?.name?e.dappMetadata?.name:"wagmi",url:e.dappMetadata?.url?e.dappMetadata?.url:typeof window<"u"?window.location.origin:"https://wagmi.sh"},useDeeplink:e.useDeeplink??!0});const p=await t.init(),w=p?.activeProvider?p.activeProvider:t.getProvider();if(!w)throw new H;return w}return n||(i||(i=d()),n=await i),n},async isAuthorized(){try{return!!(await Ge(()=>xt(()=>this.getAccounts(),{timeout:200}),{delay:201,retryCount:3})).length}catch{return!1}},async switchChain({addEthereumChainParameter:d,chainId:m}){const l=await this.getProvider(),p=c.chains.find(C=>C.id===m);if(!p)throw new F(new ee);try{return await l.request({method:"wallet_switchEthereumChain",params:[{chainId:q(m)}]}),await w(),await g(m),p}catch(C){const _=C;if(_.code===k.code)throw new k(_);if(_.code===4902||_?.data?.originalError?.code===4902)try{return await l.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:(()=>{const{default:N,...z}=p.blockExplorers??{};if(d?.blockExplorerUrls)return d.blockExplorerUrls;if(N)return[N.url,...Object.values(z).map(T=>T.url)]})(),chainId:q(m),chainName:d?.chainName??p.name,iconUrls:d?.iconUrls,nativeCurrency:d?.nativeCurrency??p.nativeCurrency,rpcUrls:d?.rpcUrls?.length?d.rpcUrls:[p.rpcUrls.default?.http[0]??""]}]}),await w(),await g(m),p}catch(N){const z=N;throw z.code===k.code?new k(z):new F(z)}throw new F(_)}async function w(){await Ge(async()=>{const C=Ir(await l.request({method:"eth_chainId"}));if(C!==m)throw new Error("User rejected switch after adding network.");return C},{delay:50,retryCount:20})}async function g(C){await new Promise(_=>{const N=(z=>{"chainId"in z&&z.chainId===C&&(c.emitter.off("change",N),_())});c.emitter.on("change",N),c.emitter.emit("change",{chainId:C})})}},async onAccountsChanged(d){if(d.length===0)if(t.isExtensionActive())this.onDisconnect();else return;else if(c.emitter.listenerCount("connect")){const m=(await this.getChainId()).toString();this.onConnect({chainId:m})}else c.emitter.emit("change",{accounts:d.map(m=>R(m))})},onChainChanged(d){const m=Number(d);c.emitter.emit("change",{chainId:m})},async onConnect(d){const m=await this.getAccounts();if(m.length===0)return;const l=Number(d.chainId);c.emitter.emit("connect",{accounts:m,chainId:l});const p=await this.getProvider();s&&(p.removeListener("connect",s),s=void 0),r||(r=this.onAccountsChanged.bind(this),p.on("accountsChanged",r)),o||(o=this.onChainChanged.bind(this),p.on("chainChanged",o)),u||(u=this.onDisconnect.bind(this),p.on("disconnect",u))},async onDisconnect(d){const m=await this.getProvider();d&&d.code===1013&&m&&(await this.getAccounts()).length||(c.emitter.emit("disconnect"),o&&(m.removeListener("chainChanged",o),o=void 0),u&&(m.removeListener("disconnect",u),u=void 0),s||(s=this.onConnect.bind(this),m.on("connect",s)))},onDisplayUri(d){c.emitter.emit("message",{type:"display_uri",data:d})}})}const _t="#__bigint";function Ja(e,t){return JSON.parse(e,(n,i)=>{const r=i;return typeof r=="string"&&r.endsWith(_t)?BigInt(r.slice(0,-_t.length)):r})}function Es(e,t,n){return JSON.stringify(e,(i,r)=>typeof t=="function"?t(i,r):typeof r=="bigint"?r.toString()+_t:r,n)}const Rs="0.1.1";function Ts(){return Rs}class V extends Error{static setStaticOptions(t){V.prototype.docsOrigin=t.docsOrigin,V.prototype.showVersion=t.showVersion,V.prototype.version=t.version}constructor(t,n={}){const i=(()=>{if(n.cause instanceof V){if(n.cause.details)return n.cause.details;if(n.cause.shortMessage)return n.cause.shortMessage}return n.cause&&"details"in n.cause&&typeof n.cause.details=="string"?n.cause.details:n.cause?.message?n.cause.message:n.details})(),r=n.cause instanceof V&&n.cause.docsPath||n.docsPath,o=n.docsOrigin??V.prototype.docsOrigin,s=`${o}${r??""}`,a=!!(n.version??V.prototype.showVersion),u=n.version??V.prototype.version,c=[t||"An error occurred.",...n.metaMessages?["",...n.metaMessages]:[],...i||r||a?["",i?`Details: ${i}`:void 0,r?`See: ${s}`:void 0,a?`Version: ${u}`:void 0]:[]].filter(d=>
3typeof d=="string").join(`
4`);super(c,n.cause?{cause:n.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=n.cause,this.details=i,this.docs=s,this.docsOrigin=o,this.docsPath=r,this.shortMessage=t,this.showVersion=a,this.version=u}walk(t){return Ji(this,t)}}Object.defineProperty(V,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${Ts()}`}});V.setStaticOptions(V.defaultStaticOptions);function Ji(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?Ji(e.cause,t):t?null:e}function Ft(e,t){if(Ce(e)>t)throw new Ws({givenSize:Ce(e),maxSize:t})}function xs(e,t){if(typeof t=="number"&&t>0&&t>Ce(e)-1)throw new ir({offset:t,position:"start",size:Ce(e)})}function $s(e,t,n){if(typeof t=="number"&&typeof n=="number"&&Ce(e)!==n-t)throw new ir({offset:n,position:"end",size:Ce(e)})}function Xi(e,t={}){const{dir:n,size:i=32}=t;if(i===0)return e;const r=e.replace("0x","");if(r.length>i*2)throw new Fs({size:Math.ceil(r.length/2),targetSize:i,type:"Hex"});return`0x${r[n==="right"?"padEnd":"padStart"](i*2,"0")}`}function Ls(e,t={}){const{dir:n="left"}=t;let i=e.replace("0x",""),r=0;for(let o=0;o<i.length-1&&i[n==="left"?o:i.length-o-1].toString()==="0";o++)r++;return i=n==="left"?i.slice(r):i.slice(0,i.length-r),i==="0"?"0x":n==="right"&&i.length%2===1?`0x${i}0`:`0x${i}`}const Us=new TextEncoder,qs=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Zs(e,t={}){const{strict:n=!1}=t;if(!e)throw new An(e);if(typeof e!="string")throw new An(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e))throw new On(e);if(!e.startsWith("0x"))throw new On(e)}function Xa(...e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function ec(e){return e instanceof Uint8Array?Dt(e):Array.isArray(e)?Dt(new Uint8Array(e)):e}function tc(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(Ft(n,t.size),tr(n,t.size)):n}function Dt(e,t={}){let n="";for(let r=0;r<e.length;r++)n+=qs[e[r]];const i=`0x${n}`;return typeof t.size=="number"?(Ft(i,t.size),Ys(i,t.size)):i}function er(e,t={}){const{signed:n,size:i}=t,r=BigInt(e);let o;i?n?o=(1n<<BigInt(i)*8n-1n)-1n:o=2n**(BigInt(i)*8n)-1n:typeof e=="number"&&(o=BigInt(Number.MAX_SAFE_INTEGER));const s=typeof o=="bigint"&&n?-o-1n:0;if(o&&r>o||r<s){const c=typeof e=="bigint"?"n":"";throw new Qs({max:o?`${o}${c}`:void 0,min:`${s}${c}`,signed:n,size:i,value:`${e}${c}`})}const u=`0x${(n&&r<0?BigInt.asUintN(i*8,BigInt(r)):r).toString(16)}`;return i?tr(u,i):u}function nc(e,t={}){return Dt(Us.encode(e),t)}function tr(e,t){return Xi(e,{dir:"left",size:t})}function Ys(e,t){return Xi(e,{dir:"right",size:t})}function ic(e,t,n,i={}){const{strict:r}=i;xs(e,t);const o=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&$s(o,t,n),o}function Ce(e){return Math.ceil((e.length-2)/2)}function rc(e){return Ls(e,{dir:"left"})}function nr(e,t={}){const{signed:n}=t;t.size&&Ft(e,t.size);const i=BigInt(e);if(!n)return i;const r=(e.length-2)/2,o=(1n<<BigInt(r)*8n)-1n,s=o>>1n;return i<=s?i:i-o-1n}function Vs(e,t={}){const{signed:n,size:i}=t;return Number(!n&&!i?e:nr(e,t))}function sc(e,t={}){const{strict:n=!1}=t;try{return Zs(e,{strict:n}),!0}catch{return!1}}class Qs extends V{constructor({max:t,min:n,signed:i,size:r,value:o}){super(`Number \`${o}\` is not in safe${r?` ${r*8}-bit`:""}${i?" signed":" unsigned"} integer range ${t?`(\`${n}\` to \`${t}\`)`:`(above \`${n}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class An extends V{constructor(t){super(`Value \`${typeof t=="object"?Es(t):t}\` of type \`${typeof t}
4\` 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"})}}class On extends V{constructor(t){super(`Value \`${t}\` 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"})}}class Ws extends V{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class ir extends V{constructor({offset:t,position:n,size:i}){super(`Slice ${n==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${i}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class Fs extends V{constructor({size:t,targetSize:n,type:i}){super(`${i.charAt(0).toUpperCase()}${i.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}var Sn;function j(e,t,n){function i(a,u){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:u,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,u);const c=s.prototype,d=Object.keys(c);for(let m=0;m<d.length;m++){const l=d[m];l in a||(a[l]=c[l].bind(a))}}const r=n?.Parent??Object;class o extends r{}Object.defineProperty(o,"name",{value:e});function s(a){var u;const c=n?.Parent?new o:this;i(c,a),(u=c._zod).deferred??(u.deferred=[]);for(const d of c._zod.deferred)d();return c}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class Ae extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}(Sn=globalThis).__zod_globalConfig??(Sn.__zod_globalConfig={});const Ks=globalThis.__zod_globalConfig;function le(e){return Ks}function Bs(e,t){return typeof t=="bigint"?t.toString():t}function rr(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Gs(e){return e==null}function Kt(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const kn=Symbol("evaluating");function x(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==kn)return i===void 0&&(i=kn,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function Bt(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Gt(...e){const t={};for(const n of e){const i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}const sr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Xe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Hs(e){if(Xe(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Xe(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}const Js=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Nt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function lt(e,t,n){const i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function Q(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Xs(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function eo(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=Gt(e._zod.def,{get shape(){const s={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=n.shape[a])}return Bt(this,"shape",s),s},checks:[]});return lt(e,o)}function to(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=Gt(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return Bt(this,"shape",s),s},checks:[]});return lt(e,o)}function no(e,t,n){const r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const s=Gt(t._zod.def,{get shape(){const a=t._zod.def.shape,u={...a};for(const c in a)u[c]=e?new e({type:"optional",innerType:a[c]}):a[c];return Bt(this,"shape",u),u},checks:[]});return lt(t,s)}function je(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function io(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function re(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function Ze(e){return typeof e=="string"?e:e?.message}function fe(e,t,n){const i=e.message?e.message:Ze(e.inst?._zod.def?.error?.(e))??Ze(t?.error?.(e))??Ze(n.customError?.(e))??Ze(n.localeError?.(e))??"Invalid input",{inst:r,continue:o,input
vendor: 4,633 bytes, line 4
4:s,...a}=e;return a.path??(a.path=[]),a.message=i,t?.reportInput&&(a.input=s),a}function ro(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}const or=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Bs,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},so=j("$ZodError",or),De=j("$ZodError",or,{Parent:Error}),Ht=e=>(t,n,i,r)=>{const o=i?{...i,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Ae;if(s.issues.length){const a=new(r?.Err??e)(s.issues.map(u=>fe(u,o,le())));throw sr(a,r?.callee),a}return s.value},oo=Ht(De),ao=e=>async(t,n,i,r)=>{const o=i?{...i,async:!0}:{async:!0};let s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){const a=new(r?.Err??e)(s.issues.map(u=>fe(u,o,le())));throw sr(a,r?.callee),a}return s.value},co=ao(De),uo=e=>(t,n,i)=>{const r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new Ae;return o.issues.length?{success:!1,error:new(e??so)(o.issues.map(s=>fe(s,r,le())))}:{success:!0,data:o.value}},ar=uo(De),ho=e=>async(t,n,i)=>{const r=i?{...i,async:!0}:{async:!0};let o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(s=>fe(s,r,le())))}:{success:!0,data:o.value}},cr=ho(De),lo=e=>(t,n,i)=>{const r=i?{...i,direction:"backward"}:{direction:"backward"};return Ht(e)(t,n,r)},fo=lo(De),po=e=>(t,n,i)=>Ht(e)(t,n,i),oc=po(De),mo=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},go=/^-?\d+n?$/,ur=/^-?\d+(?:\.\d+)?$/,wo=/^(?:true|false)$/i,yo=/^null$/i,vo=/^undefined$/i,Jt=j("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),bo={number:"number",bigint:"bigint",object:"date"},Mo=j("$ZodCheckGreaterThan",(e,t)=>{Jt.init(e,t);const n=bo[typeof t.value];e._zod.onattach.push(i=>{const r=i._zod.bag,o=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Io=j("$ZodCheckMinLength",(e,t)=>{var n;Jt.init(e,t),(n=e._zod.def).when??(n.when=i=>{const r=i.value;return!Gs(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{const r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const r=i.value;if(r.length>=t.minimum)return;const s=ro(r);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Co=j("$ZodCheckStringFormat",(e,t)=>{var n,i;Jt.init(e,t),e._zod.onattach.push(r=>{const o=r._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),zo=j("$ZodCheckRegex",(e,t)=>{Co.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),_o={major:4,minor:4,patch:3},U=j("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=_o;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const r of i)for(const o of r._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const r=(s,a,u)=>{let c=je(s),d;for(const m of a){if(m._zod.def.when){if(io(s)||!m._zod.def.when(s))continue}else if(c)continue;const l=s.issues.length,p=m._zod.check(s);if(p instanceof Promise&&u?.async===!1)throw new Ae;if(d||p instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await p,s.issues.length!==l&&(c||(c=je(s,l)))});else{if(s.issues.length===l)continue;c||(c=je(s,l))}}return d?d.then(()=>s):s},o=(s,a,u)=>{if(je(s))return s.aborted=!0,s;const c=r(a,i,u);if(c instanceof Promise){if(u.async===!1)throw new Ae;return c.then(d=>e._zod.parse(d,u))}return e._zod.parse(c,u)};e._zod.run=(s,a)=>
4{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){const c=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return c instanceof Promise?c.then(d=>o(d,s,a)):o(c,s,a)}const u=e._zod.parse(s,a);if(u instanceof Promise){if(a.async===!1)throw new Ae;return u.then(c=>r(c,i,a))}return r(u,i,a)}}x(e,"~standard",()=>({validate:r=>{try{const o=ar(e,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return cr(e,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),Do=j("$ZodString",(e,t)=>{U.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??mo(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),No=j("$ZodNumber",(e,t)=>{U.init(e,t),e._zod.pattern=e._zod.bag.pattern??ur,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;const o=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),jo=j("$ZodBoolean",(e,t)=>{U.init(e,t),e._zod.pattern=wo,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}const r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Po=j("$ZodBigInt",(e,t)=>{U.init(e,t),e._zod.pattern=go,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Ao=j("$ZodUndefined",(e,t)=>{U.init(e,t),e._zod.pattern=vo,e._zod.values=new Set([void 0]),e._zod.parse=(n,i)=>{const r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),Oo=j("$ZodNull",(e,t)=>{U.init(e,t),e._zod.pattern=yo,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{const r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),So=j("$ZodAny",(e,t)=>{U.init(e,t),e._zod.parse=n=>n}),ko=j("$ZodUnknown",(e,t)=>{U.init(e,t),e._zod.parse=n=>n}),Eo=j("$ZodDate",(e,t)=>{U.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}const r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function En(e,t,n){e.issues.length&&t.issues.push(...re(n,e.issues)),t.value[n]=e.value}const Ro=j("$ZodArray",(e,t)=>{U.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);const o=[];for(let s=0;s<r.length;s++){const a=r[s],u=t.element._zod.run({value:a,issues:[]},i);u instanceof Promise?o.push(u.then(c=>En(c,n,s))):En(u,n,s)}return o.length?Promise.all(o).then(()=>n):n}});function et(e,t,n,i,r,o){const s=n in i;if(e.issues.length){if(r&&o&&!s)return;t.issues.push(...re(n,e.issues))}if(!s&&!r){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?s&&(t.value[n]=void 0):t.value[n]=e.value}function To(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const n=Xs(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function xo(e,t,n,i,r,o){const s=[],a=r.keySet,u=r.catchall._zod,c=u.def.type,d=u.optin==="optional",m=u.optout==="optional";for(const l in t){if(l==="__proto__"||a.has(l))continue;if(c==="never"){s.push(l);continue}const p=u.run({value:t[l],issues:[]},i);p instanceof Promise?e.push(p.then(w=>et(w,n,l,t,d,m))):et(p,n,l,t,d,m)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const $o=j("$ZodObject",(e,t)=>{if(U.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const u={...a};return Object.defineProperty(t,"shape",{value:u}),u}})}const i=rr(()=>To(t));x(e._zod,"propValues",()=>{const a=t.shape,u={};for(const c in a){const d=a[c]._zod;if(d.values){u[c]??(u[c]=new Set);for(const m of d.values)u[c].add(m)}}return u});const r=Xe,o=t.catchall;let s;e._zod.parse=(a,u)=>{s??(s=i.value);const c=a.value;if(!r(c))return a.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),a;a.value={};const d=[],m=s.shape;for(const l of s.keys){const p=m[l],w=p._zod.optin==="optional",g=p._zod.optout==="optional",C=p._zod.run({value:c[l],issues:[]},u);C instanceof Promise?d.push(C.then(_=>et(_,a,l,c,w,g))):et(C,a,l,c,w,g)}return o?xo(d,c,a,u,i.value,e):d.length?Promise.all(d).then(()=>a):a}});function Rn(e,t,n,i){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const r=e.filter(o=>!je(o));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(s=>fe(s,i,le())))}),t)}const dr=j("$ZodUnion",(e,t)=>{U.init(e,t),x(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),x(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),x(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),x(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${i.map(r=>Kt(r.source)).join("|")})$`)}});
4const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1;const s=[];for(const a of t.options){const u=a._zod.run({value:i.value,issues:[]},r);if(u instanceof Promise)s.push(u),o=!0;else{if(u.issues.length===0)return u;s.push(u)}}return o?Promise.all(s).then(a=>Rn(a,i,e,r)):Rn(s,i,e,r)}}),Lo=j("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,dr.init(e,t);const n=e._zod.parse;x(e._zod,"propValues",()=>{const r={};for(const o of t.options){const s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[a,u]of Object.entries(s)){r[a]||(r[a]=new Set);for(const c of u)r[a].add(c)}}return r});const i=rr(()=>{const r=t.options,o=new Map;for(const s of r){const a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(const u of a){if(o.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);o.set(u,s)}}return o});e._zod.parse=(r,o)=>{const s=r.value;if(!Xe(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),r;const a=i.value.get(s?.[t.discriminator]);return a?a._zod.run(r,o):t.unionFallback||o.direction==="backward"?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:s,path:[t.discriminator],inst:e}),r)}}),Uo=j("$ZodTuple",(e,t)=>{U.init(e,t);const n=t.items;e._zod.parse=(i,r)=>{const o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];const s=[],a=Tn(n,"optin"),u=Tn(n,"optout");if(!t.rest){if(o.length<a)return i.issues.push({code:"too_small",minimum:a,inclusive:!0,input:o,inst:e,origin:"array"}),i;o.length>n.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:o,inst:e,origin:"array"})}const c=new Array(n.length);for(let d=0;d<n.length;d++){const m=n[d]._zod.run({value:o[d],issues:[]},r);m instanceof Promise?s.push(m.then(l=>{c[d]=l})):c[d]=m}if(t.rest){let d=n.length-1;const m=o.slice(n.length);for(const l of m){d++;const p=t.rest._zod.run({value:l,issues:[]},r);p instanceof Promise?s.push(p.then(w=>xn(w,i,d))):xn(p,i,d)}}return s.length?Promise.all(s).then(()=>$n(c,i,n,o,u)):$n(c,i,n,o,u)}});function Tn(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function xn(e,t,n){e.issues.length&&t.issues.push(...re(n,e.issues)),t.value[n]=e.value}function $n(e,t,n,i,r){for(let o=0;o<n.length;o++){const s=e[o],a=o<i.length;if(s.issues.length){if(!a&&o>=r){t.value.length=o;break}t.issues.push(...re(o,s.issues))}t.value[o]=s.value}for(let o=t.value.length-1;o>=i.length&&(n[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}const qo=j("$ZodRecord",(e,t)=>{U.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!Hs(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;const o=[],s=t.keyType._zod.values;if(s){n.value={};const a=new Set;for(const c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){a.add(typeof c=="number"?c.toString():c);const d=t.keyType._zod.run({value:c,issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(p=>fe(p,i,le())),input:c,path:[c],inst:e});continue}const m=d.value,l=t.valueType._zod.run({value:r[c],issues:[]},i);l instanceof Promise?o.push(l.then(p=>{p.issues.length&&n.issues.push(...re(c,p.issues)),n.value[m]=p.value})):(l.issues.length&&n.issues.push(...re(c,l.issues)),n.value[m]=l.value)}let u;for(const c in r)a.has(c)||(u=u??[],u.push(c));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:u})}else{n.value={};for(const a of Reflect.ownKeys(r)){if(a==="__proto__"||!Object.prototype.propertyIsEnumerable.call(r,a))continue;let u=t.keyType._zod.run({value:a,issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");
vendor: 5,917 bytes, line 4
4if(typeof a=="string"&&ur.test(a)&&u.issues.length){const m=t.keyType._zod.run({value:Number(a),issues:[]},i);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(u=m)}if(u.issues.length){t.mode==="loose"?n.value[a]=r[a]:n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(m=>fe(m,i,le())),input:a,path:[a],inst:e});continue}const d=t.valueType._zod.run({value:r[a],issues:[]},i);d instanceof Promise?o.push(d.then(m=>{m.issues.length&&n.issues.push(...re(a,m.issues)),n.value[u.value]=m.value})):(d.issues.length&&n.issues.push(...re(a,d.issues)),n.value[u.value]=d.value)}}return o.length?Promise.all(o).then(()=>n):n}}),Zo=j("$ZodLiteral",(e,t)=>{if(U.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?Nt(i):i?Nt(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,r)=>{const o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}});function Ln(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Yo=j("$ZodOptional",(e,t)=>{U.init(e,t),e._zod.optin="optional",e._zod.optout="optional",x(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),x(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Kt(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){const r=n.value,o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(s=>Ln(s,r)):Ln(o,r)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),Vo=j("$ZodNullable",(e,t)=>{U.init(e,t),x(e._zod,"optin",()=>t.innerType._zod.optin),x(e._zod,"optout",()=>t.innerType._zod.optout),x(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Kt(n.source)}|null)$`):void 0}),x(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),Qo=j("$ZodPipe",(e,t)=>{U.init(e,t),x(e._zod,"values",()=>t.in._zod.values),x(e._zod,"optin",()=>t.in._zod.optin),x(e._zod,"optout",()=>t.out._zod.optout),x(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){const o=t.out._zod.run(n,i);return o instanceof Promise?o.then(s=>Ye(s,t.in,i)):Ye(o,t.in,i)}const r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>Ye(o,t.out,i)):Ye(r,t.out,i)}});function Ye(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const Wo=j("$ZodCodec",(e,t)=>{U.init(e,t),x(e._zod,"values",()=>t.in._zod.values),x(e._zod,"optin",()=>t.in._zod.optin),x(e._zod,"optout",()=>t.out._zod.optout),x(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){const o=t.in._zod.run(n,i);return o instanceof Promise?o.then(s=>Ve(s,t,i)):Ve(o,t,i)}else{const o=t.out._zod.run(n,i);return o instanceof Promise?o.then(s=>Ve(s,t,i)):Ve(o,t,i)}}});function Ve(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){const r=t.transform(e.value,e);return r instanceof Promise?r.then(o=>Qe(e,o,t.out,n)):Qe(e,r,t.out,n)}else{const r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(o=>Qe(e,o,t.in,n)):Qe(e,r,t.in,n)}}function Qe(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}const Fo=j("$ZodReadonly",(e,t)=>{U.init(e,t),x(e._zod,"propValues",()=>t.innerType._zod.propValues),x(e._zod,"values",()=>t.innerType._zod.values),x(e._zod,"optin",()=>t.innerType?._zod?.optin),x(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(Un):Un(r)}});function Un(e){return e.value=Object.freeze(e.value),e}const Ko=j("$ZodTemplateLiteral",(e,t)=>{U.init(e,t);const n=[];for(const i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);const r=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${i._zod.traits}`);const o=r.startsWith("^")?1:0,s=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(o,s))}else if(i===null||Js.has(typeof i))n.push(Nt(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,r)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)});function Bo(e,t){return new e({type:"string",...Q(t)})}function Go(e,t){return new e({type:"number",checks:[],...Q(t)})}function Ho(e,t){return new e({type:"boolean",...Q(t)})}function Jo(e,t){return new e({type:"bigint",...Q(t)})}function Xo(e,t){return new e({type:"undefined",...Q(t)})}function ea(e,t){return new e({type:"null",...Q(t)})}function ta(e){return new e({type:"any"})}function na(e){return new e({type:"unknown"})}function ia(e,t){return new e({type:"date",...Q(t)})}function ra(e,t){return new Mo({check:"greater_than",...Q(t),value:e,inclusive:!0})}function hr(e,t){return new Io({check:"min_length",...Q(t),minimum:e})}function ft(e,t){return new zo({check:"string_format",format:"regex",...Q(t),pattern:e})}const Z=j("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");U.init(e,t),e.def=t,e.type=t.type,e.parse=(n,i)=>oo(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>
4ar(e,n,i),e.parseAsync=async(n,i)=>co(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>cr(e,n,i),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]},{parent:!0}),e.with=e.check,e.clone=(n,i)=>lt(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.apply=n=>n(e)}),sa=j("ZodMiniString",(e,t)=>{Do.init(e,t),Z.init(e,t)});function v(e){return Bo(sa,e)}const oa=j("ZodMiniNumber",(e,t)=>{No.init(e,t),Z.init(e,t)});function S(e){return Go(oa,e)}const aa=j("ZodMiniBoolean",(e,t)=>{jo.init(e,t),Z.init(e,t)});function Y(e){return Ho(aa,e)}const ca=j("ZodMiniBigInt",(e,t)=>{Po.init(e,t),Z.init(e,t)});function ua(e){return Jo(ca,e)}const da=j("ZodMiniUndefined",(e,t)=>{Ao.init(e,t),Z.init(e,t)});function ze(e){return Xo(da,e)}const ha=j("ZodMiniNull",(e,t)=>{Oo.init(e,t),Z.init(e,t)});function $(e){return ea(ha,e)}const la=j("ZodMiniAny",(e,t)=>{So.init(e,t),Z.init(e,t)});function lr(){return ta(la)}const fa=j("ZodMiniUnknown",(e,t)=>{ko.init(e,t),Z.init(e,t)});function B(){return na(fa)}const pa=j("ZodMiniDate",(e,t)=>{Eo.init(e,t),Z.init(e,t)});function ve(e){return ia(pa,e)}const ma=j("ZodMiniArray",(e,t)=>{Ro.init(e,t),Z.init(e,t)});function D(e,t){return new ma({type:"array",element:e,...Q(t)})}const ga=j("ZodMiniObject",(e,t)=>{$o.init(e,t),Z.init(e,t),x(e,"shape",()=>t.shape)});function h(e,t){const n={type:"object",shape:e??{},...Q(t)};return new ga(n)}function ae(e,t){return eo(e,t)}function wa(e,t){return to(e,t)}function Re(e,t){return no(fr,e)}const ya=j("ZodMiniUnion",(e,t)=>{dr.init(e,t),Z.init(e,t)});function O(e,t){return new ya({type:"union",options:e,...Q(t)})}const va=j("ZodMiniDiscriminatedUnion",(e,t)=>{Lo.init(e,t),Z.init(e,t)});function ac(e,t,n){return new va({type:"union",options:t,discriminator:e,...Q(n)})}const ba=j("ZodMiniTuple",(e,t)=>{Uo.init(e,t),Z.init(e,t)});function P(e,t,n){const i=t instanceof U,r=i?n:t,o=i?t:null;return new ba({type:"tuple",items:e,rest:o,...Q(r)})}const qn=j("ZodMiniRecord",(e,t)=>{qo.init(e,t),Z.init(e,t)});function G(e,t,n){return!t||!t._zod?new qn({type:"record",keyType:v(),valueType:e,...Q(t)}):new qn({type:"record",keyType:e,valueType:t,...Q(n)})}const Ma=j("ZodMiniLiteral",(e,t)=>{Zo.init(e,t),Z.init(e,t)});function I(e,t){return new Ma({type:"literal",values:Array.isArray(e)?e:[e],...Q(t)})}const fr=j("ZodMiniOptional",(e,t)=>{Yo.init(e,t),Z.init(e,t)});function f(e){return new fr({type:"optional",innerType:e})}const Ia=j("ZodMiniNullable",(e,t)=>{Vo.init(e,t),Z.init(e,t)});function be(e){return new Ia({type:"nullable",innerType:e})}function se(e){return f(be(e))}const Ca=j("ZodMiniPipe",(e,t)=>{Qo.init(e,t),Z.init(e,t)}),za=j("ZodMiniCodec",(e,t)=>{Ca.init(e,t),Wo.init(e,t)});function Me(e,t,n){return new za({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}const _a=j("ZodMiniReadonly",(e,t)=>{Fo.init(e,t),Z.init(e,t)});function b(e){return new _a({type:"readonly",innerType:e})}const Da=j("ZodMiniTemplateLiteral",(e,t)=>{Ko.init(e,t),Z.init(e,t)});function _e(e,t){return new Da({type:"template_literal",parts:e,...Q(t)})}const M=()=>_e(["0x",v()],{message:"Needs string in format ^0x[A-Fa-f0-9]{40}$."}),y=()=>_e(["0x",v()],{message:"Needs string in format ^0x[A-Fa-f0-9]+$."}),A=()=>Me(y(),S(),{decode:e=>Vs(e),encode:e=>er(e)}),E=()=>Me(y(),ua({message:"Required bigint"}),{decode:e=>nr(e),encode:e=>er(e)});function pt(e){return O(e)}class Na extends V{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Schema.ValidationError"})}}function cc(e){const t=e;let n=`Validation failed with ${t.issues.length} error${t.issues.length===1?"":"s"}:`;n+=`
5`;for(const i of t.issues)i&&(n+=`
6`,n+=Be(i));return new Na(n)}function Be(e,t=0){const n=ja(e.path),i=`- ${n?`${n}: `:""}`,r="  ".repeat(t+1);let o=i;switch(e.code){case"invalid_type":{const s=e.expected,a=e.input?Pa(e):"undefined";o+=`Expected ${s}. ${e.message!=="Invalid input"?e.message:""}`,a!=="undefined"&&(o+=`but received ${a}`);break}case"too_big":{const s=e.maximum,a=e.inclusive??!0;e.exact??!1?o+=`${e.origin} must be exactly ${s}`:o+=`${e.origin} must be ${a?"at most":"less than"} ${s}`;break}case"too_small":{const s=e.minimum,a=e.inclusive??!0;e.exact??!1?o+=`${e.origin} must be exactly ${s}`:o+=`${e.origin} must be ${a?"at least":"greater than"} ${s}`;break}
6case"invalid_format":{switch(e.format){case"regex":o+=`Must match pattern: ${e.pattern}`;break;case"starts_with":o+=`Must start with "${e.prefix}"`;break;case"ends_with":o+=`Must end with "${e.suffix}"`;break;case"includes":o+=`Must include "${e.includes}"`;break;case"template_literal":o+=`Must match pattern: ${e.pattern}`;break;default:o+=`Invalid ${e.format} format`}break}case"not_multiple_of":{o+=`Number must be a multiple of ${e.divisor}`;break}case"unrecognized_keys":{const s=e.keys.map(a=>`"${a}"`).join(", ");o+=`Unrecognized key${e.keys.length>1?"s":""}: ${s}`;break}case"invalid_union":{const s=e.errors&&e.errors.length>0;o+="Invalid union value.",s&&e.errors.forEach(a=>{a.length>0&&a.forEach(u=>{o+=`
7`,o+=r,o+=Be(u,t+1)})});break}case"invalid_key":{o+=`Invalid ${e.origin} key`,e.issues&&e.issues.length>0&&e.issues.forEach(s=>{o+=`
8`,o+=r,o+=Be(s,t+1)});break}case"invalid_element":{o+=`Invalid ${e.origin} element at key "${e.key}"`,e.issues&&e.issues.length>0&&e.issues.forEach(s=>{o+=`
9`,o+=r,o+=Be(s,t+1)});break}case"invalid_value":{const s=e.values.map(a=>JSON.stringify(a)).join(", ");e.values.length>1?o+=`Expected one of: ${s}`:o+=`Expected ${s}`;break}case"custom":{o+=e.message||"Custom validation failed";break}default:o+=e.message||"Validation failed"}return o}function ja(e){return e.length===0?"":"at `"+e.map((t,n)=>typeof t=="number"?`[${t}]`:typeof t=="symbol"?`[${t.toString()}]`:/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(t)&&n>0?`.${t}`:n===0&&/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(t)?t:`["${t}"]`).join("")+"`"}function Pa(e){const t=e.input;if(t===void 0)return"undefined";if(t===null)return"null";const n=typeof t;return n==="object"?Array.isArray(t)?"array":t instanceof Date?"date":t instanceof Map?"map":t instanceof Set?"set":"object":n}const Aa=h({selector:y(),to:M(),type:I("call")}),Oa=h({limit:E(),period:O([I("minute"),I("hour"),I("day"),I("week"),I("month"),I("year")]),token:f(O([M(),$()])),type:I("spend")}),Sa=O([Aa,Oa]),tt=h({expiry:A(),prehash:f(Y()),publicKey:y(),role:O([I("admin"),I("normal")]),type:O([I("p256"),I("secp256k1"),I("webauthnp256")])}),Zn=h({...tt.shape,permissions:b(D(Sa))});var jt;(function(e){e.AssetDiffAsset=O([h({address:f(O([M(),$()])),decimals:f(O([S(),$()])),direction:O([I("incoming"),I("outgoing")]),fiat:f(h({currency:v(),value:Me(v(),S(),{decode:t=>Number(t),encode:t=>String(t)})})),name:f(O([v(),$()])),symbol:v(),type:I("erc20"),value:E()}),h({address:f(O([M(),$()])),direction:O([I("incoming"),I("outgoing")]),fiat:f(h({currency:v(),value:Me(v(),S(),{decode:t=>Number(t),encode:t=>String(t)})})),name:f(O([v(),$()])),symbol:v(),type:I("erc721"),uri:v(),value:E()}),h({address:$(),decimals:f(O([S(),$()])),direction:O([I("incoming"),I("outgoing")]),fiat:f(h({currency:v(),value:Me(v(),S(),{decode:t=>Number(t),encode:t=>String(t)})})),symbol:v(),type:$(),value:E()})]),e.Response=G(y(),b(D(b(P([M(),b(D(e.AssetDiffAsset))])))))})(jt||(jt={}));var pe;(function(e){e.Request=b(D(Zn)),e.Response=b(D(h({...Zn.shape,hash:y()})))})(pe||(pe={}));var Pt;(function(e){e.Response=G(y(),h({currency:v(),value:v()}))})(Pt||(Pt={}));var At;(function(e){e.Request=h({feePayer:f(M()),feeToken:f(M()),nonce:f(E())})})(At||(At={}));var Ot;(function(e){e.Request=b(D(h({address:M(),value:E()})))})(Ot||(Ot={}));var nt;(function(e){e.Request=b(D(h({hash:y()}))),e.Response=b(D(h({hash:y()})))})(nt||(nt={}));const Ue=h({eoa:M(),executionData:y(),nonce:y(),signature:y()}),pr=h({...Ue.shape,chainId:A()}),ka=O([h({combinedGas:E(),encodedFundTransfers:b(D(y())),encodedPreCalls:b(D(y())),eoa:M(),executionData:y(),expiry:E(),funder:M(),funderSignature:y(),isMultichain:Y(),nonce:E(),payer:M(),paymentAmount:E(),paymentMaxAmount:E(),paymentRecipient:M(),paymentSignature:y(),paymentToken:M(),settler:M(),settlerContext:y(),signature:y(),supportedAccountImplementation:M()}),h({combinedGas:E(),encodedFundTransfers:b(D(y())),encodedPreCalls:b(D(y())),eoa:M(),executionData:y(),expiry:E(),funder:M(),funderSignature:y(),isMultichain:Y(),nonce:E(),payer:M(),paymentRecipient:M(),paymentSignature:y(),paymentToken:M(),prePaymentAmount:E(),prePaymentMaxAmount:E(),settler:M(),settlerContext:y(),signature:y(),supportedAccountImplementation:M(),totalPaymentAmount:E(),totalPaymentMaxAmount:E()})]),Ea=h({address:O([M(),$()]),decimals:f(S()),deficit:E(),fiat:f(h({currency:v(),value:v()})),name:f(v()),required:E(),symbol:f(v())}),Ra=h({additionalAuthorization:se(h({address:M(),chainId:A(),nonce:A(),r:y(),s:y(),yParity:A()})),assetDeficits:f(D(Ea)),authorizationAddress:f(O([M(),$()])),chainId:A(),ethPrice:E(),extraPayment:E(),feeTokenDeficit:E(),intent:ka,nativeFeeEstimate:h({maxFeePerGas:E(),maxPriorityFeePerGas:E()}),orchestrator:M(),paymentTokenDecimals:S(),txGas:E()}),Ta=h({multiChainRoot:f(O([y(),$()])),quotes:b(D(Ra)).check(hr(1)),ttl:S()}),it=h({...Ta.shape,hash:y(),r:y(),s:y(),v:f(y()),yParity:f(y())}),Xt=h({address:M(),decimals:S(),feeToken:f(Y()),interop:f(Y()),nativeRate:f(E()),symbol:v(),uid:v()}),en=v().check(ft(/^[A-Z0-9]+$/)),tn=h({address:M(),chainId:A(),nonce:A()}),xa=h({...tn.shape,r:y(),s:y(),yParity:A()}),$a=h({data:f(y()),to:M(),value:f(E())});var Yn;(function(e){e.Parameters=h({address:M(),secret:v()}),e.Request=h({method:I("account_getOnrampContactInfo"),params:b(P([e.Parameters]))}),e.Response=h({email:f(v()),phone:f(v()),phoneVerifiedAt:f(S())})})(Yn||(Yn={}));var Vn;(function(e){e.Parameters=h({address:M()}),e.Request=h({method:I("account_onrampStatus"),params:b(P([e.Parameters]))}),e.Response=h({email:f(S()),phone:f(S())})})(Vn||(Vn={}));var Qn;
9(function(e){e.Parameters=h({phone:v(),walletAddress:M()}),e.Request=h({method:I("account_resendVerifyPhone"),params:b(P([e.Parameters]))}),e.Response=$()})(Qn||(Qn={}));var Wn;(function(e){e.Parameters=h({email:v().check(ft(/^.*@.*$/)),walletAddress:M()}),e.Request=h({method:I("account_setEmail"),params:b(P([e.Parameters]))}),e.Response=$()})(Wn||(Wn={}));var Fn;(function(e){e.Parameters=h({phone:v(),walletAddress:M()}),e.Request=h({method:I("account_setPhone"),params:b(P([e.Parameters]))}),e.Response=$()})(Fn||(Fn={}));var Kn;(function(e){e.Parameters=h({chainId:A(),email:v(),signature:y(),token:v(),walletAddress:M()}),e.Request=h({method:I("account_verifyEmail"),params:b(P([e.Parameters]))}),e.Response=$()})(Kn||(Kn={}));var Bn;(function(e){e.Parameters=h({code:v(),phone:v(),walletAddress:M()}),e.Request=h({method:I("account_verifyPhone"),params:b(P([e.Parameters]))}),e.Response=$()})(Bn||(Bn={}));var Gn;(function(e){e.Request=h({method:I("health"),params:ze()}),e.Response=h({quoteSigner:M(),status:v(),version:v()})})(Gn||(Gn={}));var Hn;(function(e){e.Parameters=h({address:M(),chainId:A(),tokenAddress:M(),value:E()}),e.Request=h({method:I("wallet_addFaucetFunds"),params:b(P([e.Parameters]))}),e.Response=h({message:f(v()),transactionHash:y()})})(Hn||(Hn={}));var Jn;(function(e){e.Parameters=h({chainId:A(),id:y()}),e.Request=h({method:I("wallet_getAccounts"),params:b(P([e.Parameters]))}),e.Response=b(D(h({address:M(),keys:pe.Response})))})(Jn||(Jn={}));var Xn;(function(e){e.Parameters=h({address:M()}),e.Request=h({method:I("wallet_getAuthorization"),params:b(P([e.Parameters]))}),e.Response=h({authorization:xa,data:y(),to:M()})})(Xn||(Xn={}));var ei;(function(e){e.Request=h({method:I("wallet_getCapabilities"),params:f(P([b(D(S()))]))});const t=h({address:M(),version:f(O([v(),$()]))});e.Response=G(y(),h({contracts:h({accountImplementation:t,accountProxy:t,legacyAccountImplementations:b(D(t)),legacyOrchestrators:b(D(O([h({orchestrator:t,simulator:t}),t]))),orchestrator:t,simulator:t}),fees:h({quoteConfig:h({constantRate:f(O([S(),$()])),gas:f(h({intentBuffer:f(S()),txBuffer:f(S())})),rateTtl:S(),ttl:S()}),recipient:M(),tokens:b(D(Xt))})}))})(ei||(ei={}));var Oe;(function(e){const t=O([I("native"),I("erc20"),I("erc721"),v()]);e.Parameters=h({account:M(),assetFilter:f(G(y(),b(D(h({address:O([M(),I("native")]),type:t}))))),assetTypeFilter:f(b(D(t))),chainFilter:f(b(D(A())))}),e.Request=h({method:I("wallet_getAssets"),params:b(P([e.Parameters]))}),e.Price=h({currency:v(),value:Me(v(),S(),{decode:n=>Number(n),encode:n=>String(n)})}),e.Response=G(v(),b(D(pt([h({address:M(),balance:E(),metadata:be(h({decimals:S(),fiat:se(e.Price),name:v(),symbol:v()})),type:I("erc20")}),h({address:be(I("native")),balance:E(),metadata:be(h({decimals:S(),fiat:se(e.Price),name:f(v()),symbol:f(v())})),type:I("native")})]))))})(Oe||(Oe={}));var ti;(function(e){e.Request=h({method:I("wallet_getCallsStatus"),params:b(P([y()]))}),e.Response=h({id:v(),receipts:f(b(D(h({blockHash:y(),blockNumber:A(),chainId:A(),gasUsed:A(),logs:b(D(h({address:M(),data:y(),topics:b(D(y()))}))),status:y(),transactionHash:y()})))),status:S()})})(ti||(ti={}));var ni;(function(e){e.Parameters=h({address:M(),chainIds:f(b(D(A())))}),e.Request=h({method:I("wallet_getKeys"),params:b(P([e.Parameters]))}),e.Response=G(y(),pe.Response)})(ni||(ni={}));var St;(function(e){e.Capabilities=h({authorizeKeys:f(pe.Request),meta:At.Request,preCall:f(Y()),preCalls:f(b(D(Ue))),requiredFunds:f(Ot.Request),revokeKeys:f(nt.Request)}),e.ResponseCapabilities=h({assetDiffs:f(jt.Response),authorizeKeys:se(pe.Response),feePayerDigest:f(y()),feeSignature:f(y()),feeTotals:f(Pt.Response),revokeKeys:se(nt.Response)}),e.Parameters=h({calls:b(D($a)),capabilities:e.Capabilities,chainId:A(),from:f(M()),key:f(h({prehash:Y(),publicKey:y(),type:tt.shape.type}))}),e.Request=h({method:I("wallet_prepareCalls"),params:b(P([e.Parameters]))}),e.Response=h({capabilities:e.ResponseCapabilities,context:h({preCall:f(Re(pr)),quote:f(Re(it))}),digest:y(),key:se(h({prehash:Y(),publicKey:y(),type:tt.shape.type})),signature:y(),typedData:h({domain:O([h({chainId:O([A(),S()]),name:v(),verifyingContract:M(),version:v()}),h({})]),message:G(v(),B()),primaryType:v(),types:G(v(),B())})})})(St||(St={}));var ii;(function(e){e.Capabilities=h({authorizeKeys:pe.Request}),e.Parameters=h({address:M(),capabilities:e.Capabilities,chainId:f(S()),delegation:M()}),e.Request=h({method:I("wallet_prepareUpgradeAccount"),params:b(P([e.Parameters]))}
9),e.Response=h({capabilities:e.Capabilities,chainId:A(),context:h({address:M(),authorization:tn,chainId:A(),preCall:Ue}),digests:h({auth:y(),exec:y()}),typedData:h({domain:O([h({chainId:O([A(),S()]),name:v(),verifyingContract:M(),version:v()}),h({})]),message:G(v(),B()),primaryType:v(),types:G(v(),B())})})})(ii||(ii={}));var ri;(function(e){e.Request=h({method:I("wallet_feeTokens"),params:f(ze())}),e.Response=G(y(),b(D(h({address:M(),decimals:S(),nativeRate:f(E()),symbol:v()}))))})(ri||(ri={}));var si;(function(e){e.Parameters=h({capabilities:f(h({feeSignature:f(y())})),context:h({preCall:f(Re(pr)),quote:f(Re(it))}),key:f(h({prehash:Y(),publicKey:y(),type:tt.shape.type})),signature:y()}),e.Request=h({method:I("wallet_sendPreparedCalls"),params:b(P([e.Parameters]))}),e.Response=h({id:y()})})(si||(si={}));var oi;(function(e){e.Parameters=h({context:h({address:M(),authorization:tn,chainId:A(),preCall:Ue}),signatures:h({auth:y(),exec:y()})}),e.Request=h({method:I("wallet_upgradeAccount"),params:b(P([e.Parameters]))}),e.Response=ze()})(oi||(oi={}));var ai;(function(e){e.Parameters=h({address:y(),chainId:A(),digest:y(),signature:y()}),e.Request=h({method:I("wallet_verifySignature"),params:b(P([e.Parameters]))}),e.Response=h({proof:se(h({account:M(),initPreCall:se(Ue),keyHash:y()})),valid:Y()})})(ai||(ai={}));const ie=h({chainId:f(A()),expiry:A(),hash:y(),id:y(),prehash:f(Y()),publicKey:y(),role:O([I("admin"),I("session")]),type:O([I("address"),I("p256"),I("secp256k1"),I("webauthn-p256")])}),nn=b(D(pt([h({signature:v(),to:M()}),h({signature:v()}),h({to:M()})])).check(hr(1))),mr=h({limit:O([_e([S(),".",S()]),_e([S()])]).check(ft(/^\d+(\.\d+)?$/)),symbol:f(O([I("native"),en]))}),rn=h({addresses:b(D(M()))}),sn=b(D(h({limit:E(),period:O([I("minute"),I("hour"),I("day"),I("week"),I("month"),I("year")]),token:f(M())}))),La=h({calls:f(nn),signatureVerification:f(rn),spend:f(sn)}),Ua=h({...ie.shape,feeToken:f(be(mr)),permissions:f(La)}),gr=h({address:M(),chainId:f(A()),expiry:S(),id:y(),key:ae(ie,{publicKey:!0,type:!0}),permissions:h({calls:nn,signatureVerification:f(rn),spend:f(sn)})}),wr=h({address:f(M()),chainId:f(A()),expiry:S().check(ra(1)),feeToken:be(mr),key:f(ae(ie,{publicKey:!0,type:!0})),permissions:h({calls:nn,signatureVerification:f(rn),spend:f(sn)})});var kt;(function(e){e.GetCapabilitiesResponse=h({status:O([I("supported"),I("unsupported")])})})(kt||(kt={}));var Et;(function(e){e.Request=O([Y(),h({chainId:f(A()),label:f(v())})])})(Et||(Et={}));var rt;(function(e){e.Request=pt([h({chainId:f(S()),domain:f(v()),expirationTime:f(ve()),issuedAt:f(ve()),nonce:v(),notBefore:f(ve()),requestId:f(v()),resources:f(b(D(v()))),scheme:f(v()),statement:f(v()),uri:f(v()),version:f(I("1"))}),h({authUrl:O([v(),h({logout:v(),nonce:v(),verify:v()})]),chainId:f(A()),domain:f(v()),expirationTime:f(ve()),issuedAt:f(ve()),notBefore:f(ve()),requestId:f(v()),resources:f(b(D(v()))),scheme:f(v()),statement:f(v()),uri:f(v()),version:f(I("1"))})]),e.Response=h({message:v(),signature:y(),token:f(v())})})(rt||(rt={}));var ce;(function(e){e.GetCapabilitiesResponse=h({supported:Y(),tokens:b(D(Xt))}),e.Request=O([en,M()])})(ce||(ce={}));var Rt;(function(e){e.Request=wr})(Rt||(Rt={}));var Tt;(function(e){e.GetCapabilitiesResponse=h({supported:Y()})})(Tt||(Tt={}));var me;(function(e){e.GetCapabilitiesResponse=h({supported:Y()}),e.Request=h({id:f(O([y(),$()]))}),e.Response=b(D(gr))})(me||(me={}));var ge;(function(e){e.Request=b(D(h({context:B(),signature:y()}))),e.Response=e.Request})(ge||(ge={}));var st;(function(e){e.Request=v()})(st||(st={}));var ot;(function(e){e.GetCapabilitiesResponse=h({supported:Y(),tokens:b(D(Xt))}),e.Request=b(D(pt([h({address:M(),value:E()}),h({symbol:en,value:O([_e([S(),".",S()]),_e([S()])]).check(ft(/^\d+(\.\d+)?$/))})])))})(ot||(ot={}));const qa=h({...ae(ie,{id:!0,publicKey:!0,type:!0}).shape,credentialId:f(v()),privateKey:f(lr())});var ci;(function(e){e.Parameters=h({address:M(),secret:v()}),e.Request=h({method:I("account_getOnrampContactInfo"),params:b(P([e.Parameters]))}),e.Response=h({email:f(v()),phone:f(v()),phoneVerifiedAt:f(S())})})(ci||(ci={}));var ui;(function(e){e.Parameters=h({address:M()}),e.Request=h({method:I("account_onrampStatus"),params:b(P([e.Parameters]))}),e.Response=h({email:f(S()),phone:f(S())})})(ui||(ui={}));var di;(function(e){e.Parameters=h({email:v(),walletAddress:M()}),e.Request=h({method:I("account_resendVerifyPhone"),params:b(P([e.Parameters]))}),e.Response=$()})(di||(di={}));var hi;(function(e){e.Parameters=h({email:v(),walletAddress:M()}),e.Request=h({method:I("account_setEmail"),params:b(P([e.Parameters]))}),e.Response=$()})(hi||(hi={}));var li;(function(e){e.Parameters=h({email:v(),walletAddress:M()}),e.Request=h({method:I("account_setPhone"),params:b(P([e.Parameters]))}),e.Response=$()})(li||(li={}));var fi;(function(e){e.Parameters=h({chainId:A(),email:v(),token:v(),walletAddress:M()}),e.Request=h({method:I("account_verifyEmail"),params:b(P([e.Parameters]))}),e.Response=$()})(fi||(fi={}));var pi;(function(e){e.Parameters=h({code:v(),phone:v(),walletAddress:M()}),e.Request=h({method:I("account_verifyPhone"),params:b(P([e.Parameters]))}),e.Response=$()})(pi||(pi={}));var mi;(function(e){e.Parameters=h({address:f(M()),chainId:f(A()),token:f(M()),value:f(v())}),e.Request=h({method:I("wallet_addFunds"),params:b(P([e.Parameters]))}),e.Response=h({id:y()})}
9)(mi||(mi={}));var gi;(function(e){e.Request=h({method:I("eth_accounts"),params:f(B())}),e.Response=b(D(M()))})(gi||(gi={}));var wi;(function(e){e.Request=h({method:I("eth_chainId"),params:f(B())}),e.Response=y()})(wi||(wi={}));var yi;(function(e){e.Request=h({method:I("eth_requestAccounts"),params:f(B())}),e.Response=b(D(M()))})(yi||(yi={}));var vi;(function(e){e.Request=h({method:I("eth_sendTransaction"),params:b(P([h({capabilities:f(h({feeToken:f(ce.Request),merchantUrl:f(st.Request),preCalls:f(ge.Request)})),chainId:f(A()),data:f(y()),from:f(M()),to:M(),value:f(E())})]))}),e.Response=y()})(vi||(vi={}));var bi;(function(e){e.Request=h({method:I("eth_signTypedData_v4"),params:b(P([M(),v()]))}),e.Response=y()})(bi||(bi={}));var at;(function(e){e.Parameters=h({address:f(M()),chainId:f(A())}),e.Request=h({method:I("wallet_getAdmins"),params:f(b(P([e.Parameters])))}),e.Key=qa,e.Response=h({address:M(),chainId:A(),keys:b(D(e.Key))})})(at||(at={}));var Mi;(function(e){e.Capabilities=h({feeToken:f(ce.Request)}),e.Parameters=h({address:f(M()),capabilities:f(e.Capabilities),chainId:f(A()),key:ae(ie,{publicKey:!0,type:!0})}),e.Request=h({method:I("wallet_grantAdmin"),params:b(P([e.Parameters]))}),e.Response=h({address:M(),chainId:A(),key:at.Key})})(Mi||(Mi={}));var Ii;(function(e){e.Parameters=wr,e.Request=h({method:I("wallet_grantPermissions"),params:b(P([e.Parameters]))}),e.ResponseCapabilities=h({preCalls:f(ge.Response)}),e.Response=h({...gr.shape,capabilities:f(lr())})})(Ii||(Ii={}));var Ci;(function(e){e.Parameters=h({address:f(M())}),e.Request=h({method:I("wallet_getAccountVersion"),params:f(b(P([e.Parameters])))}),e.Response=h({current:v(),latest:v()})})(Ci||(Ci={}));var zi;(function(e){e.Parameters=h({address:f(M()),chainIds:f(b(D(A())))}),e.Request=h({method:I("wallet_getPermissions"),params:f(b(P([e.Parameters])))}),e.Response=me.Response})(zi||(zi={}));var _i;(function(e){e.Capabilities=h({feeToken:f(ce.Request)}),e.Parameters=h({address:f(M()),capabilities:f(e.Capabilities),chainId:f(A()),id:y()}),e.Request=h({method:I("wallet_revokeAdmin"),params:b(P([e.Parameters]))}),e.Response=void 0})(_i||(_i={}));var Di;(function(e){e.Capabilities=h({feeToken:f(ce.Request)}),e.Parameters=h({address:f(M()),capabilities:f(e.Capabilities),id:y()}),e.Request=h({method:I("wallet_revokePermissions"),params:b(P([e.Parameters]))}),e.Response=void 0})(Di||(Di={}));var Ni;(function(e){e.Request=h({method:I("wallet_switchEthereumChain"),params:b(P([h({chainId:y()})]))})})(Ni||(Ni={}));var ji;(function(e){e.Parameters=h({context:B(),signatures:h({auth:y(),exec:y()})}),e.Request=h({method:I("wallet_upgradeAccount"),params:b(P([e.Parameters]))}),e.ResponseCapabilities=h({admins:f(b(D(at.Key))),permissions:f(me.Response)}),e.Response=h({address:M(),capabilities:f(e.ResponseCapabilities)})})(ji||(ji={}));var Pi;(function(e){e.Request=h({method:I("personal_sign"),params:b(P([y(),M()]))}),e.Response=y()})(Pi||(Pi={}));var Ai;(function(e){e.Request=h({method:I("porto_ping"),params:f(ze())}),e.Response=I("pong")})(Ai||(Ai={}));var ct;(function(e){e.Capabilities=h({createAccount:f(Et.Request),email:f(Y()),grantAdmins:f(b(D(ae(ie,{publicKey:!0,type:!0})))),grantPermissions:f(Rt.Request),preCalls:f(ge.Request),selectAccount:f(O([Y(),h({address:M(),key:f(h({credentialId:f(v()),publicKey:y()}))})])),signInWithEthereum:f(rt.Request)}),e.Parameters=h({capabilities:f(e.Capabilities),chainIds:f(b(D(A())))}),e.Request=h({method:I("wallet_connect"),params:f(b(P([e.Parameters])))}),e.ResponseCapabilities=h({admins:f(b(D(h({...ae(ie,{id:!0,publicKey:!0,type:!0}).shape,credentialId:f(v())})))),permissions:f(me.Response),preCalls:f(ge.Response),signInWithEthereum:f(rt.Response)}),e.Response=h({accounts:b(D(h({address:M(),capabilities:f(e.ResponseCapabilities)}))),chainIds:b(D(A()))})})(ct||(ct={}));var Oi;(function(e){e.Request=h({method:I("wallet_disconnect"),params:f(B())}),e.Response=void 0})(Oi||(Oi={}));var Si;(function(e){e.Parameters=Oe.Parameters,e.Request=Oe.Request,e.Response=Oe.Response})(Si||(Si={}));var ki;(function(e){e.Request=h({method:I("wallet_getCallsStatus"),params:P([y()])}),e.Response=h({atomic:Y(),chainId:A(),id:v(),receipts:f(b(D(h({blockHash:y(),blockNumber:y(),gasUsed:y(),logs:b(D(h({address:M(),data:y(),topics:b(D(y()))}))),status:y(),transactionHash:y()})))),status:S(),version:v()})})(ki||(ki={}));var Ei;(function(e){e.Request=h({method:I("wallet_getCapabilities"),params:f(O([b(P([O([y(),ze()])])),b(P
9([O([y(),ze()]),b(D(A()))]))]))}),e.Response=G(y(),h({atomic:kt.GetCapabilitiesResponse,feeToken:ce.GetCapabilitiesResponse,merchant:Tt.GetCapabilitiesResponse,permissions:me.GetCapabilitiesResponse,requiredFunds:ot.GetCapabilitiesResponse}))})(Ei||(Ei={}));var Ri;(function(e){e.Parameters=h({address:M(),chainIds:f(b(D(A())))}),e.Request=h({method:I("wallet_getKeys"),params:b(P([e.Parameters]))}),e.Response=b(D(Ua))})(Ri||(Ri={}));var he;(function(e){e.Capabilities=h({feeToken:f(ce.Request),merchantUrl:f(st.Request),permissions:f(me.Request),preCalls:f(ge.Request),requiredFunds:f(ot.Request)}),e.Parameters=h({calls:b(D(h({data:f(y()),to:M(),value:f(E())}))),capabilities:f(e.Capabilities),chainId:f(A()),from:f(M()),key:f(ae(ie,{prehash:!0,publicKey:!0,type:!0})),version:f(v())}),e.Request=h({method:I("wallet_prepareCalls"),params:b(P([e.Parameters]))}),e.Response=h({capabilities:f(h({...St.ResponseCapabilities.shape,quote:f(it)})),chainId:y(),context:h({account:h({address:M()}),calls:e.Parameters.shape.calls,nonce:E(),quote:f(Re(it))}),digest:y(),key:ae(ie,{prehash:!0,publicKey:!0,type:!0}),typedData:h({domain:O([h({chainId:A(),name:v(),verifyingContract:M(),version:v()}),h({})]),message:G(v(),B()),primaryType:v(),types:G(v(),B())})})})(he||(he={}));var Ti;(function(e){e.Capabilities=h({...ct.Capabilities.shape,label:f(v())}),e.Parameters=h({address:M(),capabilities:f(e.Capabilities),chainId:f(A())}),e.Request=h({method:I("wallet_prepareUpgradeAccount"),params:b(P([e.Parameters]))}),e.Response=h({context:B(),digests:h({auth:y(),exec:y()})})})(Ti||(Ti={}));var xi;(function(e){e.Capabilities=he.Capabilities,e.Request=h({method:I("wallet_sendCalls"),params:b(P([wa(he.Parameters,{key:!0})]))}),e.Response=h({id:y()})})(xi||(xi={}));var $i;(function(e){e.Parameters=h({capabilities:he.Response.shape.capabilities,chainId:y(),context:he.Response.shape.context,key:he.Response.shape.key,signature:y()}),e.Request=h({method:I("wallet_sendPreparedCalls"),params:b(P([e.Parameters]))}),e.Response=b(D(h({capabilities:f(G(v(),B())),id:y()})))})($i||($i={}));var Li;(function(e){e.Parameters=h({address:M(),chainId:f(A()),digest:y(),signature:y()}),e.Request=h({method:I("wallet_verifySignature"),params:b(P([e.Parameters]))}),e.Response=h({address:M(),chainId:A(),proof:f(B()),valid:Y()})})(Li||(Li={}));function Za(e={}){return t=>{const n=t.chains??e.chains??[],i=t.transports?t.transports:e.transports;let r,o,s,a,u;return{async connect({chainId:c=n[0].id,...d}={}){const m="isReconnecting"in d&&d.isReconnecting||!1,l="withCapabilities"in d&&d.withCapabilities||!1;let p=[],w;m&&([p,w]=await Promise.all([this.getAccounts().catch(()=>[]),this.getChainId().catch(()=>{})]),c&&w!==c&&(w=(await this.switchChain({chainId:c}).catch(_=>{if(_.code===k.code)throw _;return{id:w}}))?.id??w));const g=await this.getProvider();try{if(!p?.length&&!m){const C=await g.request({method:"wallet_connect",params:[{..."capabilities"in d?{capabilities:fo(ct.Capabilities,d.capabilities??{})}:{},chainIds:[q(c),...n.filter(_=>_.id!==c).map(_=>q(_.id))]}]});p=C.accounts,w=Number(C.chainIds[0])}if(!w)throw new ee;return a&&(g.removeListener("connect",a),a=void 0),o||(o=this.onAccountsChanged.bind(this),g.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),g.on("chainChanged",s)),u||(u=this.onDisconnect.bind(this),g.on("disconnect",u)),{accounts:p.map(C=>typeof C=="object"?l?C:C.address:l?{address:C,capabilities:{}}:C),chainId:w}}catch(C){const _=C;throw _.code===k.code?new k(_):_}},async disconnect(){const c=await this.getProvider();s&&(c.removeListener("chainChanged",s),s=void 0),u&&(c.removeListener("disconnect",u),u=void 0),a||(a=this.onConnect.bind(this),c.on("connect",a)),await c.request({method:"wallet_disconnect"})},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(m=>R(m))},async getChainId(){const d=await(await this.getProvider()).request({method:"eth_chainId"});return Number(d)},async getPortoInstance(){return r??=(async()=>{const{Porto:c}=await oe(async()=>{const{Porto:d}=await import("./TGroBBFr.js");return{Porto:d}},__vite__mapDeps([39,13,7,8,1,2,3,4,5,6,9,10,11,24,25,22,23,20,16,40,27,28,15,41,31,29,42,32,34,33]),import.meta.url);return c.create({...e,announceProvider:!1,chains:n,transports:i})})(),await r},async getProvider(){return(await this.getPortoInstance()).provider},icon:
vendor: 5,205 bytes, line 9
9"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDIyIiBoZWlnaHQ9IjQyMiIgdmlld0JveD0iMCAwIDQyMiA0MjIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSI0MjIiIGhlaWdodD0iNDIyIiBmaWxsPSJibGFjayIvPgo8ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMV8xNSkiPgo8cGF0aCBkPSJNODEgMjg2LjM2NkM4MSAyODAuODkzIDg1LjQ1MDUgMjc2LjQ1NSA5MC45NDA0IDI3Ni40NTVIMzI5LjUxMUMzMzUuMDAxIDI3Ni40NTUgMzM5LjQ1MiAyODAuODkzIDMzOS40NTIgMjg2LjM2NlYzMDYuMTg4QzMzOS40NTIgMzExLjY2MiAzMzUuMDAxIDMxNi4wOTkgMzI5LjUxMSAzMTYuMDk5SDkwLjk0MDRDODUuNDUwNSAzMTYuMDk5IDgxIDMxMS42NjIgODEgMzA2LjE4OFYyODYuMzY2WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTAuOTQwNCAyMzQuODI4Qzg1LjQ1MDUgMjM0LjgyOCA4MSAyMzkuMjY2IDgxIDI0NC43MzlWMjcxLjUzMUM4My44NDMyIDI2OS42MzMgODcuMjYyMiAyNjguNTI2IDkwLjk0MDQgMjY4LjUyNkgzMjkuNTExQzMzMy4xODggMjY4LjUyNiAzMzYuNjA4IDI2OS42MzMgMzM5LjQ1MiAyNzEuNTMxVjI0NC43MzlDMzM5LjQ1MiAyMzkuMjY2IDMzNS4wMDEgMjM0LjgyOCAzMjkuNTExIDIzNC44MjhIOTAuOTQwNFpNMzM5LjQ1MiAyODYuMzY2QzMzOS40NTIgMjgwLjg5MyAzMzUuMDAxIDI3Ni40NTUgMzI5LjUxMSAyNzYuNDU1SDkwLjk0MDRDODUuNDUwNSAyNzYuNDU1IDgxIDI4MC44OTMgODEgMjg2LjM2NlYzMDYuMTlDODEgMzExLjY2NCA4NS40NTA1IDMxNi4xMDEgOTAuOTQwNCAzMTYuMTAxSDMyOS41MTFDMzM1LjAwMSAzMTYuMTAxIDMzOS40NTIgMzExLjY2NCAzMzkuNDUyIDMwNi4xOVYyODYuMzY2WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTAuOTQwNCAxOTMuMjAxQzg1LjQ1MDUgMTkzLjIwMSA4MSAxOTcuNjM4IDgxIDIwMy4xMTJWMjI5LjkwM0M4My44NDMyIDIyOC4wMDYgODcuMjYyMiAyMjYuODk5IDkwLjk0MDQgMjI2Ljg5OUgzMjkuNTExQzMzMy4xODggMjI2Ljg5OSAzMzYuNjA4IDIyOC4wMDYgMzM5LjQ1MiAyMjkuOTAzVjIwMy4xMTJDMzM5LjQ1MiAxOTcuNjM4IDMzNS4wMDEgMTkzLjIwMSAzMjkuNTExIDE5My4yMDFIOTAuOTQwNFpNMzM5LjQ1MiAyNDQuNzM5QzMzOS40NTIgMjM5LjI2NSAzMzUuMDAxIDIzNC44MjggMzI5LjUxMSAyMzQuODI4SDkwLjk0MDRDODUuNDUwNSAyMzQuODI4IDgxIDIzOS4yNjUgODEgMjQ0LjczOVYyNzEuNTNDODEuMjE3NSAyNzEuMzg1IDgxLjQzODMgMjcxLjI0NSA4MS42NjI0IDI3MS4xMDlDODMuODMyNSAyNjkuNzk0IDg2LjMwNTQgMjY4LjkyNyA4OC45NTIzIDI2OC42MzVDODkuNjA1MSAyNjguNTYzIDkwLjI2ODQgMjY4LjUyNiA5MC45NDA0IDI2OC41MjZIMzI5LjUxMUMzMzAuMTgzIDI2OC41MjYgMzMwLjg0NiAyNjguNTYzIDMzMS40OTggMjY4LjYzNUMzMzQuNDE5IDI2OC45NTcgMzM3LjEyOCAyNjkuOTggMzM5LjQ1MiAyNzEuNTNWMjQ0LjczOVpNMzM5LjQ1MiAyODYuMzY2QzMzOS40NTIgMjgxLjAyMSAzMzUuMjA2IDI3Ni42NjMgMzI5Ljg5MyAyNzYuNDYyQzMyOS43NjcgMjc2LjQ1NyAzMjkuNjQgMjc2LjQ1NSAzMjkuNTExIDI3Ni40NTVIOTAuOTQwNEM4NS40NTA1IDI3Ni40NTUgODEgMjgwLjg5MyA4MSAyODYuMzY2VjMwNi4xODhDODEgMzExLjY2MiA4NS40NTA1IDMxNi4xMDEgOTAuOTQwNCAzMTYuMTAxSDMyOS41MTFDMzM1LjAwMSAzMTYuMTAxIDMzOS40NTIgMzExLjY2MiAzMzkuNDUyIDMwNi4xODhWMjg2LjM2NloiIGZpbGw9IndoaXRlIiBmaWxsLW9wYWNpdHk9IjAuNSIvPgo8cGF0aCBvcGFjaXR5PSIwLjMiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTguMDE0NiAxMDRDODguNjE3NyAxMDQgODEgMTExLjU5NSA4MSAxMjAuOTY1VjE4OC4yNzZDODMuODQzMiAxODYuMzc5IDg3LjI2MjIgMTg1LjI3MiA5MC45NDA0IDE4NS4yNzJIMzI5LjUxMUMzMzMuMTg4IDE4NS4yNzIgMzM2LjYwOCAxODYuMzc5IDMzOS40NTIgMTg4LjI3NlYxMjAuOTY1QzMzOS40NTIgMTExLjU5NSAzMzEuODMzIDEwNCAzMjIuNDM3IDEwNEg5OC4wMTQ2Wk0zMzkuNDUyIDIwMy4xMTJDMzM5LjQ1MiAxOTcuNjM4IDMzNS4wMDEgMTkzLjIwMSAzMjkuNTExIDE5My4yMDFIOTAuOTQwNEM4NS40NTA1IDE5My4yMDEgODEgMTk3LjYzOCA4MSAyMDMuMTEyVjIyOS45MDNDODEuMjE3NSAyMjkuNzU4IDgxLjQzODMgMjI5LjYxOCA4MS42NjI0IDIyOS40ODJDODMuODMyNSAyMjguMTY3IDg2LjMwNTQgMjI3LjMgODguOTUyMyAyMjcuMDA4Qzg5LjYwNTEgMjI2LjkzNiA5MC4yNjg0IDIyNi44OTkgOTAuOTQwNCAyMjYuODk5SDMyOS41MTFDMzMwLjE4MyAyMjYuODk5IDMzMC44NDYgMjI2LjkzNiAzMzEuNDk4IDIyNy4wMDhDMzM0LjQxOSAyMjcuMzMgMzM3LjEyOCAyMjguMzUyIDMzOS40NTIgMjI5LjkwM1YyMDMuMTEyWk0zMzkuNDUyIDI0NC43MzlDMzM5LjQ1MiAyMzkuMzkzIDMzNS4yMDYgMjM1LjAzNiAzMjkuODkzIDIzNC44MzVDMzI5Ljc2NyAyMzQuODMgMzI5LjY0IDIzNC44MjggMzI5LjUxMSAyMzQuODI4SDkwLjk0MDRDODUuNDUwNSAyMzQuODI4IDgxIDIzOS4yNjUgODEgMjQ0LjczOVYyNzEuNTNMODEuMDcwNyAyNzEuNDgzQzgxLjI2NTMgMjcxLjM1NSA4MS40NjI1IDI3MS4yMyA4MS42NjI0IDI3MS4xMDlDODEuOTA4MyAyNzAuOTYgODIuMTU4MSAyNzAuODE3IDgyLjQxMTcgMjcwLjY3OUM4NC4zOTUzIDI2OS42MDUgODYuNjA1NCAyNjguODk0IDg4Ljk1MjMgMjY4LjYzNUM4OS4wMDUyIDI2OC42MjkgODkuMDU4IDI2OC42MjQgODkuMTExIDI2OC42MThDODkuNzEyNSAyNjguNTU3IDkwLjMyMjggMjY4LjUyNiA5MC45NDA0IDI2OC41MjZIMzI5LjUxMUMzMjkuNzM4IDI2OC41MjYgMzI5Ljk2NSAyNjguNTMgMzMwLjE5MiAyNjguNTM5QzMzMC42MzEgMjY4LjU1NSAzMzEuMDY3IDI2OC41ODcgMzMxLjQ5OCAyNjguNjM1QzMzNC40MTkgMjY4Ljk1NyAzMzcuMTI4IDI2OS45OCAzMzkuNDUyIDI3MS41M1YyNDQuNzM5Wk0zMzkuNDUyIDI4Ni4zNjZDMzM5LjQ1MiAyODEuMDIxIDMzNS4yMDYgMjc2LjY2MyAzMjkuODkzIDI3Ni40NjJMMzI5Ljg2NSAyNzYuNDYxQzMyOS43NDggMjc2LjQ1NyAzMjkuNjI5IDI3Ni40NTUgMzI5LjUxMSAyNzYuNDU1SDkwLjk0MDRDODUuNDUwNSAyNzYuNDU1IDgxIDI4MC44OTMgODEgMjg2LjM2NlYzMDYuMTg4QzgxIDMxMS42NjIgODUuNDUwNSAzMTYuMTAxIDkwLjk0MDQgMzE2LjEwMUgzMjkuNTExQzMzNS4wMDEgMzE2LjEwMSAzMzkuNDUyIDMxMS42NjIgMzM5LjQ1MiAzMDYuMTg4VjI4Ni4zNjZaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMjY5Ljg2OCAxMzEuNzUyQzI2OS44NjggMTI2LjI3OCAyNzQuMzE4IDEyMS44NCAyNzkuODA4IDEyMS44NEgzMTEuNjE4QzMxNy4xMDggMTIxLjg0IDMyMS41NTggMTI2LjI3OCAzMjEuNTU4IDEzMS43NTJWMTYxLjQ4NUMzMjEuNTU4IDE2Ni45NTkgMzE3LjEwOCAxNzEuMzk2IDMxMS42MTggMTcxLjM5NkgyNzkuODA4QzI3NC4zMTggMTcxLjM5NiAyNjkuODY4IDE2Ni45NTkgMjY5Ljg2OCAxNjEuNDg1VjEzMS43NTJaIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzFfMTUiPgo8cmVjdCB3aWR0aD0iMjU5IiBoZWlnaHQ9IjIxMyIgZmlsbD0id2hpdGUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDgxIDEwNCkiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K",
9id:"xyz.ithaca.porto",async isAuthorized(){try{return!!(await Ge(()=>this.getAccounts())).length}catch{return!1}},name:"Porto",async onAccountsChanged(c){t.emitter.emit("change",{accounts:c.map(d=>R(d))})},onChainChanged(c){const d=Number(c);t.emitter.emit("change",{chainId:d})},async onConnect(c){const d=await this.getAccounts();if(d.length===0)return;const m=Number(c.chainId);t.emitter.emit("connect",{accounts:d,chainId:m});const l=await this.getProvider();l&&(a&&(l.removeListener("connect",a),a=void 0),o||(o=this.onAccountsChanged.bind(this),l.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),l.on("chainChanged",s)),u||(u=this.onDisconnect.bind(this),l.on("disconnect",u)))},async onDisconnect(c){const d=await this.getProvider();t.emitter.emit("disconnect"),d&&(s&&(d.removeListener("chainChanged",s),s=void 0),u&&(d.removeListener("disconnect",u),u=void 0),a||(a=this.onConnect.bind(this),d.on("connect",a)))},async setup(){if(!a){const c=await this.getProvider();a=this.onConnect.bind(this),c.on("connect",a)}},async switchChain({chainId:c}){const d=n.find(l=>l.id===c);if(!d)throw new F(new ee);return await(await this.getProvider()).request({method:"wallet_switchEthereumChain",params:[{chainId:q(c)}]}),d},type:"injected"}}}on.type="safe";function on(e={}){const{shimDisconnect:t=!1}=e;let n,i;return r=>({id:"safe",name:"Safe",type:on.type,async connect({withCapabilities:o}={}){const s=await this.getProvider();if(!s)throw new H;const a=await this.getAccounts(),u=await this.getChainId();return i||(i=this.onDisconnect.bind(this),s.on("disconnect",i)),t&&await r.storage?.removeItem("safe.disconnected"),{accounts:o?a.map(c=>({address:c,capabilities:{}})):a,chainId:u}},async disconnect(){const o=await this.getProvider();if(!o)throw new H;i&&(o.removeListener("disconnect",i),i=void 0),t&&await r.storage?.setItem("safe.disconnected",!0)},async getAccounts(){const o=await this.getProvider();if(!o)throw new H;return(await o.request({method:"eth_accounts"})).map(R)}
9,async getProvider(){if(typeof window<"u"&&window?.parent!==window){if(!n){const{default:s}=await oe(async()=>{const{default:d}=await import("./LA7tM4y5.js");return{default:d}},__vite__mapDeps([43,44,4,5,2,24,25]),import.meta.url),a=new s(e),u=await xt(()=>a.safe.getInfo(),{timeout:e.unstable_getInfoTimeout??10});if(!u)throw new Error("Could not load Safe information");const c=await(async()=>{const d=await oe(()=>import("./Caj0LqM-.js").then(m=>m.i),__vite__mapDeps([45,7,8,44,46,37]),import.meta.url);return typeof d.SafeAppProvider!="function"&&typeof d.default.SafeAppProvider=="function"?d.default.SafeAppProvider:d.SafeAppProvider})();n=new c(u,a)}return n}},async getChainId(){const o=await this.getProvider();if(!o)throw new H;return Number(o.chainId)},async isAuthorized(){try{return t&&await r.storage?.getItem("safe.disconnected")?!1:!!(await this.getAccounts()).length}catch{return!1}},onAccountsChanged(){},onChainChanged(){},onDisconnect(){r.emitter.emit("disconnect")}})}const Ya="6.2.0";an.type="walletConnect";function an(e){const t=e.isNewChainsStale??!0;let n,i;const r="eip155";let o,s,a,u,c,d;return m=>({id:"walletConnect",name:"WalletConnect",type:an.type,async setup(){const l=await this.getProvider().catch(()=>null);l&&(a||(a=this.onConnect.bind(this),l.on("connect",a)),c||(c=this.onSessionDelete.bind(this),l.on("session_delete",c)))},async connect({chainId:l,withCapabilities:p,...w}={}){try{const g=await this.getProvider();if(!g)throw new H;u||(u=this.onDisplayUri,g.on("display_uri",u));let C=l;if(!C){const T=await m.storage?.getItem("state")??{};m.chains.some(ye=>ye.id===T.chainId)?C=T.chainId:C=m.chains[0]?.id}if(!C)throw new Error("No chains found on connector.");const _=await this.isChainsStale();if(g.session&&_&&await g.disconnect(),!g.session||_){const T=m.chains.filter(L=>L.id!==C).map(L=>L.id);await g.connect({optionalChains:[C,...T],..."pairingTopic"in w?{pairingTopic:w.pairingTopic}:{}}),this.setRequestedChainsIds(m.chains.map(L=>L.id))}const N=(await g.enable()).map(T=>R(T));let z=await this.getChainId();return l&&z!==l&&(z=(await this.switchChain({chainId:l}).catch(L=>{if(L.code===k.code&&L.cause?.message!=="Missing or invalid. request() method: wallet_addEthereumChain")throw L;return{id:z}}))?.id??z),u&&(g.removeListener("display_uri",u),u=void 0),a&&(g.removeListener("connect",a),a=void 0),o||(o=this.onAccountsChanged.bind(this),g.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),g.on("chainChanged",s)),d||(d=this.onDisconnect.bind(this),g.on("disconnect",d)),c||(c=this.onSessionDelete.bind(this),g.on("session_delete",c)),{accounts:p?N.map(T=>({address:T,capabilities:{}})):N,chainId:z}}catch(g){throw/(user rejected|connection request reset)/i.test(g?.message)?new k(g):g}},async disconnect(){const l=await this.getProvider();try{await l?.disconnect()}catch(p){if(!/No matching key/i.test(p.message))throw p}finally{s&&(l?.removeListener("chainChanged",s),s=void 0),d&&(l?.removeListener("disconnect",d),d=void 0),a||(a=this.onConnect.bind(this),l?.on("connect",a)),o&&(l?.removeListener("accountsChanged",o),o=void 0),c&&(l?.removeListener("session_delete",c),c=void 0),this.setRequestedChainsIds([])}},async getAccounts(){return(await this.getProvider()).accounts.map(p=>R(p))},async getProvider({chainId:l}={}){async function p(){const w=m.chains.map(C=>C.id);if(!w.length)return;const{EthereumProvider:g}=await oe(async()=>{const{EthereumProvider:C}=await import("./PuKmsKR3.js").then(_=>_.x);return{EthereumProvider:C}},__vite__mapDeps([47,7,8,37,33]),import.meta.url);return await g.init({...e,disableProviderPing:!0,optionalChains:w,projectId:e.projectId,rpcMap:Object.fromEntries(m.chains.map(C=>{const[_]=Zi({chain:C,transports:m.transports});return[C.id,_]})),showQrModal:e.showQrModal??!0})}return n||(i||(i=p()),n=await i,n?.events.setMaxListeners(Number.POSITIVE_INFINITY)),l&&await this.switchChain?.({chainId:l}),n},async getChainId(){return(await this.getProvider()).chainId},async isAuthorized(){try{const[l,p]=await Promise.all([this.getAccounts(),this.getProvider()]);return l.length?await this.isChainsStale()&&p.session?(await p.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({addEthereumChainParameter:l,chainId:p}){const w=await this.getProvider();if(!w)throw new H;const g=m.chains.find(C=>C.id===p);if(!g)throw new F(new ee);try{await Promise.all([new Promise(_=>{const N=({chainId:z})=>{z===p&&(m.emitter.off("change",N),_())};m.emitter.on("change",N)}),w.request({method:"wallet_switchEthereumChain",params:[{chainId:q(p)}]})]);const C=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...C,p]),g}catch(C){const _=C;if(/(user rejected)/i.test(_.message))throw new k(_);try{let N;l?.blockExplorerUrls?N=l.blockExplorerUrls:N=g.blockExplorers?.default.url?[g.blockExplorers?.default.url]:[];let z;l?.rpcUrls?.length?z=l.rpcUrls:z=[...g.rpcUrls.default.http];const T={blockExplorerUrls:N,chainId:q(p),chainName:l?.chainName??g.name,iconUrls:l?.iconUrls,nativeCurrency:l?.nativeCurrency??g.nativeCurrency,rpcUrls:z};await w.request({method:"wallet_addEthereumChain",params:[T]});const L=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...L,p]),g}catch(N){throw new k(N)}}},onAccountsChanged(l){l.length===0?this.onDisconnect():m.emitter.emit("change",{accounts:l.map(p=>R(p))})},onChainChanged(l){const p=Number(l);m.emitter.emit("change",{chainId:p})},async onConnect(l){const p=Number(l.chainId),w=await this.getAccounts();m.emitter.emit("connect",{accounts:w,chainId:p})},async onDisconnect(l){this.setRequestedChainsIds([]),m.emitter.emit("disconnect");const p=await this.getProvider();o&&(p.removeListener("accountsChanged",o),o=void 0),s&&(p.removeListener("chainChanged",s),s=void 0),d&&(p.removeListener("disconnect",d),d=void 0),c&&(p.removeListener("session_delete",c),c=void 0),a||(a=this.onConnect.bind(this),p.on("connect",a))},onDisplayUri(l){m.emitter.emit("message",{type:"display_uri",data:l})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){return n?n.session?.namespaces[r]?.accounts?.map(p=>Number.parseInt(p.split(":")[1]||"",10))??[]:[]},async getRequestedChainsIds(){return await m.storage?.getItem(this.requestedChainsStorageKey)??[]},async isChainsStale(){if(!t)return!1;const l=m.chains.map(g=>g.id),p=this.getNamespaceChainsIds();if(p.length&&!p.some(g=>l.includes(g)))return!1;const w=await this.getRequestedChainsIds();return!l.every(g=>w.includes(g))},async setRequestedChainsIds(l){await m.storage?.setItem(this.requestedChainsStorageKey,l)},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}})}const uc=Object.freeze(Object.defineProperty({__proto__:null,baseAccount:Pr,coinbaseWallet:ut,gemini:Qt,injected:Lt,metaMask:Wt,mock:Ut,porto:Za,safe:on,version:Ya,walletConnect:an},Symbol.toStringTag,{value:"Module"}));
9export{zi as $,ar as A,V as B,Ce as C,ic as D,Es as E,nr as F,Vs as G,cc as H,Qs as I,rc as J,sc as K,mi as L,ct as M,Oi as N,Ci as O,gr as P,at as Q,wr as R,Oe as S,Si as T,Xn as U,ti as V,ki as W,ei as X,Ei as Y,ni as Z,Ri as _,Wn as a,Mi as a0,Ii as a1,St as a2,he as a3,ii as a4,Ti as a5,_i as a6,Di as a7,xi as a8,si as a9,$i as aa,Ni as ab,oi as ac,ji as ad,ai as ae,Li as af,Kn as b,fi as c,Ft as d,Xa as e,oc as f,ac as g,fo as h,gi as i,wi as j,yi as k,vi as l,bi as m,ec as n,tc as o,Dt as p,er as q,nc as r,Gn as s,uc as t,tr as u,Ys as v,Ja as w,Pi as x,Ai as y,ts as z};

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.