1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[183],{77625:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,r,s,o){if("function"!=typeof r)throw TypeError("The listener must be a function");var a=new i(r,s||e,o),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=Array(s);i<s;i++)o[i]=r[i].fn;return o},a.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,i,s,o){var a=n?n+e:e;if(!this._events[a])return!1;var c,u,l=this._events[a],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),h){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,i),!0;case 5:return l.fn.call(l.context,t,r,i,s),!0;case 6:return l.fn.call(l.context,t,r,i,s,o),!0}for(u=1,c=Array(h-1);u<h;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var d,f=l.length;for(u=0;u<f;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),h){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,r);break;case 4:l[u].fn.call(l[u].context,t,r,i);break;default:if(!c)for(d=1,c=Array(h-1);d<h;d++)c[d-1]=arguments[d];l[u].fn.apply(l[u].context,c)}}return!0},a.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,r,i){var s=n?n+e:e;if(!this._events[s])return this;if(!t)return o(this,s),this;var a=this._events[s];if(a.fn)a.fn!==t||i&&!a.once||r&&a.context!==r||o(this,s);else{for(var c=0,u=[],l=a.length;c<l;c++)(a[c].fn!==t||i&&!a[c].once||r&&a[c].context!==r)&&u.push(a[c]);u.length?this._events[s]=1===u.length?u[0]:u:o(this,s)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a},81523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return i}});let r=n(18993);function i(e){let{reason:t,children:n}=e;if("undefined"==typeof window)throw new r.BailoutToCSRError(t);return n}},70049:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return s}});let r=n(57437),i=n(20544);function s(e){let{moduleIds:t}=e;if("undefined"!=typeof window)return null;let n=(0,i.getExpectedRequestStore)("next/dynamic css"),s=[];if(n.reactLoadableManifest&&t){let e=n.reactLoadableManifest;for(let n of t){if(!e[n])continue;let t=e[n].files.filter(e=>e.endsWith(".css"));s.push(...t)}}return 0===s.length?null:(0,r.jsx)(r.Fragment,{children:s.map(e=>(0,r.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:n.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},89229:function(){},25566:function(e){var t,n,r,i=e.exports={};function s(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}
1catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var c=[],u=!1,l=-1;function h(){u&&r&&(u=!1,r.length?c=r.concat(c):l=-1,c.length&&d())}function d(){if(!u){var e=a(h);u=!0;for(var t=c.length;t;){for(r=c,c=[];++l<t;)r&&r[l].run();l=-1,t=c.length}r=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new f(e,t)),1!==c.length||u||a(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}},8458:function(e,t,n){"use strict";n.d(t,{Ag:function(){return l}});var r=n(91269);let i={address:null,apiKey:null,chain:(0,n(90328).a)({...r.i,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...r.i.contracts,disputeGameFactory:{11155111:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{11155111:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{11155111:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{11155111:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:11155111}),config:{appearance:{mode:null,theme:null},paymaster:null},rpcUrl:null,schemaId:null,projectId:null},s=e=>i[e],o=e=>(Object.assign(i,e),s);var a=n(2265),c=n(57437);let u=(0,a.createContext)(i);function l({address:e,apiKey:t,chain:n,children:r,config:i,projectId:s,rpcUrl:l,schemaId:h}){if(h&&!RegExp("^0x[a-fA-F0-9]{64}$").test(h))throw Error('EAS schemaId must be 64 characters prefixed with "0x"');let d=(0,a.useMemo)(()=>{let r=t?`https://api.developer.coinbase.com/rpc/v1/${n.name.replace(" ","-").toLowerCase()}/${t}`:null,a={address:e??null,apiKey:t??null,chain:n,config:{appearance:{mode:i?.appearance?.mode??"auto",theme:i?.appearance?.theme??"default"},paymaster:i?.paymaster||r},projectId:s??null,rpcUrl:l??null,schemaId:h??null};return o(a),a},[e,t,n,i,s,l,h]);return(0,c.jsx)(u.Provider,{value:d,children:r})}},74043:function(e,t,n){"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function s(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function o(e,t){i(e);let n=t.outputLen;if(e.length<n)throw Error(`digestInto() expects output buffer of length at least ${n}`)}n.d(t,{Gg:function(){return s},J8:function(){return o},Rx:function(){return r},aI:function(){return i}})},10662:function(e,t,n){"use strict";n.d(t,{GL:function(){return s},Jq:function(){return i},O0:function(){return l},hE:function(){return d},iA:function(){return a},kb:function(){return h},l1:function(){return u},np:function(){return o}});var r=n(74043);let i=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),s=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),o=(e,t)=>e<<32-t|e>>>t,a=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],c=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;function u(e){for(let t=0;t<e.length;t++)e[t]=c(e[t])}function l(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}(e)),(0,r.aI)(e),e}class h{clone(){return this._cloneInto()}}function d(e){let t=t=>e().update(l(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}},31800:function(e,t,n){"use strict";n.d(t,{S:function(){return j}});var r="undefined"==typeof window||"Deno"in globalThis;function i(){}function s(e,t){return"function"==typeof e?e(t):e}function o(e,t){let{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==c(o,t.options))return!1}else if(!l(t.queryKey,o))return!1}if("all"!==n){let e=t.isActive();if("active"===n&&!e||"inactive"===n&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&(!i||i===t.state.fetchStatus)&&(!s||!!s(t))}function a(e,t){let{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(u(t.options.mutationKey)!==u(s))return!1}else if(!l(t.options.mutationKey,s))return!1}return(!r||t.state.status===r)&&(!i||!!i(t))}function c(e,t){return(t?.queryKeyHashFn||u)(e)}function u(e){return JSON.stringify(e,(e,t)=>d(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function l(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(n=>!l(e[n],t[n]))}function h(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function d(e){if(!f(e))return!1;let t=e.constructor;if(void 0===t)return!0;let n=t.prototype;return!!(f(n)&&n.hasOwnProperty("isPrototypeOf"))&&Object.getPrototypeOf(e)===Object.prototype}function f(e){return"[object Object]"===Object.prototype.toString.call(e)}function p(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function m(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var g=Symbol();function b(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==g?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}var y=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=e=>setTimeout(e,0),s=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>
1{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{--t||o()}return n},batchCalls:e=>(...t)=>{s(()=>{e(...t)})},schedule:s,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}(),v=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},w=new class extends v{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!r&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:globalThis.document?.visibilityState!=="hidden"}},x=new class extends v{#r=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!r&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#r!==e&&(this.#r=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#r}};function P(e){return Math.min(1e3*2**e,3e4)}function C(e){return(e??"online")!=="online"||x.isOnline()}var I=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function O(e){return e instanceof I}function E(e){let t,n=!1,i=0,s=!1,o=function(){let e,t;let n=new Promise((n,r)=>{e=n,t=r});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch(()=>{}),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}(),a=()=>w.isFocused()&&("always"===e.networkMode||x.isOnline())&&e.canRun(),c=()=>C(e.networkMode)&&e.canRun(),u=n=>{s||(s=!0,e.onSuccess?.(n),t?.(),o.resolve(n))},l=n=>{s||(s=!0,e.onError?.(n),t?.(),o.reject(n))},h=()=>new Promise(n=>{t=e=>{(s||a())&&n(e)},e.onPause?.()}).then(()=>{t=void 0,s||e.onContinue?.()}),d=()=>{let t;if(s)return;let o=0===i?e.initialPromise:void 0;try{t=o??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(u).catch(t=>{if(s)return;let o=e.retry??(r?0:3),c=e.retryDelay??P,u="function"==typeof c?c(i,t):c,f=!0===o||"number"==typeof o&&i<o||"function"==typeof o&&o(i,t);if(n||!f){l(t);return}i++,e.onFail?.(i,t),new Promise(e=>{setTimeout(e,u)}).then(()=>a()?void 0:h()).then(()=>{n?l(t):d()})})};return{promise:o,cancel:t=>{s||(l(new I(t)),e.abort?.())},continue:()=>(t?.(),o),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:c,start:()=>(c()?d():h().then(d),o)}}var S=class{#i;destroy(){this.clearGcTimeout()}scheduleGc(){var e;this.clearGcTimeout(),"number"==typeof(e=this.gcTime)&&e>=0&&e!==1/0&&(this.#i=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(r?1/0:3e5))}clearGcTimeout(){this.#i&&(clearTimeout(this.#i),this.#i=void 0)}},U=class extends S{#s;#o;#a;#c;#u;#l;constructor(e){super(),this.#l=!1,this.#u=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#s=function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=e.state??this.#s,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#c?.promise}setOptions(e){this.options={...this.#u,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#a.remove(this)}setData(e,t){var n,r;let i=(n=this.state.data,"function"==typeof(r=this.options).structuralSharing?r.structuralSharing(n,e):!1!==r.structuralSharing?function e(t,n){if(t===n)return t;let r=h(t)&&h(n);if(r||d(t)&&d(n)){let i=r?t:Object.keys(t),s=i.length,o=r?n:Object.keys(n),a=o.length,c=r?[]:{},u=0;for(let s=0;s<a;s++){let a=r?s:o[s];(!r&&i.includes(a)||r)&&void 0===t[a]&&void 0===n[a]?(c[a]=void 0,u++):(c[a]=e(t[a],n[a]),c[a]===t[a
1]&&void 0!==t[a]&&u++)}return s===a&&u===s?t:c}return n}(n,e):e);return this.#h({data:i,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),i}setState(e,t){this.#h({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#c?.promise;return this.#c?.cancel(e),t?t.then(i).catch(i):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#s)}isActive(){return this.observers.some(e=>{var t;return!1!==("function"==typeof(t=e.options.enabled)?t(this):t)})}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===g||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!Math.max(this.state.dataUpdatedAt+(e||0)-Date.now(),0)}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#c?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#c?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#c&&(this.#l?this.#c.cancel({revert:!0}):this.#c.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#h({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#c)return this.#c.continueRetry(),this.#c.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#l=!0,n.signal)})},i={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{let e=b(this.options,t),n={queryKey:this.queryKey,meta:this.meta};return(r(n),this.#l=!1,this.options.persister)?this.options.persister(e,n,this):e(n)}};r(i),this.options.behavior?.onFetch(i,this),this.#o=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==i.fetchOptions?.meta)&&this.#h({type:"fetch",meta:i.fetchOptions?.meta});let s=e=>{O(e)&&e.silent||this.#h({type:"error",error:e}),O(e)||(this.#a.config.onError?.(e,this),this.#a.config.onSettled?.(this.state.data,e,this)),this.scheduleGc()};return this.#c=E({initialPromise:t?.initialPromise,fn:i.fetchFn,abort:n.abort.bind(n),onSuccess:e=>{if(void 0===e){s(Error(`${this.queryHash} data is undefined`));return}try{this.setData(e)}catch(e){s(e);return}this.#a.config.onSuccess?.(e,this),this.#a.config.onSettled?.(e,this.state.error,this),this.scheduleGc()},onError:s,onFail:(e,t)=>{this.#h({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#h({type:"pause"})},onContinue:()=>{this.#h({type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}),this.#c.start()}#h(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":var n;return{...t,...(n=t.data,{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:C(this.options.networkMode)?"fetching":"paused",...void 0===n&&{error:null,status:"pending"}}),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let r=e.error;if(O(r)&&r.revert&&this.#o)return{...this.#o,fetchStatus:"idle"};
1return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),y.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:e})})}},A=class extends v{constructor(e={}){super(),this.config=e,this.#d=new Map}#d;build(e,t,n){let r=t.queryKey,i=t.queryHash??c(r,t),s=this.get(i);return s||(s=new U({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}add(e){this.#d.has(e.queryHash)||(this.#d.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#d.get(e.queryHash);t&&(e.destroy(),t===e&&this.#d.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){y.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#d.get(e)}getAll(){return[...this.#d.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>o(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>o(e,t)):t}notify(e){y.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){y.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){y.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},$=class extends S{#f;#p;#c;constructor(e){super(),this.mutationId=e.mutationId,this.#p=e.mutationCache,this.#f=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#f.includes(e)||(this.#f.push(e),this.clearGcTimeout(),this.#p.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#f=this.#f.filter(t=>t!==e),this.scheduleGc(),this.#p.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#f.length||("pending"===this.state.status?this.scheduleGc():this.#p.remove(this))}continue(){return this.#c?.continue()??this.execute(this.state.variables)}async execute(e){this.#c=E({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#h({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#h({type:"pause"})},onContinue:()=>{this.#h({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#p.canRun(this)});let t="pending"===this.state.status,n=!this.#c.canStart();try{if(!t){this.#h({type:"pending",variables:e,isPaused:n}),await this.#p.config.onMutate?.(e,this);let t=await this.options.onMutate?.(e);t!==this.state.context&&this.#h({type:"pending",context:t,variables:e,isPaused:n})}let r=await this.#c.start();return await this.#p.config.onSuccess?.(r,e,this.state.context,this),await this.options.onSuccess?.(r,e,this.state.context),await this.#p.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,e,this.state.context),this.#h({type:"success",data:r}),r}catch(t){try{throw await this.#p.config.onError?.(t,e,this.state.context,this),await this.options.onError?.(t,e,this.state.context),await this.#p.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,t,e,this.state.context),t}finally{this.#h({type:"error",error:t})}}finally{this.#p.runNext(this)}}#h(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPau
1sed:!1,status:"error"}}})(this.state),y.batch(()=>{this.#f.forEach(t=>{t.onMutationUpdate(e)}),this.#p.notify({mutation:this,type:"updated",action:e})})}},M=class extends v{constructor(e={}){super(),this.config=e,this.#m=new Map,this.#g=Date.now()}#m;#g;build(e,t,n){let r=new $({mutationCache:this,mutationId:++this.#g,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){let t=k(e),n=this.#m.get(t)??[];n.push(e),this.#m.set(t,n),this.notify({type:"added",mutation:e})}remove(e){let t=k(e);if(this.#m.has(t)){let n=this.#m.get(t)?.filter(t=>t!==e);n&&(0===n.length?this.#m.delete(t):this.#m.set(t,n))}this.notify({type:"removed",mutation:e})}canRun(e){let t=this.#m.get(k(e))?.find(e=>"pending"===e.state.status);return!t||t===e}runNext(e){let t=this.#m.get(k(e))?.find(t=>t!==e&&t.state.isPaused);return t?.continue()??Promise.resolve()}clear(){y.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...this.#m.values()].flat()}find(e){let t={exact:!0,...e};return this.getAll().find(e=>a(t,e))}findAll(e={}){return this.getAll().filter(t=>a(e,t))}notify(e){y.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>
1e.state.isPaused);return y.batch(()=>Promise.all(e.map(e=>e.continue().catch(i))))}};function k(e){return e.options.scope?.id??String(e.mutationId)}function G(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],o=t.state.data?.pageParams||[],a={pages:[],pageParams:[]},c=0,u=async()=>{let n=!1,u=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",()=>{n=!0}),t.signal)})},l=b(t.options,t.fetchOptions),h=async(e,r,i)=>{if(n)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);let s={queryKey:t.queryKey,pageParam:r,direction:i?"backward":"forward",meta:t.options.meta};u(s);let o=await l(s),{maxPages:a}=t.options,c=i?m:p;return{pages:c(e.pages,o,a),pageParams:c(e.pageParams,r,a)}};if(i&&s.length){let e="backward"===i,t={pages:s,pageParams:o},n=(e?function(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}:T)(r,t);a=await h(t,n,e)}else{let t=e??s.length;do{let e=0===c?o[0]??r.initialPageParam:T(r,a);if(c>0&&null==e)break;a=await h(a,e),c++}while(c<t)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function T(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}var j=class{#b;#p;#u;#y;#v;#w;#x;#P;constructor(e={}){this.#b=e.queryCache||new A,this.#p=e.mutationCache||new M,this.#u=e.defaultOptions||{},this.#y=new Map,this.#v=new Map,this.#w=0}mount(){this.#w++,1===this.#w&&(this.#x=w.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#b.onFocus())}),this.#P=x.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#b.onOnline())}))}unmount(){this.#w--,0===this.#w&&(this.#x?.(),this.#x=void 0,this.#P?.(),this.#P=void 0)}isFetching(e){return this.#b.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#p.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#b.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.getQueryData(e.queryKey);if(void 0===t)return this.fetchQuery(e);{let n=this.defaultQueryOptions(e),r=this.#b.build(this,n);return e.revalidateIfStale&&r.isStaleByTime(s(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return this.#b.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#b.get(r.queryHash),s=i?.state.data,o="function"==typeof t?t(s):t;if(void 0!==o)return this.#b.build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return y.batch(()=>this.#b.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#b.get(t.queryHash)?.state}removeQueries(e){let t=this.#b;y.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#b,r={type:"active",...e};return y.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){let n={revert:!0,...t};return Promise.all(y.batch(()=>this.#b.findAll(e).map(e=>e.cancel(n)))).then(i).catch(i)}invalidateQueries(e={},t={}){return y.batch(()=>{if(this.#b.findAll(e).forEach(e=>{e.invalidate()}),"none"===e.refetchType)return Promise.resolve();let n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){let n={...t,cancelRefetch:t?.cancelRefetch??!0};return Promise.all(y.batch(()=>this.#b.findAll(e).filter(e=>!e.isDisabled()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(i)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(i)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let n=this.#b.build(this,t);return n.isStaleByTime(s(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(i).catch(i)}fetchInfiniteQuery(e){return e.behavior=G(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(i).catch(i)}ensureInfiniteQueryData(e){return e.behavior=G(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return x.isOnline()?this.#p.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#b}getMutationCache(){return this.#p}getDefaultOptions(){return this.#u}setDefaultOptions(e){this.#u=e}setQueryDefaults(e,t){this.#y.set(u(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#y.values()],n={};return t.forEach(t=>{l(e,t.queryKey)&&(n={...n,...t.defaultOptions})}),n}
1setMutationDefaults(e,t){this.#v.set(u(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#v.values()],n={};return t.forEach(t=>{l(e,t.mutationKey)&&(n={...n,...t.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#u.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=c(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),!0!==t.enabled&&t.queryFn===g&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#u.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#b.clear(),this.#p.clear()}}},29827:function(e,t,n){"use strict";n.d(t,{aH:function(){return o}});var r=n(2265),i=n(57437),s=r.createContext(void 0),o=e=>{let{client:t,children:n}=e;return r.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,i.jsx)(s.Provider,{value:t,children:n})}},81938:function(e,t,n){"use strict";n.d(t,{D:function(){return c}});var r=n(53738),i=n(13102),s=n(31669),o=n(77014),a=n(59455);function c(e={}){let t,u,l,h,d,f,p,m,g;return"3"===e.version||e.headlessMode?(0,r.K)(r=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",supportsSimulation:!0,type:c.type,async connect({chainId:e}={}){try{let t=await this.getProvider(),n=(await t.request({method:"eth_requestAccounts"})).map(e=>(0,s.K)(e));l||(l=this.onAccountsChanged.bind(this),t.on("accountsChanged",l)),h||(h=this.onChainChanged.bind(this),t.on("chainChanged",h)),d||(d=this.onDisconnect.bind(this),t.on("disconnect",d));let r=await this.getChainId();if(e&&r!==e){let t=await this.switchChain({chainId:e}).catch(e=>{if(e.code===o.ab.code)throw e;return{id:r}});r=t?.id??r}return{accounts:n,chainId:r}}catch(e){if(/(user closed modal|accounts received is empty|user denied account)/i.test(e.message))throw new o.ab(e);throw e}},async disconnect(){let e=await this.getProvider();l&&(e.removeListener("accountsChanged",l),l=void 0),h&&(e.removeListener("chainChanged",h),h=void 0),d&&(e.removeListener("disconnect",d),d=void 0),e.disconnect(),e.close()},async getAccounts(){let e=await this.getProvider();return(await e.request({method:"eth_accounts"})).map(e=>(0,s.K)(e))},async getChainId(){let e=await this.getProvider();return Number(await e.request({method:"eth_chainId"}))}
1,async getProvider(){if(!u){t=new(await (async()=>{let{default:e}=await Promise.all([n.e(498),n.e(32),n.e(878)]).then(n.t.bind(n,28032,19));return"function"!=typeof e&&"function"==typeof e.default?e.default:e})())({...e,reloadOnDisconnect:!1});let i=t.walletExtension?.getChainId(),s=r.chains.find(t=>e.chainId?t.id===e.chainId:t.id===i)||r.chains[0],o=e.chainId||s?.id,a=e.jsonRpcUrl||s?.rpcUrls.default.http[0];u=t.makeWeb3Provider(a,o)}return u},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:e,chainId:t}){let n=r.chains.find(e=>e.id===t);if(!n)throw new o.x3(new i.X4);let s=await this.getProvider();try{return await s.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,a.eC)(n.id)}]}),n}catch(r){if(4902===r.code)try{let r,i;r=e?.blockExplorerUrls?e.blockExplorerUrls:n.blockExplorers?.default.url?[n.blockExplorers?.default.url]:[],i=e?.rpcUrls?.length?e.rpcUrls:[n.rpcUrls.default?.http[0]??""];let o={blockExplorerUrls:r,chainId:(0,a.eC)(t),chainName:e?.chainName??n.name,iconUrls:e?.iconUrls,nativeCurrency:e?.nativeCurrency??n.nativeCurrency,rpcUrls:i};return await s.request({method:"wallet_addEthereumChain",params:[o]}),n}catch(e){throw new o.ab(e)}throw new o.x3(r)}},onAccountsChanged(e){0===e.length?this.onDisconnect():r.emitter.emit("change",{accounts:e.map(e=>(0,s.K)(e))})},onChainChanged(e){let t=Number(e);r.emitter.emit("change",{chainId:t})},async onDisconnect(e){r.emitter.emit("disconnect");let t=await this.getProvider();l&&(t.removeListener("accountsChanged",l),l=void 0),h&&(t.removeListener("chainChanged",h),h=void 0),d&&(t.removeListener("disconnect",d),d=void 0)}})):(0,r.K)(t=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",supportsSimulation:!0,type:c.type,async connect({chainId:e}={}){try{let t=await this.getProvider(),n=(await t.request({method:"eth_requestAccounts"})).map(e=>(0,s.K)(e));p||(p=this.onAccountsChanged.bind(this),t.on("accountsChanged",p)),m||(m=this.onChainChanged.bind(this),t.on("chainChanged",m)),g||(g=this.onDisconnect.bind(this),t.on("disconnect",g));let r=await this.getChainId();if(e&&r!==e){let t=await this.switchChain({chainId:e}).catch(e=>{if(e.code===o.ab.code)throw e;return{id:r}});r=t?.id??r}return{accounts:n,chainId:r}}catch(e){if(/(user closed modal|accounts received is empty|user denied account|request rejected)/i.test(e.message))throw new o.ab(e);throw e}},async disconnect(){let e=await this.getProvider();p&&(e.removeListener("accountsChanged",p),p=void 0),m&&(e.removeListener("chainChanged",m),m=void 0),g&&(e.removeListener("disconnect",g),g=void 0),e.disconnect(),e.close?.()},async getAccounts(){let e=await this.getProvider();return(await e.request({method:"eth_accounts"})).map(e=>(0,s.K)(e))},async getChainId(){let e=await this.getProvider();return Number(await e.request({method:"eth_chainId"}))},getProvider:async()=>(f||(f=new(await (async()=>{let{default:e}=await Promise.all([n.e(498),n.e(264),n.e(434)]).then(n.t.bind(n,50264,19));return"function"!=typeof e&&"function"==typeof e.default?e.default:e})())({...e,appChainIds:t.chains.map(e=>e.id)}).makeWeb3Provider({...e,options:e.preference??"all"})),f),async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:e,chainId:n}){let r=t.chains.find(e=>e.id===n);if(!r)throw new o.x3(new i.X4);let s=await this.getProvider();try{return await s.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,a.eC)(r.id)}]}),r}catch(t){if(4902===t.code)try{let t,i;t=e?.blockExplorerUrls?e.blockExplorerUrls:r.blockExplorers?.default.url?[r.blockExplorers?.default.url]:[],i=e?.rpcUrls?.length?e.rpcUrls:[r.rpcUrls.default?.http[0]??""];let o={blockExplorerUrls:t,chainId:(0,a.eC)(n),chainName:e?.chainName??r.name,iconUrls:e?.iconUrls,nativeCurrency:e?.nativeCurrency??r.nativeCurrency,rpcUrls:i};return await s.request({method:"wallet_addEthereumChain",params:[o]}),r}catch(e){throw new o.ab(e)}throw new o.x3(t)}},onAccountsChanged(e){0===e.length?this.onDisconnect():t.emitter.emit("change",{accounts:e.map(e=>(0,s.K)(e))})},onChainChanged(e){let n=Number(e);t.emitter.emit("change",{chainId:n})},async onDisconnect(e){t.emitter.emit("disconnect");let n=await this.getProvider();p&&(n.removeListener("accountsChanged",p),p=void 0),m&&(n.removeListener("chainChanged",m),m=void 0),g&&(n.removeListener("disconnect",g),g=void 0)}}))}c.type="coinbaseWallet"},53738:function(e,t,n){"use strict";function r(e){return e}n.d(t,{K:function(){return r}})},31316:function(e,t,n){"use strict";let r;n.d(t,{_:function(){return T}});var i=n(78217);let s=e=>(t,n,r)=>{let i=r.subscribe;
1return r.subscribe=(e,t,n)=>{let s=e;if(t){let i=(null==n?void 0:n.equalityFn)||Object.is,o=e(r.getState());s=n=>{let r=e(n);if(!i(o,r)){let e=o;t(o=r,e)}},(null==n?void 0:n.fireImmediately)&&t(o,o)}return i(s)},e(t,n,r)},o=e=>t=>{try{let n=e(t);if(n instanceof Promise)return n;return{then:e=>o(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>o(t)(e)}}},a=(e,t)=>(n,r,i)=>{let s,a,c={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},u=!1,l=new Set,h=new Set;try{s=c.getStorage()}catch(e){}if(!s)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${c.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=o(c.serialize),f=()=>{let e;let t=d({state:c.partialize({...r()}),version:c.version}).then(e=>s.setItem(c.name,e)).catch(t=>{e=t});if(e)throw e;return t},p=i.setState;i.setState=(e,t)=>{p(e,t),f()};let m=e((...e)=>{n(...e),f()},r,i),g=()=>{var e;if(!s)return;u=!1,l.forEach(e=>e(r()));let t=(null==(e=c.onRehydrateStorage)?void 0:e.call(c,r()))||void 0;return o(s.getItem.bind(s))(c.name).then(e=>{if(e)return c.deserialize(e)}).then(e=>{if(e){if("number"!=typeof e.version||e.version===c.version)return e.state;if(c.migrate)return c.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return n(a=c.merge(e,null!=(t=r())?t:m),!0),f()}).then(()=>{null==t||t(a,void 0),u=!0,h.forEach(e=>e(a))}).catch(e=>{null==t||t(void 0,e)})};return i.persist={setOptions:e=>{c={...c,...e},e.getStorage&&(s=e.getStorage())},clearStorage:()=>{null==s||s.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>g(),hasHydrated:()=>u,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(h.add(e),()=>{h.delete(e)})},g(),a||m},c=(e,t)=>(n,r,i)=>{let s,a={storage:function(e,t){let n;try{n=e()}catch(e){return}return{getItem:e=>{var t;let r=e=>null===e?null:JSON.parse(e,void 0),i=null!=(t=n.getItem(e))?t:null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,t)=>n.setItem(e,JSON.stringify(t,void 0)),removeItem:e=>n.removeItem(e)}}(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},c=!1,u=new Set,l=new Set,h=a.storage;if(!h)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return h.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(e,t)=>{f(e,t),d()};let p=e((...e)=>{n(...e),d()},r,i),m=()=>{var e,t;if(!h)return;c=!1,u.forEach(e=>{var t;return e(null!=(t=r())?t:p)});let i=(null==(t=a.onRehydrateStorage)?void 0:t.call(a,null!=(e=r())?e:p))||void 0;return o(h.getItem.bind(h))(a.name).then(e=>{if(e){if("number"!=typeof e.version||e.version===a.version)return e.state;if(a.migrate)return a.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return n(s=a.merge(e,null!=(t=r())?t:p),!0),d()}).then(()=>{null==i||i(s,void 0),s=r(),c=!0,l.forEach(e=>e(s))}).catch(e=>{null==i||i(void 0,e)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(h=e.storage)},clearStorage:()=>{null==h||h.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>c,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||m(),s||p},u=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?(console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),a(e,t)):c(e,t),l=e=>{let t;let n=new Set,r=(e,r)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=r?r:"object"!=typeof i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,s={setState:r,getState:i,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,i,s),s},h=e=>e?l(e):l;var d=n(31669),f=n(77014),p=n(39504),m=n(72938),g=n(59455),b=n(13102),y=n(26129);class v extends y.G{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}var w=n(53738);let x=/(rabby|trustwallet)/,P={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider:e=>e?.coinbaseWalletExtension?e.coinbaseWalletExtension:I(e,"isCoinbaseWallet")},metaMask:{id:"metaMask",name:"MetaMask",provider:e=>I(e,e=>{if(!e.isMetaMask||e.isBraveWallet&&!e._events&&!e._state)return!1;for(let t of["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPortal","isRabby","isTokenPocket","isTokenary","isZerion"])if(e[t])return!1;return!0})}
1,phantom:{id:"phantom",name:"Phantom",provider:e=>e?.phantom?.ethereum?e.phantom?.ethereum:I(e,"isPhantom")}};function C(e={}){let t,n,r,i;let{shimDisconnect:s=!0,unstable_shimAsyncInject:o}=e;function a(){let t=e.target;if("function"==typeof t){let e=t();if(e)return e}return"object"==typeof t?t:"string"==typeof t?{...P[t]??{id:t,name:`${t[0].toUpperCase()}${t.slice(1)}`,provider:`is${t[0].toUpperCase()}${t.slice(1)}`}}:{id:"injected",name:"Injected",provider:e=>e?.ethereum}}return(0,w.K)(c=>({get icon(){return a().icon},get id(){return a().id},get name(){return a().name},get supportsSimulation(){return x.test(this.id.toLowerCase())},type:C.type,async setup(){let n=await this.getProvider();n?.on&&e.target&&(r||(r=this.onConnect.bind(this),n.on("connect",r)),t||(t=this.onAccountsChanged.bind(this),n.on("accountsChanged",t)))},async connect({chainId:o,isReconnecting:a}={}){let u=await this.getProvider();if(!u)throw new v;let l=[];if(a)l=await this.getAccounts().catch(()=>[]);else if(s)try{let e=await u.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]});(l=e[0]?.caveats?.[0]?.value?.map(e=>d.K(e))).length>0&&(l=await this.getAccounts())}catch(e){if(e.code===f.ab.code)throw new f.ab(e);if(e.code===f.pT.code)throw e}try{l?.length||a||(l=(await u.request({method:"eth_requestAccounts"})).map(e=>(0,d.K)(e))),r&&(u.removeListener("connect",r),r=void 0),t||(t=this.onAccountsChanged.bind(this),u.on("accountsChanged",t)),n||(n=this.onChainChanged.bind(this),u.on("chainChanged",n)),i||(i=this.onDisconnect.bind(this),u.on("disconnect",i));let h=await this.getChainId();if(o&&h!==o){let e=await this.switchChain({chainId:o}).catch(e=>{if(e.code===f.ab.code)throw e;return{id:h}});h=e?.id??h}return s&&await c.storage?.removeItem(`${this.id}.disconnected`),e.target||await c.storage?.setItem("injected.connected",!0),{accounts:l,chainId:h}}catch(e){if(e.code===f.ab.code)throw new f.ab(e);if(e.code===f.pT.code)throw new f.pT(e);throw e}},async disconnect(){let t=await this.getProvider();if(!t)throw new v;n&&(t.removeListener("chainChanged",n),n=void 0),i&&(t.removeListener("disconnect",i),i=void 0),r||(r=this.onConnect.bind(this),t.on("connect",r));try{await (0,p.F)(()=>t.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}s&&await c.storage?.setItem(`${this.id}.disconnected`,!0),e.target||await c.storage?.removeItem("injected.connected")},async getAccounts(){let e=await this.getProvider();if(!e)throw new v;return(await e.request({method:"eth_accounts"})).map(e=>(0,d.K)(e))},async getChainId(){let e=await this.getProvider();if(!e)throw new v;return Number(await e.request({method:"eth_chainId"}))},async getProvider(){let e;if("undefined"==typeof window)return;let t=a();return(e="function"==typeof t.provider?t.provider(window):"string"==typeof t.provider?I(window,t.provider):t.provider)&&!e.removeListener&&("off"in e&&"function"==typeof e.off?e.removeListener=e.off:e.removeListener=()=>{}),e},async isAuthorized(){try{if(s&&await c.storage?.getItem(`${this.id}.disconnected`)||!e.target&&!await c.storage?.getItem("injected.connected"))return!1;if(!await this.getProvider()){if(void 0!==o&&!1!==o){let e=async()=>("undefined"!=typeof window&&window.removeEventListener("ethereum#initialized",e),!!await this.getProvider()),t="number"==typeof o?o:1e3;if(await Promise.race([..."undefined"!=typeof window?[new Promise(t=>window.addEventListener("ethereum#initialized",()=>t(e()),{once:!0}))]:[],new Promise(n=>setTimeout(()=>n(e()),t))]))return!0}throw new v}return!!(await (0,m.J)(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:e,chainId:t}){let n=await this.getProvider();if(!n)throw new v;let r=c.chains.find(e=>e.id===t);if(!r)throw new f.x3(new b.X4);try{return await Promise.all([n.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,g.eC)(t)}]}).then(async()=>{await this.getChainId()===t&&c.emitter.emit("change",{chainId:t})}),new Promise(e=>{let n=r=>{"chainId"in r&&r.chainId===t&&(c.emitter.off("change",n),e())};c.emitter.on("change",n)})]),r}catch(i){if(4902===i.code||i?.data?.originalError?.code===4902)try{let i,s;let{default:o,...a}=r.blockExplorers??{};e?.blockExplorerUrls?i=e.blockExplorerUrls:o&&(i=[o.url,...Object.values(a).map(e=>e.url)]),s=e?.rpcUrls?.length?e.rpcUrls:[r.rpcUrls.default?.http[0]??""];let c={blockExplorerUrls:i,chainId:(0,g.eC)(t),chainName:e?.chainName??r.name,iconUrls:e?.iconUrls,nativeCurrency:e?.nativeCurrency??r.nativeCurrency,rpcUrls:s};if(await n.request({method:"wallet_addEthereumChain",params:[c]}),await this.getChainId()!==t)throw new f.ab(Error("User rejected switch after adding network."));return r}catch(e){throw new f.ab(e)}if(i.code===f.ab.code)throw new f.ab(i);throw new f.x3(i)}},async onAccountsChanged(e){if(0===e.length)this.onDisconnect();else if(c.emitter.listenerCount("connect")){let e=(await this.getChainId()).toString();this.onConnect({chainId:e}),s&&await c.storage?.removeItem(`${this.id}.disconnected`)}else c.emitter.emit("change",{accounts:e.map(e=>(0,d.K)(e))})},onChainChanged(e){let t=Number(e);c.emitter.emit("change",{chainId:t})},async onConnect(e){let s=await this.getAccounts();if(0===s.length)return;let o=Number(e.chainId);c.emitter.emit("connect",{accounts:s,chainId:o});let a=await this.getProvider();a&&(r&&(a.removeListener("connect",r),r=void 0),t||(t=this.onAccountsChanged.bind(this),a.on("accountsChanged",t)),n||(n=this.onChainChanged.bind(this),a.on("chainChanged",n)),i||(i=this.onDisconnect.bind(this),a.on("disconnect",i)))},async onDisconnect(e){let t=await this.getProvider();e&&1013===e.code&&t&&(await this.getAccounts()).length||(c.emitter.emit("disconnect"),t&&(n&&(t.removeListener("chainChanged",n),n=void 0),i&&(t.removeListener("disconnect",i),i=void 0),r||(r=this.onConnect.bind(this),t.on("connect",r))))}}))}function I(e,t){function n(e){return"function"==typeof t?t(e):"str
1ing"!=typeof t||e[t]}let r=e.ethereum;return r?.providers?r.providers.find(e=>n(e)):r&&n(r)?r:void 0}C.type="injected";var O=n(77625);class E{constructor(e){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new O})}on(e,t){this._emitter.on(e,t)}once(e,t){this._emitter.once(e,t)}off(e,t){this._emitter.off(e,t)}emit(e,...t){let n=t[0];this._emitter.emit(e,{uid:this.uid,...n})}listenerCount(e){return this._emitter.listenerCount(e)}}function S(e,t){return JSON.parse(e,(e,n)=>{let r=n;return r?.__type==="bigint"&&(r=BigInt(r.value)),r?.__type==="Map"&&(r=new Map(r.value)),t?.(e,r)??r})}function U(e,t){return e.slice(0,t).join(".")||"."}function A(e,t){let{length:n}=e;for(let r=0;r<n;++r)if(e[r]===t)return r+1;return 0}function $(e,t,n,r){return JSON.stringify(e,function(e,t){let n="function"==typeof e,r="function"==typeof t,i=[],s=[];return function(o,a){if("object"==typeof a){if(i.length){let e=A(i,this);0===e?i[i.length]=this:(i.splice(e),s.splice(e)),s[s.length]=o;let n=A(i,a);if(0!==n)return r?t.call(this,o,a,U(s,n)):`[ref=${U(s,n)}]`}else i[0]=a,s[0]=o}return n?e.call(this,o,a):a}}((e,n)=>{let r=n;return"bigint"==typeof r&&(r={__type:"bigint",value:n.toString()}),r instanceof Map&&(r={__type:"Map",value:Array.from(n.entries())}),t?.(e,r)??r},r),n??void 0)}let M={getItem:()=>null,setItem:()=>{},removeItem:()=>{}},k=256;var G=n(19676);function T(e){let t;let{multiInjectedProviderDiscovery:n=!0,storage:o=function(e){let{deserialize:t=S,key:n="wagmi",serialize:r=$,storage:i=M}=e;function s(e){return e instanceof Promise?e.then(e=>e).catch(()=>null):e}return{...i,key:n,async getItem(e,r){let o=i.getItem(`${n}.${e}`),a=await s(o);return a?t(a)??null:r??null},async setItem(e,t){let o=`${n}.${e}`;null===t?await s(i.removeItem(o)):await s(i.setItem(o,r(t)))},async removeItem(e){await s(i.removeItem(`${n}.${e}`))}}}({storage:"undefined"!=typeof window&&window.localStorage?window.localStorage:M}),syncConnectedChain:a=!0,ssr:c=!1,...l}=e,d="undefined"!=typeof window&&n?function(){let e=new Set,t=[],n=()=>(function(e){if("undefined"==typeof window)return;let t=t=>e(t.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)})(n=>{t.some(({info:e})=>e.uuid===n.info.uuid)||(t=[...t,n],e.forEach(e=>e(t,{added:[n]})))}),r=n();return{_listeners:()=>e,clear(){e.forEach(e=>e([],{removed:[...t]})),t=[]},destroy(){this.clear(),e.clear(),r?.()},findProvider:({rdns:e})=>t.find(t=>t.info.rdns===e),getProviders:()=>t,reset(){this.clear(),r?.(),r=n()},subscribe:(n,{emitImmediately:r}={})=>(e.add(n),r&&n(t,{added:t}),()=>e.delete(n))}}():void 0,f=h(()=>l.chains),p=h(()=>[...l.connectors??[],...c?[]:d?.getProviders().map(g)??[]].map(m));function m(e){let t=new E(function(e=11){if(!r||k+e>512){r="",k=0;for(let e=0;e<256;e++)r+=(256+256*Math.random()|0).toString(16).substring(1)}return r.substring(k,k+++e)}()),n={...e({emitter:t,chains:f.getState(),storage:o,transports:l.transports}),emitter:t,uid:t.uid};return t.on("connect",O),n.setup?.(),n}function g(e){let{info:t}=e,n=e.provider;return C({target:{...t,id:t.rdns,provider:n}})}let y=new Map;function v(){return{chainId:f.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let w="0.0.0-canary-";t=G.i.startsWith(w)?Number.parseInt(G.i.replace(w,"")):Number.parseInt(G.i.split(".")[0]??"0");let x=h(s(o?u(v,{migrate(e,n){if(n===t)return e;let r=v(),i=P(e,r.chainId);return{...r,chainId:i}},name:"store",partialize:e=>({connections:{__type:"Map",value:Array.from(e.connections.entries()).map(([e,t])=>{let{id:n,name:r,type:i,uid:s}=t.connector;return[e,{...t,connector:{id:n,name:r,type:i,uid:s}}]})},chainId:e.chainId,current:e.current}),merge(e,t){"object"==typeof e&&e&&"status"in e&&delete e.status;let n=P(e,t.chainId);return{...t,...e,chainId:n}},skipHydration:c,storage:o,version:t}):v));function P(e,t){return e&&"object"==typeof e&&"chainId"in e&&"number"==typeof e.chainId&&f.getState().some(t=>t.id===e.chainId)?e.chainId:t}function I(e){x.setState(t=>{let n=t.connections.get(e.uid);return n?{...t,connections:new Map(t.connections).set(e.uid,{accounts:e.accounts??n.accounts,chainId:e.chainId??n.chainId,connector:n.connector})}:t})}function O(e){"connecting"!==x.getState().status&&"reconnecting"!==x.getState().status&&x.setState(t=>{let n=p.getState().find(t=>t.uid===e.uid);return n?(n.emitter.listenerCount("connect")&&n.emitter.off("connect",I),n.emitter.listenerCount("change")||n.emitter.on("change",I),n.emitter.listenerCount("disconnect")||n.emitter.on("disconnect",U),{...t,connections:new Map(t.connections).set(e.uid,{accounts:e.accounts,chainId:e.chainId,connector:n}),current:e.uid,status:"connected"}):t})}function U(e){x.setState(t=>{let n=t.connections.get(e.uid);if(n){let e=n.connector;e.emitter.listenerCount("change")&&n.connector.emitter.off("change",I),e.emitter.listenerCount("disconnect")&&n.connector.emitter.off("disconnect",U),e.emitter.listenerCount("connect")||n.connector.emitter.on("connect",O)}if(t.connections.delete(e.uid),0===t.connections.size)return{...t,connections:new Map,current:null,status:"disconnected"};let r=t.connections.values().next().value;return{...t,connections:new Map(t.connections),current:r.connector.uid}})}return a&&x.subscribe(({connections:e,current:t})=>t?e.get(t)?.chainId:void 0,e=>{if(f.getState().some(t=>t.id===e))return x.setState(t=>({...t,chainId:e??t.chainId}))}),d?.subscribe(e=>{let t=new Map;for(let e of p.getState())t.set(e.id,!0);let n=[];for(let r of e){let e=m(g(r));t.has(e.id)||n.push(e)}(!o||x.persist.hasHydrated())&&p.setState(e=>[...e,...n],!0)}),{get chains(){return f.getState()},get connectors(){return p.getState()},storage:o,getClient:function(e={}){let t;let n=e.chainId??x.getState().chainId,r=f.getState().find(e=>e.id===n);if(e.chainId&&!r)throw new b.X4;{let e=y.get(x.getState().chainId);if(e&&!r)return e;if(!r)throw new b.X4}{let e=y.get(n);if(e)return e}if(l.client)t=l.client({chain:r});else{let e=r.id,n=f.getState().map(e=>e.id),s={};for(let[t,r]of Object.entries(l))if("chains"!==t&&"client"!==t&&"connectors"!==t&&"transports"!==t){if("object"==typeof r){if(e in r)s[t]=r[e];else{if(n.some(e=>e in r))continue;s[t]=r}}else s[t]=r}t=function(e){var t;let{batch:n,cacheTime:r=e.pollingInterval??4e3,ccipRead:s,key:o="base",n
1ame:a="Base Client",pollingInterval:c=4e3,type:u="base"}=e,l=e.chain,h=e.account?"string"==typeof(t=e.account)?{address:t,type:"json-rpc"}:t:void 0,{config:d,request:f,value:p}=e.transport({chain:l,pollingInterval:c}),m={account:h,batch:n,cacheTime:r,ccipRead:s,chain:l,key:o,name:a,pollingInterval:c,request:f,transport:{...d,...p},type:u,uid:(0,i.h)()};return Object.assign(m,{extend:function e(t){return n=>{let r=n(t);for(let e in m)delete r[e];let i={...t,...r};return Object.assign(i,{extend:e(i)})}}(m)})}({...s,chain:r,batch:s.batch??{multicall:!0},transport:t=>l.transports[e]({...t,connectors:p})})}return y.set(n,t),t},get state(){return x.getState()},setState(e){let t;t="function"==typeof e?e(x.getState()):e;let n=v();"object"!=typeof t&&(t=n),Object.keys(n).some(e=>!(e in t))&&(t=n),x.setState(t,!0)},subscribe:(e,t,n)=>x.subscribe(e,t,n?{...n,fireImmediately:n.emitImmediately}:void 0),_internal:{mipd:d,store:x,ssr:!!c,syncConnectedChain:a,transports:l.transports,chains:{setState(e){let t="function"==typeof e?e(f.getState()):e;if(0!==t.length)return f.setState(t,!0)},subscribe:e=>f.subscribe(e)},connectors:{providerDetailToConnector:g,setup:m,setState:e=>p.setState("function"==typeof e?e(p.getState()):e,!0),subscribe:e=>p.subscribe(e)},events:{change:I,connect:O,disconnect:U}}}}},26129:function(e,t,n){"use strict";n.d(t,{G:function(){return c}});var r,i,s=n(19676);let o=()=>`@wagmi/core@${s.i}`;var a=function(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class c extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return o()}constructor(e,t={}){super(),r.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});let n=t.cause instanceof c?t.cause.details:t.cause?.message?t.cause.message:t.details,i=t.cause instanceof c&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?[`Docs: ${this.docsBaseUrl}${i}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join("\n"),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=i,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return a(this,r,"m",i).call(this,this,e)}}r=new WeakSet,i=function e(t,n){return n?.(t)?t:t.cause?a(this,r,"m",e).call(this,t.cause,n):t}},13102:function(e,t,n){"use strict";n.d(t,{X4:function(){return i}});var r=n(26129);class i extends r.G{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}},19676:function(e,t,n){"use strict";n.d(t,{i:function(){return r}});let r="2.13.8"},90713:function(e,t,n){"use strict";n.d(t,{u:function(){return i}});var r=n(91269);let i=(0,n(90328).a)({...r.i,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...r.i.contracts,l2OutputOracle:{1:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{1:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{1:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:1})},86551:function(e,t,n){"use strict";n.d(t,{d:function(){return g}});var r=n(89120),i=n(81544);class s extends i.G{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}let o=new Map;var a=n(39504),c=n(31853);let u={current:0,take(){return this.current++},reset(){this.current=0}};var l=n(77014),h=n(59455),d=n(88748);let f=new(n(82061)).k(8192);var p=n(72938),m=n(78217);function g(e,t={}){let{batch:n,fetchOptions:g,key:b="http",name:y="HTTP JSON-RPC",onFetchRequest:v,onFetchResponse:w,retryDelay:x}=t;return({chain:P,retryCount:C,timeout:I})=>{let{batchSize:O=1e3,wait:E=0}="object"==typeof n?n:{},S=t.retryCount??C,U=I??t.timeout??1e4,A=e||P?.rpcUrls.default.http[0];if(!A)throw new s;let $=function(e,t={}){return{async request(n){let{body:i,onRequest:s=t.onRequest,onResponse:o=t.onResponse,timeout:l=t.timeout??1e4}=n,h={...t.fetchOptions??{},...n.fetchOptions??{}},{headers:d,method:f,signal:p}=h;try{let t;let n=await (0,a.F)(async({signal:t})=>{let n={...h,body:Array.isArray(i)?(0,c.P)(i.map(e=>({jsonrpc:"2.0",id:e.id??u.take(),...e}))):(0,c.P)({jsonrpc:"2.0",id:i.id??u.take(),...i}),headers:{"Content-Type":"application/json",...d},method:f||"POST",signal:p||(l>0?t:null)}
1,r=new Request(e,n),o=await s?.(r,n)??{...n,url:e};return await fetch(o.url??e,o)},{errorInstance:new r.W5({body:i,url:e}),timeout:l,signal:!0});if(o&&await o(n),n.headers.get("Content-Type")?.startsWith("application/json"))t=await n.json();else{t=await n.text();try{t=JSON.parse(t||"{}")}catch(e){if(n.ok)throw e;t={error:t}}}if(!n.ok)throw new r.Gg({body:i,details:(0,c.P)(t.error)||n.statusText,headers:n.headers,status:n.status,url:e});return t}catch(t){if(t instanceof r.Gg||t instanceof r.W5)throw t;throw new r.Gg({body:i,cause:t,url:e})}}}}(A,{fetchOptions:g,onRequest:v,onResponse:w,timeout:U});return function({key:e,name:t,request:n,retryCount:s=3,retryDelay:o=150,timeout:a,type:u},g){return{config:{key:e,name:t,request:n,retryCount:s,retryDelay:o,timeout:a,type:u},request:function(e,t={}){return async(n,s={})=>{let{dedupe:o=!1,retryDelay:a=150,retryCount:u=3,uid:m}={...t,...s},g=o?(0,d.w)((0,h.$G)(`${m}.${(0,c.P)(n)}`)):void 0;return function(e,{enabled:t=!0,id:n}){if(!t||!n)return e();if(f.get(n))return f.get(n);let r=e().finally(()=>f.delete(n));return f.set(n,r),r}(()=>(0,p.J)(async()=>{try{return await e(n)}catch(e){switch(e.code){case l.s7.code:throw new l.s7(e);case l.B.code:throw new l.B(e);case l.LX.code:throw new l.LX(e,{method:n.method});case l.nY.code:throw new l.nY(e);case l.XS.code:throw new l.XS(e);case l.yR.code:throw new l.yR(e);case l.Og.code:throw new l.Og(e);case l.pT.code:throw new l.pT(e);case l.KB.code:throw new l.KB(e);case l.gS.code:throw new l.gS(e,{method:n.method});case l.Pv.code:throw new l.Pv(e);case l.GD.code:throw new l.GD(e);case l.ab.code:throw new l.ab(e);case l.PE.code:throw new l.PE(e);case l.Ts.code:throw new l.Ts(e);case l.u5.code:throw new l.u5(e);case l.I0.code:throw new l.I0(e);case l.x3.code:throw new l.x3(e);case 5e3:throw new l.ab(e);default:if(e instanceof i.G)throw e;throw new l.ir(e)}}},{delay:({count:e,error:t})=>{if(t&&t instanceof r.Gg){let e=t?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*Number.parseInt(e)}return~~(1<<e)*a},retryCount:u,shouldRetry:({error:e})=>"code"in e&&"number"==typeof e.code?-1===e.code||e.code===l.Pv.code||e.code===l.XS.code:!(e instanceof r.Gg)||!e.status||403===e.status||408===e.status||413===e.status||429===e.status||500===e.status||502===e.status||503===e.status||504===e.status}),{enabled:o,id:g})}}(n,{retryCount:s,retryDelay:o,uid:(0,m.h)()}),value:g}}({key:b,name:y,async request({method:e,params:t}){let i={method:e,params:t},{schedule:s}=function({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:i}){let s=async()=>{let t=u();a();let n=t.map(({args:e})=>e);0!==n.length&&e(n).then(e=>{i&&Array.isArray(e)&&e.sort(i);for(let n=0;n<t.length;n++){let{pendingPromise:r}=t[n];r.resolve?.([e[n],e])}}).catch(e=>{for(let n=0;n<t.length;n++){let{pendingPromise:r}=t[n];r.reject?.(e)}})},a=()=>o.delete(t),c=()=>u().map(({args:e})=>e),u=()=>o.get(t)||[],l=e=>o.set(t,[...u(),e]);return{flush:a,async schedule(e){let t={},i=new Promise((e,n)=>{t.resolve=e,t.reject=n});return(n?.([...c(),e])&&s(),u().length>0)?l({args:e,pendingPromise:t}):(l({args:e,pendingPromise:t}),setTimeout(s,r)),i}}}({id:A,wait:E,shouldSplitBatch:e=>e.length>O,fn:e=>$.request({body:e}),sort:(e,t)=>e.id-t.id}),a=async e=>n?s(e):[await $.request({body:e})],[{error:c,result:u}]=await a(i);if(c)throw new r.bs({body:i,error:c,url:A});return u},retryCount:S,retryDelay:x,timeout:U,type:"http"},{fetchOptions:g,url:A})}}},10052:function(e,t,n){"use strict";n.d(t,{b:function(){return i}});var r=n(81544);class i extends r.G{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}},81544:function(e,t,n){"use strict";n.d(t,{G:function(){return s}});let r="2.21.26",i={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:r};class s extends Error{constructor(e,t={}){let n=t.cause instanceof s?t.cause.details:t.cause?.message?t.cause.message:t.details,o=t.cause instanceof s&&t.cause.docsPath||t.docsPath,a=i.getDocsUrl?.({...t,docsPath:o});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...n?[`Details: ${n}`]:[],...i.version?[`Version: ${i.version}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=o,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=r}walk(e){return function e(t,n){return n?.(t)?t:t&&"object"==typeof t&&"cause"in t?e(t.cause,n):n?null:t}(this,e)}}},47116:function(e,t,n){"use strict";n.d(t,{$s:function(){return s},mV:function(){return i}});var r=n(81544);class i extends r.G{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}}class s extends r.G{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}},63152:function(e,t,n){"use strict";n.d(t,{J5:function(){return i},M6:function(){return s}});var r=n(81544);class i extends r.G{constructor({max:e,min:t,signed:n,size:r,value:i}
1){super(`Number "${i}" is not in safe ${r?`${8*r}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}class s extends r.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}},89120:function(e,t,n){"use strict";n.d(t,{Gg:function(){return o},bs:function(){return a},W5:function(){return c}});var r=n(31853),i=n(81544);let s=e=>e;class o extends i.G{constructor({body:e,cause:t,details:n,headers:i,status:o,url:a}){super("HTTP request failed.",{cause:t,details:n,metaMessages:[o&&`Status: ${o}`,`URL: ${s(a)}`,e&&`Request body: ${(0,r.P)(e)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=i,this.status=o,this.url=a}}class a extends i.G{constructor({body:e,error:t,url:n}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${s(n)}`,`Request body: ${(0,r.P)(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code}}class c extends i.G{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${s(t)}`,`Request body: ${(0,r.P)(e)}`],name:"TimeoutError"})}}},77014:function(e,t,n){"use strict";n.d(t,{B:function(){return c},GD:function(){return y},I0:function(){return C},KB:function(){return m},LX:function(){return u},Og:function(){return f},PE:function(){return w},Pv:function(){return b},Ts:function(){return x},XS:function(){return h},ab:function(){return v},gS:function(){return g},ir:function(){return O},nY:function(){return l},pT:function(){return p},s7:function(){return a},u5:function(){return P},x3:function(){return I},yR:function(){return d}});var r=n(81544),i=n(89120);class s extends r.G{constructor(e,{code:t,docsPath:n,metaMessages:r,name:s,shortMessage:o}){super(o,{cause:e,docsPath:n,metaMessages:r||e?.metaMessages,name:s||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=s||e.name,this.code=e instanceof i.bs?e.code:t??-1}}class o extends s{constructor(e,t){super(e,t),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class a extends s{constructor(e){super(e,{code:a.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class c extends s{constructor(e){super(e,{code:c.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class u extends s{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 s{constructor(e){super(e,{code:l.code,name:"InvalidParamsRpcError",shortMessage:"Invalid parameters were provided to the RPC method.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class h extends s{constructor(e){super(e,{code:h.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class d extends s{constructor(e){super(e,{code:d.code,name:"InvalidInputRpcError",shortMessage:"Missing or invalid parameters.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class f extends s{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 s{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 m extends s{constructor(e){super(e,{code:m.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class g extends s{constructor(e,{method:t}={}){super(e,{code:g.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${t?` "${t}"`:""} is not implemented.`})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class b extends s{constructor(e){super(e,{code:b.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class y extends s{constructor(e){super(e,{code:y.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class v extends o{constructor(e){super(e,{code:v.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class w extends o{constructor(e){super(e,{code:w.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class x extends o{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 o{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 C extends o{constructor(e){super(e,{code:C.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(C,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class I extends o{constructor(e){super(e,{code:I.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(I,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class O extends s{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}},91269:function(e,t,n){"use strict";n.d(t,{i:function(){return ep}});var r=n(72932);function i(e,t){return({exclude:n,format:r})=>({exclude:n,format:e=>{let i=t(e);if(n)for(let e of n)delete i[e];return{...i,...r(e)}},type:e})}let s={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function o(e){let t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,r.ly)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,r.ly)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?s[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(t.authorizationList=e.authorizationList.map(e=>({contractAddress:e.address,r:e.r,s:e.s,chainId:Number(e.chainId),nonce:Number(e.nonce),...void 0!==e.yParity?{yParity:Number(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:Number(e.v)}:{}}))),t.yParity=(()=>
1{if(e.yParity)return Number(e.yParity);if("bigint"==typeof t.v){if(0n===t.v||27n===t.v)return 0;if(1n===t.v||28n===t.v)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),"eip1559"===t.type&&delete t.maxFeePerBlobGas,t}let a=i("transaction",o),c=i("block",function(e){let t=e.transactions?.map(e=>"string"==typeof e?e:o(e));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}),u={"0x0":"reverted","0x1":"success"},l=i("transactionReceipt",function(e){let t={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(e=>(function(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}})(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,r.ly)(e.transactionIndex):null,status:e.status?u[e.status]:null,type:e.type?s[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}),h={block:c({format:e=>({transactions:e.transactions?.map(e=>{if("string"==typeof e)return e;let t=o(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?r.y_(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}),stateRoot:e.stateRoot})}),transaction:a({format(e){let t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?(0,r.y_)(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:l({format:e=>({l1GasPrice:e.l1GasPrice?(0,r.y_)(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?(0,r.y_)(e.l1GasUsed):null,l1Fee:e.l1Fee?(0,r.y_)(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})};var d=n(10052),f=n(4012);function p(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}var m=n(59455),g=n(81544);class b extends g.G{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class y extends g.G{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}class v extends g.G{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}let w={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new v({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new y({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new b({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new b({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function x(e,{recursiveReadLimit:t=8192}={}){let n=Object.create(w);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}var P=n(44659);function C(e,t="hex"){let n=function e(t){return Array.isArray(t)?function(e){let t=e.reduce((e,t)=>
1e+t.length,0),n=I(t);return{length:t<=55?1+t:1+n+t,encode(r){for(let{encode:i}of(t<=55?r.pushByte(192+t):(r.pushByte(247+n),1===n?r.pushUint8(t):2===n?r.pushUint16(t):3===n?r.pushUint24(t):r.pushUint32(t)),e))i(r)}}}(t.map(t=>e(t))):function(e){let t="string"==typeof e?(0,P.nr)(e):e,n=I(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(e){1===t.length&&t[0]<128||(t.length<=55?e.pushByte(128+t.length):(e.pushByte(183+n),1===n?e.pushUint8(t.length):2===n?e.pushUint16(t.length):3===n?e.pushUint24(t.length):e.pushUint32(t.length))),e.pushBytes(t)}}}(t)}(e),r=x(new Uint8Array(n.length));return(n.encode(r),"hex"===t)?(0,m.ci)(r.bytes):r.bytes}function I(e){if(e<256)return 1;if(e<65536)return 2;if(e<16777216)return 3;if(e<4294967296)return 4;throw new g.G("Length is too large.")}let O={ether:-9,wei:9};function E(e,t="wei"){return function(e,t){let n=e.toString(),r=n.startsWith("-");r&&(n=n.slice(1));let[i,s]=[(n=n.padStart(t,"0")).slice(0,n.length-t),n.slice(n.length-t)];return s=s.replace(/(0+)$/,""),`${r?"-":""}${i||"0"}${s?`.${s}`:""}`}(e,O[t])}class S extends g.G{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class U extends g.G{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",function(e){let t=Object.entries(e).map(([e,t])=>void 0===t||!1===t?null:[e,t]).filter(Boolean),n=t.reduce((e,[t])=>Math.max(e,t.length),0);return t.map(([e,t])=>` ${`${e}:`.padEnd(n+1)} ${t}`).join("\n")}(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class A extends g.G{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}function $(e){let{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),r="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,P.nr)(e)):e.blobs,i=[];for(let e of r)i.push(Uint8Array.from(t.blobToKzgCommitment(e)));return"bytes"===n?i:i.map(e=>(0,m.ci)(e))}function M(e){let{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),r="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,P.nr)(e)):e.blobs,i="string"==typeof e.commitments[0]?e.commitments.map(e=>(0,P.nr)(e)):e.commitments,s=[];for(let e=0;e<r.length;e++){let n=r[e],o=i[e];s.push(Uint8Array.from(t.computeBlobKzgProof(n,o)))}return"bytes"===n?s:s.map(e=>(0,m.ci)(e))}var k=n(74043),G=n(10662);let T=(e,t,n)=>e&t^~e&n,j=(e,t,n)=>e&t^e&n^t&n;class R extends G.kb{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,G.GL)(this.buffer)}update(e){(0,k.Gg)(this);let{view:t,buffer:n,blockLen:r}=this,i=(e=(0,G.O0)(e)).length;for(let s=0;s<i;){let o=Math.min(r-this.pos,i-s);if(o===r){let t=(0,G.GL)(e);for(;r<=i-s;s+=r)this.process(t,s);continue}n.set(e.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,k.Gg)(this),(0,k.J8)(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:s}=this;t[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>r-s&&(this.process(n,0),s=0);for(let e=s;e<r;e++)t[e]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);let i=BigInt(32),s=BigInt(4294967295),o=Number(n>>i&s),a=Number(n&s),c=r?4:0,u=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+u,a,r)}(n,r-8,BigInt(8*this.length),i),this.process(n,0);let o=(0,G.GL)(e),a=this.outputLen;if(a%4)throw Error("_sha2: outputLen should be aligned to 32bit");let c=a/4,u=this.get();if(c>u.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)o.setUint32(4*e,u[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:s,pos:o}=this;return e.length=r,e.pos=o,e.finished=i,e.destroyed=s,r%t&&e.buffer.set(n),e}}let F=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
1734187,3204031479,3329325298]),q=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),N=new Uint32Array(64);class B extends R{constructor(){super(64,32,8,!1),this.A=0|q[0],this.B=0|q[1],this.C=0|q[2],this.D=0|q[3],this.E=0|q[4],this.F=0|q[5],this.G=0|q[6],this.H=0|q[7]}get(){let{A:e,B:t,C:n,D:r,E:i,F:s,G:o,H:a}=this;return[e,t,n,r,i,s,o,a]}set(e,t,n,r,i,s,o,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|s,this.G=0|o,this.H=0|a}process(e,t){for(let n=0;n<16;n++,t+=4)N[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=N[e-15],n=N[e-2],r=(0,G.np)(t,7)^(0,G.np)(t,18)^t>>>3,i=(0,G.np)(n,17)^(0,G.np)(n,19)^n>>>10;N[e]=i+N[e-7]+r+N[e-16]|0}let{A:n,B:r,C:i,D:s,E:o,F:a,G:c,H:u}=this;for(let e=0;e<64;e++){let t=u+((0,G.np)(o,6)^(0,G.np)(o,11)^(0,G.np)(o,25))+T(o,a,c)+F[e]+N[e]|0,l=((0,G.np)(n,2)^(0,G.np)(n,13)^(0,G.np)(n,22))+j(n,r,i)|0;u=c,c=a,a=o,o=s+t|0,s=i,i=r,r=n,n=t+l|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,s=s+this.D|0,o=o+this.E|0,a=a+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(n,r,i,s,o,a,c,u)}roundClean(){N.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}let L=(0,G.hE)(()=>new B);var _=n(93610);class z extends g.G{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}class D extends g.G{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class H extends g.G{constructor({hash:e,size:t}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${t}`],name:"InvalidVersionedHashSizeError"})}}class K extends g.G{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:["Expected: 1",`Received: ${t}`],name:"InvalidVersionedHashVersionError"})}}var Q=n(20556);function W(e,{dir:t="left"}={}){let n="string"==typeof e?e.replace("0x",""):e,r=0;for(let e=0;e<n.length-1&&"0"===n["left"===t?e:n.length-e-1].toString();e++)r++;return(n="left"===t?n.slice(r):n.slice(0,n.length-r),"string"==typeof e)?(1===n.length&&"right"===t&&(n=`${n}0`),`0x${n.length%2==1?`0${n}`:n}`):n}let V=2n**256n-1n;class J extends g.G{constructor({chainId:e}){super("number"==typeof e?`Chain ID "${e}
1" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}class X extends g.G{constructor({cause:e,message:t}={}){let n=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(X,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(X,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class Y extends g.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${E(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(Y,"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 Z extends g.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${E(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(Z,"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 ee extends g.G{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(ee,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class et extends g.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account. 2Try increasing the nonce or find the latest nonce with \`getTransactionCount\`.`,{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(et,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class en extends g.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(en,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class er extends g.G{constructor({cause:e}={}){super("The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.",{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(er,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class ei extends g.G{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(ei,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class es extends g.G{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(es,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class eo extends g.G{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(eo,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class ea extends g.G{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super(`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${E(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${E(n)} gwei`:""}).`,{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(ea,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});var ec=n(47116);function eu(e,t){if("number"==typeof t&&t>0&&t>
2(0,Q.d)(e)-1)throw new ec.mV({offset:t,position:"start",size:(0,Q.d)(e)})}function el(e,t,n){if("number"==typeof t&&"number"==typeof n&&(0,Q.d)(e)!==n-t)throw new ec.mV({offset:n,position:"end",size:(0,Q.d)(e)})}function eh(e){let{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:r,to:i}=e;if(t<=0)throw new J({chainId:t});if(i&&!(0,f.U)(i))throw new d.b({address:i});if(r&&r>V)throw new Y({maxFeePerGas:r});if(n&&r&&n>r)throw new ea({maxFeePerGas:r,maxPriorityFeePerGas:n})}function ed(e){if(!e||0===e.length)return[];let t=[];for(let n=0;n<e.length;n++){let{address:r,storageKeys:i}=e[n];for(let e=0;e<i.length;e++)if(i[e].length-2!=64)throw new A({storageKey:i[e]});if(!(0,f.U)(r,{strict:!1}))throw new d.b({address:r});t.push([r,i])}return t}function ef(e,t){let n=t??e,{v:r,yParity:i}=n;if(void 0===n.r||void 0===n.s||void 0===r&&void 0===i)return[];let s=W(n.r),o=W(n.s);return["number"==typeof i?i?(0,m.NC)(1):"0x":0n===r?"0x":1n===r?(0,m.NC)(1):27n===r?"0x":(0,m.NC)(1),"0x00"===s?"0x":s,"0x00"===o?"0x":o]}let ep={contracts:{gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},formatters:h,serializers:{transaction:function(e,t){return"deposit"===e.type||void 0!==e.sourceHash?function(e){!function(e){let{from:t,to:n}=e;if(t&&!(0,f.U)(t))throw new d.b({address:t});if(n&&!(0,f.U)(n))throw new d.b({address:n})}(e);let{sourceHash:t,data:n,from:r,gas:i,isSystemTx:s,mint:o,to:a,value:c}=e;return p(["0x7e",C([t,r,a??"0x",o?(0,m.NC)(o):"0x",c?(0,m.NC)(c):"0x",i?(0,m.NC)(i):"0x",s?"0x1":"0x",n??"0x"])])}(e):function(e,t){let n=function(e){if(e.type)return e.type;if(void 0!==e.authorizationList)return"eip7702";if(void 0!==e.blobs||void 0!==e.blobVersionedHashes||void 0!==e.maxFeePerBlobGas||void 0!==e.sidecars)return"eip4844";if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new U({transaction:e})}(e);return"eip1559"===n?function(e,t){let{chainId:n,gas:r,nonce:i,to:s,value:o,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,data:l}=e;eh(e);let h=ed(u);return p(["0x02",C([(0,m.NC)(n),i?(0,m.NC)(i):"0x",c?(0,m.NC)(c):"0x",a?(0,m.NC)(a):"0x",r?(0,m.NC)(r):"0x",s??"0x",o?(0,m.NC)(o):"0x",l??"0x",h,...ef(e,t)])])}(e,t):"eip2930"===n?function(e,t){let{chainId:n,gas:r,data:i,nonce:s,to:o,value:a,accessList:c,gasPrice:u}=e;!function(e){let{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:s}=e;if(t<=0)throw new J({chainId:t});if(s&&!(0,f.U)(s))throw new d.b({address:s});if(n||i)throw new g.G("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>V)throw new Y({maxFeePerGas:r})}(e);let l=ed(c);return p(["0x01",C([(0,m.NC)(n),s?(0,m.NC)(s):"0x",u?(0,m.NC)(u):"0x",r?(0,m.NC)(r):"0x",o??"0x",a?(0,m.NC)(a):"0x",i??"0x",l,...ef(e,t)])])}(e,t):"eip4844"===n?function(e,t){let{chainId:n,gas:i,nonce:s,to:o,value:a,maxFeePerBlobGas:c,maxFeePerGas:u,maxPriorityFeePerGas:l,accessList:h,data:d}=e;!function(e){let{blobVersionedHashes:t}=e;if(t){if(0===t.length)throw new D;for(let e of t){let t=(0,Q.d)(e),n=(0,r.ly)(function(e,t,n,{strict:r}={}){return(0,_.v)(e,{strict:!1})?function(e,t,n,{strict:r}={}){eu(e,0);let i=`0x${e.replace("0x","").slice(0*2,2)}`;return r&&el(i,t,1),i}(e,0,1,{strict:r}):function(e,t,n,{strict:r}={}){eu(e,0);let i=e.slice(t,1);return r&&el(i,t,n),i}(e,0,1,{strict:r})}(e,0,0));if(32!==t)throw new H({hash:e,size:t});if(1!==n)throw new K({hash:e,version:n})}}eh(e)}(e);let f=e.blobVersionedHashes,g=e.sidecars;if(e.blobs&&(void 0===f||void 0===g)){let t="string"==typeof e.blobs[0]?e.blobs:e.blobs.map(e=>(0,m.ci)(e)),n=e.kzg,r=$({blobs:t,kzg:n});if(void 0===f&&(f=function(e){let{commitments:t,version:n}=e,r=e.to??("string"==typeof t[0]?"hex":"bytes"),i=[];
2for(let e of t)i.push(function(e){let{commitment:t,version:n=1}=e,r=e.to??("string"==typeof t?"hex":"bytes"),i=function(e,t){let n=L((0,_.v)(e,{strict:!1})?(0,P.O0)(e):e);return"bytes"===(t||"hex")?n:(0,m.NC)(n)}(t,"bytes");return i.set([n],0),"bytes"===r?i:(0,m.ci)(i)}({commitment:e,to:r,version:n}));return i}({commitments:r})),void 0===g){let e=M({blobs:t,commitments:r,kzg:n});g=function(e){let{data:t,kzg:n,to:r}=e,i=e.blobs??function(e){let t=e.to??("string"==typeof e.data?"hex":"bytes"),n="string"==typeof e.data?(0,P.nr)(e.data):e.data,r=(0,Q.d)(n);if(!r)throw new D;if(r>761855)throw new z({maxSize:761855,size:r});let i=[],s=!0,o=0;for(;s;){let e=x(new Uint8Array(131072)),t=0;for(;t<4096;){let r=n.slice(o,o+31);if(e.pushByte(0),e.pushBytes(r),r.length<31){e.pushByte(128),s=!1;break}t++,o+=31}i.push(e)}return"bytes"===t?i.map(e=>e.bytes):i.map(e=>(0,m.ci)(e.bytes))}({data:t,to:r}),s=e.commitments??$({blobs:i,kzg:n,to:r}),o=e.proofs??M({blobs:i,commitments:s,kzg:n,to:r}),a=[];for(let e=0;e<i.length;e++)a.push({blob:i[e],commitment:s[e],proof:o[e]});return a}({blobs:t,commitments:r,proofs:e})}}let b=ed(h),y=[(0,m.NC)(n),s?(0,m.NC)(s):"0x",l?(0,m.NC)(l):"0x",u?(0,m.NC)(u):"0x",i?(0,m.NC)(i):"0x",o??"0x",a?(0,m.NC)(a):"0x",d??"0x",b,c?(0,m.NC)(c):"0x",f??[],...ef(e,t)],v=[],w=[],I=[];if(g)for(let e=0;e<g.length;e++){let{blob:t,commitment:n,proof:r}=g[e];v.push(t),w.push(n),I.push(r)}return p(["0x03",g?C([y,v,w,I]):C(y)])}(e,t):"eip7702"===n?function(e,t){let{authorizationList:n,chainId:r,gas:i,nonce:s,to:o,value:a,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:l,data:h}=e;!function(e){let{authorizationList:t}=e;
2if(t)for(let e of t){let{contractAddress:t,chainId:n}=e;if(!(0,f.U)(t))throw new d.b({address:t});if(n<=0)throw new J({chainId:n})}eh(e)}(e);let g=ed(l),b=function(e){if(!e||0===e.length)return[];let t=[];for(let n of e){let{contractAddress:e,chainId:r,nonce:i,...s}=n;t.push([(0,m.NC)(r),e,i?(0,m.NC)(i):"0x",...ef({},s)])}return t}(n);return p(["0x04",C([(0,m.NC)(r),s?(0,m.NC)(s):"0x",u?(0,m.NC)(u):"0x",c?(0,m.NC)(c):"0x",i?(0,m.NC)(i):"0x",o??"0x",a?(0,m.NC)(a):"0x",h??"0x",g,b,...ef(e,t)])])}(e,t):function(e,t){let{chainId:n=0,gas:r,data:i,nonce:s,to:o,value:a,gasPrice:c}=e;!function(e){let{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:s}=e;if(s&&!(0,f.U)(s))throw new d.b({address:s});if(void 0!==t&&t<=0)throw new J({chainId:t});if(n||i)throw new g.G("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>V)throw new Y({maxFeePerGas:r})}(e);let u=[s?(0,m.NC)(s):"0x",c?(0,m.NC)(c):"0x",r?(0,m.NC)(r):"0x",o??"0x",a?(0,m.NC)(a):"0x",i??"0x"];if(t){let e=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n);if(n>0)return BigInt(2*n)+BigInt(35n+t.v-27n);let e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new S({v:t.v});return e})(),r=W(t.r),i=W(t.s);u=[...u,(0,m.NC)(e),"0x00"===r?"0x":r,"0x00"===i?"0x":i]}else n>0&&(u=[...u,(0,m.NC)(n),"0x","0x"]);return C(u)}(e,t)}(e,t)}}}},31669:function(e,t,n){"use strict";n.d(t,{K:function(){return l},x:function(){return u}});var r=n(10052),i=n(44659),s=n(88748),o=n(82061),a=n(4012);let c=new o.k(8192);function u(e,t){if(c.has(`${e}.${t}`))return c.get(`${e}.${t}`);let n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=(0,s.w)((0,i.qX)(n),"bytes"),o=(t?n.substring(`${t}0x`.length):n).split("");for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&o[e]&&(o[e]=o[e].toUpperCase()),(15&r[e>>1])>=8&&o[e+1]&&(o[e+1]=o[e+1].toUpperCase());let a=`0x${o.join("")}`;return c.set(`${e}.${t}`,a),a}function l(e,t){if(!(0,a.U)(e,{strict:!1}))throw new r.b({address:e});return u(e,t)}},4012:function(e,t,n){"use strict";n.d(t,{U:function(){return a}});var r=n(82061),i=n(31669);let s=/^0x[a-fA-F0-9]{40}$/,o=new r.k(8192);function a(e,t){let{strict:n=!0}=t??{},r=`${e}.${n}`;if(o.has(r))return o.get(r);let a=!!s.test(e)&&(e.toLowerCase()===e||!n||(0,i.x)(e)===e);return o.set(r,a),a}},90328:function(e,t,n){"use strict";function r(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}n.d(t,{a:function(){return r}})},93610:function(e,t,n){"use strict";function r(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}n.d(t,{v:function(){return r}})},8796:function(e,t,n){"use strict";n.d(t,{vk:function(){return i}});var r=n(47116);function i(e,{dir:t,size:n=32}={}){return"string"==typeof e?function(e,{dir:t,size:n=32}={}){if(null===n)return e;let i=e.replace("0x","");if(i.length>2*n)throw new r.$s({size:Math.ceil(i.length/2),targetSize:n,type:"hex"});return`0x${i["right"===t?"padEnd":"padStart"](2*n,"0")}`}(e,{dir:t,size:n}):function(e,{dir:t,size:n=32}={}){if(null===n)return e;if(e.length>n)throw new r.$s({size:e.length,targetSize:n,type:"bytes"});let i=new Uint8Array(n);for(let r=0;r<n;r++){let s="right"===t;i[s?r:n-r-1]=e[s?r:e.length-r-1]}return i}(e,{dir:t,size:n})}},20556:function(e,t,n){"use strict";n.d(t,{d:function(){return i}});var r=n(93610);function i(e){return(0,r.v)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},72932:function(e,t,n){"use strict";n.d(t,{Yf:function(){return s},ly:function(){return a},y_:function(){return o}});var r=n(63152),i=n(20556);function s(e,{size:t}){if((0,i.d)(e)>t)throw new r.M6({givenSize:(0,i.d)(e),maxSize:t})}function o(e,t={}){let{signed:n}=t;t.size&&s(e,{size:t.size});let r=BigInt(e);if(!n)return r;let i=(e.length-2)/2;return r<=(1n<<8n*BigInt(i)-1n)-1n?r:r-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function a(e,t={}){return Number(o(e,t))}},44659:function(e,t,n){"use strict";n.d(t,{O0:function(){return u},nr:function(){return d},qX:function(){return f}});var r=n(81544),i=n(93610),s=n(8796),o=n(72932),a=n(59455);let c=new TextEncoder;function u(e,t={}){return"number"==typeof e||"bigint"==typeof e?d((0,a.eC)(e,t)):"boolean"==typeof e?function(e,t={}){let n=new Uint8Array(1);return(n[0]=Number(e),"number"==typeof t.size)?((0,o.Yf)(n,{size:t.size}),(0,s.vk)(n,{size:t.size})):n}(e,t):(0,i.v)(e)?d(e,t):f(e,t)}let l={zero:48,nine:57,A:65,F:70,a:97,f:102};function h(e){return e>=l.zero&&e<=l.nine?e-l.zero:e>=l.A&&e<=l.F?e-(l.A-10):e>=l.a&&e<=l.f?e-(l.a-10):void 0}function d(e,t={}){let n=e;t.size&&((0,o.Yf)(n,{size:t.size}),n=(0,s.vk)(n,{dir:"right",size:t.size}));let i=n.slice(2);i.length%2&&(i=`0${i}`);let a=i.length/2,c=new Uint8Array(a);for(let e=0,t=0;e<a;e++){let n=h(i.charCodeAt(t++)),s=h(i.charCodeAt(t++));if(void 0===n||void 0===s)throw new r.G(`Invalid byte sequence ("${i[t-2]}${i[t-1]}" in "${i}").`);c[e]=16*n+s}return c}function f(e,t={}){let n=c.encode(e);return"number"==typeof t.size?((0,o.Yf)(n,{size:t.size}),(0,s.vk)(n,{dir:"right",size:t.size})):n}},59455:function(e,t,n){"use strict";n.d(t,{$G:function(){return h},NC:function(){return a},ci:function(){return c},eC:function(){return u}});var r=n(63152),i=n(8796),s=n(72932);let o=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function a(e,t={}){return"number"==typeof e||"bigint"==typeof e?u(e,t):"string"==typeof e?h(e,t):"boolean"==typeof e?function(e,t={}){let n=`0x${Number(e)}`;return"number"==typeof t.size?((0,s.Yf)(n,{size:t.size}),(0,i.vk)(n,{size:t.size})):n}(e,t):c(e,t)}function c(e,t={}){let n="";for(let t=0;t<e.length;t++)n+=o[e[t]];let r=`0x${n}`;return"number"==typeof t.size?((0,s.Yf)(r,{size:t.size}),(0,i.vk)(r,{dir:"right",size:t.size})):r}function u(e,t={}){let n;let{signed:s,size:o}=t,a=BigInt(e);o?n=s?(1n<<8n*BigInt(o)-1n)-1n:2n**(8n*BigInt(o))-1n:"number"==typeof e&&(n=BigInt(Number.MAX_SAFE_INTEGER));let c="bigint"==typeof n&&s?-n-1n:0;if(n&&a>n||a<c){let t="bigint"==typeof e?"n":"";throw new r.J5({max:n?`${n}${t}`:void 0,min:`${c}${t}`,signed:s,size:o,value:`${e}${t}`})}let u=`0x${(s&&a<0?(1n<<BigInt(8*o))+BigInt(a):a).toString(16)}`;return o?(0,i.vk)(u,{size:o}):u}let l=new TextEncoder;function h(e,t={}){return c(l.encode(e),t)}},88748:function(e,t,n){"use strict";n.d(t,{w:function(){return A}});var r=n(74043);let i=BigInt(4294967296-1),s=BigInt(32),o=(e,t,n)=>e<<n|t>>>32-n,a=(e,t,n)=>t<<n|e>>>32-n,c=(e,t,n)=>t<<n-32|e>>>
264-n,u=(e,t,n)=>e<<n-32|t>>>64-n;var l=n(10662);let h=[],d=[],f=[],p=BigInt(0),m=BigInt(1),g=BigInt(2),b=BigInt(7),y=BigInt(256),v=BigInt(113);for(let e=0,t=m,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],h.push(2*(5*r+n)),d.push((e+1)*(e+2)/2%64);let i=p;for(let e=0;e<7;e++)(t=(t<<m^(t>>b)*v)%y)&g&&(i^=m<<(m<<BigInt(e))-m);f.push(i)}let[w,x]=function(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let o=0;o<e.length;o++){let{h:a,l:c}=function(e,t=!1){return t?{h:Number(e&i),l:Number(e>>s&i)}:{h:0|Number(e>>s&i),l:0|Number(e&i)}}(e[o],t);[n[o],r[o]]=[a,c]}return[n,r]}(f,!0),P=(e,t,n)=>n>32?c(e,t,n):o(e,t,n),C=(e,t,n)=>n>32?u(e,t,n):a(e,t,n);class I extends l.kb{constructor(e,t,n,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,r.Rx)(n),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,l.Jq)(this.state)}keccak(){l.iA||(0,l.l1)(this.state32),function(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let r=(t+8)%10,i=(t+2)%10,s=n[i],o=n[i+1],a=P(s,o,1)^n[r],c=C(s,o,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=a,e[t+n+1]^=c}let t=e[2],i=e[3];for(let n=0;n<24;n++){let r=d[n],s=P(t,i,r),o=C(t,i,r),a=h[n];t=e[a],i=e[a+1],e[a]=s,e[a+1]=o}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=w[r],e[1]^=x[r]}n.fill(0)}(this.state32,this.rounds),l.iA||(0,l.l1)(this.state32),this.posOut=0,this.pos=0}update(e){(0,r.Gg)(this);let{blockLen:t,state:n}=this,i=(e=(0,l.O0)(e)).length;for(let r=0;r<i;){let s=Math.min(t-this.pos,i-r);for(let t=0;t<s;t++)n[this.pos++]^=e[r++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,(128&t)!=0&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){(0,r.Gg)(this,!1),(0,r.aI)(e),this.finish();let t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();let s=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+s),r),this.posOut+=s,r+=s}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,r.Rx)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,r.J8)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:s}=this;return e||(e=new I(t,n,r,s,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=s,e.destroyed=this.destroyed,e}}let O=(0,l.hE)(()=>new I(136,1,32));var E=n(93610),S=n(44659),U=n(59455);function A(e,t){let n=O((0,E.v)(e,{strict:!1})?(0,S.O0)(e):e);return"bytes"===(t||"hex")?n:(0,U.NC)(n)}},82061:function(e,t,n){"use strict";n.d(t,{k:function(){return r}});class r extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}},72938:function(e,t,n){"use strict";async function r(e){return new Promise(t=>setTimeout(t,e))}function i(e,{delay:t=100,retryCount:n=2,shouldRetry:i=()=>!0}={}){return new Promise((s,o)=>{let a=async({count:c=0}={})=>{let u=async({error:e})=>{let n="function"==typeof t?t({count:c,error:e}):t;n&&await r(n),a({count:c+1})};try{let t=await e();s(t)}catch(e){if(c<n&&await i({count:c,error:e}))return u({error:e});o(e)}};a()})}n.d(t,{J:function(){return i}})},39504:function(e,t,n){"use strict";function r(e,{errorInstance:t=Error("timed out"),timeout:n,signal:r}){return new Promise((i,s)=>{(async()=>{let o;try{let a=new AbortController;n>0&&(o=setTimeout(()=>{r?a.abort():s(t)},n)),i(await e({signal:a?.signal||null}))}catch(e){e?.name==="AbortError"&&s(t),s(e)}finally{clearTimeout(o)}})()})}n.d(t,{F:function(){return r}})},31853:function(e,t,n){"use strict";n.d(t,{P:function(){return r}});let r=(e,t,n)=>JSON.stringify(e,(e,n)=>{let r="bigint"==typeof n?n.toString():n;return"function"==typeof t?t(e,r):r},n)},78217:function(e,t,n){"use strict";let r;n.d(t,{h:function(){return s}});let i=256;function s(e=11){if(!r||i+e>512){r="",i=0;for(let e=0;e<256;e++)r+=(256+256*Math.random()|0).toString(16).substring(1)}return r.substring(i,i+++e)}},10231:function(e,t,n){"use strict";n.d(t,{F:function(){return c}});var r=n(2265);let i=!1;async function s(e,t={}){let n;if(i)return[];i=!0,e.setState(e=>({...e,status:e.current?"reconnecting":"connecting"}));let r=[];if(t.connectors?.length)for(let n of t.connectors){let t;t="function"==typeof n?e._internal.connectors.setup(n):n,r.push(t)}else r.push(...e.connectors);try{n=await e.storage?.getItem("recentConnectorId")}catch{}let s={};for(let[,t]of e.state.connections)s[t.connector.id]=1;n&&(s[n]=0);let o=Object.keys(s).length>0?[...r].sort((e,t)=>
2(s[e.id]??10)-(s[t.id]??10)):r,a=!1,c=[],u=[];for(let t of o){let n=await t.getProvider().catch(()=>void 0);if(!n||u.some(e=>e===n)||!await t.isAuthorized())continue;let r=await t.connect({isReconnecting:!0}).catch(()=>null);r&&(t.emitter.off("connect",e._internal.events.connect),t.emitter.on("change",e._internal.events.change),t.emitter.on("disconnect",e._internal.events.disconnect),e.setState(e=>{let n=new Map(a?e.connections:new Map).set(t.uid,{accounts:r.accounts,chainId:r.chainId,connector:t});return{...e,current:a?e.current:t.uid,connections:n}}),c.push({accounts:r.accounts,chainId:r.chainId,connector:t}),u.push(n),a=!0)}return("reconnecting"===e.state.status||"connecting"===e.state.status)&&(a?e.setState(e=>({...e,status:"connected"})):e.setState(e=>({...e,connections:new Map,current:null,status:"disconnected"}))),i=!1,c}function o(e){let{children:t,config:n,initialState:i,reconnectOnMount:o=!0}=e,{onMount:a}=function(e,t){let{initialState:n,reconnectOnMount:r}=t;return n&&!e._internal.store.persist.hasHydrated()&&e.setState({...n,chainId:e.chains.some(e=>e.id===n.chainId)?n.chainId:e.chains[0].id,connections:r?n.connections:new Map,status:r?"reconnecting":"disconnected"}),{async onMount(){if(e._internal.ssr){await e._internal.store.persist.rehydrate();let t=e._internal.mipd?.getProviders().map(e._internal.connectors.providerDetailToConnector).map(e._internal.connectors.setup);e._internal.connectors.setState(e=>[...e,...t??[]])}r?s(e):e.storage&&e.setState(e=>({...e,connections:new Map}))}}}(n,{initialState:i,reconnectOnMount:o});n._internal.ssr||a();let c=(0,r.useRef)(!0);return(0,r.useEffect)(()=>{if(c.current&&n._internal.ssr)return a(),()=>{c.current=!1}},[]),t}let a=(0,r.createContext)(void 0);function c(e){let{children:t,config:n}=e;return(0,r.createElement)(o,e,(0,r.createElement)(a.Provider,{value:n},t))}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.