"use strict";(self.webpackChunkfrog=self.webpackChunkfrog||[]).push([[6570],{6973:(e,t,r)=>{r.d(t,{s:()=>d});var s=r(96540),o=r(24693),n=r(19888),a=r(71285);const{use:c}=s,{useSyncExternalStore:i}=n,u=(e,t)=>{const r=(0,s.useRef)();(0,s.useEffect)((()=>{r.current=(0,o.JR)(e,t,!0)})),(0,s.useDebugValue)(r.current)},l=new WeakMap;function d(e,t){const r=null==t?void 0:t.sync,n=(0,s.useRef)(),d=(0,s.useRef)();let h=!0;const f=i((0,s.useCallback)((t=>{const s=(0,a.B1)(e,t,r);return t(),s}),[e,r]),(()=>{const t=(0,a.P9)(e,c);try{if(!h&&n.current&&d.current&&!(0,o.Hq)(n.current,t,d.current,new WeakMap))return n.current}catch(e){}return t}),(()=>(0,a.P9)(e,c)));h=!1;const p=new WeakMap;(0,s.useEffect)((()=>{n.current=f,d.current=p})),u(f,p);const b=(0,s.useMemo)((()=>new WeakMap),[]);return(0,o.tz)(f,p,b,l)}},71285:(e,t,r)=>{r.d(t,{B1:()=>l,BX:()=>u,KR:()=>h,P9:()=>d});var s=r(24693);const o=e=>"object"==typeof e&&null!==e,n=new WeakMap,a=new WeakSet,c=(e=Object.is,t=(e,t)=>new Proxy(e,t),r=e=>o(e)&&!a.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer),c=e=>{switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e}},i=new WeakMap,u=(e,t,r=c)=>{const o=i.get(e);if((null==o?void 0:o[0])===t)return o[1];const l=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return(0,s.OC)(l,!0),i.set(e,[t,l]),Reflect.ownKeys(e).forEach((t=>{if(Object.getOwnPropertyDescriptor(l,t))return;const o=Reflect.get(e,t),c={value:o,enumerable:!0,configurable:!0};if(a.has(o))(0,s.OC)(o,!1);else if(o instanceof Promise)delete c.value,c.get=()=>r(o);else if(n.has(o)){const[e,t]=n.get(o);c.value=u(e,t(),r)}Object.defineProperty(l,t,c)})),Object.preventExtensions(l)},l=new WeakMap,d=[1,1],h=c=>{if(!o(c))throw new Error("object required");const i=l.get(c);if(i)return i;let f=d[0];const p=new Set,b=(e,t=++d[0])=>{f!==t&&(f=t,p.forEach((r=>r(e,t))))};let m=d[1];const g=e=>(t,r)=>{const s=[...t];s[1]=[e,...s[1]],b(s,r)},w=new Map,y=e=>{var t;const r=w.get(e);r&&(w.delete(e),null==(t=r[1])||t.call(r))},v=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c)),x=t(v,{deleteProperty(e,t){const r=Reflect.get(e,t);y(t);const s=Reflect.deleteProperty(e,t);return s&&b(["delete",[t],r]),s},set(t,c,i,u){const d=Reflect.has(t,c),f=Reflect.get(t,c,u);if(d&&(e(f,i)||l.has(i)&&e(f,l.get(i))))return!0;y(c),o(i)&&(i=(0,s.Ai)(i)||i);let m=i;if(i instanceof Promise)i.then((e=>{i.status="fulfilled",i.value=e,b(["resolve",[c],e])})).catch((e=>{i.status="rejected",i.reason=e,b(["reject",[c],e])}));else{!n.has(i)&&r(i)&&(m=h(i));const e=!a.has(m)&&n.get(m);e&&((e,t)=>{if(w.has(e))throw new Error("prop listener already exists");if(p.size){const r=t[3](g(e));w.set(e,[t,r])}else w.set(e,[t])})(c,e)}return Reflect.set(t,c,m,u),b(["set",[c],i,f]),!0}});l.set(c,x);const P=[v,(e=++d[1])=>(m===e||p.size||(m=e,w.forEach((([t])=>{const r=t[1](e);r>f&&(f=r)}))),f),u,e=>{p.add(e),1===p.size&&w.forEach((([e,t],r)=>{if(t)throw new Error("remove already exists");const s=e[3](g(r));w.set(r,[e,s])}));return()=>{p.delete(e),0===p.size&&w.forEach((([e,t],r)=>{t&&(t(),w.set(r,[e]))}))}}];return n.set(x,P),Reflect.ownKeys(c).forEach((e=>{const t=Object.getOwnPropertyDescriptor(c,e);"value"in t&&(x[e]=c[e],delete t.value,delete t.writable),Object.defineProperty(v,e,t)})),x})=>[h,n,a,e,t,r,c,i,u,l,d],[i]=c();function u(e={}){return i(e)}function l(e,t,r){const s=n.get(e);let o;const a=[],c=s[3];let i=!1;const u=c((e=>{a.push(e),r?t(a.splice(0)):o||(o=Promise.resolve().then((()=>{o=void 0,i&&t(a.splice(0))})))}));return i=!0,()=>{i=!1,u()}}function d(e,t){const r=n.get(e),[s,o,a]=r;return a(s,o(),t)}function h(e){return a.add(e),e}},4707:(e,t,r)=>{r.d(t,{u$:()=>o,zC:()=>n});var s=r(71285);function o(e,t,r,o){let n=e[t];return(0,s.B1)(e,(()=>{const s=e[t];Object.is(n,s)||r(n=s)}),o)}Symbol();function n(e){const t=(0,s.BX)({data:Array.from(e||[]),has(e){return this.data.some((t=>t[0]===e))},set(e,t){const r=this.data.find((t=>t[0]===e));return r?r[1]=t:this.data.push([e,t]),this},get(e){var t;return null==(t=this.data.find((t=>t[0]===e)))?void 0:t[1]},delete(e){const t=this.data.findIndex((t=>t[0]===e));return-1!==t&&(this.data.splice(t,1),!0)},clear(){this.data.splice(0)},get size(){return this.data.length},toJSON(){return new Map(this.data)},forEach(e){this.data.forEach((t=>{e(t[1],t[0],this)}))},keys(){return this.data.map((e=>e[0])).values()},values(){return this.data.map((e=>e[1])).values()},entries(){return new Map(this.data).entries()},get[Symbol.toStringTag](){return"Map"},[Symbol.iterator](){return this.entries()}});return Object.defineProperties(t,{data:{enumerable:!1},size:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(t),t}},3625:(e,t,r)=>{function s(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}r.d(t,{rCZ:()=>o});const o=s({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xce01f8eee7E479C928F8919abD53E553a36CeF67",blockCreated:19258213},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}})},2669:(e,t,r)=>{r.d(t,{o:()=>C});var s=r(51344),o=r(73589),n=r(27513);s.C;class a extends s.C{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}s.C;function c(e,{dir:t,size:r=32}={}){return"string"==typeof e?function(e,{dir:t,size:r=32}={}){if(null===r)return e;const s=e.replace("0x","");if(s.length>2*r)throw new a({size:Math.ceil(s.length/2),targetSize:r,type:"hex"});return`0x${s["right"===t?"padEnd":"padStart"](2*r,"0")}`}(e,{dir:t,size:r}):function(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new a({size:e.length,targetSize:r,type:"bytes"});const s=new Uint8Array(r);for(let o=0;ot)throw new i({givenSize:u(e),maxSize:t})}const d=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function h(e,t={}){let r="";for(let t=0;tthis.maxSize){const e=this.keys().next().value;e&&this.delete(e)}return this}}const m=new b(8192);var g=r(50669);function w(e,{delay:t=100,retryCount:r=2,shouldRetry:s=()=>!0}={}){return new Promise(((o,n)=>{const a=async({count:c=0}={})=>{try{const t=await e();o(t)}catch(e){if(c{const r="function"==typeof t?t({count:c,error:e}):t;r&&await(0,g.u)(r),a({count:c+1})})({error:e});n(e)}};a()}))}var y=r(18463);function v(e,t={}){return async(r,a={})=>{const{dedupe:c=!1,methods:i,retryDelay:u=150,retryCount:l=3,uid:d}={...t,...a},{method:h}=r;if(i?.exclude?.includes(h))throw new n.ab(new Error("method not supported"),{method:h});if(i?.include&&!i.include.includes(h))throw new n.ab(new Error("method not supported"),{method:h});return function(e,{enabled:t=!0,id:r}){if(!t||!r)return e();if(m.get(r))return m.get(r);const s=e().finally((()=>m.delete(r)));return m.set(r,s),s}((()=>w((async()=>{try{return await e(r)}catch(e){const t=e;switch(t.code){case n.XU.code:throw new n.XU(t);case n.CL.code:throw new n.CL(t);case n.Gi.code:throw new n.Gi(t,{method:r.method});case n.D5.code:throw new n.D5(t);case n.bq.code:throw new n.bq(t);case n.Di.code:throw new n.Di(t);case n.hA.code:throw new n.hA(t);case n.qZ.code:throw new n.qZ(t);case n.YW.code:throw new n.YW(t);case n.ab.code:throw new n.ab(t,{method:r.method});case n.s0.code:throw new n.s0(t);case n.xQ.code:throw new n.xQ(t);case n.vx.code:throw new n.vx(t);case n.sV.code:throw new n.sV(t);case n.Sf.code:throw new n.Sf(t);case n.RV.code:throw new n.RV(t);case n.xq.code:throw new n.xq(t);case n.ch.code:throw new n.ch(t);case 5e3:throw new n.vx(t);default:if(e instanceof s.C)throw e;throw new n.MI(t)}}}),{delay:({count:e,error:t})=>{if(t&&t instanceof o.Ci){const e=t?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*Number.parseInt(e)}return(1<function(e){if("code"in e&&"number"==typeof e.code)return-1===e.code||(e.code===n.s0.code||e.code===n.bq.code);if(e instanceof o.Ci&&e.status)return 403===e.status||(408===e.status||(413===e.status||(429===e.status||(500===e.status||(502===e.status||(503===e.status||504===e.status))))));return!0}(e)})),{enabled:c,id:c?p(`${d}.${(0,y.A)(r)}`):void 0})}}const x=256;let P,j=x;function C({key:e,methods:t,name:r,request:s,retryCount:o=3,retryDelay:n=150,timeout:a,type:c},i){return{config:{key:e,name:r,request:s,retryCount:o,retryDelay:n,timeout:a,type:c},request:v(s,{methods:t,retryCount:o,retryDelay:n,uid:function(e=11){if(!P||j+e>2*x){P="",j=0;for(let e=0;e{r.d(t,{N:()=>v});const s={ether:-9,wei:9};function o(e,t="wei"){return function(e,t){let r=e.toString();const s=r.startsWith("-");s&&(r=r.slice(1)),r=r.padStart(t,"0");let[o,n]=[r.slice(0,r.length-t),r.slice(r.length-t)];return n=n.replace(/(0+)$/,""),`${s?"-":""}${o||"0"}${n?`.${n}`:""}`}(e,s[t])}var n=r(51344);class a extends n.C{constructor({cause:e,message:t}={}){const r=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class c extends n.C{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${o(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class i extends n.C{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${o(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(i,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class u extends n.C{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class l extends n.C{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class d extends n.C{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class h extends n.C{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class f extends n.C{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class p extends n.C{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class b extends n.C{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(b,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends n.C{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${o(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${o(r)} gwei`:""}).`].join("\n"),{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});n.C;var g=r(27513),w=r(50669),y=r(2669);function v(e,t={}){const{key:r="fallback",name:s="Fallback",rank:o=!1,retryCount:n,retryDelay:c}=t;return({chain:t,pollingInterval:i=4e3,timeout:u,...l})=>{let d=e,h=()=>{};const f=(0,y.o)({key:r,name:s,async request({method:e,params:r}){const s=async(o=0)=>{const n=d[o]({...l,chain:t,retryCount:0,timeout:u});try{const t=await n.request({method:e,params:r});return h({method:e,params:r,response:t,transport:n,status:"success"}),t}catch(t){if(h({error:t,method:e,params:r,transport:n,status:"error"}),function(e){if("code"in e&&"number"==typeof e.code&&(e.code===g.YW.code||e.code===g.vx.code||a.nodeMessage.test(e.message)||5e3===e.code))return!0;return!1}(t))throw t;if(o===d.length-1)throw t;return s(o+1)}};return s()},retryCount:n,retryDelay:c,type:"fallback"},{onResponse:e=>h=e,transports:d.map((e=>e({chain:t,retryCount:0})))});if(o){const e="object"==typeof o?o:{};!function({chain:e,interval:t=4e3,onTransports:r,ping:s,sampleCount:o=10,timeout:n=1e3,transports:a,weights:c={}}){const{stability:i=.7,latency:u=.3}=c,l=[],d=async()=>{const c=await Promise.all(a.map((async t=>{const r=t({chain:e,retryCount:0,timeout:n}),o=Date.now();let a,c;try{await(s?s({transport:r}):r.request({method:"net_listening"})),c=1}catch{c=0}finally{a=Date.now()}return{latency:a-o,success:c}})));l.push(c),l.length>o&&l.shift();const h=Math.max(...l.map((e=>Math.max(...e.map((({latency:e})=>e)))))),f=a.map(((e,t)=>{const r=l.map((e=>e[t].latency)),s=1-r.reduce(((e,t)=>e+t),0)/r.length/h,o=l.map((e=>e[t].success)),n=o.reduce(((e,t)=>e+t),0)/o.length;return 0===n?[0,t]:[u*s+i*n,t]})).sort(((e,t)=>t[0]-e[0]));r(f.map((([,e])=>a[e]))),await(0,w.u)(t),d()};d()}({chain:t,interval:e.interval??i,onTransports:e=>d=e,ping:e.ping,sampleCount:e.sampleCount,timeout:e.timeout,transports:d,weights:e.weights})}return f}}},99571:(e,t,r)=>{r.d(t,{L:()=>f});var s=r(73589),o=r(51344);class n extends o.C{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}const a=new Map;function c({fn:e,id:t,shouldSplitBatch:r,wait:s=0,sort:o}){const n=async()=>{const t=i();c();const r=t.map((({args:e})=>e));0!==r.length&&e(r).then((e=>{o&&Array.isArray(e)&&e.sort(o);for(let r=0;r{for(let r=0;ra.delete(t),i=()=>a.get(t)||[],u=e=>a.set(t,[...i(),e]);return{flush:c,async schedule(e){const{promise:t,resolve:o,reject:a}=function(){let e=()=>{},t=()=>{};return{promise:new Promise(((r,s)=>{e=r,t=s})),resolve:e,reject:t}}(),c=r?.([...i().map((({args:e})=>e)),e]);c&&n();return i().length>0?(u({args:e,resolve:o,reject:a}),t):(u({args:e,resolve:o,reject:a}),setTimeout(n,s),t)}}}var i=r(18463);function u(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const l=u();function d(e,t={}){return{async request(r){const{body:o,onRequest:n=t.onRequest,onResponse:a=t.onResponse,timeout:c=t.timeout??1e4}=r,u={...t.fetchOptions??{},...r.fetchOptions??{}},{headers:d,method:h,signal:f}=u;try{const t=await function(e,{errorInstance:t=new Error("timed out"),timeout:r,signal:s}){return new Promise(((o,n)=>{(async()=>{let a;try{const c=new AbortController;r>0&&(a=setTimeout((()=>{s?c.abort():n(t)}),r)),o(await e({signal:c?.signal||null}))}catch(e){"AbortError"===e?.name&&n(t),n(e)}finally{clearTimeout(a)}})()}))}((async({signal:t})=>{const r={...u,body:Array.isArray(o)?(0,i.A)(o.map((e=>({jsonrpc:"2.0",id:e.id??l.take(),...e})))):(0,i.A)({jsonrpc:"2.0",id:o.id??l.take(),...o}),headers:{"Content-Type":"application/json",...d},method:h||"POST",signal:f||(c>0?t:null)},s=new Request(e,r),a=await(n?.(s,r))??{...r,url:e};return await fetch(a.url??e,a)}),{errorInstance:new s.MU({body:o,url:e}),timeout:c,signal:!0});let r;if(a&&await a(t),t.headers.get("Content-Type")?.startsWith("application/json"))r=await t.json();else{r=await t.text();try{r=JSON.parse(r||"{}")}catch(e){if(t.ok)throw e;r={error:r}}}if(!t.ok)throw new s.Ci({body:o,details:(0,i.A)(r.error)||t.statusText,headers:t.headers,status:t.status,url:e});return r}catch(t){if(t instanceof s.Ci)throw t;if(t instanceof s.MU)throw t;throw new s.Ci({body:o,cause:t,url:e})}}}}var h=r(2669);function f(e,t={}){const{batch:r,fetchOptions:o,key:a="http",methods:i,name:u="HTTP JSON-RPC",onFetchRequest:l,onFetchResponse:f,retryDelay:p}=t;return({chain:b,retryCount:m,timeout:g})=>{const{batchSize:w=1e3,wait:y=0}="object"==typeof r?r:{},v=t.retryCount??m,x=g??t.timeout??1e4,P=e||b?.rpcUrls.default.http[0];if(!P)throw new n;const j=d(P,{fetchOptions:o,onRequest:l,onResponse:f,timeout:x});return(0,h.o)({key:a,methods:i,name:u,async request({method:e,params:t}){const o={method:e,params:t},{schedule:n}=c({id:P,wait:y,shouldSplitBatch:e=>e.length>w,fn:e=>j.request({body:e}),sort:(e,t)=>e.id-t.id}),[{error:a,result:i}]=await(async e=>r?n(e):[await j.request({body:e})])(o);if(a)throw new s.J8({body:o,error:a,url:P});return i},retryCount:v,retryDelay:p,timeout:x,type:"http"},{fetchOptions:o,url:P})}}},51344:(e,t,r)=>{r.d(t,{C:()=>n});const s="2.22.17";let o={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${s}`};class n extends Error{constructor(e,t={}){const r=t.cause instanceof n?t.cause.details:t.cause?.message?t.cause.message:t.details,a=t.cause instanceof n&&t.cause.docsPath||t.docsPath,c=o.getDocsUrl?.({...t,docsPath:a});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...c?[`Docs: ${c}`]:[],...r?[`Details: ${r}`]:[],...o.version?[`Version: ${o.version}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=a,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=s}walk(e){return a(this,e)}}function a(e,t){return t?.(e)?e:e&&"object"==typeof e&&"cause"in e&&void 0!==e.cause?a(e.cause,t):t?null:e}},73589:(e,t,r)=>{r.d(t,{Ci:()=>n,J8:()=>a,MU:()=>c});var s=r(18463),o=r(51344);class n extends o.C{constructor({body:e,cause:t,details:r,headers:o,status:n,url:a}){super("HTTP request failed.",{cause:t,details:r,metaMessages:[n&&`Status: ${n}`,`URL: ${a}`,e&&`Request body: ${(0,s.A)(e)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=o,this.status=n,this.url=a}}o.C;class a extends o.C{constructor({body:e,error:t,url:r}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${r}`,`Request body: ${(0,s.A)(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code,this.data=t.data}}o.C;class c extends o.C{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${t}`,`Request body: ${(0,s.A)(e)}`],name:"TimeoutError"})}}},27513:(e,t,r)=>{r.d(t,{CL:()=>i,D5:()=>l,Di:()=>h,Gi:()=>u,MI:()=>O,RV:()=>P,Sf:()=>x,XU:()=>c,YW:()=>b,ab:()=>m,bq:()=>d,ch:()=>C,hA:()=>f,qZ:()=>p,s0:()=>g,sV:()=>v,vx:()=>y,xQ:()=>w,xq:()=>j});var s=r(51344),o=r(73589);class n extends s.C{constructor(e,{code:t,docsPath:r,metaMessages:s,name:n,shortMessage:a}){super(a,{cause:e,docsPath:r,metaMessages:s||e?.metaMessages,name:n||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=n||e.name,this.code=e instanceof o.J8?e.code:t??-1}}class a extends n{constructor(e,t){super(e,t),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class c extends n{constructor(e){super(e,{code:c.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class i extends n{constructor(e){super(e,{code:i.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(i,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class u extends n{constructor(e,{method:t}={}){super(e,{code:u.code,name:"MethodNotFoundRpcError",shortMessage:`The method${t?` "${t}"`:""} does not exist / is not available.`})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class l extends n{constructor(e){super(e,{code:l.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join("\n")})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class d extends n{constructor(e){super(e,{code:d.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class h extends n{constructor(e){super(e,{code:h.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join("\n")})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class f extends n{constructor(e){super(e,{code:f.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class p extends n{constructor(e){super(e,{code:p.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class b extends n{constructor(e){super(e,{code:b.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class m extends n{constructor(e,{method:t}={}){super(e,{code:m.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${t?` "${t}"`:""} is not supported.`})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class g extends n{constructor(e){super(e,{code:g.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class w extends n{constructor(e){super(e,{code:w.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class y extends a{constructor(e){super(e,{code:y.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class v extends a{constructor(e){super(e,{code:v.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class x extends a{constructor(e,{method:t}={}){super(e,{code:x.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${t?` " ${t}"`:""}.`})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class P extends a{constructor(e){super(e,{code:P.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class j extends a{constructor(e){super(e,{code:j.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(j,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class C extends a{constructor(e){super(e,{code:C.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(C,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class O extends n{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}},18463:(e,t,r)=>{r.d(t,{A:()=>s});const s=(e,t,r)=>JSON.stringify(e,((e,r)=>{const s="bigint"==typeof r?r.toString():r;return"function"==typeof t?t(e,s):s}),r)},50669:(e,t,r)=>{async function s(e){return new Promise((t=>setTimeout(t,e)))}r.d(t,{u:()=>s})}}]);