@orbs-network/spot-react 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ccip-CtSUe45L.js → ccip-DYVRalTt.js} +1 -1
- package/dist/{index-vzISTdG1.js → index-DiYJ6g0r.js} +6060 -6066
- package/dist/spot-react/package.json.d.ts +2 -3
- package/dist/spot-react/src/components/orders/order-preview.d.ts.map +1 -0
- package/dist/spot-react/src/components/orders/orders-list.d.ts.map +1 -0
- package/dist/spot-react/src/components/orders/orders.d.ts.map +1 -0
- package/dist/spot-react/src/{twap/components → components}/submit-order-panel.d.ts +1 -1
- package/dist/spot-react/src/components/submit-order-panel.d.ts.map +1 -0
- package/dist/spot-react/src/consts.d.ts +1 -1
- package/dist/spot-react/src/consts.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/order-hooks.d.ts +109 -1
- package/dist/spot-react/src/hooks/order-hooks.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/{use-build-repermit-order-data-callback.ts.d.ts → use-build-repermit-order-data-callback.d.ts} +2 -2
- package/dist/spot-react/src/hooks/use-build-repermit-order-data-callback.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-cancel-order.d.ts +1 -1
- package/dist/spot-react/src/hooks/use-cancel-order.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-duration.d.ts +1 -1
- package/dist/spot-react/src/hooks/use-duration.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-fill-delay.d.ts +1 -1
- package/dist/spot-react/src/hooks/use-fill-delay.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-history-order.d.ts +1 -1
- package/dist/spot-react/src/hooks/use-history-order.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-input-errors.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-submit-order.d.ts +1 -1
- package/dist/spot-react/src/hooks/use-submit-order.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-submit-swap-panel.d.ts +1 -1
- package/dist/spot-react/src/index.d.ts +21 -1
- package/dist/spot-react/src/index.d.ts.map +1 -1
- package/dist/spot-react/src/{context/twap-context.d.ts → spot-context.d.ts} +3 -3
- package/dist/spot-react/src/spot-context.d.ts.map +1 -0
- package/dist/spot-react/src/types.d.ts +3 -3
- package/dist/spot-react/src/types.d.ts.map +1 -1
- package/dist/spot-react/src/utils.d.ts +1 -1
- package/dist/spot-react/src/utils.d.ts.map +1 -1
- package/dist/spot-react.js +20 -20
- package/dist/spot-react.umd.cjs +44 -44
- package/package.json +2 -3
- package/dist/spot-react/src/context/twap-context.d.ts.map +0 -1
- package/dist/spot-react/src/hooks/use-build-repermit-order-data-callback.ts.d.ts.map +0 -1
- package/dist/spot-react/src/twap/components/orders/order-preview.d.ts.map +0 -1
- package/dist/spot-react/src/twap/components/orders/orders-list.d.ts.map +0 -1
- package/dist/spot-react/src/twap/components/orders/orders.d.ts.map +0 -1
- package/dist/spot-react/src/twap/components/submit-order-panel.d.ts.map +0 -1
- package/dist/spot-react/src/twap/twap.d.ts +0 -22
- package/dist/spot-react/src/twap/twap.d.ts.map +0 -1
- /package/dist/spot-react/src/{twap/components → components}/orders/order-preview.d.ts +0 -0
- /package/dist/spot-react/src/{twap/components → components}/orders/orders-list.d.ts +0 -0
- /package/dist/spot-react/src/{twap/components → components}/orders/orders.d.ts +0 -0
package/dist/spot-react.umd.cjs
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
(function(Z,F){typeof exports=="object"&&typeof module<"u"?F(exports,require("react"),require("@orbs-network/spot-sdk"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","@orbs-network/spot-sdk","react/jsx-runtime","react-dom"],F):(Z=typeof globalThis<"u"?globalThis:Z||self,F(Z.SpotReact={},Z.React,Z.SpotSDK,Z.jsxRuntime,Z.ReactDOM))})(this,(function(Z,F,R,O,Pu){"use strict";var r2=Z=>{throw TypeError(Z)};var R0=(Z,F,R)=>F.has(Z)||r2("Cannot "+R);var N=(Z,F,R)=>(R0(Z,F,"read from private field"),R?R.call(Z):F.get(Z)),le=(Z,F,R)=>F.has(Z)?r2("Cannot add the same private member more than once"):F instanceof WeakSet?F.add(Z):F.set(Z,R),ee=(Z,F,R,O)=>(R0(Z,F,"write to private field"),O?O.call(Z,R):F.set(Z,R),R),Ae=(Z,F,R)=>(R0(Z,F,"access private method"),R);var Su=(Z,F,R,O)=>({set _(Pu){ee(Z,F,Pu,R)},get _(){return N(Z,F,O)}});var rn,Xs,Lx,Qs,os,eo,Rx,to,is,ro,Hx,Js,$x,ea,no,vr,ta,St,rc,ra,Rr,Nn,Gx,Zt,Me,nc,Lt,na,so,Bn,cs,sc,ao,oo,sa,aa,ls,io,Ve,ic,H0,$0,G0,j0,V0,W0,q0,n2,jx,ac,nn,Rt,oa,sn,hs,Vx,Mn,Hr,oc,Wx,_n,us,Xt,Dn,Fn,Au,Y0,qx,an,Yx,ut,ds,fs,co,lo,ps,uo,fo,Kx;function s2(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const mt=s2(F),X0=e=>{let t;const r=new Set,n=(l,u)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const p=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(h=>h(t,p))}},s=()=>t,i={setState:n,getState:s,getInitialState:()=>c,subscribe:l=>(r.add(l),()=>r.delete(l))},c=t=e(n,s,i);return i},a2=(e=>e?X0(e):X0),o2=e=>e;function i2(e,t=o2){const r=F.useSyncExternalStore(e.subscribe,F.useCallback(()=>t(e.getState()),[e,t]),F.useCallback(()=>t(e.getInitialState()),[e,t]));return F.useDebugValue(r),r}const Q0=e=>{const t=a2(e),r=n=>i2(t,n);return Object.assign(r,t),r},c2=(e=>e?Q0(e):Q0),J0={disclaimerAccepted:!0,currentTime:Date.now(),swapExecution:{}},K=c2((e,t)=>({state:J0,updateState:r=>e(n=>({state:{...n.state,...r}})),updateSwapExecution:r=>e(n=>({state:{...n.state,swapExecution:{...n.state.swapExecution,...r}}})),resetState:()=>{e({state:{...J0,currentTime:Date.now(),swapExecution:t().state.swapExecution,isMarketOrder:t().state.isMarketOrder}})}})),l2={version:"0.0.6"};(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".orbs_OrbsLogo{object-fit:contain;display:inline}.orbs_PoweredBy{border-radius:8px;margin-left:auto;margin-right:auto}.orbs_PoweredBy a{display:flex;align-items:center;justify-content:center;text-decoration:none;color:inherit}.orbs_PoweredBy span{font-size:14px}.orbs_PoweredBy .orbs_OrbsLogo{margin-left:6px;margin-right:6px;width:18px;height:18px}.orbs_Text{margin:0;padding:0}.orbs_Spinner{width:var(--size, 38px);height:var(--size, 38px);border:var(--border-width, 3px) solid var(--border-color, white);border-bottom-color:var(--bottom-border-color, rgba(255, 255, 255, .2));border-radius:50%;display:inline-block;box-sizing:border-box;animation:orbs_rotation 1s linear infinite}@keyframes orbs_rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.orbs_TradeStepLayout{--layout-min-height: 220px;--layout-width: 100%;--layout-display: flex;--layout-direction: column;--layout-align: center;--layout-overflow: visible;display:var(--layout-display);flex-direction:var(--layout-direction);align-items:var(--layout-align);width:var(--layout-width);min-height:var(--layout-min-height);overflow:var(--layout-overflow)}.orbs_TradeStepLayoutBody{--body-gap: 20px;--body-margin-top: 30px;--body-width: 100%;--body-display: flex;--body-direction: column;--body-align: center;--body-overflow: visible;gap:var(--body-gap);align-items:var(--body-align);display:var(--body-display);flex-direction:var(--body-direction);width:var(--body-width);margin-top:var(--body-margin-top);overflow:var(--body-overflow)}.orbs_TradeStepLayoutHeader{--header-gap: 30px;--header-display: flex;--header-direction: column;--header-align: center;--header-justify: center;--header-overflow: visible;display:var(--header-display);flex-direction:var(--header-direction);align-items:var(--header-align);justify-content:var(--header-justify);gap:var(--header-gap);overflow:var(--header-overflow)}.orbs_TradeStepLayoutTitle{--title-font-size: 18px;--title-font-weight: 500;--title-line-height: normal;--title-color: inherit;--title-text-align: center;--title-margin: 0;--title-padding: 0;font-size:var(--title-font-size);font-weight:var(--title-font-weight);line-height:var(--title-line-height);color:var(--title-color);text-align:var(--title-text-align);margin:var(--title-margin);padding:var(--title-padding)}.orbs_StepIndicator{--indicator-display: flex;--indicator-align: center;--indicator-justify: flex-start;--indicator-height: 7px;--indicator-width: 120px;--indicator-border-radius: 999px;--indicator-bg-color: white;--indicator-margin-bottom: 20px;--indicator-position: relative;--indicator-overflow: hidden;--indicator-border: none;--indicator-box-shadow: none;display:var(--indicator-display);align-items:var(--indicator-align);justify-content:var(--indicator-justify);height:var(--indicator-height);width:var(--indicator-width);border-radius:var(--indicator-border-radius);overflow:var(--indicator-overflow);background-color:var(--indicator-bg-color);margin-bottom:var(--indicator-margin-bottom);position:var(--indicator-position);border:var(--indicator-border);box-shadow:var(--indicator-box-shadow)}.orbs_StepIndicatorLine{--line-height: 100%;--line-bg-color: black;--line-position: absolute;--line-top: 0;--line-left: 0;--line-right: 0;--line-bottom: 0;--line-transition: all .3s ease;--line-border-radius: inherit;--line-box-shadow: none;height:var(--line-height);background-color:var(--line-bg-color);position:var(--line-position);top:var(--line-top);left:var(--line-left);right:var(--line-right);bottom:var(--line-bottom);transition:var(--line-transition);border-radius:var(--line-border-radius);box-shadow:var(--line-box-shadow)}.orbs_TradeStepLayoutFooter{--footer-display: flex;--footer-align: center;--footer-justify: center;--footer-direction: column;--footer-margin-top: auto;--footer-padding-top: 30px;--footer-width: 100%;--footer-overflow: visible;--footer-border-top: none;display:var(--footer-display);align-items:var(--footer-align);justify-content:var(--footer-justify);flex-direction:var(--footer-direction);margin-top:var(--footer-margin-top);padding-top:var(--footer-padding-top);width:var(--footer-width);overflow:var(--footer-overflow);border-top:var(--footer-border-top)}.orbs_TradeStepLayoutFooter p{--footer-text-font-size: 15px;--footer-text-line-height: normal;--footer-text-color: inherit;--footer-text-margin: 0;--footer-text-padding: 0;font-size:var(--footer-text-font-size);line-height:var(--footer-text-line-height);color:var(--footer-text-color);margin:var(--footer-text-margin);padding:var(--footer-text-padding)}.orbs_TradeStepLayoutFooterLink{--link-color: inherit;--link-text-decoration: none;--link-font-size: 15px;--link-text-align: center;--link-margin: auto;--link-outline: none;--link-line-height: normal;--link-padding: 0;--link-transition: color .2s ease;--link-hover-color: inherit;--link-hover-text-decoration: underline;color:var(--link-color);text-decoration:var(--link-text-decoration);font-size:var(--link-font-size);text-align:var(--link-text-align);margin-left:var(--link-margin);margin-right:var(--link-margin);outline:var(--link-outline);line-height:var(--link-line-height);padding:var(--link-padding);transition:var(--link-transition)}.orbs_TradeStepLayoutFooterLink:hover{color:var(--link-hover-color);text-decoration:var(--link-hover-text-decoration)}.orbs_TradeStepLayoutSuccessIcon{--success-icon-display: flex;--success-icon-justify: center;--success-icon-align: center;--success-icon-width: 60px;--success-icon-height: 60px;--success-icon-border-radius: 50%;--success-icon-overflow: visible;--success-icon-bg-color: transparent;--success-icon-border: none;--success-icon-box-shadow: none;display:var(--success-icon-display);justify-content:var(--success-icon-justify);align-items:var(--success-icon-align);width:var(--success-icon-width);height:var(--success-icon-height);border-radius:var(--success-icon-border-radius);overflow:var(--success-icon-overflow);background-color:var(--success-icon-bg-color);border:var(--success-icon-border);box-shadow:var(--success-icon-box-shadow)}.orbs_TradeStepLayoutErrorIcon{--error-icon-width: 80px;--error-icon-height: 80px;--error-icon-display: flex;--error-icon-justify: center;--error-icon-align: center;--error-icon-overflow: visible;--error-icon-bg-color: transparent;--error-icon-border: none;--error-icon-box-shadow: none;width:var(--error-icon-width);height:var(--error-icon-height);display:var(--error-icon-display);justify-content:var(--error-icon-justify);align-items:var(--error-icon-align);overflow:var(--error-icon-overflow);background-color:var(--error-icon-bg-color);border:var(--error-icon-border);box-shadow:var(--error-icon-box-shadow)}.orbs_FailedContentMsg{font-size:22px;font-weight:500}.orbs_TradePreview{display:flex;align-items:center;justify-content:center;gap:8px;width:100%}.orbs_TradePreviewToken{display:flex;align-items:center;gap:6px;max-width:calc(50% - 30px)}.orbs_TradePreviewToken p{--token-font-size: 15px;--token-white-space: nowrap;--token-overflow: hidden;--token-text-overflow: ellipsis;--token-flex: 1;--token-margin: 0;--token-padding: 0;font-size:var(--token-font-size);white-space:var(--token-white-space);overflow:var(--token-overflow);text-overflow:var(--token-text-overflow);flex:var(--token-flex);margin:var(--token-margin)}.orbs_TradepPreviewIcon{width:22px;height:22px}.orbs_TradepPreviewLogo{width:24px;height:24px;border-radius:50%;overflow:hidden}.orbs_FlexRow{display:flex;flex-direction:row}.orbs_FlexColumn{display:flex;flex-direction:column}@keyframes orbs_skeletonAnimation{0%{opacity:.2}to{opacity:.4}}.orbs_SkeletonLoader{animation:orbs_skeletonAnimation 1s linear infinite alternate;background-color:#fff}.orbs_Main-wrapper{width:100%}.orbs_Main{width:100%;display:flex;flex-direction:column;gap:28px}.orbs_MainToken{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;gap:8px}.orbs_MainTokenLeft{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.orbs_MainTokenUsd{display:flex;align-items:center;gap:5px}.orbs_MainTokenUsd small{font-size:12px;opacity:.6}.orbs_MainContentLoader{width:100%;display:flex;gap:15px;align-items:center;margin-top:20px}.orbs_MainContentRectengularLoader{flex:1;height:20px;max-width:250px;border-radius:20px}.orbs_MainContentCircleLoader{width:30px;height:30px;border-radius:50%}.orbs_MainTokenLogo{--width: 40px;--height: 40px;width:var(--width);height:var(--height)}.orbs_MainTokenLogo img{width:100%;height:100%;object-fit:cover}.orbs_SwapFlow{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%}.orbs_SwapFlow *{box-sizing:border-box}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();const Ne=e=>`orbs_${e}`;function ho({children:e,className:t=""}){return O.jsx("p",{className:`${t} ${Ne("Text")}`,children:e})}const eh=F.createContext({});function u2({children:e,...t}){return O.jsx(eh.Provider,{value:t,children:e})}const $r=()=>F.useContext(eh);var gt=(e=>(e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILED=3]="FAILED",e))(gt||{});const d2=({className:e="",size:t=38,borderWidth:r=3,borderColor:n="white",bottomBorderColor:s="rgba(255, 255, 255, 0.2)"})=>{const a={"--size":`${t}px`,"--border-width":`${r}px`,"--border-color":n,"--bottom-border-color":s};return O.jsx("div",{className:`${Ne("Spinner")} ${e}`,style:a})};function cc({className:e="",body:t,footerLink:r,footerText:n,title:s,children:a}){return O.jsxs("div",{className:`${Ne("TradeStepLayout")} ${e}`,children:[O.jsxs("div",{className:Ne("TradeStepLayoutHeader"),children:[O.jsx(b2,{}),s&&O.jsx(ho,{className:Ne("TradeStepLayoutTitle"),children:s})]}),t&&O.jsx("div",{className:Ne("TradeStepLayoutBody"),children:t}),O.jsx(f2,{link:r,text:n}),a]})}const f2=({link:e,text:t})=>{const{swapStatus:r}=$r();return!e&&!t?null:O.jsxs("div",{className:Ne("TradeStepLayoutFooter"),children:[O.jsx(g2,{}),e?O.jsx(p2,{link:e,text:t}):r===gt.FAILED?void 0:O.jsx(ho,{children:t})]})},p2=({link:e,text:t})=>O.jsx("a",{target:"_blank",className:Ne("TradeStepLayoutFooterLink"),href:e,children:t});function h2(){const{components:e}=$r();return e.SuccessIcon?e.SuccessIcon:O.jsxs("svg",{fill:"none",viewBox:"0 0 16 16",className:Ne("TradeStepLayoutSuccessIcon"),children:[O.jsx("circle",{cx:"8",cy:"8",r:"7",strokeWidth:"1.5",stroke:"#00C853"}),O.jsx("path",{strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",stroke:"#00C853",d:"M5 8l2 2 4-4"})]})}function m2(){const{components:e}=$r();return e.FailedIcon?e.FailedIcon:O.jsxs("svg",{className:Ne("TradeStepLayoutErrorIcon"),viewBox:"0 0 16 16",fill:"none",children:[O.jsx("circle",{cx:"8",cy:"8",r:"7",strokeWidth:"1.5",stroke:"#FF3D00"}),O.jsx("path",{strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",stroke:"#FF3D00",d:"M8 4v5M8 11h.01"})]})}const b2=()=>{const{swapStatus:e}=$r();return e===gt.SUCCESS?O.jsx(h2,{}):e===gt.FAILED?O.jsx(m2,{}):O.jsx(y2,{})},y2=()=>{const{components:e}=$r();return e.Loader?e.Loader:O.jsx(d2,{size:60,borderWidth:5,className:Ne("TradeStepLayoutSpinner")})},g2=()=>{const{totalSteps:e,currentStepIndex:t=0,swapStatus:r}=$r();return r!==gt.LOADING||e===1?null:O.jsx("div",{className:Ne("StepIndicator"),children:O.jsx("div",{style:{width:`${100/(e||0)}%`,left:`${t*100/(e||0)}%`},className:Ne("StepIndicatorLine")})})},x2=({error:e,footerLink:t,footerText:r})=>O.jsx(cc,{footerLink:t,footerText:r,body:e||O.jsx("p",{className:Ne("FailedContentMsg"),children:"Something went wrong"}),className:Ne("FailedContent")});function w2(){return O.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",className:Ne("TradepPreviewIcon"),children:O.jsx("path",{fillRule:"evenodd",d:"M4 8a.5.5 0 01.5-.5h5.793L8.146 5.354a.5.5 0 11.708-.708l3 3a.5.5 0 010 .708l-3 3a.5.5 0 01-.708-.708L10.293 8.5H4.5A.5.5 0 014 8z"})})}const th=({inTokenOnly:e})=>{const{inToken:t,outToken:r,inAmount:n,outAmount:s,components:a}=$r();return O.jsxs("div",{className:Ne("TradePreview"),children:[O.jsx(rh,{token:t,amount:n,Logo:a==null?void 0:a.SrcTokenLogo}),!e&&O.jsxs(O.Fragment,{children:[O.jsx(w2,{}),O.jsx(rh,{token:r,amount:s,Logo:a==null?void 0:a.DstTokenLogo})]})]})},rh=({token:e,amount:t,Logo:r})=>O.jsxs("div",{className:Ne("TradePreviewToken"),children:[r||O.jsx("img",{src:e==null?void 0:e.logoUrl,className:Ne("TradepPreviewLogo"),alt:`${e==null?void 0:e.symbol} logo`}),O.jsxs(ho,{children:[t," ",e==null?void 0:e.symbol]})]});function v2({title:e,footerLink:t,footerText:r,hideTokens:n}){return O.jsx(cc,{title:e,className:Ne("Success"),body:!n&&O.jsx(th,{}),footerLink:t,footerText:r})}const nh=({$gap:e=10,$alignItems:t="flex-start",children:r,className:n="",customStyles:s={}})=>{const a={gap:`${e}px`,alignItems:t,width:"100%",...s};return O.jsx("div",{className:`${Ne("FlexColumn")} ${n}`,style:a,children:r})};function sh({styles:e={},className:t=""}){return O.jsx("div",{style:e,className:`${Ne("SkeletonLoader")} ${t}`})}const k2=()=>O.jsxs("div",{className:`${Ne("MainContentLoader")}`,children:[O.jsx(sh,{className:`${Ne("MainContentCircleLoader")}`}),O.jsx(sh,{className:`${Ne("MainContentRectengularLoader")}`})]}),E2=({fromTitle:e,toTitle:t,inUsd:r,outUsd:n})=>{const{swapStatus:s,outAmount:a,inAmount:o,inToken:i,outToken:c,components:l,totalSteps:u}=$r(),d=O.jsx(oh,{fromTitle:e,inUsd:r,inToken:i,toTitle:t,outUsd:n,outToken:c,inAmount:o,outAmount:a,SrcTokenLogo:l.SrcTokenLogo,DstTokenLogo:l.DstTokenLogo});return s?u?O.jsx(C2,{}):O.jsxs(nh,{children:[d,O.jsx(k2,{})]}):O.jsx(nh,{children:d})},ah=({amount:e,token:t,usd:r,title:n,Logo:s})=>O.jsxs("div",{className:`${Ne("MainToken")}`,children:[O.jsxs("div",{className:`${Ne("MainTokenLeft")}`,children:[O.jsx(ho,{className:`${Ne("MainTokenTitle")}`,children:n}),O.jsx(ho,{className:` ${Ne("MainTokenAmount")}`,children:`${e&&Number(e)>0?e:""} ${(t==null?void 0:t.symbol)||""}`}),r&&O.jsx("div",{className:` ${Ne("MainTokenUsd")}`,children:r})]}),s||O.jsx("div",{className:` ${Ne("MainTokenLogo")}`,children:t!=null&&t.logoUrl?O.jsx("img",{src:t==null?void 0:t.logoUrl,alt:"Token logo"}):null})]});function C2(){const{currentStep:e}=$r();return e?O.jsx(cc,{footerLink:e.footerLink,footerText:e.footerText,title:e.title,body:e.hideTokens?void 0:O.jsx(th,{inTokenOnly:e==null?void 0:e.inTokenOnly})}):null}const oh=({fromTitle:e,inUsd:t,inToken:r,toTitle:n,outUsd:s,outToken:a,inAmount:o,outAmount:i,SrcTokenLogo:c,DstTokenLogo:l})=>O.jsxs("div",{className:`${Ne("Main")}`,children:[O.jsx(ah,{title:e||"Swap from",usd:t,token:r,amount:o,Logo:c}),O.jsx(ah,{title:n||"Swap to",usd:s,token:a,amount:i,Logo:l})]}),zn=e=>O.jsx(u2,{...e,children:O.jsx(T2,{})}),T2=()=>{const{swapStatus:e,components:t,className:r}=$r();return O.jsx("div",{className:`${Ne("SwapFlow")} ${r}`,children:e===gt.SUCCESS?t==null?void 0:t.Success:e===gt.FAILED?t==null?void 0:t.Failed:t==null?void 0:t.Main})};zn.Success=v2,zn.Failed=x2,zn.Main=E2,zn.StepLayout=cc;var ca=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(){}},S2={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},A2=(Lx=class{constructor(){le(this,rn,S2);le(this,Xs,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&N(this,Xs)&&e!==N(this,rn)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:N(this,rn),provider:e}),ee(this,rn,e),process.env.NODE_ENV!=="production"&&ee(this,Xs,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&ee(this,Xs,!0),N(this,rn).setTimeout(e,t)}clearTimeout(e){N(this,rn).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&ee(this,Xs,!0),N(this,rn).setInterval(e,t)}clearInterval(e){N(this,rn).clearInterval(e)}},rn=new WeakMap,Xs=new WeakMap,Lx),ms=new A2;function P2(e){setTimeout(e,0)}var bs=typeof window>"u"||"Deno"in globalThis;function Ft(){}function I2(e,t){return typeof e=="function"?e(t):e}function Iu(e){return typeof e=="number"&&e>=0&&e!==1/0}function ih(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ln(e,t){return typeof e=="function"?e(t):e}function ur(e,t){return typeof e=="function"?e(t):e}function ch(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:a,queryKey:o,stale:i}=e;if(o){if(n){if(t.queryHash!==Uu(o,t.options))return!1}else if(!mo(t.queryKey,o))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof i=="boolean"&&t.isStale()!==i||s&&s!==t.state.fetchStatus||a&&!a(t))}function lh(e,t){const{exact:r,status:n,predicate:s,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(ys(t.options.mutationKey)!==ys(a))return!1}else if(!mo(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function Uu(e,t){return((t==null?void 0:t.queryKeyHashFn)||ys)(e)}function ys(e){return JSON.stringify(e,(t,r)=>Bu(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function mo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>mo(e[r],t[r])):!1}var U2=Object.prototype.hasOwnProperty;function Ou(e,t){if(e===t)return e;const r=uh(e)&&uh(t);if(!r&&!(Bu(e)&&Bu(t)))return t;const s=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,i=r?new Array(o):{};let c=0;for(let l=0;l<o;l++){const u=r?l:a[l],d=e[u],p=t[u];if(d===p){i[u]=d,(r?l<s:U2.call(e,u))&&c++;continue}if(d===null||p===null||typeof d!="object"||typeof p!="object"){i[u]=p;continue}const h=Ou(d,p);i[u]=h,h===d&&c++}return s===o&&c===s?e:i}function lc(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function uh(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Bu(e){if(!dh(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!dh(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function dh(e){return Object.prototype.toString.call(e)==="[object Object]"}function O2(e){return new Promise(t=>{ms.setTimeout(t,e)})}function Mu(e,t,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(e,t);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Ou(e,t)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`),n}return Ou(e,t)}return t}function B2(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function M2(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var uc=Symbol();function fh(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===uc&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===uc?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ph(e,t){return typeof e=="function"?e(...t):!!e}var _2=(Rx=class extends ca{constructor(){super();le(this,Qs);le(this,os);le(this,eo);ee(this,eo,t=>{if(!bs&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){N(this,os)||this.setEventListener(N(this,eo))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,os))==null||t.call(this),ee(this,os,void 0))}setEventListener(t){var r;ee(this,eo,t),(r=N(this,os))==null||r.call(this),ee(this,os,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){N(this,Qs)!==t&&(ee(this,Qs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof N(this,Qs)=="boolean"?N(this,Qs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Qs=new WeakMap,os=new WeakMap,eo=new WeakMap,Rx),_u=new _2;function Du(){let e,t;const r=new Promise((s,a)=>{e=s,t=a});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}var D2=P2;function F2(){let e=[],t=0,r=i=>{i()},n=i=>{i()},s=D2;const a=i=>{t?e.push(i):s(()=>{r(i)})},o=()=>{const i=e;e=[],i.length&&s(()=>{n(()=>{i.forEach(c=>{r(c)})})})};return{batch:i=>{let c;t++;try{c=i()}finally{t--,t||o()}return c},batchCalls:i=>(...c)=>{a(()=>{i(...c)})},schedule:a,setNotifyFunction:i=>{r=i},setBatchNotifyFunction:i=>{n=i},setScheduler:i=>{s=i}}}var xt=F2(),N2=(Hx=class extends ca{constructor(){super();le(this,to,!0);le(this,is);le(this,ro);ee(this,ro,t=>{if(!bs&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){N(this,is)||this.setEventListener(N(this,ro))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,is))==null||t.call(this),ee(this,is,void 0))}setEventListener(t){var r;ee(this,ro,t),(r=N(this,is))==null||r.call(this),ee(this,is,t(this.setOnline.bind(this)))}setOnline(t){N(this,to)!==t&&(ee(this,to,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return N(this,to)}},to=new WeakMap,is=new WeakMap,ro=new WeakMap,Hx),dc=new N2;function z2(e){return Math.min(1e3*2**e,3e4)}function hh(e){return(e??"online")==="online"?dc.isOnline():!0}var Fu=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function mh(e){let t=!1,r=0,n;const s=Du(),a=()=>s.status!=="pending",o=g=>{var k;if(!a()){const v=new Fu(g);p(v),(k=e.onCancel)==null||k.call(e,v)}},i=()=>{t=!0},c=()=>{t=!1},l=()=>_u.isFocused()&&(e.networkMode==="always"||dc.isOnline())&&e.canRun(),u=()=>hh(e.networkMode)&&e.canRun(),d=g=>{a()||(n==null||n(),s.resolve(g))},p=g=>{a()||(n==null||n(),s.reject(g))},h=()=>new Promise(g=>{var k;n=v=>{(a()||l())&&g(v)},(k=e.onPause)==null||k.call(e)}).then(()=>{var g;n=void 0,a()||(g=e.onContinue)==null||g.call(e)}),y=()=>{if(a())return;let g;const k=r===0?e.initialPromise:void 0;try{g=k??e.fn()}catch(v){g=Promise.reject(v)}Promise.resolve(g).then(d).catch(v=>{var z;if(a())return;const w=e.retry??(bs?0:3),S=e.retryDelay??z2,C=typeof S=="function"?S(r,v):S,_=w===!0||typeof w=="number"&&r<w||typeof w=="function"&&w(r,v);if(t||!_){p(v);return}r++,(z=e.onFail)==null||z.call(e,r,v),O2(C).then(()=>l()?void 0:h()).then(()=>{t?p(v):y()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(n==null||n(),s),cancelRetry:i,continueRetry:c,canStart:u,start:()=>(u()?y():h().then(y),s)}}var bh=($x=class{constructor(){le(this,Js)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Iu(this.gcTime)&&ee(this,Js,ms.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(bs?1/0:300*1e3))}clearGcTimeout(){N(this,Js)&&(ms.clearTimeout(N(this,Js)),ee(this,Js,void 0))}},Js=new WeakMap,$x),L2=(Gx=class extends bh{constructor(t){super();le(this,Rr);le(this,ea);le(this,no);le(this,vr);le(this,ta);le(this,St);le(this,rc);le(this,ra);ee(this,ra,!1),ee(this,rc,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,ta,t.client),ee(this,vr,N(this,ta).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,ea,xh(this.options)),this.state=t.state??N(this,ea),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=N(this,St))==null?void 0:t.promise}setOptions(t){if(this.options={...N(this,rc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=xh(this.options);r.data!==void 0&&(this.setState(gh(r.data,r.dataUpdatedAt)),ee(this,ea,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,vr).remove(this)}setData(t,r){const n=Mu(this.state.data,t,this.options);return Ae(this,Rr,Nn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Ae(this,Rr,Nn).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=N(this,St))==null?void 0:n.promise;return(s=N(this,St))==null||s.cancel(t),r?r.then(Ft).catch(Ft):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(N(this,ea))}isActive(){return this.observers.some(t=>ur(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===uc||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ln(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!ih(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=N(this,St))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=N(this,St))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),N(this,vr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(N(this,St)&&(N(this,ra)?N(this,St).cancel({revert:!0}):N(this,St).cancelRetry()),this.scheduleGc()),N(this,vr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ae(this,Rr,Nn).call(this,{type:"invalidate"})}async fetch(t,r){var c,l,u,d,p,h,y,g,k,v,w,S;if(this.state.fetchStatus!=="idle"&&((c=N(this,St))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(N(this,St))return N(this,St).continueRetry(),N(this,St).promise}if(t&&this.setOptions(t),!this.options.queryFn){const C=this.observers.find(_=>_.options.queryFn);C&&this.setOptions(C.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,s=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(ee(this,ra,!0),n.signal)})},a=()=>{const C=fh(this.options,r),z=(()=>{const T={client:N(this,ta),queryKey:this.queryKey,meta:this.meta};return s(T),T})();return ee(this,ra,!1),this.options.persister?this.options.persister(C,z,this):C(z)},i=(()=>{const C={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:N(this,ta),state:this.state,fetchFn:a};return s(C),C})();(l=this.options.behavior)==null||l.onFetch(i,this),ee(this,no,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=i.fetchOptions)==null?void 0:u.meta))&&Ae(this,Rr,Nn).call(this,{type:"fetch",meta:(d=i.fetchOptions)==null?void 0:d.meta}),ee(this,St,mh({initialPromise:r==null?void 0:r.initialPromise,fn:i.fetchFn,onCancel:C=>{C instanceof Fu&&C.revert&&this.setState({...N(this,no),fetchStatus:"idle"}),n.abort()},onFail:(C,_)=>{Ae(this,Rr,Nn).call(this,{type:"failed",failureCount:C,error:_})},onPause:()=>{Ae(this,Rr,Nn).call(this,{type:"pause"})},onContinue:()=>{Ae(this,Rr,Nn).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}));try{const C=await N(this,St).start();if(C===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(C),(h=(p=N(this,vr).config).onSuccess)==null||h.call(p,C,this),(g=(y=N(this,vr).config).onSettled)==null||g.call(y,C,this.state.error,this),C}catch(C){if(C instanceof Fu){if(C.silent)return N(this,St).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw Ae(this,Rr,Nn).call(this,{type:"error",error:C}),(v=(k=N(this,vr).config).onError)==null||v.call(k,C,this),(S=(w=N(this,vr).config).onSettled)==null||S.call(w,this.state.data,C,this),C}finally{this.scheduleGc()}}},ea=new WeakMap,no=new WeakMap,vr=new WeakMap,ta=new WeakMap,St=new WeakMap,rc=new WeakMap,ra=new WeakMap,Rr=new WeakSet,Nn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...yh(n.data,this.options),fetchMeta:t.meta??null};case"success":const s={...n,...gh(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,no,t.manual?s:void 0),s;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),xt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),N(this,vr).notify({query:this,type:"updated",action:t})})},Gx);function yh(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:hh(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function gh(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function xh(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var R2=(jx=class extends ca{constructor(t,r){super();le(this,Ve);le(this,Zt);le(this,Me);le(this,nc);le(this,Lt);le(this,na);le(this,so);le(this,Bn);le(this,cs);le(this,sc);le(this,ao);le(this,oo);le(this,sa);le(this,aa);le(this,ls);le(this,io,new Set);this.options=r,ee(this,Zt,t),ee(this,cs,null),ee(this,Bn,Du()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,Me).addObserver(this),wh(N(this,Me),this.options)?Ae(this,Ve,ic).call(this):this.updateResult(),Ae(this,Ve,j0).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Nu(N(this,Me),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Nu(N(this,Me),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ae(this,Ve,V0).call(this),Ae(this,Ve,W0).call(this),N(this,Me).removeObserver(this)}setOptions(t){const r=this.options,n=N(this,Me);if(this.options=N(this,Zt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ur(this.options.enabled,N(this,Me))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ae(this,Ve,q0).call(this),N(this,Me).setOptions(this.options),r._defaulted&&!lc(this.options,r)&&N(this,Zt).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,Me),observer:this});const s=this.hasListeners();s&&vh(N(this,Me),n,this.options,r)&&Ae(this,Ve,ic).call(this),this.updateResult(),s&&(N(this,Me)!==n||ur(this.options.enabled,N(this,Me))!==ur(r.enabled,N(this,Me))||Ln(this.options.staleTime,N(this,Me))!==Ln(r.staleTime,N(this,Me)))&&Ae(this,Ve,H0).call(this);const a=Ae(this,Ve,$0).call(this);s&&(N(this,Me)!==n||ur(this.options.enabled,N(this,Me))!==ur(r.enabled,N(this,Me))||a!==N(this,ls))&&Ae(this,Ve,G0).call(this,a)}getOptimisticResult(t){const r=N(this,Zt).getQueryCache().build(N(this,Zt),t),n=this.createResult(r,t);return $2(this,n)&&(ee(this,Lt,n),ee(this,so,this.options),ee(this,na,N(this,Me).state)),n}getCurrentResult(){return N(this,Lt)}trackResult(t,r){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),r==null||r(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&N(this,Bn).status==="pending"&&N(this,Bn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(t){N(this,io).add(t)}getCurrentQuery(){return N(this,Me)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=N(this,Zt).defaultQueryOptions(t),n=N(this,Zt).getQueryCache().build(N(this,Zt),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Ae(this,Ve,ic).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,Lt)))}createResult(t,r){var b;const n=N(this,Me),s=this.options,a=N(this,Lt),o=N(this,na),i=N(this,so),l=t!==n?t.state:N(this,nc),{state:u}=t;let d={...u},p=!1,h;if(r._optimisticResults){const x=this.hasListeners(),A=!x&&wh(t,r),I=x&&vh(t,n,r,s);(A||I)&&(d={...d,...yh(u.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:y,errorUpdatedAt:g,status:k}=d;h=d.data;let v=!1;if(r.placeholderData!==void 0&&h===void 0&&k==="pending"){let x;a!=null&&a.isPlaceholderData&&r.placeholderData===(i==null?void 0:i.placeholderData)?(x=a.data,v=!0):x=typeof r.placeholderData=="function"?r.placeholderData((b=N(this,oo))==null?void 0:b.state.data,N(this,oo)):r.placeholderData,x!==void 0&&(k="success",h=Mu(a==null?void 0:a.data,x,r),p=!0)}if(r.select&&h!==void 0&&!v)if(a&&h===(o==null?void 0:o.data)&&r.select===N(this,sc))h=N(this,ao);else try{ee(this,sc,r.select),h=r.select(h),h=Mu(a==null?void 0:a.data,h,r),ee(this,ao,h),ee(this,cs,null)}catch(x){ee(this,cs,x)}N(this,cs)&&(y=N(this,cs),h=N(this,ao),g=Date.now(),k="error");const w=d.fetchStatus==="fetching",S=k==="pending",C=k==="error",_=S&&w,z=h!==void 0,m={status:k,fetchStatus:d.fetchStatus,isPending:S,isSuccess:k==="success",isError:C,isInitialLoading:_,isLoading:_,data:h,dataUpdatedAt:d.dataUpdatedAt,error:y,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:w,isRefetching:w&&!S,isLoadingError:C&&!z,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:C&&z,isStale:zu(t,r),refetch:this.refetch,promise:N(this,Bn),isEnabled:ur(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const x=U=>{m.status==="error"?U.reject(m.error):m.data!==void 0&&U.resolve(m.data)},A=()=>{const U=ee(this,Bn,m.promise=Du());x(U)},I=N(this,Bn);switch(I.status){case"pending":t.queryHash===n.queryHash&&x(I);break;case"fulfilled":(m.status==="error"||m.data!==I.value)&&A();break;case"rejected":(m.status!=="error"||m.error!==I.reason)&&A();break}}return m}updateResult(){const t=N(this,Lt),r=this.createResult(N(this,Me),this.options);if(ee(this,na,N(this,Me).state),ee(this,so,this.options),N(this,na).data!==void 0&&ee(this,oo,N(this,Me)),lc(r,t))return;ee(this,Lt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!N(this,io).size)return!0;const o=new Set(a??N(this,io));return this.options.throwOnError&&o.add("error"),Object.keys(N(this,Lt)).some(i=>{const c=i;return N(this,Lt)[c]!==t[c]&&o.has(c)})};Ae(this,Ve,n2).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ae(this,Ve,j0).call(this)}},Zt=new WeakMap,Me=new WeakMap,nc=new WeakMap,Lt=new WeakMap,na=new WeakMap,so=new WeakMap,Bn=new WeakMap,cs=new WeakMap,sc=new WeakMap,ao=new WeakMap,oo=new WeakMap,sa=new WeakMap,aa=new WeakMap,ls=new WeakMap,io=new WeakMap,Ve=new WeakSet,ic=function(t){Ae(this,Ve,q0).call(this);let r=N(this,Me).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Ft)),r},H0=function(){Ae(this,Ve,V0).call(this);const t=Ln(this.options.staleTime,N(this,Me));if(bs||N(this,Lt).isStale||!Iu(t))return;const n=ih(N(this,Lt).dataUpdatedAt,t)+1;ee(this,sa,ms.setTimeout(()=>{N(this,Lt).isStale||this.updateResult()},n))},$0=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,Me)):this.options.refetchInterval)??!1},G0=function(t){Ae(this,Ve,W0).call(this),ee(this,ls,t),!(bs||ur(this.options.enabled,N(this,Me))===!1||!Iu(N(this,ls))||N(this,ls)===0)&&ee(this,aa,ms.setInterval(()=>{(this.options.refetchIntervalInBackground||_u.isFocused())&&Ae(this,Ve,ic).call(this)},N(this,ls)))},j0=function(){Ae(this,Ve,H0).call(this),Ae(this,Ve,G0).call(this,Ae(this,Ve,$0).call(this))},V0=function(){N(this,sa)&&(ms.clearTimeout(N(this,sa)),ee(this,sa,void 0))},W0=function(){N(this,aa)&&(ms.clearInterval(N(this,aa)),ee(this,aa,void 0))},q0=function(){const t=N(this,Zt).getQueryCache().build(N(this,Zt),this.options);if(t===N(this,Me))return;const r=N(this,Me);ee(this,Me,t),ee(this,nc,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},n2=function(t){xt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(N(this,Lt))}),N(this,Zt).getQueryCache().notify({query:N(this,Me),type:"observerResultsUpdated"})})},jx);function H2(e,t){return ur(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function wh(e,t){return H2(e,t)||e.state.data!==void 0&&Nu(e,t,t.refetchOnMount)}function Nu(e,t,r){if(ur(t.enabled,e)!==!1&&Ln(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&zu(e,t)}return!1}function vh(e,t,r,n){return(e!==t||ur(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&zu(e,r)}function zu(e,t){return ur(t.enabled,e)!==!1&&e.isStaleByTime(Ln(t.staleTime,e))}function $2(e,t){return!lc(e.getCurrentResult(),t)}function kh(e){return{onFetch:(t,r)=>{var u,d,p,h,y;const n=t.options,s=(p=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,a=((h=t.state.data)==null?void 0:h.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let g=!1;const k=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},v=fh(t.options,t.fetchOptions),w=async(S,C,_)=>{if(g)return Promise.reject();if(C==null&&S.pages.length)return Promise.resolve(S);const T=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:C,direction:_?"backward":"forward",meta:t.options.meta};return k(A),A})(),m=await v(T),{maxPages:b}=t.options,x=_?M2:B2;return{pages:x(S.pages,m,b),pageParams:x(S.pageParams,C,b)}};if(s&&a.length){const S=s==="backward",C=S?G2:Eh,_={pages:a,pageParams:o},z=C(n,_);i=await w(_,z,S)}else{const S=e??a.length;do{const C=c===0?o[0]??n.initialPageParam:Eh(n,i);if(c>0&&C==null)break;i=await w(i,C),c++}while(c<S)}return i};t.options.persister?t.fetchFn=()=>{var g,k;return(k=(g=t.options).persister)==null?void 0:k.call(g,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=l}}}function Eh(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function G2(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var j2=(Vx=class extends bh{constructor(t){super();le(this,sn);le(this,ac);le(this,nn);le(this,Rt);le(this,oa);ee(this,ac,t.client),this.mutationId=t.mutationId,ee(this,Rt,t.mutationCache),ee(this,nn,[]),this.state=t.state||Ch(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){N(this,nn).includes(t)||(N(this,nn).push(t),this.clearGcTimeout(),N(this,Rt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,nn,N(this,nn).filter(r=>r!==t)),this.scheduleGc(),N(this,Rt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){N(this,nn).length||(this.state.status==="pending"?this.scheduleGc():N(this,Rt).remove(this))}continue(){var t;return((t=N(this,oa))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,c,l,u,d,p,h,y,g,k,v,w,S,C,_,z,T,m,b;const r=()=>{Ae(this,sn,hs).call(this,{type:"continue"})},n={client:N(this,ac),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,oa,mh({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(x,A)=>{Ae(this,sn,hs).call(this,{type:"failed",failureCount:x,error:A})},onPause:()=>{Ae(this,sn,hs).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,Rt).canRun(this)}));const s=this.state.status==="pending",a=!N(this,oa).canStart();try{if(s)r();else{Ae(this,sn,hs).call(this,{type:"pending",variables:t,isPaused:a}),await((i=(o=N(this,Rt).config).onMutate)==null?void 0:i.call(o,t,this,n));const A=await((l=(c=this.options).onMutate)==null?void 0:l.call(c,t,n));A!==this.state.context&&Ae(this,sn,hs).call(this,{type:"pending",context:A,variables:t,isPaused:a})}const x=await N(this,oa).start();return await((d=(u=N(this,Rt).config).onSuccess)==null?void 0:d.call(u,x,t,this.state.context,this,n)),await((h=(p=this.options).onSuccess)==null?void 0:h.call(p,x,t,this.state.context,n)),await((g=(y=N(this,Rt).config).onSettled)==null?void 0:g.call(y,x,null,this.state.variables,this.state.context,this,n)),await((v=(k=this.options).onSettled)==null?void 0:v.call(k,x,null,t,this.state.context,n)),Ae(this,sn,hs).call(this,{type:"success",data:x}),x}catch(x){try{throw await((S=(w=N(this,Rt).config).onError)==null?void 0:S.call(w,x,t,this.state.context,this,n)),await((_=(C=this.options).onError)==null?void 0:_.call(C,x,t,this.state.context,n)),await((T=(z=N(this,Rt).config).onSettled)==null?void 0:T.call(z,void 0,x,this.state.variables,this.state.context,this,n)),await((b=(m=this.options).onSettled)==null?void 0:b.call(m,void 0,x,t,this.state.context,n)),x}finally{Ae(this,sn,hs).call(this,{type:"error",error:x})}}finally{N(this,Rt).runNext(this)}}},ac=new WeakMap,nn=new WeakMap,Rt=new WeakMap,oa=new WeakMap,sn=new WeakSet,hs=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),xt.batch(()=>{N(this,nn).forEach(n=>{n.onMutationUpdate(t)}),N(this,Rt).notify({mutation:this,type:"updated",action:t})})},Vx);function Ch(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var V2=(Wx=class extends ca{constructor(t={}){super();le(this,Mn);le(this,Hr);le(this,oc);this.config=t,ee(this,Mn,new Set),ee(this,Hr,new Map),ee(this,oc,0)}build(t,r,n){const s=new j2({client:t,mutationCache:this,mutationId:++Su(this,oc)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){N(this,Mn).add(t);const r=fc(t);if(typeof r=="string"){const n=N(this,Hr).get(r);n?n.push(t):N(this,Hr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(N(this,Mn).delete(t)){const r=fc(t);if(typeof r=="string"){const n=N(this,Hr).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&N(this,Hr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=fc(t);if(typeof r=="string"){const n=N(this,Hr).get(r),s=n==null?void 0:n.find(a=>a.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=fc(t);if(typeof r=="string"){const s=(n=N(this,Hr).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){xt.batch(()=>{N(this,Mn).forEach(t=>{this.notify({type:"removed",mutation:t})}),N(this,Mn).clear(),N(this,Hr).clear()})}getAll(){return Array.from(N(this,Mn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>lh(r,n))}findAll(t={}){return this.getAll().filter(r=>lh(t,r))}notify(t){xt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return xt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Ft))))}},Mn=new WeakMap,Hr=new WeakMap,oc=new WeakMap,Wx);function fc(e){var t;return(t=e.options.scope)==null?void 0:t.id}var W2=(qx=class extends ca{constructor(t,r){super();le(this,Fn);le(this,_n);le(this,us);le(this,Xt);le(this,Dn);ee(this,_n,t),this.setOptions(r),this.bindMethods(),Ae(this,Fn,Au).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const r=this.options;this.options=N(this,_n).defaultMutationOptions(t),lc(this.options,r)||N(this,_n).getMutationCache().notify({type:"observerOptionsUpdated",mutation:N(this,Xt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ys(r.mutationKey)!==ys(this.options.mutationKey)?this.reset():((n=N(this,Xt))==null?void 0:n.state.status)==="pending"&&N(this,Xt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=N(this,Xt))==null||t.removeObserver(this)}onMutationUpdate(t){Ae(this,Fn,Au).call(this),Ae(this,Fn,Y0).call(this,t)}getCurrentResult(){return N(this,us)}reset(){var t;(t=N(this,Xt))==null||t.removeObserver(this),ee(this,Xt,void 0),Ae(this,Fn,Au).call(this),Ae(this,Fn,Y0).call(this)}mutate(t,r){var n;return ee(this,Dn,r),(n=N(this,Xt))==null||n.removeObserver(this),ee(this,Xt,N(this,_n).getMutationCache().build(N(this,_n),this.options)),N(this,Xt).addObserver(this),N(this,Xt).execute(t)}},_n=new WeakMap,us=new WeakMap,Xt=new WeakMap,Dn=new WeakMap,Fn=new WeakSet,Au=function(){var r;const t=((r=N(this,Xt))==null?void 0:r.state)??Ch();ee(this,us,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Y0=function(t){xt.batch(()=>{var r,n,s,a,o,i,c,l;if(N(this,Dn)&&this.hasListeners()){const u=N(this,us).variables,d=N(this,us).context,p={client:N(this,_n),meta:this.options.meta,mutationKey:this.options.mutationKey};(t==null?void 0:t.type)==="success"?((n=(r=N(this,Dn)).onSuccess)==null||n.call(r,t.data,u,d,p),(a=(s=N(this,Dn)).onSettled)==null||a.call(s,t.data,null,u,d,p)):(t==null?void 0:t.type)==="error"&&((i=(o=N(this,Dn)).onError)==null||i.call(o,t.error,u,d,p),(l=(c=N(this,Dn)).onSettled)==null||l.call(c,void 0,t.error,u,d,p))}this.listeners.forEach(u=>{u(N(this,us))})})},qx),q2=(Yx=class extends ca{constructor(t={}){super();le(this,an);this.config=t,ee(this,an,new Map)}build(t,r,n){const s=r.queryKey,a=r.queryHash??Uu(s,r);let o=this.get(a);return o||(o=new L2({client:t,queryKey:s,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){N(this,an).has(t.queryHash)||(N(this,an).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=N(this,an).get(t.queryHash);r&&(t.destroy(),r===t&&N(this,an).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){xt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return N(this,an).get(t)}getAll(){return[...N(this,an).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>ch(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>ch(t,n)):r}notify(t){xt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){xt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){xt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},an=new WeakMap,Yx),Y2=(Kx=class{constructor(e={}){le(this,ut);le(this,ds);le(this,fs);le(this,co);le(this,lo);le(this,ps);le(this,uo);le(this,fo);ee(this,ut,e.queryCache||new q2),ee(this,ds,e.mutationCache||new V2),ee(this,fs,e.defaultOptions||{}),ee(this,co,new Map),ee(this,lo,new Map),ee(this,ps,0)}mount(){Su(this,ps)._++,N(this,ps)===1&&(ee(this,uo,_u.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,ut).onFocus())})),ee(this,fo,dc.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,ut).onOnline())})))}unmount(){var e,t;Su(this,ps)._--,N(this,ps)===0&&((e=N(this,uo))==null||e.call(this),ee(this,uo,void 0),(t=N(this,fo))==null||t.call(this),ee(this,fo,void 0))}isFetching(e){return N(this,ut).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return N(this,ds).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=N(this,ut).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=N(this,ut).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Ln(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return N(this,ut).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=N(this,ut).get(n.queryHash),a=s==null?void 0:s.state.data,o=I2(t,a);if(o!==void 0)return N(this,ut).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return xt.batch(()=>N(this,ut).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=N(this,ut).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=N(this,ut);xt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=N(this,ut);return xt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=xt.batch(()=>N(this,ut).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(Ft).catch(Ft)}invalidateQueries(e,t={}){return xt.batch(()=>(N(this,ut).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=xt.batch(()=>N(this,ut).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let a=s.fetch(void 0,r);return r.throwOnError||(a=a.catch(Ft)),s.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Ft)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=N(this,ut).build(this,t);return r.isStaleByTime(Ln(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ft).catch(Ft)}fetchInfiniteQuery(e){return e.behavior=kh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ft).catch(Ft)}ensureInfiniteQueryData(e){return e.behavior=kh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return dc.isOnline()?N(this,ds).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,ut)}getMutationCache(){return N(this,ds)}getDefaultOptions(){return N(this,fs)}setDefaultOptions(e){ee(this,fs,e)}setQueryDefaults(e,t){N(this,co).set(ys(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...N(this,co).values()],r={};return t.forEach(n=>{mo(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){N(this,lo).set(ys(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...N(this,lo).values()],r={};return t.forEach(n=>{mo(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...N(this,fs).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Uu(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===uc&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...N(this,fs).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){N(this,ut).clear(),N(this,ds).clear()}},ut=new WeakMap,ds=new WeakMap,fs=new WeakMap,co=new WeakMap,lo=new WeakMap,ps=new WeakMap,uo=new WeakMap,fo=new WeakMap,Kx),Th=mt.createContext(void 0),bo=e=>{const t=mt.useContext(Th);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},K2=({client:e,children:t})=>(mt.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),O.jsx(Th.Provider,{value:e,children:t})),Sh=mt.createContext(!1),Z2=()=>mt.useContext(Sh);Sh.Provider;function X2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Q2=mt.createContext(X2()),J2=()=>mt.useContext(Q2),ew=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},tw=e=>{mt.useEffect(()=>{e.clearReset()},[e])},rw=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||ph(r,[e.error,n])),nw=e=>{if(e.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>r(n(...s)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},sw=(e,t)=>e.isLoading&&e.isFetching&&!t,aw=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Ah=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function ow(e,t,r){var d,p,h,y,g;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=Z2(),s=J2(),a=bo(),o=a.defaultQueryOptions(e);(p=(d=a.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||p.call(d,o),process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),o._optimisticResults=n?"isRestoring":"optimistic",nw(o),ew(o,s),tw(s);const i=!a.getQueryCache().get(o.queryHash),[c]=mt.useState(()=>new t(a,o)),l=c.getOptimisticResult(o),u=!n&&e.subscribed!==!1;if(mt.useSyncExternalStore(mt.useCallback(k=>{const v=u?c.subscribe(xt.batchCalls(k)):Ft;return c.updateResult(),v},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),mt.useEffect(()=>{c.setOptions(o)},[o,c]),aw(o,l))throw Ah(o,c,s);if(rw({result:l,errorResetBoundary:s,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw l.error;if((y=(h=a.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||y.call(h,o,l),o.experimental_prefetchInRender&&!bs&&sw(l,n)){const k=i?Ah(o,c,s):(g=a.getQueryCache().get(o.queryHash))==null?void 0:g.promise;k==null||k.catch(Ft).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?l:c.trackResult(l)}function iw(e,t){return ow(e,R2)}function on(e,t){const r=bo(),[n]=mt.useState(()=>new W2(r,e));mt.useEffect(()=>{n.setOptions(e)},[n,e]);const s=mt.useSyncExternalStore(mt.useCallback(o=>n.subscribe(xt.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=mt.useCallback((o,i)=>{n.mutate(o,i).catch(Ft)},[n]);if(s.error&&ph(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:a,mutateAsync:s.mutate}}const cw="1.2.3";let Ht=class K0 extends Error{constructor(t,r={}){var o;const n=r.cause instanceof K0?r.cause.details:(o=r.cause)!=null&&o.message?r.cause.message:r.details,s=r.cause instanceof K0&&r.cause.docsPath||r.docsPath,a=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...s?[`Docs: https://abitype.dev${s}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${cw}`].join(`
|
|
2
|
-
`);super(a),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=s,this.metaMessages=r.metaMessages,this.shortMessage=t}};function cn(e,t){const r=e.exec(t);return r==null?void 0:r.groups}const Ph=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Ih=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,Uh=/^\(.+?\).*?$/,Oh=/^tuple(?<array>(\[(\d*)\])*)$/;function Lu(e){let t=e.type;if(Oh.test(e.type)&&"components"in e){t="(";const r=e.components.length;for(let s=0;s<r;s++){const a=e.components[s];t+=Lu(a),s<r-1&&(t+=", ")}const n=cn(Oh,e.type);return t+=`)${(n==null?void 0:n.array)||""}`,Lu({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function la(e){let t="";const r=e.length;for(let n=0;n<r;n++){const s=e[n];t+=Lu(s),n!==r-1&&(t+=", ")}return t}function pc(e){var t;return e.type==="function"?`function ${e.name}(${la(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${la(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${la(e.inputs)})`:e.type==="error"?`error ${e.name}(${la(e.inputs)})`:e.type==="constructor"?`constructor(${la(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const Bh=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function lw(e){return Bh.test(e)}function uw(e){return cn(Bh,e)}const Mh=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function dw(e){return Mh.test(e)}function fw(e){return cn(Mh,e)}const _h=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function pw(e){return _h.test(e)}function hw(e){return cn(_h,e)}const Dh=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function hc(e){return Dh.test(e)}function mw(e){return cn(Dh,e)}const Fh=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function bw(e){return Fh.test(e)}function yw(e){return cn(Fh,e)}const Nh=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function gw(e){return Nh.test(e)}function xw(e){return cn(Nh,e)}const ww=/^receive\(\) external payable$/;function vw(e){return ww.test(e)}const zh=new Set(["memory","indexed","storage","calldata"]),kw=new Set(["indexed"]),Ru=new Set(["calldata","memory","storage"]);class Ew extends Ht{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class Cw extends Ht{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class Tw extends Ht{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class Sw extends Ht{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class Aw extends Ht{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class Pw extends Ht{constructor({param:t,name:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class Iw extends Ht{constructor({param:t,type:r,modifier:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class Uw extends Ht{constructor({param:t,type:r,modifier:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class Ow extends Ht{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class ua extends Ht{constructor({signature:t,type:r}){super(`Invalid ${r} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class Bw extends Ht{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class Mw extends Ht{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class _w extends Ht{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class Dw extends Ht{constructor({current:t,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function Fw(e,t,r){let n="";if(r)for(const s of Object.entries(r)){if(!s)continue;let a="";for(const o of s[1])a+=`[${o.type}${o.name?`:${o.name}`:""}]`;n+=`(${s[0]}{${a}})`}return t?`${t}:${e}${n}`:`${e}${n}`}const Hu=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function $u(e,t={}){if(pw(e))return Nw(e,t);if(dw(e))return zw(e,t);if(lw(e))return Lw(e,t);if(bw(e))return Rw(e,t);if(gw(e))return Hw(e);if(vw(e))return{type:"receive",stateMutability:"payable"};throw new Bw({signature:e})}function Nw(e,t={}){const r=hw(e);if(!r)throw new ua({signature:e,type:"function"});const n=Qt(r.parameters),s=[],a=n.length;for(let i=0;i<a;i++)s.push(ln(n[i],{modifiers:Ru,structs:t,type:"function"}));const o=[];if(r.returns){const i=Qt(r.returns),c=i.length;for(let l=0;l<c;l++)o.push(ln(i[l],{modifiers:Ru,structs:t,type:"function"}))}return{name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:s,outputs:o}}function zw(e,t={}){const r=fw(e);if(!r)throw new ua({signature:e,type:"event"});const n=Qt(r.parameters),s=[],a=n.length;for(let o=0;o<a;o++)s.push(ln(n[o],{modifiers:kw,structs:t,type:"event"}));return{name:r.name,type:"event",inputs:s}}function Lw(e,t={}){const r=uw(e);if(!r)throw new ua({signature:e,type:"error"});const n=Qt(r.parameters),s=[],a=n.length;for(let o=0;o<a;o++)s.push(ln(n[o],{structs:t,type:"error"}));return{name:r.name,type:"error",inputs:s}}function Rw(e,t={}){const r=yw(e);if(!r)throw new ua({signature:e,type:"constructor"});const n=Qt(r.parameters),s=[],a=n.length;for(let o=0;o<a;o++)s.push(ln(n[o],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:s}}function Hw(e){const t=xw(e);if(!t)throw new ua({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const $w=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,Gw=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,jw=/^u?int$/;function ln(e,t){var d,p;const r=Fw(e,t==null?void 0:t.type,t==null?void 0:t.structs);if(Hu.has(r))return Hu.get(r);const n=Uh.test(e),s=cn(n?Gw:$w,e);if(!s)throw new Aw({param:e});if(s.name&&Ww(s.name))throw new Pw({param:e,name:s.name});const a=s.name?{name:s.name}:{},o=s.modifier==="indexed"?{indexed:!0}:{},i=(t==null?void 0:t.structs)??{};let c,l={};if(n){c="tuple";const h=Qt(s.type),y=[],g=h.length;for(let k=0;k<g;k++)y.push(ln(h[k],{structs:i}));l={components:y}}else if(s.type in i)c="tuple",l={components:i[s.type]};else if(jw.test(s.type))c=`${s.type}256`;else if(s.type==="address payable")c="address";else if(c=s.type,(t==null?void 0:t.type)!=="struct"&&!Lh(c))throw new Tw({type:c});if(s.modifier){if(!((p=(d=t==null?void 0:t.modifiers)==null?void 0:d.has)!=null&&p.call(d,s.modifier)))throw new Iw({param:e,type:t==null?void 0:t.type,modifier:s.modifier});if(Ru.has(s.modifier)&&!qw(c,!!s.array))throw new Uw({param:e,type:t==null?void 0:t.type,modifier:s.modifier})}const u={type:`${c}${s.array??""}`,...a,...o,...l};return Hu.set(r,u),u}function Qt(e,t=[],r="",n=0){const s=e.trim().length;for(let a=0;a<s;a++){const o=e[a],i=e.slice(a+1);switch(o){case",":return n===0?Qt(i,[...t,r.trim()]):Qt(i,t,`${r}${o}`,n);case"(":return Qt(i,t,`${r}${o}`,n+1);case")":return Qt(i,t,`${r}${o}`,n-1);default:return Qt(i,t,`${r}${o}`,n)}}if(r==="")return t;if(n!==0)throw new Dw({current:r,depth:n});return t.push(r.trim()),t}function Lh(e){return e==="address"||e==="bool"||e==="function"||e==="string"||Ph.test(e)||Ih.test(e)}const Vw=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function Ww(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||Ph.test(e)||Ih.test(e)||Vw.test(e)}function qw(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function Gu(e){const t={},r=e.length;for(let o=0;o<r;o++){const i=e[o];if(!hc(i))continue;const c=mw(i);if(!c)throw new ua({signature:i,type:"struct"});const l=c.properties.split(";"),u=[],d=l.length;for(let p=0;p<d;p++){const y=l[p].trim();if(!y)continue;const g=ln(y,{type:"struct"});u.push(g)}if(!u.length)throw new Mw({signature:i});t[c.name]=u}const n={},s=Object.entries(t),a=s.length;for(let o=0;o<a;o++){const[i,c]=s[o];n[i]=Rh(c,t)}return n}const Yw=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function Rh(e=[],t={},r=new Set){const n=[],s=e.length;for(let a=0;a<s;a++){const o=e[a];if(Uh.test(o.type))n.push(o);else{const c=cn(Yw,o.type);if(!(c!=null&&c.type))throw new Ow({abiParameter:o});const{array:l,type:u}=c;if(u in t){if(r.has(u))throw new _w({type:u});n.push({...o,type:`tuple${l??""}`,components:Rh(t[u],t,new Set([...r,u]))})}else if(Lh(u))n.push(o);else throw new Cw({type:u})}}return n}function Hh(e){const t=Gu(e),r=[],n=e.length;for(let s=0;s<n;s++){const a=e[s];hc(a)||r.push($u(a,t))}return r}function $h(e){let t;if(typeof e=="string")t=$u(e);else{const r=Gu(e),n=e.length;for(let s=0;s<n;s++){const a=e[s];if(!hc(a)){t=$u(a,r);break}}}if(!t)throw new Ew({signature:e});return t}function Gh(e){const t=[];if(typeof e=="string"){const r=Qt(e),n=r.length;for(let s=0;s<n;s++)t.push(ln(r[s],{modifiers:zh}))}else{const r=Gu(e),n=e.length;for(let s=0;s<n;s++){const a=e[s];if(hc(a))continue;const o=Qt(a),i=o.length;for(let c=0;c<i;c++)t.push(ln(o[c],{modifiers:zh,structs:r}))}}if(t.length===0)throw new Sw({params:e});return t}function ne(e,t,r){const n=e[t.name];if(typeof n=="function")return n;const s=e[r];return typeof s=="function"?s:a=>t(e,a)}function Er(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new c5(e.type);return`${e.name}(${mc(e.inputs,{includeName:t})})`}function mc(e,{includeName:t=!1}={}){return e?e.map(r=>Kw(r,{includeName:t})).join(t?", ":","):""}function Kw(e,{includeName:t}){return e.type.startsWith("tuple")?`(${mc(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}function Cr(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function it(e){return Cr(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const jh="2.43.3";let yo={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${jh}`},$=class Z0 extends Error{constructor(t,r={}){var i;const n=(()=>{var c;return r.cause instanceof Z0?r.cause.details:(c=r.cause)!=null&&c.message?r.cause.message:r.details})(),s=r.cause instanceof Z0&&r.cause.docsPath||r.docsPath,a=(i=yo.getDocsUrl)==null?void 0:i.call(yo,{...r,docsPath:s}),o=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...n?[`Details: ${n}`]:[],...yo.version?[`Version: ${yo.version}`]:[]].join(`
|
|
3
|
-
`);super(o,r.cause?{cause:r.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=s,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=t,this.version=
|
|
4
|
-
`),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class
|
|
5
|
-
`),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class
|
|
6
|
-
`),{metaMessages:[`Params: (${
|
|
7
|
-
`),{name:"AbiEncodingArrayLengthMismatchError"})}}class
|
|
8
|
-
`),{name:"AbiEncodingLengthMismatchError"})}}class
|
|
9
|
-
`),{docsPath:r,name:"AbiErrorInputsNotFoundError"})}}class
|
|
10
|
-
`),{docsPath:r,name:"AbiErrorNotFoundError"})}}class
|
|
11
|
-
`),{docsPath:r,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}}class
|
|
12
|
-
`),{docsPath:r,name:"AbiEventSignatureNotFoundError"})}}class
|
|
1
|
+
(function(Z,F){typeof exports=="object"&&typeof module<"u"?F(exports,require("react"),require("@orbs-network/spot-ui"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","@orbs-network/spot-ui","react/jsx-runtime","react-dom"],F):(Z=typeof globalThis<"u"?globalThis:Z||self,F(Z.SpotReact={},Z.React,Z.SpotSDK,Z.jsxRuntime,Z.ReactDOM))})(this,(function(Z,F,R,B,Pu){"use strict";var r2=Z=>{throw TypeError(Z)};var R0=(Z,F,R)=>F.has(Z)||r2("Cannot "+R);var N=(Z,F,R)=>(R0(Z,F,"read from private field"),R?R.call(Z):F.get(Z)),le=(Z,F,R)=>F.has(Z)?r2("Cannot add the same private member more than once"):F instanceof WeakSet?F.add(Z):F.set(Z,R),ee=(Z,F,R,B)=>(R0(Z,F,"write to private field"),B?B.call(Z,R):F.set(Z,R),R),Ae=(Z,F,R)=>(R0(Z,F,"access private method"),R);var Su=(Z,F,R,B)=>({set _(Pu){ee(Z,F,Pu,R)},get _(){return N(Z,F,B)}});var rn,Xs,Lx,Qs,os,eo,Rx,to,is,ro,Hx,Js,$x,ea,no,vr,ta,St,rc,ra,Rr,Nn,Gx,Zt,_e,nc,Lt,na,so,Mn,cs,sc,ao,oo,sa,aa,ls,io,Ve,ic,H0,$0,G0,j0,V0,W0,q0,n2,jx,ac,nn,Rt,oa,sn,hs,Vx,_n,Hr,oc,Wx,Un,us,Xt,Dn,Fn,Au,Y0,qx,an,Yx,ut,ds,fs,co,lo,ps,uo,fo,Kx;function s2(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const mt=s2(F),X0=e=>{let t;const r=new Set,n=(l,u)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const p=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(h=>h(t,p))}},s=()=>t,i={setState:n,getState:s,getInitialState:()=>c,subscribe:l=>(r.add(l),()=>r.delete(l))},c=t=e(n,s,i);return i},a2=(e=>e?X0(e):X0),o2=e=>e;function i2(e,t=o2){const r=F.useSyncExternalStore(e.subscribe,F.useCallback(()=>t(e.getState()),[e,t]),F.useCallback(()=>t(e.getInitialState()),[e,t]));return F.useDebugValue(r),r}const Q0=e=>{const t=a2(e),r=n=>i2(t,n);return Object.assign(r,t),r},c2=(e=>e?Q0(e):Q0),J0={disclaimerAccepted:!0,currentTime:Date.now(),swapExecution:{}},K=c2((e,t)=>({state:J0,updateState:r=>e(n=>({state:{...n.state,...r}})),updateSwapExecution:r=>e(n=>({state:{...n.state,swapExecution:{...n.state.swapExecution,...r}}})),resetState:()=>{e({state:{...J0,currentTime:Date.now(),swapExecution:t().state.swapExecution,isMarketOrder:t().state.isMarketOrder}})}})),l2={version:"0.0.8"};var ca=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(){}},u2={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},d2=(Lx=class{constructor(){le(this,rn,u2);le(this,Xs,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&N(this,Xs)&&e!==N(this,rn)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:N(this,rn),provider:e}),ee(this,rn,e),process.env.NODE_ENV!=="production"&&ee(this,Xs,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&ee(this,Xs,!0),N(this,rn).setTimeout(e,t)}clearTimeout(e){N(this,rn).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&ee(this,Xs,!0),N(this,rn).setInterval(e,t)}clearInterval(e){N(this,rn).clearInterval(e)}},rn=new WeakMap,Xs=new WeakMap,Lx),ms=new d2;function f2(e){setTimeout(e,0)}var bs=typeof window>"u"||"Deno"in globalThis;function Ft(){}function p2(e,t){return typeof e=="function"?e(t):e}function Iu(e){return typeof e=="number"&&e>=0&&e!==1/0}function eh(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zn(e,t){return typeof e=="function"?e(t):e}function ur(e,t){return typeof e=="function"?e(t):e}function th(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:a,queryKey:o,stale:i}=e;if(o){if(n){if(t.queryHash!==Ou(o,t.options))return!1}else if(!ho(t.queryKey,o))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof i=="boolean"&&t.isStale()!==i||s&&s!==t.state.fetchStatus||a&&!a(t))}function rh(e,t){const{exact:r,status:n,predicate:s,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(ys(t.options.mutationKey)!==ys(a))return!1}else if(!ho(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function Ou(e,t){return((t==null?void 0:t.queryKeyHashFn)||ys)(e)}function ys(e){return JSON.stringify(e,(t,r)=>Mu(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function ho(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>ho(e[r],t[r])):!1}var h2=Object.prototype.hasOwnProperty;function Bu(e,t){if(e===t)return e;const r=nh(e)&&nh(t);if(!r&&!(Mu(e)&&Mu(t)))return t;const s=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,i=r?new Array(o):{};let c=0;for(let l=0;l<o;l++){const u=r?l:a[l],d=e[u],p=t[u];if(d===p){i[u]=d,(r?l<s:h2.call(e,u))&&c++;continue}if(d===null||p===null||typeof d!="object"||typeof p!="object"){i[u]=p;continue}const h=Bu(d,p);i[u]=h,h===d&&c++}return s===o&&c===s?e:i}function cc(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function nh(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Mu(e){if(!sh(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!sh(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function sh(e){return Object.prototype.toString.call(e)==="[object Object]"}function m2(e){return new Promise(t=>{ms.setTimeout(t,e)})}function _u(e,t,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(e,t);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Bu(e,t)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`),n}return Bu(e,t)}return t}function b2(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function y2(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var lc=Symbol();function ah(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===lc&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===lc?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function oh(e,t){return typeof e=="function"?e(...t):!!e}var g2=(Rx=class extends ca{constructor(){super();le(this,Qs);le(this,os);le(this,eo);ee(this,eo,t=>{if(!bs&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){N(this,os)||this.setEventListener(N(this,eo))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,os))==null||t.call(this),ee(this,os,void 0))}setEventListener(t){var r;ee(this,eo,t),(r=N(this,os))==null||r.call(this),ee(this,os,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){N(this,Qs)!==t&&(ee(this,Qs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof N(this,Qs)=="boolean"?N(this,Qs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Qs=new WeakMap,os=new WeakMap,eo=new WeakMap,Rx),Uu=new g2;function Du(){let e,t;const r=new Promise((s,a)=>{e=s,t=a});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}var x2=f2;function w2(){let e=[],t=0,r=i=>{i()},n=i=>{i()},s=x2;const a=i=>{t?e.push(i):s(()=>{r(i)})},o=()=>{const i=e;e=[],i.length&&s(()=>{n(()=>{i.forEach(c=>{r(c)})})})};return{batch:i=>{let c;t++;try{c=i()}finally{t--,t||o()}return c},batchCalls:i=>(...c)=>{a(()=>{i(...c)})},schedule:a,setNotifyFunction:i=>{r=i},setBatchNotifyFunction:i=>{n=i},setScheduler:i=>{s=i}}}var gt=w2(),v2=(Hx=class extends ca{constructor(){super();le(this,to,!0);le(this,is);le(this,ro);ee(this,ro,t=>{if(!bs&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){N(this,is)||this.setEventListener(N(this,ro))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,is))==null||t.call(this),ee(this,is,void 0))}setEventListener(t){var r;ee(this,ro,t),(r=N(this,is))==null||r.call(this),ee(this,is,t(this.setOnline.bind(this)))}setOnline(t){N(this,to)!==t&&(ee(this,to,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return N(this,to)}},to=new WeakMap,is=new WeakMap,ro=new WeakMap,Hx),uc=new v2;function k2(e){return Math.min(1e3*2**e,3e4)}function ih(e){return(e??"online")==="online"?uc.isOnline():!0}var Fu=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ch(e){let t=!1,r=0,n;const s=Du(),a=()=>s.status!=="pending",o=g=>{var k;if(!a()){const v=new Fu(g);p(v),(k=e.onCancel)==null||k.call(e,v)}},i=()=>{t=!0},c=()=>{t=!1},l=()=>Uu.isFocused()&&(e.networkMode==="always"||uc.isOnline())&&e.canRun(),u=()=>ih(e.networkMode)&&e.canRun(),d=g=>{a()||(n==null||n(),s.resolve(g))},p=g=>{a()||(n==null||n(),s.reject(g))},h=()=>new Promise(g=>{var k;n=v=>{(a()||l())&&g(v)},(k=e.onPause)==null||k.call(e)}).then(()=>{var g;n=void 0,a()||(g=e.onContinue)==null||g.call(e)}),y=()=>{if(a())return;let g;const k=r===0?e.initialPromise:void 0;try{g=k??e.fn()}catch(v){g=Promise.reject(v)}Promise.resolve(g).then(d).catch(v=>{var z;if(a())return;const w=e.retry??(bs?0:3),S=e.retryDelay??k2,C=typeof S=="function"?S(r,v):S,U=w===!0||typeof w=="number"&&r<w||typeof w=="function"&&w(r,v);if(t||!U){p(v);return}r++,(z=e.onFail)==null||z.call(e,r,v),m2(C).then(()=>l()?void 0:h()).then(()=>{t?p(v):y()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(n==null||n(),s),cancelRetry:i,continueRetry:c,canStart:u,start:()=>(u()?y():h().then(y),s)}}var lh=($x=class{constructor(){le(this,Js)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Iu(this.gcTime)&&ee(this,Js,ms.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(bs?1/0:300*1e3))}clearGcTimeout(){N(this,Js)&&(ms.clearTimeout(N(this,Js)),ee(this,Js,void 0))}},Js=new WeakMap,$x),E2=(Gx=class extends lh{constructor(t){super();le(this,Rr);le(this,ea);le(this,no);le(this,vr);le(this,ta);le(this,St);le(this,rc);le(this,ra);ee(this,ra,!1),ee(this,rc,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,ta,t.client),ee(this,vr,N(this,ta).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,ea,fh(this.options)),this.state=t.state??N(this,ea),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=N(this,St))==null?void 0:t.promise}setOptions(t){if(this.options={...N(this,rc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=fh(this.options);r.data!==void 0&&(this.setState(dh(r.data,r.dataUpdatedAt)),ee(this,ea,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,vr).remove(this)}setData(t,r){const n=_u(this.state.data,t,this.options);return Ae(this,Rr,Nn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Ae(this,Rr,Nn).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=N(this,St))==null?void 0:n.promise;return(s=N(this,St))==null||s.cancel(t),r?r.then(Ft).catch(Ft):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(N(this,ea))}isActive(){return this.observers.some(t=>ur(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===lc||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>zn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!eh(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=N(this,St))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=N(this,St))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),N(this,vr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(N(this,St)&&(N(this,ra)?N(this,St).cancel({revert:!0}):N(this,St).cancelRetry()),this.scheduleGc()),N(this,vr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ae(this,Rr,Nn).call(this,{type:"invalidate"})}async fetch(t,r){var c,l,u,d,p,h,y,g,k,v,w,S;if(this.state.fetchStatus!=="idle"&&((c=N(this,St))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(N(this,St))return N(this,St).continueRetry(),N(this,St).promise}if(t&&this.setOptions(t),!this.options.queryFn){const C=this.observers.find(U=>U.options.queryFn);C&&this.setOptions(C.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,s=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(ee(this,ra,!0),n.signal)})},a=()=>{const C=ah(this.options,r),z=(()=>{const T={client:N(this,ta),queryKey:this.queryKey,meta:this.meta};return s(T),T})();return ee(this,ra,!1),this.options.persister?this.options.persister(C,z,this):C(z)},i=(()=>{const C={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:N(this,ta),state:this.state,fetchFn:a};return s(C),C})();(l=this.options.behavior)==null||l.onFetch(i,this),ee(this,no,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=i.fetchOptions)==null?void 0:u.meta))&&Ae(this,Rr,Nn).call(this,{type:"fetch",meta:(d=i.fetchOptions)==null?void 0:d.meta}),ee(this,St,ch({initialPromise:r==null?void 0:r.initialPromise,fn:i.fetchFn,onCancel:C=>{C instanceof Fu&&C.revert&&this.setState({...N(this,no),fetchStatus:"idle"}),n.abort()},onFail:(C,U)=>{Ae(this,Rr,Nn).call(this,{type:"failed",failureCount:C,error:U})},onPause:()=>{Ae(this,Rr,Nn).call(this,{type:"pause"})},onContinue:()=>{Ae(this,Rr,Nn).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}));try{const C=await N(this,St).start();if(C===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(C),(h=(p=N(this,vr).config).onSuccess)==null||h.call(p,C,this),(g=(y=N(this,vr).config).onSettled)==null||g.call(y,C,this.state.error,this),C}catch(C){if(C instanceof Fu){if(C.silent)return N(this,St).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw Ae(this,Rr,Nn).call(this,{type:"error",error:C}),(v=(k=N(this,vr).config).onError)==null||v.call(k,C,this),(S=(w=N(this,vr).config).onSettled)==null||S.call(w,this.state.data,C,this),C}finally{this.scheduleGc()}}},ea=new WeakMap,no=new WeakMap,vr=new WeakMap,ta=new WeakMap,St=new WeakMap,rc=new WeakMap,ra=new WeakMap,Rr=new WeakSet,Nn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...uh(n.data,this.options),fetchMeta:t.meta??null};case"success":const s={...n,...dh(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,no,t.manual?s:void 0),s;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),gt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),N(this,vr).notify({query:this,type:"updated",action:t})})},Gx);function uh(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ih(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function dh(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function fh(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var C2=(jx=class extends ca{constructor(t,r){super();le(this,Ve);le(this,Zt);le(this,_e);le(this,nc);le(this,Lt);le(this,na);le(this,so);le(this,Mn);le(this,cs);le(this,sc);le(this,ao);le(this,oo);le(this,sa);le(this,aa);le(this,ls);le(this,io,new Set);this.options=r,ee(this,Zt,t),ee(this,cs,null),ee(this,Mn,Du()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,_e).addObserver(this),ph(N(this,_e),this.options)?Ae(this,Ve,ic).call(this):this.updateResult(),Ae(this,Ve,j0).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Nu(N(this,_e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Nu(N(this,_e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ae(this,Ve,V0).call(this),Ae(this,Ve,W0).call(this),N(this,_e).removeObserver(this)}setOptions(t){const r=this.options,n=N(this,_e);if(this.options=N(this,Zt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ur(this.options.enabled,N(this,_e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ae(this,Ve,q0).call(this),N(this,_e).setOptions(this.options),r._defaulted&&!cc(this.options,r)&&N(this,Zt).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,_e),observer:this});const s=this.hasListeners();s&&hh(N(this,_e),n,this.options,r)&&Ae(this,Ve,ic).call(this),this.updateResult(),s&&(N(this,_e)!==n||ur(this.options.enabled,N(this,_e))!==ur(r.enabled,N(this,_e))||zn(this.options.staleTime,N(this,_e))!==zn(r.staleTime,N(this,_e)))&&Ae(this,Ve,H0).call(this);const a=Ae(this,Ve,$0).call(this);s&&(N(this,_e)!==n||ur(this.options.enabled,N(this,_e))!==ur(r.enabled,N(this,_e))||a!==N(this,ls))&&Ae(this,Ve,G0).call(this,a)}getOptimisticResult(t){const r=N(this,Zt).getQueryCache().build(N(this,Zt),t),n=this.createResult(r,t);return S2(this,n)&&(ee(this,Lt,n),ee(this,so,this.options),ee(this,na,N(this,_e).state)),n}getCurrentResult(){return N(this,Lt)}trackResult(t,r){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),r==null||r(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&N(this,Mn).status==="pending"&&N(this,Mn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(t){N(this,io).add(t)}getCurrentQuery(){return N(this,_e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=N(this,Zt).defaultQueryOptions(t),n=N(this,Zt).getQueryCache().build(N(this,Zt),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Ae(this,Ve,ic).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,Lt)))}createResult(t,r){var b;const n=N(this,_e),s=this.options,a=N(this,Lt),o=N(this,na),i=N(this,so),l=t!==n?t.state:N(this,nc),{state:u}=t;let d={...u},p=!1,h;if(r._optimisticResults){const x=this.hasListeners(),A=!x&&ph(t,r),I=x&&hh(t,n,r,s);(A||I)&&(d={...d,...uh(u.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:y,errorUpdatedAt:g,status:k}=d;h=d.data;let v=!1;if(r.placeholderData!==void 0&&h===void 0&&k==="pending"){let x;a!=null&&a.isPlaceholderData&&r.placeholderData===(i==null?void 0:i.placeholderData)?(x=a.data,v=!0):x=typeof r.placeholderData=="function"?r.placeholderData((b=N(this,oo))==null?void 0:b.state.data,N(this,oo)):r.placeholderData,x!==void 0&&(k="success",h=_u(a==null?void 0:a.data,x,r),p=!0)}if(r.select&&h!==void 0&&!v)if(a&&h===(o==null?void 0:o.data)&&r.select===N(this,sc))h=N(this,ao);else try{ee(this,sc,r.select),h=r.select(h),h=_u(a==null?void 0:a.data,h,r),ee(this,ao,h),ee(this,cs,null)}catch(x){ee(this,cs,x)}N(this,cs)&&(y=N(this,cs),h=N(this,ao),g=Date.now(),k="error");const w=d.fetchStatus==="fetching",S=k==="pending",C=k==="error",U=S&&w,z=h!==void 0,m={status:k,fetchStatus:d.fetchStatus,isPending:S,isSuccess:k==="success",isError:C,isInitialLoading:U,isLoading:U,data:h,dataUpdatedAt:d.dataUpdatedAt,error:y,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:w,isRefetching:w&&!S,isLoadingError:C&&!z,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:C&&z,isStale:zu(t,r),refetch:this.refetch,promise:N(this,Mn),isEnabled:ur(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const x=O=>{m.status==="error"?O.reject(m.error):m.data!==void 0&&O.resolve(m.data)},A=()=>{const O=ee(this,Mn,m.promise=Du());x(O)},I=N(this,Mn);switch(I.status){case"pending":t.queryHash===n.queryHash&&x(I);break;case"fulfilled":(m.status==="error"||m.data!==I.value)&&A();break;case"rejected":(m.status!=="error"||m.error!==I.reason)&&A();break}}return m}updateResult(){const t=N(this,Lt),r=this.createResult(N(this,_e),this.options);if(ee(this,na,N(this,_e).state),ee(this,so,this.options),N(this,na).data!==void 0&&ee(this,oo,N(this,_e)),cc(r,t))return;ee(this,Lt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!N(this,io).size)return!0;const o=new Set(a??N(this,io));return this.options.throwOnError&&o.add("error"),Object.keys(N(this,Lt)).some(i=>{const c=i;return N(this,Lt)[c]!==t[c]&&o.has(c)})};Ae(this,Ve,n2).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ae(this,Ve,j0).call(this)}},Zt=new WeakMap,_e=new WeakMap,nc=new WeakMap,Lt=new WeakMap,na=new WeakMap,so=new WeakMap,Mn=new WeakMap,cs=new WeakMap,sc=new WeakMap,ao=new WeakMap,oo=new WeakMap,sa=new WeakMap,aa=new WeakMap,ls=new WeakMap,io=new WeakMap,Ve=new WeakSet,ic=function(t){Ae(this,Ve,q0).call(this);let r=N(this,_e).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Ft)),r},H0=function(){Ae(this,Ve,V0).call(this);const t=zn(this.options.staleTime,N(this,_e));if(bs||N(this,Lt).isStale||!Iu(t))return;const n=eh(N(this,Lt).dataUpdatedAt,t)+1;ee(this,sa,ms.setTimeout(()=>{N(this,Lt).isStale||this.updateResult()},n))},$0=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,_e)):this.options.refetchInterval)??!1},G0=function(t){Ae(this,Ve,W0).call(this),ee(this,ls,t),!(bs||ur(this.options.enabled,N(this,_e))===!1||!Iu(N(this,ls))||N(this,ls)===0)&&ee(this,aa,ms.setInterval(()=>{(this.options.refetchIntervalInBackground||Uu.isFocused())&&Ae(this,Ve,ic).call(this)},N(this,ls)))},j0=function(){Ae(this,Ve,H0).call(this),Ae(this,Ve,G0).call(this,Ae(this,Ve,$0).call(this))},V0=function(){N(this,sa)&&(ms.clearTimeout(N(this,sa)),ee(this,sa,void 0))},W0=function(){N(this,aa)&&(ms.clearInterval(N(this,aa)),ee(this,aa,void 0))},q0=function(){const t=N(this,Zt).getQueryCache().build(N(this,Zt),this.options);if(t===N(this,_e))return;const r=N(this,_e);ee(this,_e,t),ee(this,nc,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},n2=function(t){gt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(N(this,Lt))}),N(this,Zt).getQueryCache().notify({query:N(this,_e),type:"observerResultsUpdated"})})},jx);function T2(e,t){return ur(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ph(e,t){return T2(e,t)||e.state.data!==void 0&&Nu(e,t,t.refetchOnMount)}function Nu(e,t,r){if(ur(t.enabled,e)!==!1&&zn(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&zu(e,t)}return!1}function hh(e,t,r,n){return(e!==t||ur(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&zu(e,r)}function zu(e,t){return ur(t.enabled,e)!==!1&&e.isStaleByTime(zn(t.staleTime,e))}function S2(e,t){return!cc(e.getCurrentResult(),t)}function mh(e){return{onFetch:(t,r)=>{var u,d,p,h,y;const n=t.options,s=(p=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,a=((h=t.state.data)==null?void 0:h.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let g=!1;const k=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},v=ah(t.options,t.fetchOptions),w=async(S,C,U)=>{if(g)return Promise.reject();if(C==null&&S.pages.length)return Promise.resolve(S);const T=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:C,direction:U?"backward":"forward",meta:t.options.meta};return k(A),A})(),m=await v(T),{maxPages:b}=t.options,x=U?y2:b2;return{pages:x(S.pages,m,b),pageParams:x(S.pageParams,C,b)}};if(s&&a.length){const S=s==="backward",C=S?A2:bh,U={pages:a,pageParams:o},z=C(n,U);i=await w(U,z,S)}else{const S=e??a.length;do{const C=c===0?o[0]??n.initialPageParam:bh(n,i);if(c>0&&C==null)break;i=await w(i,C),c++}while(c<S)}return i};t.options.persister?t.fetchFn=()=>{var g,k;return(k=(g=t.options).persister)==null?void 0:k.call(g,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=l}}}function bh(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function A2(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var P2=(Vx=class extends lh{constructor(t){super();le(this,sn);le(this,ac);le(this,nn);le(this,Rt);le(this,oa);ee(this,ac,t.client),this.mutationId=t.mutationId,ee(this,Rt,t.mutationCache),ee(this,nn,[]),this.state=t.state||yh(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){N(this,nn).includes(t)||(N(this,nn).push(t),this.clearGcTimeout(),N(this,Rt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,nn,N(this,nn).filter(r=>r!==t)),this.scheduleGc(),N(this,Rt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){N(this,nn).length||(this.state.status==="pending"?this.scheduleGc():N(this,Rt).remove(this))}continue(){var t;return((t=N(this,oa))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,c,l,u,d,p,h,y,g,k,v,w,S,C,U,z,T,m,b;const r=()=>{Ae(this,sn,hs).call(this,{type:"continue"})},n={client:N(this,ac),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,oa,ch({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(x,A)=>{Ae(this,sn,hs).call(this,{type:"failed",failureCount:x,error:A})},onPause:()=>{Ae(this,sn,hs).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,Rt).canRun(this)}));const s=this.state.status==="pending",a=!N(this,oa).canStart();try{if(s)r();else{Ae(this,sn,hs).call(this,{type:"pending",variables:t,isPaused:a}),await((i=(o=N(this,Rt).config).onMutate)==null?void 0:i.call(o,t,this,n));const A=await((l=(c=this.options).onMutate)==null?void 0:l.call(c,t,n));A!==this.state.context&&Ae(this,sn,hs).call(this,{type:"pending",context:A,variables:t,isPaused:a})}const x=await N(this,oa).start();return await((d=(u=N(this,Rt).config).onSuccess)==null?void 0:d.call(u,x,t,this.state.context,this,n)),await((h=(p=this.options).onSuccess)==null?void 0:h.call(p,x,t,this.state.context,n)),await((g=(y=N(this,Rt).config).onSettled)==null?void 0:g.call(y,x,null,this.state.variables,this.state.context,this,n)),await((v=(k=this.options).onSettled)==null?void 0:v.call(k,x,null,t,this.state.context,n)),Ae(this,sn,hs).call(this,{type:"success",data:x}),x}catch(x){try{throw await((S=(w=N(this,Rt).config).onError)==null?void 0:S.call(w,x,t,this.state.context,this,n)),await((U=(C=this.options).onError)==null?void 0:U.call(C,x,t,this.state.context,n)),await((T=(z=N(this,Rt).config).onSettled)==null?void 0:T.call(z,void 0,x,this.state.variables,this.state.context,this,n)),await((b=(m=this.options).onSettled)==null?void 0:b.call(m,void 0,x,t,this.state.context,n)),x}finally{Ae(this,sn,hs).call(this,{type:"error",error:x})}}finally{N(this,Rt).runNext(this)}}},ac=new WeakMap,nn=new WeakMap,Rt=new WeakMap,oa=new WeakMap,sn=new WeakSet,hs=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),gt.batch(()=>{N(this,nn).forEach(n=>{n.onMutationUpdate(t)}),N(this,Rt).notify({mutation:this,type:"updated",action:t})})},Vx);function yh(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var I2=(Wx=class extends ca{constructor(t={}){super();le(this,_n);le(this,Hr);le(this,oc);this.config=t,ee(this,_n,new Set),ee(this,Hr,new Map),ee(this,oc,0)}build(t,r,n){const s=new P2({client:t,mutationCache:this,mutationId:++Su(this,oc)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){N(this,_n).add(t);const r=dc(t);if(typeof r=="string"){const n=N(this,Hr).get(r);n?n.push(t):N(this,Hr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(N(this,_n).delete(t)){const r=dc(t);if(typeof r=="string"){const n=N(this,Hr).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&N(this,Hr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=dc(t);if(typeof r=="string"){const n=N(this,Hr).get(r),s=n==null?void 0:n.find(a=>a.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=dc(t);if(typeof r=="string"){const s=(n=N(this,Hr).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){gt.batch(()=>{N(this,_n).forEach(t=>{this.notify({type:"removed",mutation:t})}),N(this,_n).clear(),N(this,Hr).clear()})}getAll(){return Array.from(N(this,_n))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>rh(r,n))}findAll(t={}){return this.getAll().filter(r=>rh(t,r))}notify(t){gt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return gt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Ft))))}},_n=new WeakMap,Hr=new WeakMap,oc=new WeakMap,Wx);function dc(e){var t;return(t=e.options.scope)==null?void 0:t.id}var O2=(qx=class extends ca{constructor(t,r){super();le(this,Fn);le(this,Un);le(this,us);le(this,Xt);le(this,Dn);ee(this,Un,t),this.setOptions(r),this.bindMethods(),Ae(this,Fn,Au).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const r=this.options;this.options=N(this,Un).defaultMutationOptions(t),cc(this.options,r)||N(this,Un).getMutationCache().notify({type:"observerOptionsUpdated",mutation:N(this,Xt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ys(r.mutationKey)!==ys(this.options.mutationKey)?this.reset():((n=N(this,Xt))==null?void 0:n.state.status)==="pending"&&N(this,Xt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=N(this,Xt))==null||t.removeObserver(this)}onMutationUpdate(t){Ae(this,Fn,Au).call(this),Ae(this,Fn,Y0).call(this,t)}getCurrentResult(){return N(this,us)}reset(){var t;(t=N(this,Xt))==null||t.removeObserver(this),ee(this,Xt,void 0),Ae(this,Fn,Au).call(this),Ae(this,Fn,Y0).call(this)}mutate(t,r){var n;return ee(this,Dn,r),(n=N(this,Xt))==null||n.removeObserver(this),ee(this,Xt,N(this,Un).getMutationCache().build(N(this,Un),this.options)),N(this,Xt).addObserver(this),N(this,Xt).execute(t)}},Un=new WeakMap,us=new WeakMap,Xt=new WeakMap,Dn=new WeakMap,Fn=new WeakSet,Au=function(){var r;const t=((r=N(this,Xt))==null?void 0:r.state)??yh();ee(this,us,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Y0=function(t){gt.batch(()=>{var r,n,s,a,o,i,c,l;if(N(this,Dn)&&this.hasListeners()){const u=N(this,us).variables,d=N(this,us).context,p={client:N(this,Un),meta:this.options.meta,mutationKey:this.options.mutationKey};(t==null?void 0:t.type)==="success"?((n=(r=N(this,Dn)).onSuccess)==null||n.call(r,t.data,u,d,p),(a=(s=N(this,Dn)).onSettled)==null||a.call(s,t.data,null,u,d,p)):(t==null?void 0:t.type)==="error"&&((i=(o=N(this,Dn)).onError)==null||i.call(o,t.error,u,d,p),(l=(c=N(this,Dn)).onSettled)==null||l.call(c,void 0,t.error,u,d,p))}this.listeners.forEach(u=>{u(N(this,us))})})},qx),B2=(Yx=class extends ca{constructor(t={}){super();le(this,an);this.config=t,ee(this,an,new Map)}build(t,r,n){const s=r.queryKey,a=r.queryHash??Ou(s,r);let o=this.get(a);return o||(o=new E2({client:t,queryKey:s,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){N(this,an).has(t.queryHash)||(N(this,an).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=N(this,an).get(t.queryHash);r&&(t.destroy(),r===t&&N(this,an).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){gt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return N(this,an).get(t)}getAll(){return[...N(this,an).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>th(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>th(t,n)):r}notify(t){gt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){gt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){gt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},an=new WeakMap,Yx),M2=(Kx=class{constructor(e={}){le(this,ut);le(this,ds);le(this,fs);le(this,co);le(this,lo);le(this,ps);le(this,uo);le(this,fo);ee(this,ut,e.queryCache||new B2),ee(this,ds,e.mutationCache||new I2),ee(this,fs,e.defaultOptions||{}),ee(this,co,new Map),ee(this,lo,new Map),ee(this,ps,0)}mount(){Su(this,ps)._++,N(this,ps)===1&&(ee(this,uo,Uu.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,ut).onFocus())})),ee(this,fo,uc.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,ut).onOnline())})))}unmount(){var e,t;Su(this,ps)._--,N(this,ps)===0&&((e=N(this,uo))==null||e.call(this),ee(this,uo,void 0),(t=N(this,fo))==null||t.call(this),ee(this,fo,void 0))}isFetching(e){return N(this,ut).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return N(this,ds).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=N(this,ut).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=N(this,ut).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(zn(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return N(this,ut).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=N(this,ut).get(n.queryHash),a=s==null?void 0:s.state.data,o=p2(t,a);if(o!==void 0)return N(this,ut).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return gt.batch(()=>N(this,ut).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=N(this,ut).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=N(this,ut);gt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=N(this,ut);return gt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=gt.batch(()=>N(this,ut).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(Ft).catch(Ft)}invalidateQueries(e,t={}){return gt.batch(()=>(N(this,ut).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=gt.batch(()=>N(this,ut).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let a=s.fetch(void 0,r);return r.throwOnError||(a=a.catch(Ft)),s.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Ft)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=N(this,ut).build(this,t);return r.isStaleByTime(zn(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ft).catch(Ft)}fetchInfiniteQuery(e){return e.behavior=mh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ft).catch(Ft)}ensureInfiniteQueryData(e){return e.behavior=mh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return uc.isOnline()?N(this,ds).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,ut)}getMutationCache(){return N(this,ds)}getDefaultOptions(){return N(this,fs)}setDefaultOptions(e){ee(this,fs,e)}setQueryDefaults(e,t){N(this,co).set(ys(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...N(this,co).values()],r={};return t.forEach(n=>{ho(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){N(this,lo).set(ys(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...N(this,lo).values()],r={};return t.forEach(n=>{ho(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...N(this,fs).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ou(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===lc&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...N(this,fs).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){N(this,ut).clear(),N(this,ds).clear()}},ut=new WeakMap,ds=new WeakMap,fs=new WeakMap,co=new WeakMap,lo=new WeakMap,ps=new WeakMap,uo=new WeakMap,fo=new WeakMap,Kx),gh=mt.createContext(void 0),mo=e=>{const t=mt.useContext(gh);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},_2=({client:e,children:t})=>(mt.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),B.jsx(gh.Provider,{value:e,children:t})),xh=mt.createContext(!1),U2=()=>mt.useContext(xh);xh.Provider;function D2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var F2=mt.createContext(D2()),N2=()=>mt.useContext(F2),z2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},L2=e=>{mt.useEffect(()=>{e.clearReset()},[e])},R2=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||oh(r,[e.error,n])),H2=e=>{if(e.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>r(n(...s)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},$2=(e,t)=>e.isLoading&&e.isFetching&&!t,G2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,wh=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function j2(e,t,r){var d,p,h,y,g;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=U2(),s=N2(),a=mo(),o=a.defaultQueryOptions(e);(p=(d=a.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||p.call(d,o),process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),o._optimisticResults=n?"isRestoring":"optimistic",H2(o),z2(o,s),L2(s);const i=!a.getQueryCache().get(o.queryHash),[c]=mt.useState(()=>new t(a,o)),l=c.getOptimisticResult(o),u=!n&&e.subscribed!==!1;if(mt.useSyncExternalStore(mt.useCallback(k=>{const v=u?c.subscribe(gt.batchCalls(k)):Ft;return c.updateResult(),v},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),mt.useEffect(()=>{c.setOptions(o)},[o,c]),G2(o,l))throw wh(o,c,s);if(R2({result:l,errorResetBoundary:s,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw l.error;if((y=(h=a.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||y.call(h,o,l),o.experimental_prefetchInRender&&!bs&&$2(l,n)){const k=i?wh(o,c,s):(g=a.getQueryCache().get(o.queryHash))==null?void 0:g.promise;k==null||k.catch(Ft).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?l:c.trackResult(l)}function V2(e,t){return j2(e,C2)}function on(e,t){const r=mo(),[n]=mt.useState(()=>new O2(r,e));mt.useEffect(()=>{n.setOptions(e)},[n,e]);const s=mt.useSyncExternalStore(mt.useCallback(o=>n.subscribe(gt.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=mt.useCallback((o,i)=>{n.mutate(o,i).catch(Ft)},[n]);if(s.error&&oh(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:a,mutateAsync:s.mutate}}const W2="1.2.3";let Ht=class K0 extends Error{constructor(t,r={}){var o;const n=r.cause instanceof K0?r.cause.details:(o=r.cause)!=null&&o.message?r.cause.message:r.details,s=r.cause instanceof K0&&r.cause.docsPath||r.docsPath,a=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...s?[`Docs: https://abitype.dev${s}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${W2}`].join(`
|
|
2
|
+
`);super(a),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=s,this.metaMessages=r.metaMessages,this.shortMessage=t}};function cn(e,t){const r=e.exec(t);return r==null?void 0:r.groups}const vh=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,kh=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,Eh=/^\(.+?\).*?$/,Ch=/^tuple(?<array>(\[(\d*)\])*)$/;function Lu(e){let t=e.type;if(Ch.test(e.type)&&"components"in e){t="(";const r=e.components.length;for(let s=0;s<r;s++){const a=e.components[s];t+=Lu(a),s<r-1&&(t+=", ")}const n=cn(Ch,e.type);return t+=`)${(n==null?void 0:n.array)||""}`,Lu({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function la(e){let t="";const r=e.length;for(let n=0;n<r;n++){const s=e[n];t+=Lu(s),n!==r-1&&(t+=", ")}return t}function fc(e){var t;return e.type==="function"?`function ${e.name}(${la(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${la(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${la(e.inputs)})`:e.type==="error"?`error ${e.name}(${la(e.inputs)})`:e.type==="constructor"?`constructor(${la(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const Th=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function q2(e){return Th.test(e)}function Y2(e){return cn(Th,e)}const Sh=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function K2(e){return Sh.test(e)}function Z2(e){return cn(Sh,e)}const Ah=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function X2(e){return Ah.test(e)}function Q2(e){return cn(Ah,e)}const Ph=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function pc(e){return Ph.test(e)}function J2(e){return cn(Ph,e)}const Ih=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function ew(e){return Ih.test(e)}function tw(e){return cn(Ih,e)}const Oh=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function rw(e){return Oh.test(e)}function nw(e){return cn(Oh,e)}const sw=/^receive\(\) external payable$/;function aw(e){return sw.test(e)}const Bh=new Set(["memory","indexed","storage","calldata"]),ow=new Set(["indexed"]),Ru=new Set(["calldata","memory","storage"]);class iw extends Ht{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class cw extends Ht{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class lw extends Ht{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class uw extends Ht{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class dw extends Ht{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class fw extends Ht{constructor({param:t,name:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class pw extends Ht{constructor({param:t,type:r,modifier:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class hw extends Ht{constructor({param:t,type:r,modifier:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class mw extends Ht{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class ua extends Ht{constructor({signature:t,type:r}){super(`Invalid ${r} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class bw extends Ht{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class yw extends Ht{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class gw extends Ht{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class xw extends Ht{constructor({current:t,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function ww(e,t,r){let n="";if(r)for(const s of Object.entries(r)){if(!s)continue;let a="";for(const o of s[1])a+=`[${o.type}${o.name?`:${o.name}`:""}]`;n+=`(${s[0]}{${a}})`}return t?`${t}:${e}${n}`:`${e}${n}`}const Hu=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function $u(e,t={}){if(X2(e))return vw(e,t);if(K2(e))return kw(e,t);if(q2(e))return Ew(e,t);if(ew(e))return Cw(e,t);if(rw(e))return Tw(e);if(aw(e))return{type:"receive",stateMutability:"payable"};throw new bw({signature:e})}function vw(e,t={}){const r=Q2(e);if(!r)throw new ua({signature:e,type:"function"});const n=Qt(r.parameters),s=[],a=n.length;for(let i=0;i<a;i++)s.push(ln(n[i],{modifiers:Ru,structs:t,type:"function"}));const o=[];if(r.returns){const i=Qt(r.returns),c=i.length;for(let l=0;l<c;l++)o.push(ln(i[l],{modifiers:Ru,structs:t,type:"function"}))}return{name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:s,outputs:o}}function kw(e,t={}){const r=Z2(e);if(!r)throw new ua({signature:e,type:"event"});const n=Qt(r.parameters),s=[],a=n.length;for(let o=0;o<a;o++)s.push(ln(n[o],{modifiers:ow,structs:t,type:"event"}));return{name:r.name,type:"event",inputs:s}}function Ew(e,t={}){const r=Y2(e);if(!r)throw new ua({signature:e,type:"error"});const n=Qt(r.parameters),s=[],a=n.length;for(let o=0;o<a;o++)s.push(ln(n[o],{structs:t,type:"error"}));return{name:r.name,type:"error",inputs:s}}function Cw(e,t={}){const r=tw(e);if(!r)throw new ua({signature:e,type:"constructor"});const n=Qt(r.parameters),s=[],a=n.length;for(let o=0;o<a;o++)s.push(ln(n[o],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:s}}function Tw(e){const t=nw(e);if(!t)throw new ua({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const Sw=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,Aw=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,Pw=/^u?int$/;function ln(e,t){var d,p;const r=ww(e,t==null?void 0:t.type,t==null?void 0:t.structs);if(Hu.has(r))return Hu.get(r);const n=Eh.test(e),s=cn(n?Aw:Sw,e);if(!s)throw new dw({param:e});if(s.name&&Ow(s.name))throw new fw({param:e,name:s.name});const a=s.name?{name:s.name}:{},o=s.modifier==="indexed"?{indexed:!0}:{},i=(t==null?void 0:t.structs)??{};let c,l={};if(n){c="tuple";const h=Qt(s.type),y=[],g=h.length;for(let k=0;k<g;k++)y.push(ln(h[k],{structs:i}));l={components:y}}else if(s.type in i)c="tuple",l={components:i[s.type]};else if(Pw.test(s.type))c=`${s.type}256`;else if(s.type==="address payable")c="address";else if(c=s.type,(t==null?void 0:t.type)!=="struct"&&!Mh(c))throw new lw({type:c});if(s.modifier){if(!((p=(d=t==null?void 0:t.modifiers)==null?void 0:d.has)!=null&&p.call(d,s.modifier)))throw new pw({param:e,type:t==null?void 0:t.type,modifier:s.modifier});if(Ru.has(s.modifier)&&!Bw(c,!!s.array))throw new hw({param:e,type:t==null?void 0:t.type,modifier:s.modifier})}const u={type:`${c}${s.array??""}`,...a,...o,...l};return Hu.set(r,u),u}function Qt(e,t=[],r="",n=0){const s=e.trim().length;for(let a=0;a<s;a++){const o=e[a],i=e.slice(a+1);switch(o){case",":return n===0?Qt(i,[...t,r.trim()]):Qt(i,t,`${r}${o}`,n);case"(":return Qt(i,t,`${r}${o}`,n+1);case")":return Qt(i,t,`${r}${o}`,n-1);default:return Qt(i,t,`${r}${o}`,n)}}if(r==="")return t;if(n!==0)throw new xw({current:r,depth:n});return t.push(r.trim()),t}function Mh(e){return e==="address"||e==="bool"||e==="function"||e==="string"||vh.test(e)||kh.test(e)}const Iw=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function Ow(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||vh.test(e)||kh.test(e)||Iw.test(e)}function Bw(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function Gu(e){const t={},r=e.length;for(let o=0;o<r;o++){const i=e[o];if(!pc(i))continue;const c=J2(i);if(!c)throw new ua({signature:i,type:"struct"});const l=c.properties.split(";"),u=[],d=l.length;for(let p=0;p<d;p++){const y=l[p].trim();if(!y)continue;const g=ln(y,{type:"struct"});u.push(g)}if(!u.length)throw new yw({signature:i});t[c.name]=u}const n={},s=Object.entries(t),a=s.length;for(let o=0;o<a;o++){const[i,c]=s[o];n[i]=_h(c,t)}return n}const Mw=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function _h(e=[],t={},r=new Set){const n=[],s=e.length;for(let a=0;a<s;a++){const o=e[a];if(Eh.test(o.type))n.push(o);else{const c=cn(Mw,o.type);if(!(c!=null&&c.type))throw new mw({abiParameter:o});const{array:l,type:u}=c;if(u in t){if(r.has(u))throw new gw({type:u});n.push({...o,type:`tuple${l??""}`,components:_h(t[u],t,new Set([...r,u]))})}else if(Mh(u))n.push(o);else throw new cw({type:u})}}return n}function Uh(e){const t=Gu(e),r=[],n=e.length;for(let s=0;s<n;s++){const a=e[s];pc(a)||r.push($u(a,t))}return r}function Dh(e){let t;if(typeof e=="string")t=$u(e);else{const r=Gu(e),n=e.length;for(let s=0;s<n;s++){const a=e[s];if(!pc(a)){t=$u(a,r);break}}}if(!t)throw new iw({signature:e});return t}function Fh(e){const t=[];if(typeof e=="string"){const r=Qt(e),n=r.length;for(let s=0;s<n;s++)t.push(ln(r[s],{modifiers:Bh}))}else{const r=Gu(e),n=e.length;for(let s=0;s<n;s++){const a=e[s];if(pc(a))continue;const o=Qt(a),i=o.length;for(let c=0;c<i;c++)t.push(ln(o[c],{modifiers:Bh,structs:r}))}}if(t.length===0)throw new uw({params:e});return t}function ne(e,t,r){const n=e[t.name];if(typeof n=="function")return n;const s=e[r];return typeof s=="function"?s:a=>t(e,a)}function Er(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new Ww(e.type);return`${e.name}(${hc(e.inputs,{includeName:t})})`}function hc(e,{includeName:t=!1}={}){return e?e.map(r=>_w(r,{includeName:t})).join(t?", ":","):""}function _w(e,{includeName:t}){return e.type.startsWith("tuple")?`(${hc(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}function Cr(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function it(e){return Cr(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const Nh="2.43.3";let bo={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${Nh}`},$=class Z0 extends Error{constructor(t,r={}){var i;const n=(()=>{var c;return r.cause instanceof Z0?r.cause.details:(c=r.cause)!=null&&c.message?r.cause.message:r.details})(),s=r.cause instanceof Z0&&r.cause.docsPath||r.docsPath,a=(i=bo.getDocsUrl)==null?void 0:i.call(bo,{...r,docsPath:s}),o=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...n?[`Details: ${n}`]:[],...bo.version?[`Version: ${bo.version}`]:[]].join(`
|
|
3
|
+
`);super(o,r.cause?{cause:r.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=s,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=t,this.version=Nh}walk(t){return zh(this,t)}};function zh(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?zh(e.cause,t):t?null:e}class Uw extends ${constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
|
|
4
|
+
`),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class Lh extends ${constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
|
|
5
|
+
`),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class Rh extends ${constructor({data:t,params:r,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join(`
|
|
6
|
+
`),{metaMessages:[`Params: (${hc(r,{includeName:!0})})`,`Data: ${t} (${n} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=r,this.size=n}}class yo extends ${constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class Dw extends ${constructor({expectedLength:t,givenLength:r,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${t}`,`Given length: ${r}`].join(`
|
|
7
|
+
`),{name:"AbiEncodingArrayLengthMismatchError"})}}class Fw extends ${constructor({expectedSize:t,value:r}){super(`Size of bytes "${r}" (bytes${it(r)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class Nw extends ${constructor({expectedLength:t,givenLength:r}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${r}`].join(`
|
|
8
|
+
`),{name:"AbiEncodingLengthMismatchError"})}}class zw extends ${constructor(t,{docsPath:r}){super([`Arguments (\`args\`) were provided to "${t}", but "${t}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(`
|
|
9
|
+
`),{docsPath:r,name:"AbiErrorInputsNotFoundError"})}}class Hh extends ${constructor(t,{docsPath:r}={}){super([`Error ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
|
|
10
|
+
`),{docsPath:r,name:"AbiErrorNotFoundError"})}}class $h extends ${constructor(t,{docsPath:r}){super([`Encoded error signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${t}.`].join(`
|
|
11
|
+
`),{docsPath:r,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}}class Lw extends ${constructor({docsPath:t}){super("Cannot extract event signature from empty topics.",{docsPath:t,name:"AbiEventSignatureEmptyTopicsError"})}}class Rw extends ${constructor(t,{docsPath:r}){super([`Encoded event signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${t}.`].join(`
|
|
12
|
+
`),{docsPath:r,name:"AbiEventSignatureNotFoundError"})}}class Gh extends ${constructor(t,{docsPath:r}={}){super([`Event ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(`
|
|
13
13
|
`),{docsPath:r,name:"AbiEventNotFoundError"})}}class da extends ${constructor(t,{docsPath:r}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
|
|
14
|
-
`),{docsPath:r,name:"AbiFunctionNotFoundError"})}}class
|
|
15
|
-
`),{docsPath:r,name:"AbiFunctionOutputsNotFoundError"})}}class
|
|
16
|
-
`),{docsPath:r,name:"AbiFunctionSignatureNotFoundError"})}}class
|
|
17
|
-
`),{metaMessages:[`Params: (${
|
|
18
|
-
`),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t}}class
|
|
19
|
-
`),{docsPath:r,name:"InvalidAbiEncodingType"})}}class
|
|
20
|
-
`),{docsPath:r,name:"InvalidAbiDecodingType"})}}let
|
|
21
|
-
`),{name:"InvalidArrayError"})}};class
|
|
22
|
-
`),{name:"InvalidDefinitionTypeError"})}}class l5 extends ${constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}let Jh=class extends ${constructor({offset:t,position:r,size:n}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}},em=class extends ${constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${t}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"})}};class tm extends ${constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} is expected to be ${r} ${n} long, but is ${t} ${n} long.`,{name:"InvalidBytesLengthError"})}}function gs(e,{dir:t,size:r=32}={}){return typeof e=="string"?Rn(e,{dir:t,size:r}):u5(e,{dir:t,size:r})}function Rn(e,{dir:t,size:r=32}={}){if(r===null)return e;const n=e.replace("0x","");if(n.length>r*2)throw new em({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[t==="right"?"padEnd":"padStart"](r*2,"0")}`}function u5(e,{dir:t,size:r=32}={}){if(r===null)return e;if(e.length>r)throw new em({size:e.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let s=0;s<r;s++){const a=t==="right";n[a?s:r-s-1]=e[a?s:e.length-s-1]}return n}let rm=class extends ${constructor({max:t,min:r,signed:n,size:s,value:a}){super(`Number "${a}" is not in safe ${s?`${s*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${t?`(${r} to ${t})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}},d5=class extends ${constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}};class f5 extends ${constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}let p5=class extends ${constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}};function $t(e,{dir:t="left"}={}){let r=typeof e=="string"?e.replace("0x",""):e,n=0;for(let s=0;s<r.length-1&&r[t==="left"?s:r.length-s-1].toString()==="0";s++)n++;return r=t==="left"?r.slice(n):r.slice(0,r.length-n),typeof e=="string"?(r.length===1&&t==="right"&&(r=`${r}0`),`0x${r.length%2===1?`0${r}`:r}`):r}function Tr(e,{size:t}){if(it(e)>t)throw new p5({givenSize:it(e),maxSize:t})}function ze(e,t={}){const{signed:r}=t;t.size&&Tr(e,{size:t.size});const n=BigInt(e);if(!r)return n;const s=(e.length-2)/2,a=(1n<<BigInt(s)*8n-1n)-1n;return n<=a?n:n-BigInt(`0x${"f".padStart(s*2,"f")}`)-1n}function h5(e,t={}){let r=e;if(t.size&&(Tr(r,{size:t.size}),r=$t(r)),$t(r)==="0x00")return!1;if($t(r)==="0x01")return!0;throw new f5(r)}function Jt(e,t={}){return Number(ze(e,t))}const m5=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Oe(e,t={}){return typeof e=="number"||typeof e=="bigint"?W(e,t):typeof e=="string"?fa(e,t):typeof e=="boolean"?nm(e,t):bt(e,t)}function nm(e,t={}){const r=`0x${Number(e)}`;return typeof t.size=="number"?(Tr(r,{size:t.size}),gs(r,{size:t.size})):r}function bt(e,t={}){let r="";for(let s=0;s<e.length;s++)r+=m5[e[s]];const n=`0x${r}`;return typeof t.size=="number"?(Tr(n,{size:t.size}),gs(n,{dir:"right",size:t.size})):n}function W(e,t={}){const{signed:r,size:n}=t,s=BigInt(e);let a;n?r?a=(1n<<BigInt(n)*8n-1n)-1n:a=2n**(BigInt(n)*8n)-1n:typeof e=="number"&&(a=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof a=="bigint"&&r?-a-1n:0;if(a&&s>a||s<o){const c=typeof e=="bigint"?"n":"";throw new rm({max:a?`${a}${c}`:void 0,min:`${o}${c}`,signed:r,size:n,value:`${e}${c}`})}const i=`0x${(r&&s<0?(1n<<BigInt(n*8))+BigInt(s):s).toString(16)}`;return n?gs(i,{size:n}):i}const b5=new TextEncoder;function fa(e,t={}){const r=b5.encode(e);return bt(r,t)}const y5=new TextEncoder;function un(e,t={}){return typeof e=="number"||typeof e=="bigint"?x5(e,t):typeof e=="boolean"?g5(e,t):Cr(e)?er(e,t):xs(e,t)}function g5(e,t={}){const r=new Uint8Array(1);return r[0]=Number(e),typeof t.size=="number"?(Tr(r,{size:t.size}),gs(r,{size:t.size})):r}const dn={zero:48,nine:57,A:65,F:70,a:97,f:102};function sm(e){if(e>=dn.zero&&e<=dn.nine)return e-dn.zero;if(e>=dn.A&&e<=dn.F)return e-(dn.A-10);if(e>=dn.a&&e<=dn.f)return e-(dn.a-10)}function er(e,t={}){let r=e;t.size&&(Tr(r,{size:t.size}),r=gs(r,{dir:"right",size:t.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);const s=n.length/2,a=new Uint8Array(s);for(let o=0,i=0;o<s;o++){const c=sm(n.charCodeAt(i++)),l=sm(n.charCodeAt(i++));if(c===void 0||l===void 0)throw new $(`Invalid byte sequence ("${n[i-2]}${n[i-1]}" in "${n}").`);a[o]=c*16+l}return a}function x5(e,t){const r=W(e,t);return er(r)}function xs(e,t={}){const r=y5.encode(e);return typeof t.size=="number"?(Tr(r,{size:t.size}),gs(r,{dir:"right",size:t.size})):r}const yc=BigInt(2**32-1),am=BigInt(32);function w5(e,t=!1){return t?{h:Number(e&yc),l:Number(e>>am&yc)}:{h:Number(e>>am&yc)|0,l:Number(e&yc)|0}}function om(e,t=!1){const r=e.length;let n=new Uint32Array(r),s=new Uint32Array(r);for(let a=0;a<r;a++){const{h:o,l:i}=w5(e[a],t);[n[a],s[a]]=[o,i]}return[n,s]}const im=(e,t,r)=>e>>>r,cm=(e,t,r)=>e<<32-r|t>>>r,pa=(e,t,r)=>e>>>r|t<<32-r,ha=(e,t,r)=>e<<32-r|t>>>r,gc=(e,t,r)=>e<<64-r|t>>>r-32,xc=(e,t,r)=>e>>>r-32|t<<64-r,v5=(e,t,r)=>e<<r|t>>>32-r,k5=(e,t,r)=>t<<r|e>>>32-r,E5=(e,t,r)=>t<<r-32|e>>>64-r,C5=(e,t,r)=>e<<r-32|t>>>64-r;function fn(e,t,r,n){const s=(t>>>0)+(n>>>0);return{h:e+r+(s/2**32|0)|0,l:s|0}}const T5=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),S5=(e,t,r,n)=>t+r+n+(e/2**32|0)|0,A5=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),P5=(e,t,r,n,s)=>t+r+n+s+(e/2**32|0)|0,I5=(e,t,r,n,s)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(s>>>0),U5=(e,t,r,n,s,a)=>t+r+n+s+a+(e/2**32|0)|0,ma=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function O5(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function xo(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function ws(e,...t){if(!O5(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function B5(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");xo(e.outputLen),xo(e.blockLen)}function ba(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function lm(e,t){ws(e);const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function M5(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Hn(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Vu(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Gr(e,t){return e<<32-t|e>>>t}const _5=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function D5(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function F5(e){for(let t=0;t<e.length;t++)e[t]=D5(e[t]);return e}const um=_5?e=>e:F5;function N5(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function wc(e){return typeof e=="string"&&(e=N5(e)),ws(e),e}function z5(...e){let t=0;for(let n=0;n<e.length;n++){const s=e[n];ws(s),t+=s.length}const r=new Uint8Array(t);for(let n=0,s=0;n<e.length;n++){const a=e[n];r.set(a,s),s+=a.length}return r}class Wu{}function vc(e){const t=n=>e().update(wc(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function L5(e=32){if(ma&&typeof ma.getRandomValues=="function")return ma.getRandomValues(new Uint8Array(e));if(ma&&typeof ma.randomBytes=="function")return Uint8Array.from(ma.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const R5=BigInt(0),wo=BigInt(1),H5=BigInt(2),$5=BigInt(7),G5=BigInt(256),j5=BigInt(113),dm=[],fm=[],pm=[];for(let e=0,t=wo,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],dm.push(2*(5*n+r)),fm.push((e+1)*(e+2)/2%64);let s=R5;for(let a=0;a<7;a++)t=(t<<wo^(t>>$5)*j5)%G5,t&H5&&(s^=wo<<(wo<<BigInt(a))-wo);pm.push(s)}const hm=om(pm,!0),V5=hm[0],W5=hm[1],mm=(e,t,r)=>r>32?E5(e,t,r):v5(e,t,r),bm=(e,t,r)=>r>32?C5(e,t,r):k5(e,t,r);function q5(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let o=0;o<10;o++)r[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(let o=0;o<10;o+=2){const i=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],d=mm(l,u,1)^r[i],p=bm(l,u,1)^r[i+1];for(let h=0;h<50;h+=10)e[o+h]^=d,e[o+h+1]^=p}let s=e[2],a=e[3];for(let o=0;o<24;o++){const i=fm[o],c=mm(s,a,i),l=bm(s,a,i),u=dm[o];s=e[u],a=e[u+1],e[u]=c,e[u+1]=l}for(let o=0;o<50;o+=10){for(let i=0;i<10;i++)r[i]=e[o+i];for(let i=0;i<10;i++)e[o+i]^=~r[(i+2)%10]&r[(i+4)%10]}e[0]^=V5[n],e[1]^=W5[n]}Hn(r)}class qu extends Wu{constructor(t,r,n,s=!1,a=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=s,this.rounds=a,xo(n),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=M5(this.state)}clone(){return this._cloneInto()}keccak(){um(this.state32),q5(this.state32,this.rounds),um(this.state32),this.posOut=0,this.pos=0}update(t){ba(this),t=wc(t),ws(t);const{blockLen:r,state:n}=this,s=t.length;for(let a=0;a<s;){const o=Math.min(r-this.pos,s-a);for(let i=0;i<o;i++)n[this.pos++]^=t[a++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:r,pos:n,blockLen:s}=this;t[n]^=r,(r&128)!==0&&n===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){ba(this,!1),ws(t),this.finish();const r=this.state,{blockLen:n}=this;for(let s=0,a=t.length;s<a;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,a-s);t.set(r.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return xo(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(lm(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,Hn(this.state)}_cloneInto(t){const{blockLen:r,suffix:n,outputLen:s,rounds:a,enableXOF:o}=this;return t||(t=new qu(r,n,s,o,a)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=a,t.suffix=n,t.outputLen=s,t.enableXOF=o,t.destroyed=this.destroyed,t}}const Y5=(e,t,r)=>vc(()=>new qu(t,e,r)),ym=Y5(1,136,256/8);function At(e,t){const r=t||"hex",n=ym(Cr(e,{strict:!1})?un(e):e);return r==="bytes"?n:Oe(n)}const K5=e=>At(un(e));function Z5(e){return K5(e)}function X5(e){let t=!0,r="",n=0,s="",a=!1;for(let o=0;o<e.length;o++){const i=e[o];if(["(",")",","].includes(i)&&(t=!0),i==="("&&n++,i===")"&&n--,!!t){if(n===0){if(i===" "&&["event","function",""].includes(s))s="";else if(s+=i,i===")"){a=!0;break}continue}if(i===" "){e[o-1]!==","&&r!==","&&r!==",("&&(r="",t=!1);continue}s+=i,r+=i}}if(!a)throw new $("Unable to normalize signature.");return s}const Q5=e=>{const t=typeof e=="string"?e:pc(e);return X5(t)};function gm(e){return Z5(Q5(e))}const kc=gm;let wt=class extends ${constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}},ya=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const r=super.get(t);return super.has(t)&&r!==void 0&&(this.delete(t),super.set(t,r)),r}set(t,r){if(super.set(t,r),this.maxSize&&this.size>this.maxSize){const n=this.keys().next().value;n&&this.delete(n)}return this}};const Yu=new ya(8192);function vo(e,t){if(Yu.has(`${e}.${t}`))return Yu.get(`${e}.${t}`);const r=e.substring(2).toLowerCase(),n=At(xs(r),"bytes"),s=r.split("");for(let o=0;o<40;o+=2)n[o>>1]>>4>=8&&s[o]&&(s[o]=s[o].toUpperCase()),(n[o>>1]&15)>=8&&s[o+1]&&(s[o+1]=s[o+1].toUpperCase());const a=`0x${s.join("")}`;return Yu.set(`${e}.${t}`,a),a}function Ku(e,t){if(!rt(e,{strict:!1}))throw new wt({address:e});return vo(e,t)}const J5=/^0x[a-fA-F0-9]{40}$/,Zu=new ya(8192);function rt(e,t){const{strict:r=!0}=t??{},n=`${e}.${r}`;if(Zu.has(n))return Zu.get(n);const s=J5.test(e)?e.toLowerCase()===e?!0:r?vo(e)===e:!0:!1;return Zu.set(n,s),s}function tr(e){return typeof e[0]=="string"?rr(e):ev(e)}function ev(e){let t=0;for(const s of e)t+=s.length;const r=new Uint8Array(t);let n=0;for(const s of e)r.set(s,n),n+=s.length;return r}function rr(e){return`0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}function vs(e,t,r,{strict:n}={}){return Cr(e,{strict:!1})?Xu(e,t,r,{strict:n}):vm(e,t,r,{strict:n})}function xm(e,t){if(typeof t=="number"&&t>0&&t>it(e)-1)throw new Jh({offset:t,position:"start",size:it(e)})}function wm(e,t,r){if(typeof t=="number"&&typeof r=="number"&&it(e)!==r-t)throw new Jh({offset:r,position:"end",size:it(e)})}function vm(e,t,r,{strict:n}={}){xm(e,t);const s=e.slice(t,r);return n&&wm(s,t,r),s}function Xu(e,t,r,{strict:n}={}){xm(e,t);const s=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&wm(s,t,r),s}const tv=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,km=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function $n(e,t){if(e.length!==t.length)throw new Jw({expectedLength:e.length,givenLength:t.length});const r=rv({params:e,values:t}),n=Ju(r);return n.length===0?"0x":n}function rv({params:e,values:t}){const r=[];for(let n=0;n<e.length;n++)r.push(Qu({param:e[n],value:t[n]}));return r}function Qu({param:e,value:t}){const r=ed(e.type);if(r){const[n,s]=r;return sv(t,{length:n,param:{...e,type:s}})}if(e.type==="tuple")return lv(t,{param:e});if(e.type==="address")return nv(t);if(e.type==="bool")return ov(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const n=e.type.startsWith("int"),[,,s="256"]=km.exec(e.type)??[];return iv(t,{signed:n,size:Number(s)})}if(e.type.startsWith("bytes"))return av(t,{param:e});if(e.type==="string")return cv(t);throw new o5(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function Ju(e){let t=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?t+=32:t+=it(i)}const r=[],n=[];let s=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?(r.push(W(t+s,{size:32})),n.push(i),s+=it(i)):r.push(i)}return tr([...r,...n])}function nv(e){if(!rt(e))throw new wt({address:e});return{dynamic:!1,encoded:Rn(e.toLowerCase())}}function sv(e,{length:t,param:r}){const n=t===null;if(!Array.isArray(e))throw new Qh(e);if(!n&&e.length!==t)throw new Xw({expectedLength:t,givenLength:e.length,type:`${r.type}[${t}]`});let s=!1;const a=[];for(let o=0;o<e.length;o++){const i=Qu({param:r,value:e[o]});i.dynamic&&(s=!0),a.push(i)}if(n||s){const o=Ju(a);if(n){const i=W(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?tr([i,o]):i}}if(s)return{dynamic:!0,encoded:o}}return{dynamic:!1,encoded:tr(a.map(({encoded:o})=>o))}}function av(e,{param:t}){const[,r]=t.type.split("bytes"),n=it(e);if(!r){let s=e;return n%32!==0&&(s=Rn(s,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:tr([Rn(W(n,{size:32})),s])}}if(n!==Number.parseInt(r,10))throw new Qw({expectedSize:Number.parseInt(r,10),value:e});return{dynamic:!1,encoded:Rn(e,{dir:"right"})}}function ov(e){if(typeof e!="boolean")throw new $(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Rn(nm(e))}}function iv(e,{signed:t,size:r=256}){if(typeof r=="number"){const n=2n**(BigInt(r)-(t?1n:0n))-1n,s=t?-n-1n:0n;if(e>n||e<s)throw new rm({max:n.toString(),min:s.toString(),signed:t,size:r/8,value:e.toString()})}return{dynamic:!1,encoded:W(e,{size:32,signed:t})}}function cv(e){const t=fa(e),r=Math.ceil(it(t)/32),n=[];for(let s=0;s<r;s++)n.push(Rn(vs(t,s*32,(s+1)*32),{dir:"right"}));return{dynamic:!0,encoded:tr([Rn(W(it(t),{size:32})),...n])}}function lv(e,{param:t}){let r=!1;const n=[];for(let s=0;s<t.components.length;s++){const a=t.components[s],o=Array.isArray(e)?s:a.name,i=Qu({param:a,value:e[o]});n.push(i),i.dynamic&&(r=!0)}return{dynamic:r,encoded:r?Ju(n):tr(n.map(({encoded:s})=>s))}}function ed(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}const ko=e=>vs(gm(e),0,4);function ks(e){const{abi:t,args:r=[],name:n}=e,s=Cr(n,{strict:!1}),a=t.filter(i=>s?i.type==="function"?ko(i)===n:i.type==="event"?kc(i)===n:!1:"name"in i&&i.name===n);if(a.length===0)return;if(a.length===1)return a[0];let o;for(const i of a){if(!("inputs"in i))continue;if(!r||r.length===0){if(!i.inputs||i.inputs.length===0)return i;continue}if(!i.inputs||i.inputs.length===0||i.inputs.length!==r.length)continue;if(r.every((l,u)=>{const d="inputs"in i&&i.inputs[u];return d?td(l,d):!1})){if(o&&"inputs"in o&&o.inputs){const l=Em(i.inputs,o.inputs,r);if(l)throw new s5({abiItem:i,type:l[0]},{abiItem:o,type:l[1]})}o=i}}return o||a[0]}function td(e,t){const r=typeof e,n=t.type;switch(n){case"address":return rt(e,{strict:!1});case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in t?Object.values(t.components).every((s,a)=>td(Object.values(e)[a],s)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(e)&&e.every(s=>td(s,{...t,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function Em(e,t,r){for(const n in e){const s=e[n],a=t[n];if(s.type==="tuple"&&a.type==="tuple"&&"components"in s&&"components"in a)return Em(s.components,a.components,r[n]);const o=[s.type,a.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")?rt(r[n],{strict:!1}):o.includes("address")&&o.includes("bytes")?rt(r[n],{strict:!1}):!1)return o}}const Cm="/docs/contract/encodeEventTopics";function Eo(e){var c;const{abi:t,eventName:r,args:n}=e;let s=t[0];if(r){const l=ks({abi:t,name:r});if(!l)throw new Zh(r,{docsPath:Cm});s=l}if(s.type!=="event")throw new Zh(void 0,{docsPath:Cm});const a=Er(s),o=kc(a);let i=[];if(n&&"inputs"in s){const l=(c=s.inputs)==null?void 0:c.filter(d=>"indexed"in d&&d.indexed),u=Array.isArray(n)?n:Object.values(n).length>0?(l==null?void 0:l.map(d=>n[d.name]))??[]:[];u.length>0&&(i=(l==null?void 0:l.map((d,p)=>Array.isArray(u[p])?u[p].map((h,y)=>Tm({param:d,value:u[p][y]})):typeof u[p]<"u"&&u[p]!==null?Tm({param:d,value:u[p]}):null))??[])}return[o,...i]}function Tm({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return At(un(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new l5(e.type);return $n([e],[t])}function Ec(e,{method:t}){var n,s;const r={};return e.transport.type==="fallback"&&((s=(n=e.transport).onResponse)==null||s.call(n,({method:a,response:o,status:i,transport:c})=>{i==="success"&&t===a&&(r[o]=c.request)})),(a=>r[a]||e.request)}async function Sm(e,t){const{address:r,abi:n,args:s,eventName:a,fromBlock:o,strict:i,toBlock:c}=t,l=Ec(e,{method:"eth_newFilter"}),u=a?Eo({abi:n,args:s,eventName:a}):void 0,d=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:typeof o=="bigint"?W(o):o,toBlock:typeof c=="bigint"?W(c):c,topics:u}]});return{abi:n,args:s,eventName:a,id:d,request:l(d),strict:!!i,type:"event"}}function Ke(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}const Am="/docs/contract/encodeFunctionData";function uv(e){const{abi:t,args:r,functionName:n}=e;let s=t[0];if(n){const a=ks({abi:t,args:r,name:n});if(!a)throw new da(n,{docsPath:Am});s=a}if(s.type!=="function")throw new da(void 0,{docsPath:Am});return{abi:[s],functionName:ko(Er(s))}}function nr(e){const{args:t}=e,{abi:r,functionName:n}=(()=>{var i;return e.abi.length===1&&((i=e.functionName)!=null&&i.startsWith("0x"))?e:uv(e)})(),s=r[0],a=n,o="inputs"in s&&s.inputs?$n(s.inputs,t??[]):void 0;return rr([a,o??"0x"])}const dv={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},Pm={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},fv={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};let Im=class extends ${constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}},Um=class extends ${constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}},pv=class extends ${constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}};const hv={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 pv({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new Um({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Im({offset:e});const 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 Im({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const 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,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function rd(e,{recursiveReadLimit:t=8192}={}){const r=Object.create(hv);return r.bytes=e,r.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}function mv(e,t={}){typeof t.size<"u"&&Tr(e,{size:t.size});const r=bt(e,t);return ze(r,t)}function bv(e,t={}){let r=e;if(typeof t.size<"u"&&(Tr(r,{size:t.size}),r=$t(r)),r.length>1||r[0]>1)throw new d5(r);return!!r[0]}function pn(e,t={}){typeof t.size<"u"&&Tr(e,{size:t.size});const r=bt(e,t);return Jt(r,t)}function yv(e,t={}){let r=e;return typeof t.size<"u"&&(Tr(r,{size:t.size}),r=$t(r,{dir:"right"})),new TextDecoder().decode(r)}function Co(e,t){const r=typeof t=="string"?er(t):t,n=rd(r);if(it(r)===0&&e.length>0)throw new go;if(it(t)&&it(t)<32)throw new qh({data:typeof t=="string"?t:bt(t),params:e,size:it(t)});let s=0;const a=[];for(let o=0;o<e.length;++o){const i=e[o];n.setPosition(s);const[c,l]=ga(n,i,{staticPosition:0});s+=l,a.push(c)}return a}function ga(e,t,{staticPosition:r}){const n=ed(t.type);if(n){const[s,a]=n;return xv(e,{...t,type:a},{length:s,staticPosition:r})}if(t.type==="tuple")return Ev(e,t,{staticPosition:r});if(t.type==="address")return gv(e);if(t.type==="bool")return wv(e);if(t.type.startsWith("bytes"))return vv(e,t,{staticPosition:r});if(t.type.startsWith("uint")||t.type.startsWith("int"))return kv(e,t);if(t.type==="string")return Cv(e,{staticPosition:r});throw new i5(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const Om=32,nd=32;function gv(e){const t=e.readBytes(32);return[vo(bt(vm(t,-20))),32]}function xv(e,t,{length:r,staticPosition:n}){if(!r){const o=pn(e.readBytes(nd)),i=n+o,c=i+Om;e.setPosition(i);const l=pn(e.readBytes(Om)),u=To(t);let d=0;const p=[];for(let h=0;h<l;++h){e.setPosition(c+(u?h*32:d));const[y,g]=ga(e,t,{staticPosition:c});d+=g,p.push(y)}return e.setPosition(n+32),[p,32]}if(To(t)){const o=pn(e.readBytes(nd)),i=n+o,c=[];for(let l=0;l<r;++l){e.setPosition(i+l*32);const[u]=ga(e,t,{staticPosition:i});c.push(u)}return e.setPosition(n+32),[c,32]}let s=0;const a=[];for(let o=0;o<r;++o){const[i,c]=ga(e,t,{staticPosition:n+s});s+=c,a.push(i)}return[a,s]}function wv(e){return[bv(e.readBytes(32),{size:32}),32]}function vv(e,t,{staticPosition:r}){const[n,s]=t.type.split("bytes");if(!s){const o=pn(e.readBytes(32));e.setPosition(r+o);const i=pn(e.readBytes(32));if(i===0)return e.setPosition(r+32),["0x",32];const c=e.readBytes(i);return e.setPosition(r+32),[bt(c),32]}return[bt(e.readBytes(Number.parseInt(s,10),32)),32]}function kv(e,t){const r=t.type.startsWith("int"),n=Number.parseInt(t.type.split("int")[1]||"256",10),s=e.readBytes(32);return[n>48?mv(s,{signed:r}):pn(s,{signed:r}),32]}function Ev(e,t,{staticPosition:r}){const n=t.components.length===0||t.components.some(({name:o})=>!o),s=n?[]:{};let a=0;if(To(t)){const o=pn(e.readBytes(nd)),i=r+o;for(let c=0;c<t.components.length;++c){const l=t.components[c];e.setPosition(i+a);const[u,d]=ga(e,l,{staticPosition:i});a+=d,s[n?c:l==null?void 0:l.name]=u}return e.setPosition(r+32),[s,32]}for(let o=0;o<t.components.length;++o){const i=t.components[o],[c,l]=ga(e,i,{staticPosition:r});s[n?o:i==null?void 0:i.name]=c,a+=l}return[s,a]}function Cv(e,{staticPosition:t}){const r=pn(e.readBytes(32)),n=t+r;e.setPosition(n);const s=pn(e.readBytes(32));if(s===0)return e.setPosition(t+32),["",32];const a=e.readBytes(s,32),o=yv($t(a));return e.setPosition(t+32),[o,32]}function To(e){var n;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(n=e.components)==null?void 0:n.some(To);const r=ed(e.type);return!!(r&&To({...e,type:r[1]}))}function Bm(e){const{abi:t,data:r}=e,n=vs(r,0,4);if(n==="0x")throw new go;const a=[...t||[],Pm,fv].find(o=>o.type==="error"&&n===ko(Er(o)));if(!a)throw new Kh(n,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:a,args:"inputs"in a&&a.inputs&&a.inputs.length>0?Co(a.inputs,vs(r,4)):void 0,errorName:a.name}}const dt=(e,t,r)=>JSON.stringify(e,(n,s)=>typeof s=="bigint"?s.toString():s,r);function Mm({abiItem:e,args:t,includeFunctionName:r=!0,includeName:n=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${r?e.name:""}(${e.inputs.map((s,a)=>`${n&&s.name?`${s.name}: `:""}${typeof t[a]=="object"?dt(t[a]):t[a]}`).join(", ")})`}const Tv={gwei:9,wei:18},Sv={ether:-9,wei:9};function _m(e,t){let r=e.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[s,a]=[r.slice(0,r.length-t),r.slice(r.length-t)];return a=a.replace(/(0+)$/,""),`${n?"-":""}${s||"0"}${a?`.${a}`:""}`}function sd(e,t="wei"){return _m(e,Tv[t])}function Gt(e,t="wei"){return _m(e,Sv[t])}class Av extends ${constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}class Pv extends ${constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function Dm(e){return e.reduce((t,{slot:r,value:n})=>`${t} ${r}: ${n}
|
|
23
|
-
`,"")}function
|
|
14
|
+
`),{docsPath:r,name:"AbiFunctionNotFoundError"})}}class jh extends ${constructor(t,{docsPath:r}){super([`Function "${t}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(`
|
|
15
|
+
`),{docsPath:r,name:"AbiFunctionOutputsNotFoundError"})}}class Hw extends ${constructor(t,{docsPath:r}){super([`Encoded function signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${t}.`].join(`
|
|
16
|
+
`),{docsPath:r,name:"AbiFunctionSignatureNotFoundError"})}}class $w extends ${constructor(t,r){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${Er(t.abiItem)}\`, and`,`\`${r.type}\` in \`${Er(r.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}let Gw=class extends ${constructor({expectedSize:t,givenSize:r}){super(`Expected bytes${t}, got bytes${r}.`,{name:"BytesSizeMismatchError"})}};class mc extends ${constructor({abiItem:t,data:r,params:n,size:s}){super([`Data size of ${s} bytes is too small for non-indexed event parameters.`].join(`
|
|
17
|
+
`),{metaMessages:[`Params: (${hc(n,{includeName:!0})})`,`Data: ${r} (${s} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t,this.data=r,this.params=n,this.size=s}}class ju extends ${constructor({abiItem:t,param:r}){super([`Expected a topic for indexed event parameter${r.name?` "${r.name}"`:""} on event "${Er(t,{includeName:!0})}".`].join(`
|
|
18
|
+
`),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t}}class jw extends ${constructor(t,{docsPath:r}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
|
|
19
|
+
`),{docsPath:r,name:"InvalidAbiEncodingType"})}}class Vw extends ${constructor(t,{docsPath:r}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
|
|
20
|
+
`),{docsPath:r,name:"InvalidAbiDecodingType"})}}let Vh=class extends ${constructor(t){super([`Value "${t}" is not a valid array.`].join(`
|
|
21
|
+
`),{name:"InvalidArrayError"})}};class Ww extends ${constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
|
|
22
|
+
`),{name:"InvalidDefinitionTypeError"})}}class qw extends ${constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}let Wh=class extends ${constructor({offset:t,position:r,size:n}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}},qh=class extends ${constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${t}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"})}};class Yh extends ${constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} is expected to be ${r} ${n} long, but is ${t} ${n} long.`,{name:"InvalidBytesLengthError"})}}function gs(e,{dir:t,size:r=32}={}){return typeof e=="string"?Ln(e,{dir:t,size:r}):Yw(e,{dir:t,size:r})}function Ln(e,{dir:t,size:r=32}={}){if(r===null)return e;const n=e.replace("0x","");if(n.length>r*2)throw new qh({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[t==="right"?"padEnd":"padStart"](r*2,"0")}`}function Yw(e,{dir:t,size:r=32}={}){if(r===null)return e;if(e.length>r)throw new qh({size:e.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let s=0;s<r;s++){const a=t==="right";n[a?s:r-s-1]=e[a?s:e.length-s-1]}return n}let Kh=class extends ${constructor({max:t,min:r,signed:n,size:s,value:a}){super(`Number "${a}" is not in safe ${s?`${s*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${t?`(${r} to ${t})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}},Kw=class extends ${constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}};class Zw extends ${constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}let Xw=class extends ${constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}};function $t(e,{dir:t="left"}={}){let r=typeof e=="string"?e.replace("0x",""):e,n=0;for(let s=0;s<r.length-1&&r[t==="left"?s:r.length-s-1].toString()==="0";s++)n++;return r=t==="left"?r.slice(n):r.slice(0,r.length-n),typeof e=="string"?(r.length===1&&t==="right"&&(r=`${r}0`),`0x${r.length%2===1?`0${r}`:r}`):r}function Tr(e,{size:t}){if(it(e)>t)throw new Xw({givenSize:it(e),maxSize:t})}function Ne(e,t={}){const{signed:r}=t;t.size&&Tr(e,{size:t.size});const n=BigInt(e);if(!r)return n;const s=(e.length-2)/2,a=(1n<<BigInt(s)*8n-1n)-1n;return n<=a?n:n-BigInt(`0x${"f".padStart(s*2,"f")}`)-1n}function Qw(e,t={}){let r=e;if(t.size&&(Tr(r,{size:t.size}),r=$t(r)),$t(r)==="0x00")return!1;if($t(r)==="0x01")return!0;throw new Zw(r)}function Jt(e,t={}){return Number(Ne(e,t))}const Jw=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Be(e,t={}){return typeof e=="number"||typeof e=="bigint"?W(e,t):typeof e=="string"?fa(e,t):typeof e=="boolean"?Zh(e,t):bt(e,t)}function Zh(e,t={}){const r=`0x${Number(e)}`;return typeof t.size=="number"?(Tr(r,{size:t.size}),gs(r,{size:t.size})):r}function bt(e,t={}){let r="";for(let s=0;s<e.length;s++)r+=Jw[e[s]];const n=`0x${r}`;return typeof t.size=="number"?(Tr(n,{size:t.size}),gs(n,{dir:"right",size:t.size})):n}function W(e,t={}){const{signed:r,size:n}=t,s=BigInt(e);let a;n?r?a=(1n<<BigInt(n)*8n-1n)-1n:a=2n**(BigInt(n)*8n)-1n:typeof e=="number"&&(a=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof a=="bigint"&&r?-a-1n:0;if(a&&s>a||s<o){const c=typeof e=="bigint"?"n":"";throw new Kh({max:a?`${a}${c}`:void 0,min:`${o}${c}`,signed:r,size:n,value:`${e}${c}`})}const i=`0x${(r&&s<0?(1n<<BigInt(n*8))+BigInt(s):s).toString(16)}`;return n?gs(i,{size:n}):i}const e5=new TextEncoder;function fa(e,t={}){const r=e5.encode(e);return bt(r,t)}const t5=new TextEncoder;function un(e,t={}){return typeof e=="number"||typeof e=="bigint"?n5(e,t):typeof e=="boolean"?r5(e,t):Cr(e)?er(e,t):xs(e,t)}function r5(e,t={}){const r=new Uint8Array(1);return r[0]=Number(e),typeof t.size=="number"?(Tr(r,{size:t.size}),gs(r,{size:t.size})):r}const dn={zero:48,nine:57,A:65,F:70,a:97,f:102};function Xh(e){if(e>=dn.zero&&e<=dn.nine)return e-dn.zero;if(e>=dn.A&&e<=dn.F)return e-(dn.A-10);if(e>=dn.a&&e<=dn.f)return e-(dn.a-10)}function er(e,t={}){let r=e;t.size&&(Tr(r,{size:t.size}),r=gs(r,{dir:"right",size:t.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);const s=n.length/2,a=new Uint8Array(s);for(let o=0,i=0;o<s;o++){const c=Xh(n.charCodeAt(i++)),l=Xh(n.charCodeAt(i++));if(c===void 0||l===void 0)throw new $(`Invalid byte sequence ("${n[i-2]}${n[i-1]}" in "${n}").`);a[o]=c*16+l}return a}function n5(e,t){const r=W(e,t);return er(r)}function xs(e,t={}){const r=t5.encode(e);return typeof t.size=="number"?(Tr(r,{size:t.size}),gs(r,{dir:"right",size:t.size})):r}const bc=BigInt(2**32-1),Qh=BigInt(32);function s5(e,t=!1){return t?{h:Number(e&bc),l:Number(e>>Qh&bc)}:{h:Number(e>>Qh&bc)|0,l:Number(e&bc)|0}}function Jh(e,t=!1){const r=e.length;let n=new Uint32Array(r),s=new Uint32Array(r);for(let a=0;a<r;a++){const{h:o,l:i}=s5(e[a],t);[n[a],s[a]]=[o,i]}return[n,s]}const em=(e,t,r)=>e>>>r,tm=(e,t,r)=>e<<32-r|t>>>r,pa=(e,t,r)=>e>>>r|t<<32-r,ha=(e,t,r)=>e<<32-r|t>>>r,yc=(e,t,r)=>e<<64-r|t>>>r-32,gc=(e,t,r)=>e>>>r-32|t<<64-r,a5=(e,t,r)=>e<<r|t>>>32-r,o5=(e,t,r)=>t<<r|e>>>32-r,i5=(e,t,r)=>t<<r-32|e>>>64-r,c5=(e,t,r)=>e<<r-32|t>>>64-r;function fn(e,t,r,n){const s=(t>>>0)+(n>>>0);return{h:e+r+(s/2**32|0)|0,l:s|0}}const l5=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),u5=(e,t,r,n)=>t+r+n+(e/2**32|0)|0,d5=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),f5=(e,t,r,n,s)=>t+r+n+s+(e/2**32|0)|0,p5=(e,t,r,n,s)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(s>>>0),h5=(e,t,r,n,s,a)=>t+r+n+s+a+(e/2**32|0)|0,ma=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function m5(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function go(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function ws(e,...t){if(!m5(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function b5(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");go(e.outputLen),go(e.blockLen)}function ba(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function rm(e,t){ws(e);const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function y5(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Rn(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Vu(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function $r(e,t){return e<<32-t|e>>>t}const g5=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function x5(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function w5(e){for(let t=0;t<e.length;t++)e[t]=x5(e[t]);return e}const nm=g5?e=>e:w5;function v5(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function xc(e){return typeof e=="string"&&(e=v5(e)),ws(e),e}function k5(...e){let t=0;for(let n=0;n<e.length;n++){const s=e[n];ws(s),t+=s.length}const r=new Uint8Array(t);for(let n=0,s=0;n<e.length;n++){const a=e[n];r.set(a,s),s+=a.length}return r}class Wu{}function wc(e){const t=n=>e().update(xc(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function E5(e=32){if(ma&&typeof ma.getRandomValues=="function")return ma.getRandomValues(new Uint8Array(e));if(ma&&typeof ma.randomBytes=="function")return Uint8Array.from(ma.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const C5=BigInt(0),xo=BigInt(1),T5=BigInt(2),S5=BigInt(7),A5=BigInt(256),P5=BigInt(113),sm=[],am=[],om=[];for(let e=0,t=xo,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],sm.push(2*(5*n+r)),am.push((e+1)*(e+2)/2%64);let s=C5;for(let a=0;a<7;a++)t=(t<<xo^(t>>S5)*P5)%A5,t&T5&&(s^=xo<<(xo<<BigInt(a))-xo);om.push(s)}const im=Jh(om,!0),I5=im[0],O5=im[1],cm=(e,t,r)=>r>32?i5(e,t,r):a5(e,t,r),lm=(e,t,r)=>r>32?c5(e,t,r):o5(e,t,r);function B5(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let o=0;o<10;o++)r[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(let o=0;o<10;o+=2){const i=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],d=cm(l,u,1)^r[i],p=lm(l,u,1)^r[i+1];for(let h=0;h<50;h+=10)e[o+h]^=d,e[o+h+1]^=p}let s=e[2],a=e[3];for(let o=0;o<24;o++){const i=am[o],c=cm(s,a,i),l=lm(s,a,i),u=sm[o];s=e[u],a=e[u+1],e[u]=c,e[u+1]=l}for(let o=0;o<50;o+=10){for(let i=0;i<10;i++)r[i]=e[o+i];for(let i=0;i<10;i++)e[o+i]^=~r[(i+2)%10]&r[(i+4)%10]}e[0]^=I5[n],e[1]^=O5[n]}Rn(r)}class qu extends Wu{constructor(t,r,n,s=!1,a=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=s,this.rounds=a,go(n),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=y5(this.state)}clone(){return this._cloneInto()}keccak(){nm(this.state32),B5(this.state32,this.rounds),nm(this.state32),this.posOut=0,this.pos=0}update(t){ba(this),t=xc(t),ws(t);const{blockLen:r,state:n}=this,s=t.length;for(let a=0;a<s;){const o=Math.min(r-this.pos,s-a);for(let i=0;i<o;i++)n[this.pos++]^=t[a++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:r,pos:n,blockLen:s}=this;t[n]^=r,(r&128)!==0&&n===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){ba(this,!1),ws(t),this.finish();const r=this.state,{blockLen:n}=this;for(let s=0,a=t.length;s<a;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,a-s);t.set(r.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return go(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(rm(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,Rn(this.state)}_cloneInto(t){const{blockLen:r,suffix:n,outputLen:s,rounds:a,enableXOF:o}=this;return t||(t=new qu(r,n,s,o,a)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=a,t.suffix=n,t.outputLen=s,t.enableXOF=o,t.destroyed=this.destroyed,t}}const M5=(e,t,r)=>wc(()=>new qu(t,e,r)),um=M5(1,136,256/8);function At(e,t){const r=t||"hex",n=um(Cr(e,{strict:!1})?un(e):e);return r==="bytes"?n:Be(n)}const _5=e=>At(un(e));function U5(e){return _5(e)}function D5(e){let t=!0,r="",n=0,s="",a=!1;for(let o=0;o<e.length;o++){const i=e[o];if(["(",")",","].includes(i)&&(t=!0),i==="("&&n++,i===")"&&n--,!!t){if(n===0){if(i===" "&&["event","function",""].includes(s))s="";else if(s+=i,i===")"){a=!0;break}continue}if(i===" "){e[o-1]!==","&&r!==","&&r!==",("&&(r="",t=!1);continue}s+=i,r+=i}}if(!a)throw new $("Unable to normalize signature.");return s}const F5=e=>{const t=typeof e=="string"?e:fc(e);return D5(t)};function dm(e){return U5(F5(e))}const vc=dm;let xt=class extends ${constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}},ya=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const r=super.get(t);return super.has(t)&&r!==void 0&&(this.delete(t),super.set(t,r)),r}set(t,r){if(super.set(t,r),this.maxSize&&this.size>this.maxSize){const n=this.keys().next().value;n&&this.delete(n)}return this}};const Yu=new ya(8192);function wo(e,t){if(Yu.has(`${e}.${t}`))return Yu.get(`${e}.${t}`);const r=e.substring(2).toLowerCase(),n=At(xs(r),"bytes"),s=r.split("");for(let o=0;o<40;o+=2)n[o>>1]>>4>=8&&s[o]&&(s[o]=s[o].toUpperCase()),(n[o>>1]&15)>=8&&s[o+1]&&(s[o+1]=s[o+1].toUpperCase());const a=`0x${s.join("")}`;return Yu.set(`${e}.${t}`,a),a}function Ku(e,t){if(!rt(e,{strict:!1}))throw new xt({address:e});return wo(e,t)}const N5=/^0x[a-fA-F0-9]{40}$/,Zu=new ya(8192);function rt(e,t){const{strict:r=!0}=t??{},n=`${e}.${r}`;if(Zu.has(n))return Zu.get(n);const s=N5.test(e)?e.toLowerCase()===e?!0:r?wo(e)===e:!0:!1;return Zu.set(n,s),s}function tr(e){return typeof e[0]=="string"?rr(e):z5(e)}function z5(e){let t=0;for(const s of e)t+=s.length;const r=new Uint8Array(t);let n=0;for(const s of e)r.set(s,n),n+=s.length;return r}function rr(e){return`0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}function vs(e,t,r,{strict:n}={}){return Cr(e,{strict:!1})?Xu(e,t,r,{strict:n}):hm(e,t,r,{strict:n})}function fm(e,t){if(typeof t=="number"&&t>0&&t>it(e)-1)throw new Wh({offset:t,position:"start",size:it(e)})}function pm(e,t,r){if(typeof t=="number"&&typeof r=="number"&&it(e)!==r-t)throw new Wh({offset:r,position:"end",size:it(e)})}function hm(e,t,r,{strict:n}={}){fm(e,t);const s=e.slice(t,r);return n&&pm(s,t,r),s}function Xu(e,t,r,{strict:n}={}){fm(e,t);const s=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&pm(s,t,r),s}const L5=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,mm=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function Hn(e,t){if(e.length!==t.length)throw new Nw({expectedLength:e.length,givenLength:t.length});const r=R5({params:e,values:t}),n=Ju(r);return n.length===0?"0x":n}function R5({params:e,values:t}){const r=[];for(let n=0;n<e.length;n++)r.push(Qu({param:e[n],value:t[n]}));return r}function Qu({param:e,value:t}){const r=ed(e.type);if(r){const[n,s]=r;return $5(t,{length:n,param:{...e,type:s}})}if(e.type==="tuple")return q5(t,{param:e});if(e.type==="address")return H5(t);if(e.type==="bool")return j5(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const n=e.type.startsWith("int"),[,,s="256"]=mm.exec(e.type)??[];return V5(t,{signed:n,size:Number(s)})}if(e.type.startsWith("bytes"))return G5(t,{param:e});if(e.type==="string")return W5(t);throw new jw(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function Ju(e){let t=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?t+=32:t+=it(i)}const r=[],n=[];let s=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?(r.push(W(t+s,{size:32})),n.push(i),s+=it(i)):r.push(i)}return tr([...r,...n])}function H5(e){if(!rt(e))throw new xt({address:e});return{dynamic:!1,encoded:Ln(e.toLowerCase())}}function $5(e,{length:t,param:r}){const n=t===null;if(!Array.isArray(e))throw new Vh(e);if(!n&&e.length!==t)throw new Dw({expectedLength:t,givenLength:e.length,type:`${r.type}[${t}]`});let s=!1;const a=[];for(let o=0;o<e.length;o++){const i=Qu({param:r,value:e[o]});i.dynamic&&(s=!0),a.push(i)}if(n||s){const o=Ju(a);if(n){const i=W(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?tr([i,o]):i}}if(s)return{dynamic:!0,encoded:o}}return{dynamic:!1,encoded:tr(a.map(({encoded:o})=>o))}}function G5(e,{param:t}){const[,r]=t.type.split("bytes"),n=it(e);if(!r){let s=e;return n%32!==0&&(s=Ln(s,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:tr([Ln(W(n,{size:32})),s])}}if(n!==Number.parseInt(r,10))throw new Fw({expectedSize:Number.parseInt(r,10),value:e});return{dynamic:!1,encoded:Ln(e,{dir:"right"})}}function j5(e){if(typeof e!="boolean")throw new $(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Ln(Zh(e))}}function V5(e,{signed:t,size:r=256}){if(typeof r=="number"){const n=2n**(BigInt(r)-(t?1n:0n))-1n,s=t?-n-1n:0n;if(e>n||e<s)throw new Kh({max:n.toString(),min:s.toString(),signed:t,size:r/8,value:e.toString()})}return{dynamic:!1,encoded:W(e,{size:32,signed:t})}}function W5(e){const t=fa(e),r=Math.ceil(it(t)/32),n=[];for(let s=0;s<r;s++)n.push(Ln(vs(t,s*32,(s+1)*32),{dir:"right"}));return{dynamic:!0,encoded:tr([Ln(W(it(t),{size:32})),...n])}}function q5(e,{param:t}){let r=!1;const n=[];for(let s=0;s<t.components.length;s++){const a=t.components[s],o=Array.isArray(e)?s:a.name,i=Qu({param:a,value:e[o]});n.push(i),i.dynamic&&(r=!0)}return{dynamic:r,encoded:r?Ju(n):tr(n.map(({encoded:s})=>s))}}function ed(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}const vo=e=>vs(dm(e),0,4);function ks(e){const{abi:t,args:r=[],name:n}=e,s=Cr(n,{strict:!1}),a=t.filter(i=>s?i.type==="function"?vo(i)===n:i.type==="event"?vc(i)===n:!1:"name"in i&&i.name===n);if(a.length===0)return;if(a.length===1)return a[0];let o;for(const i of a){if(!("inputs"in i))continue;if(!r||r.length===0){if(!i.inputs||i.inputs.length===0)return i;continue}if(!i.inputs||i.inputs.length===0||i.inputs.length!==r.length)continue;if(r.every((l,u)=>{const d="inputs"in i&&i.inputs[u];return d?td(l,d):!1})){if(o&&"inputs"in o&&o.inputs){const l=bm(i.inputs,o.inputs,r);if(l)throw new $w({abiItem:i,type:l[0]},{abiItem:o,type:l[1]})}o=i}}return o||a[0]}function td(e,t){const r=typeof e,n=t.type;switch(n){case"address":return rt(e,{strict:!1});case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in t?Object.values(t.components).every((s,a)=>td(Object.values(e)[a],s)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(e)&&e.every(s=>td(s,{...t,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function bm(e,t,r){for(const n in e){const s=e[n],a=t[n];if(s.type==="tuple"&&a.type==="tuple"&&"components"in s&&"components"in a)return bm(s.components,a.components,r[n]);const o=[s.type,a.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")?rt(r[n],{strict:!1}):o.includes("address")&&o.includes("bytes")?rt(r[n],{strict:!1}):!1)return o}}const ym="/docs/contract/encodeEventTopics";function ko(e){var c;const{abi:t,eventName:r,args:n}=e;let s=t[0];if(r){const l=ks({abi:t,name:r});if(!l)throw new Gh(r,{docsPath:ym});s=l}if(s.type!=="event")throw new Gh(void 0,{docsPath:ym});const a=Er(s),o=vc(a);let i=[];if(n&&"inputs"in s){const l=(c=s.inputs)==null?void 0:c.filter(d=>"indexed"in d&&d.indexed),u=Array.isArray(n)?n:Object.values(n).length>0?(l==null?void 0:l.map(d=>n[d.name]))??[]:[];u.length>0&&(i=(l==null?void 0:l.map((d,p)=>Array.isArray(u[p])?u[p].map((h,y)=>gm({param:d,value:u[p][y]})):typeof u[p]<"u"&&u[p]!==null?gm({param:d,value:u[p]}):null))??[])}return[o,...i]}function gm({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return At(un(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new qw(e.type);return Hn([e],[t])}function kc(e,{method:t}){var n,s;const r={};return e.transport.type==="fallback"&&((s=(n=e.transport).onResponse)==null||s.call(n,({method:a,response:o,status:i,transport:c})=>{i==="success"&&t===a&&(r[o]=c.request)})),(a=>r[a]||e.request)}async function xm(e,t){const{address:r,abi:n,args:s,eventName:a,fromBlock:o,strict:i,toBlock:c}=t,l=kc(e,{method:"eth_newFilter"}),u=a?ko({abi:n,args:s,eventName:a}):void 0,d=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:typeof o=="bigint"?W(o):o,toBlock:typeof c=="bigint"?W(c):c,topics:u}]});return{abi:n,args:s,eventName:a,id:d,request:l(d),strict:!!i,type:"event"}}function Ke(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}const wm="/docs/contract/encodeFunctionData";function Y5(e){const{abi:t,args:r,functionName:n}=e;let s=t[0];if(n){const a=ks({abi:t,args:r,name:n});if(!a)throw new da(n,{docsPath:wm});s=a}if(s.type!=="function")throw new da(void 0,{docsPath:wm});return{abi:[s],functionName:vo(Er(s))}}function nr(e){const{args:t}=e,{abi:r,functionName:n}=(()=>{var i;return e.abi.length===1&&((i=e.functionName)!=null&&i.startsWith("0x"))?e:Y5(e)})(),s=r[0],a=n,o="inputs"in s&&s.inputs?Hn(s.inputs,t??[]):void 0;return rr([a,o??"0x"])}const K5={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},vm={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},Z5={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};let km=class extends ${constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}},Em=class extends ${constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}},X5=class extends ${constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}};const Q5={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 X5({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new Em({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new km({offset:e});const 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 km({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const 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,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function rd(e,{recursiveReadLimit:t=8192}={}){const r=Object.create(Q5);return r.bytes=e,r.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}function J5(e,t={}){typeof t.size<"u"&&Tr(e,{size:t.size});const r=bt(e,t);return Ne(r,t)}function ev(e,t={}){let r=e;if(typeof t.size<"u"&&(Tr(r,{size:t.size}),r=$t(r)),r.length>1||r[0]>1)throw new Kw(r);return!!r[0]}function pn(e,t={}){typeof t.size<"u"&&Tr(e,{size:t.size});const r=bt(e,t);return Jt(r,t)}function tv(e,t={}){let r=e;return typeof t.size<"u"&&(Tr(r,{size:t.size}),r=$t(r,{dir:"right"})),new TextDecoder().decode(r)}function Eo(e,t){const r=typeof t=="string"?er(t):t,n=rd(r);if(it(r)===0&&e.length>0)throw new yo;if(it(t)&&it(t)<32)throw new Rh({data:typeof t=="string"?t:bt(t),params:e,size:it(t)});let s=0;const a=[];for(let o=0;o<e.length;++o){const i=e[o];n.setPosition(s);const[c,l]=ga(n,i,{staticPosition:0});s+=l,a.push(c)}return a}function ga(e,t,{staticPosition:r}){const n=ed(t.type);if(n){const[s,a]=n;return nv(e,{...t,type:a},{length:s,staticPosition:r})}if(t.type==="tuple")return iv(e,t,{staticPosition:r});if(t.type==="address")return rv(e);if(t.type==="bool")return sv(e);if(t.type.startsWith("bytes"))return av(e,t,{staticPosition:r});if(t.type.startsWith("uint")||t.type.startsWith("int"))return ov(e,t);if(t.type==="string")return cv(e,{staticPosition:r});throw new Vw(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const Cm=32,nd=32;function rv(e){const t=e.readBytes(32);return[wo(bt(hm(t,-20))),32]}function nv(e,t,{length:r,staticPosition:n}){if(!r){const o=pn(e.readBytes(nd)),i=n+o,c=i+Cm;e.setPosition(i);const l=pn(e.readBytes(Cm)),u=Co(t);let d=0;const p=[];for(let h=0;h<l;++h){e.setPosition(c+(u?h*32:d));const[y,g]=ga(e,t,{staticPosition:c});d+=g,p.push(y)}return e.setPosition(n+32),[p,32]}if(Co(t)){const o=pn(e.readBytes(nd)),i=n+o,c=[];for(let l=0;l<r;++l){e.setPosition(i+l*32);const[u]=ga(e,t,{staticPosition:i});c.push(u)}return e.setPosition(n+32),[c,32]}let s=0;const a=[];for(let o=0;o<r;++o){const[i,c]=ga(e,t,{staticPosition:n+s});s+=c,a.push(i)}return[a,s]}function sv(e){return[ev(e.readBytes(32),{size:32}),32]}function av(e,t,{staticPosition:r}){const[n,s]=t.type.split("bytes");if(!s){const o=pn(e.readBytes(32));e.setPosition(r+o);const i=pn(e.readBytes(32));if(i===0)return e.setPosition(r+32),["0x",32];const c=e.readBytes(i);return e.setPosition(r+32),[bt(c),32]}return[bt(e.readBytes(Number.parseInt(s,10),32)),32]}function ov(e,t){const r=t.type.startsWith("int"),n=Number.parseInt(t.type.split("int")[1]||"256",10),s=e.readBytes(32);return[n>48?J5(s,{signed:r}):pn(s,{signed:r}),32]}function iv(e,t,{staticPosition:r}){const n=t.components.length===0||t.components.some(({name:o})=>!o),s=n?[]:{};let a=0;if(Co(t)){const o=pn(e.readBytes(nd)),i=r+o;for(let c=0;c<t.components.length;++c){const l=t.components[c];e.setPosition(i+a);const[u,d]=ga(e,l,{staticPosition:i});a+=d,s[n?c:l==null?void 0:l.name]=u}return e.setPosition(r+32),[s,32]}for(let o=0;o<t.components.length;++o){const i=t.components[o],[c,l]=ga(e,i,{staticPosition:r});s[n?o:i==null?void 0:i.name]=c,a+=l}return[s,a]}function cv(e,{staticPosition:t}){const r=pn(e.readBytes(32)),n=t+r;e.setPosition(n);const s=pn(e.readBytes(32));if(s===0)return e.setPosition(t+32),["",32];const a=e.readBytes(s,32),o=tv($t(a));return e.setPosition(t+32),[o,32]}function Co(e){var n;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(n=e.components)==null?void 0:n.some(Co);const r=ed(e.type);return!!(r&&Co({...e,type:r[1]}))}function Tm(e){const{abi:t,data:r}=e,n=vs(r,0,4);if(n==="0x")throw new yo;const a=[...t||[],vm,Z5].find(o=>o.type==="error"&&n===vo(Er(o)));if(!a)throw new $h(n,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:a,args:"inputs"in a&&a.inputs&&a.inputs.length>0?Eo(a.inputs,vs(r,4)):void 0,errorName:a.name}}const dt=(e,t,r)=>JSON.stringify(e,(n,s)=>typeof s=="bigint"?s.toString():s,r);function Sm({abiItem:e,args:t,includeFunctionName:r=!0,includeName:n=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${r?e.name:""}(${e.inputs.map((s,a)=>`${n&&s.name?`${s.name}: `:""}${typeof t[a]=="object"?dt(t[a]):t[a]}`).join(", ")})`}const lv={gwei:9,wei:18},uv={ether:-9,wei:9};function Am(e,t){let r=e.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[s,a]=[r.slice(0,r.length-t),r.slice(r.length-t)];return a=a.replace(/(0+)$/,""),`${n?"-":""}${s||"0"}${a?`.${a}`:""}`}function sd(e,t="wei"){return Am(e,lv[t])}function Gt(e,t="wei"){return Am(e,uv[t])}class dv extends ${constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}class fv extends ${constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function Pm(e){return e.reduce((t,{slot:r,value:n})=>`${t} ${r}: ${n}
|
|
23
|
+
`,"")}function pv(e){return e.reduce((t,{address:r,...n})=>{let s=`${t} ${r}:
|
|
24
24
|
`;return n.nonce&&(s+=` nonce: ${n.nonce}
|
|
25
25
|
`),n.balance&&(s+=` balance: ${n.balance}
|
|
26
26
|
`),n.code&&(s+=` code: ${n.code}
|
|
27
27
|
`),n.state&&(s+=` state:
|
|
28
|
-
`,s+=
|
|
29
|
-
`,s+=
|
|
30
|
-
`).slice(0,-1)}function
|
|
31
|
-
`)}class
|
|
32
|
-
${
|
|
33
|
-
`):`The contract function "${n}" reverted.`,{cause:a,metaMessages:i,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=o,this.raw=r,this.reason=c,this.signature=l}}class
|
|
34
|
-
`)})}}Object.defineProperty(Oo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Cs extends jt{constructor(t){super(t,{code:Cs.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(Cs,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class
|
|
35
|
-
`)})}}Object.defineProperty(Gn,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class Bo extends jt{constructor(t){super(t,{code:Bo.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(Bo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class Mo extends jt{constructor(t){super(t,{code:Mo.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(Mo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class _o extends jt{constructor(t){super(t,{code:_o.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(_o,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class Ts extends jt{constructor(t,{method:r}={}){super(t,{code:Ts.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${r?` "${r}"`:""} is not supported.`})}}Object.defineProperty(Ts,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class xa extends jt{constructor(t){super(t,{code:xa.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(xa,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class Do extends jt{constructor(t){super(t,{code:Do.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(Do,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class wa extends sr{constructor(t){super(t,{code:wa.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(wa,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class Fo extends sr{constructor(t){super(t,{code:Fo.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(Fo,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class No extends sr{constructor(t,{method:r}={}){super(t,{code:No.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${r?` " ${r}"`:""}.`})}}Object.defineProperty(No,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class zo extends sr{constructor(t){super(t,{code:zo.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(zo,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class Lo extends sr{constructor(t){super(t,{code:Lo.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(Lo,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class Ro extends sr{constructor(t){super(t,{code:Ro.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(Ro,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class va extends sr{constructor(t){super(t,{code:va.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(va,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class Ho extends sr{constructor(t){super(t,{code:Ho.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(Ho,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class $o extends sr{constructor(t){super(t,{code:$o.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty($o,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class Go extends sr{constructor(t){super(t,{code:Go.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(Go,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class jo extends sr{constructor(t){super(t,{code:jo.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(jo,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class Vo extends sr{constructor(t){super(t,{code:Vo.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(Vo,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class ka extends sr{constructor(t){super(t,{code:ka.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(ka,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class Lv extends jt{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const Rv=3;function Ss(e,{abi:t,address:r,args:n,docsPath:s,functionName:a,sender:o}){const i=e instanceof Cc?e:e instanceof $?e.walk(y=>"data"in y)||e.walk():{},{code:c,data:l,details:u,message:d,shortMessage:p}=i,h=e instanceof go?new Fv({functionName:a}):[Rv,Cs.code].includes(c)&&(l||u||d||p)||c===Gn.code&&u==="execution reverted"&&l?new ad({abi:t,data:typeof l=="object"?l.data:l,functionName:a,message:i instanceof od?u:p??d}):e;return new Rm(h,{abi:t,args:n,contractAddress:r,docsPath:s,functionName:a,sender:o})}function Hv(e){const t=At(`0x${e.substring(4)}`).substring(26);return vo(`0x${t}`)}async function $v({hash:e,signature:t}){const r=Cr(e)?e:Oe(e),{secp256k1:n}=await Promise.resolve().then(()=>VE);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:l,s:u,v:d,yParity:p}=t,h=Number(p??d),y=$m(h);return new n.Signature(ze(l),ze(u)).addRecoveryBit(y)}const o=Cr(t)?t:Oe(t);if(it(o)!==65)throw new Error("invalid signature length");const i=Jt(`0x${o.slice(130)}`),c=$m(i);return n.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(!1)}`}function $m(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function Gm({hash:e,signature:t}){return Hv(await $v({hash:e,signature:t}))}function jr(e,t="hex"){const r=jm(e),n=rd(new Uint8Array(r.length));return r.encode(n),t==="hex"?bt(n.bytes):n.bytes}function jm(e){return Array.isArray(e)?Gv(e.map(t=>jm(t))):jv(e)}function Gv(e){const t=e.reduce((s,a)=>s+a.length,0),r=Vm(t);return{length:t<=55?1+t:1+r+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+r),r===1?s.pushUint8(t):r===2?s.pushUint16(t):r===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:a}of e)a(s)}}}function jv(e){const t=typeof e=="string"?er(e):e,r=Vm(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+r),r===1?s.pushUint8(t.length):r===2?s.pushUint16(t.length):r===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function Vm(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new $("Length is too large.")}function Vv(e){const{chainId:t,nonce:r,to:n}=e,s=e.contractAddress??e.address,a=At(rr(["0x05",jr([t?W(t):"0x",s,r?W(r):"0x"])]));return n==="bytes"?er(a):a}async function Tc(e){const{authorization:t,signature:r}=e;return Gm({hash:Vv(t),signature:r??t})}class Wv extends ${constructor(t,{account:r,docsPath:n,chain:s,data:a,gas:o,gasPrice:i,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:d,value:p}){var y;const h=So({from:r==null?void 0:r.address,to:d,value:typeof p<"u"&&`${sd(p)} ${((y=s==null?void 0:s.nativeCurrency)==null?void 0:y.symbol)||"ETH"}`,data:a,gas:o,gasPrice:typeof i<"u"&&`${Gt(i)} gwei`,maxFeePerGas:typeof c<"u"&&`${Gt(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Gt(l)} gwei`,nonce:u});super(t.shortMessage,{cause:t,docsPath:n,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",h].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class Ea extends ${constructor({cause:t,message:r}={}){var s;const n=(s=r==null?void 0:r.replace("execution reverted: ",""))==null?void 0:s.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(Ea,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(Ea,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});let jn=class extends ${constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${Gt(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}};Object.defineProperty(jn,"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 id extends ${constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${Gt(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(id,"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 cd extends ${constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(cd,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class ld extends ${constructor({cause:t,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
|
|
28
|
+
`,s+=Pm(n.state)),n.stateDiff&&(s+=` stateDiff:
|
|
29
|
+
`,s+=Pm(n.stateDiff)),s},` State Override:
|
|
30
|
+
`).slice(0,-1)}function To(e){const t=Object.entries(e).map(([n,s])=>s===void 0||s===!1?null:[n,s]).filter(Boolean),r=t.reduce((n,[s])=>Math.max(n,s.length),0);return t.map(([n,s])=>` ${`${n}:`.padEnd(r+1)} ${s}`).join(`
|
|
31
|
+
`)}class hv extends ${constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class mv extends ${constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",To(t),"}","","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"})}}let bv=class extends ${constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}};class yv extends ${constructor(t,{account:r,docsPath:n,chain:s,data:a,gas:o,gasPrice:i,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:d,value:p}){var y;const h=To({chain:s&&`${s==null?void 0:s.name} (id: ${s==null?void 0:s.id})`,from:r==null?void 0:r.address,to:d,value:typeof p<"u"&&`${sd(p)} ${((y=s==null?void 0:s.nativeCurrency)==null?void 0:y.symbol)||"ETH"}`,data:a,gas:o,gasPrice:typeof i<"u"&&`${Gt(i)} gwei`,maxFeePerGas:typeof c<"u"&&`${Gt(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Gt(l)} gwei`,nonce:u});super(t.shortMessage,{cause:t,docsPath:n,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",h].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class Im extends ${constructor({blockHash:t,blockNumber:r,blockTag:n,hash:s,index:a}){let o="Transaction";n&&a!==void 0&&(o=`Transaction at block time "${n}" at index "${a}"`),t&&a!==void 0&&(o=`Transaction at block hash "${t}" at index "${a}"`),r&&a!==void 0&&(o=`Transaction at block number "${r}" at index "${a}"`),s&&(o=`Transaction with hash "${s}"`),super(`${o} could not be found.`,{name:"TransactionNotFoundError"})}}class Om extends ${constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class Bm extends ${constructor({receipt:t}){super(`Transaction with hash "${t.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=t}}class gv extends ${constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}const xv=e=>e,So=e=>e;class Mm extends ${constructor(t,{account:r,docsPath:n,chain:s,data:a,gas:o,gasPrice:i,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:d,value:p,stateOverride:h}){var k;const y=r?Ke(r):void 0;let g=To({from:y==null?void 0:y.address,to:d,value:typeof p<"u"&&`${sd(p)} ${((k=s==null?void 0:s.nativeCurrency)==null?void 0:k.symbol)||"ETH"}`,data:a,gas:o,gasPrice:typeof i<"u"&&`${Gt(i)} gwei`,maxFeePerGas:typeof c<"u"&&`${Gt(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Gt(l)} gwei`,nonce:u});h&&(g+=`
|
|
32
|
+
${pv(h)}`),super(t.shortMessage,{cause:t,docsPath:n,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",g].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class _m extends ${constructor(t,{abi:r,args:n,contractAddress:s,docsPath:a,functionName:o,sender:i}){const c=ks({abi:r,args:n,name:o}),l=c?Sm({abiItem:c,args:n,includeFunctionName:!1,includeName:!1}):void 0,u=c?Er(c,{includeName:!0}):void 0,d=To({address:s&&xv(s),function:u,args:l&&l!=="()"&&`${[...Array((o==null?void 0:o.length)??0).keys()].map(()=>" ").join("")}${l}`,sender:i});super(t.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:t,docsPath:a,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],d&&"Contract Call:",d].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=r,this.args=n,this.cause=t,this.contractAddress=s,this.functionName=o,this.sender=i}}class ad extends ${constructor({abi:t,data:r,functionName:n,message:s}){let a,o,i,c;if(r&&r!=="0x")try{o=Tm({abi:t,data:r});const{abiItem:u,errorName:d,args:p}=o;if(d==="Error")c=p[0];else if(d==="Panic"){const[h]=p;c=K5[h]}else{const h=u?Er(u,{includeName:!0}):void 0,y=u&&p?Sm({abiItem:u,args:p,includeFunctionName:!1,includeName:!1}):void 0;i=[h?`Error: ${h}`:"",y&&y!=="()"?` ${[...Array((d==null?void 0:d.length)??0).keys()].map(()=>" ").join("")}${y}`:""]}}catch(u){a=u}else s&&(c=s);let l;a instanceof $h&&(l=a.signature,i=[`Unable to decode signature "${l}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${l}.`]),super(c&&c!=="execution reverted"||l?[`The contract function "${n}" reverted with the following ${l?"signature":"reason"}:`,c||l].join(`
|
|
33
|
+
`):`The contract function "${n}" reverted.`,{cause:a,metaMessages:i,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=o,this.raw=r,this.reason=c,this.signature=l}}class wv extends ${constructor({functionName:t}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class vv extends ${constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class Ec extends ${constructor({data:t,message:r}){super(r||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}class Es extends ${constructor({body:t,cause:r,details:n,headers:s,status:a,url:o}){super("HTTP request failed.",{cause:r,details:n,metaMessages:[a&&`Status: ${a}`,`URL: ${So(o)}`,t&&`Request body: ${dt(t)}`].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=t,this.headers=s,this.status=a,this.url=o}}class od extends ${constructor({body:t,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${So(n)}`,`Request body: ${dt(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code,this.data=r.data,this.url=n}}class Um extends ${constructor({body:t,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${So(r)}`,`Request body: ${dt(t)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=r}}const kv=-1;class jt extends ${constructor(t,{code:r,docsPath:n,metaMessages:s,name:a,shortMessage:o}){super(o,{cause:t,docsPath:n,metaMessages:s||(t==null?void 0:t.metaMessages),name:a||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=a||t.name,this.code=t instanceof od?t.code:r??kv}}class sr extends jt{constructor(t,r){super(t,r),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}}class Ao extends jt{constructor(t){super(t,{code:Ao.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(Ao,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class Po extends jt{constructor(t){super(t,{code:Po.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(Po,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class Io extends jt{constructor(t,{method:r}={}){super(t,{code:Io.code,name:"MethodNotFoundRpcError",shortMessage:`The method${r?` "${r}"`:""} does not exist / is not available.`})}}Object.defineProperty(Io,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class Oo extends jt{constructor(t){super(t,{code:Oo.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
|
|
34
|
+
`)})}}Object.defineProperty(Oo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Cs extends jt{constructor(t){super(t,{code:Cs.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(Cs,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class $n extends jt{constructor(t){super(t,{code:$n.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
|
|
35
|
+
`)})}}Object.defineProperty($n,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class Bo extends jt{constructor(t){super(t,{code:Bo.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(Bo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class Mo extends jt{constructor(t){super(t,{code:Mo.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(Mo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class _o extends jt{constructor(t){super(t,{code:_o.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(_o,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class Ts extends jt{constructor(t,{method:r}={}){super(t,{code:Ts.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${r?` "${r}"`:""} is not supported.`})}}Object.defineProperty(Ts,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class xa extends jt{constructor(t){super(t,{code:xa.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(xa,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class Uo extends jt{constructor(t){super(t,{code:Uo.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(Uo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class wa extends sr{constructor(t){super(t,{code:wa.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(wa,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class Do extends sr{constructor(t){super(t,{code:Do.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(Do,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class Fo extends sr{constructor(t,{method:r}={}){super(t,{code:Fo.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${r?` " ${r}"`:""}.`})}}Object.defineProperty(Fo,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class No extends sr{constructor(t){super(t,{code:No.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(No,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class zo extends sr{constructor(t){super(t,{code:zo.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(zo,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class Lo extends sr{constructor(t){super(t,{code:Lo.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(Lo,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class va extends sr{constructor(t){super(t,{code:va.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(va,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class Ro extends sr{constructor(t){super(t,{code:Ro.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(Ro,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class Ho extends sr{constructor(t){super(t,{code:Ho.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(Ho,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class $o extends sr{constructor(t){super(t,{code:$o.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty($o,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class Go extends sr{constructor(t){super(t,{code:Go.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(Go,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class jo extends sr{constructor(t){super(t,{code:jo.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(jo,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class ka extends sr{constructor(t){super(t,{code:ka.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(ka,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class Ev extends jt{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const Cv=3;function Ss(e,{abi:t,address:r,args:n,docsPath:s,functionName:a,sender:o}){const i=e instanceof Ec?e:e instanceof $?e.walk(y=>"data"in y)||e.walk():{},{code:c,data:l,details:u,message:d,shortMessage:p}=i,h=e instanceof yo?new wv({functionName:a}):[Cv,Cs.code].includes(c)&&(l||u||d||p)||c===$n.code&&u==="execution reverted"&&l?new ad({abi:t,data:typeof l=="object"?l.data:l,functionName:a,message:i instanceof od?u:p??d}):e;return new _m(h,{abi:t,args:n,contractAddress:r,docsPath:s,functionName:a,sender:o})}function Tv(e){const t=At(`0x${e.substring(4)}`).substring(26);return wo(`0x${t}`)}async function Sv({hash:e,signature:t}){const r=Cr(e)?e:Be(e),{secp256k1:n}=await Promise.resolve().then(()=>IE);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:l,s:u,v:d,yParity:p}=t,h=Number(p??d),y=Dm(h);return new n.Signature(Ne(l),Ne(u)).addRecoveryBit(y)}const o=Cr(t)?t:Be(t);if(it(o)!==65)throw new Error("invalid signature length");const i=Jt(`0x${o.slice(130)}`),c=Dm(i);return n.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(!1)}`}function Dm(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function Fm({hash:e,signature:t}){return Tv(await Sv({hash:e,signature:t}))}function Gr(e,t="hex"){const r=Nm(e),n=rd(new Uint8Array(r.length));return r.encode(n),t==="hex"?bt(n.bytes):n.bytes}function Nm(e){return Array.isArray(e)?Av(e.map(t=>Nm(t))):Pv(e)}function Av(e){const t=e.reduce((s,a)=>s+a.length,0),r=zm(t);return{length:t<=55?1+t:1+r+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+r),r===1?s.pushUint8(t):r===2?s.pushUint16(t):r===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:a}of e)a(s)}}}function Pv(e){const t=typeof e=="string"?er(e):e,r=zm(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+r),r===1?s.pushUint8(t.length):r===2?s.pushUint16(t.length):r===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function zm(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new $("Length is too large.")}function Iv(e){const{chainId:t,nonce:r,to:n}=e,s=e.contractAddress??e.address,a=At(rr(["0x05",Gr([t?W(t):"0x",s,r?W(r):"0x"])]));return n==="bytes"?er(a):a}async function Cc(e){const{authorization:t,signature:r}=e;return Fm({hash:Iv(t),signature:r??t})}class Ov extends ${constructor(t,{account:r,docsPath:n,chain:s,data:a,gas:o,gasPrice:i,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:d,value:p}){var y;const h=To({from:r==null?void 0:r.address,to:d,value:typeof p<"u"&&`${sd(p)} ${((y=s==null?void 0:s.nativeCurrency)==null?void 0:y.symbol)||"ETH"}`,data:a,gas:o,gasPrice:typeof i<"u"&&`${Gt(i)} gwei`,maxFeePerGas:typeof c<"u"&&`${Gt(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Gt(l)} gwei`,nonce:u});super(t.shortMessage,{cause:t,docsPath:n,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",h].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class Ea extends ${constructor({cause:t,message:r}={}){var s;const n=(s=r==null?void 0:r.replace("execution reverted: ",""))==null?void 0:s.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(Ea,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(Ea,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});let Gn=class extends ${constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${Gt(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}};Object.defineProperty(Gn,"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 id extends ${constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${Gt(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(id,"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 cd extends ${constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(cd,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class ld extends ${constructor({cause:t,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
|
|
36
36
|
`),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(ld,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class ud extends ${constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(ud,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class dd extends ${constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
|
|
37
37
|
`),{cause:t,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(dd,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class fd extends ${constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(fd,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class pd extends ${constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(pd,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class hd extends ${constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(hd,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});let Ca=class extends ${constructor({cause:t,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${Gt(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${Gt(n)} gwei`:""}).`].join(`
|
|
38
|
-
`),{cause:t,name:"TipAboveFeeCapError"})}};Object.defineProperty(Ca,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class Wo extends ${constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function Sc(e,t){const r=(e.details||"").toLowerCase(),n=e instanceof $?e.walk(s=>(s==null?void 0:s.code)===Ea.code):e;return n instanceof $?new Ea({cause:e,message:n.details}):Ea.nodeMessage.test(r)?new Ea({cause:e,message:e.details}):jn.nodeMessage.test(r)?new jn({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):id.nodeMessage.test(r)?new id({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):cd.nodeMessage.test(r)?new cd({cause:e,nonce:t==null?void 0:t.nonce}):ld.nodeMessage.test(r)?new ld({cause:e,nonce:t==null?void 0:t.nonce}):ud.nodeMessage.test(r)?new ud({cause:e,nonce:t==null?void 0:t.nonce}):dd.nodeMessage.test(r)?new dd({cause:e}):fd.nodeMessage.test(r)?new fd({cause:e,gas:t==null?void 0:t.gas}):pd.nodeMessage.test(r)?new pd({cause:e,gas:t==null?void 0:t.gas}):hd.nodeMessage.test(r)?new hd({cause:e}):Ca.nodeMessage.test(r)?new Ca({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new Wo({cause:e})}function qv(e,{docsPath:t,...r}){const n=(()=>{const s=Sc(e,r);return s instanceof Wo?e:s})();return new Wv(n,{docsPath:t,...r})}function As(e,{format:t}){if(!t)return{};const r={};function n(a){const o=Object.keys(a);for(const i of o)i in e&&(r[i]=e[i]),a[i]&&typeof a[i]=="object"&&!Array.isArray(a[i])&&n(a[i])}const s=t(e||{});return n(s),r}function Ac(e,t){return({exclude:r,format:n})=>({exclude:r,format:(s,a)=>{const o=t(s,a);if(r)for(const i of r)delete o[i];return{...o,...n(s,a)}},type:e})}const Yv={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Sr(e,t){const r={};return typeof e.authorizationList<"u"&&(r.authorizationList=Kv(e.authorizationList)),typeof e.accessList<"u"&&(r.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(r.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?r.blobs=e.blobs.map(n=>bt(n)):r.blobs=e.blobs),typeof e.data<"u"&&(r.data=e.data),e.account&&(r.from=e.account.address),typeof e.from<"u"&&(r.from=e.from),typeof e.gas<"u"&&(r.gas=W(e.gas)),typeof e.gasPrice<"u"&&(r.gasPrice=W(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(r.maxFeePerBlobGas=W(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(r.maxFeePerGas=W(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(r.maxPriorityFeePerGas=W(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(r.nonce=W(e.nonce)),typeof e.to<"u"&&(r.to=e.to),typeof e.type<"u"&&(r.type=Yv[e.type]),typeof e.value<"u"&&(r.value=W(e.value)),r}const md=Ac("transactionRequest",Sr);function Kv(e){return e.map(t=>({address:t.address,r:t.r?W(BigInt(t.r)):t.r,s:t.s?W(BigInt(t.s)):t.s,chainId:W(t.chainId),nonce:W(t.nonce),...typeof t.yParity<"u"?{yParity:W(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:W(t.v)}:{}}))}function Wm(e){if(!(!e||e.length===0))return e.reduce((t,{slot:r,value:n})=>{if(r.length!==66)throw new tm({size:r.length,targetSize:66,type:"hex"});if(n.length!==66)throw new tm({size:n.length,targetSize:66,type:"hex"});return t[r]=n,t},{})}function Zv(e){const{balance:t,nonce:r,state:n,stateDiff:s,code:a}=e,o={};if(a!==void 0&&(o.code=a),t!==void 0&&(o.balance=W(t)),r!==void 0&&(o.nonce=W(r)),n!==void 0&&(o.state=Wm(n)),s!==void 0){if(o.state)throw new Pv;o.stateDiff=Wm(s)}return o}function bd(e){if(!e)return;const t={};for(const{address:r,...n}of e){if(!rt(r,{strict:!1}))throw new wt({address:r});if(t[r])throw new Av({address:r});t[r]=Zv(n)}return t}const Xv=2n**16n-1n,Ps=2n**256n-1n;function Vr(e){const{account:t,maxFeePerGas:r,maxPriorityFeePerGas:n,to:s}=e,a=t?Ke(t):void 0;if(a&&!rt(a.address))throw new wt({address:a.address});if(s&&!rt(s))throw new wt({address:s});if(r&&r>Ps)throw new jn({maxFeePerGas:r});if(n&&r&&n>r)throw new Ca({maxFeePerGas:r,maxPriorityFeePerGas:n})}class qm extends ${constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class yd extends ${constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class Qv extends ${constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Gt(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class Ym extends ${constructor({blockHash:t,blockNumber:r}){let n="Block";t&&(n=`Block at hash "${t}"`),r&&(n=`Block at number "${r}"`),super(`${n} could not be found.`,{name:"BlockNotFoundError"})}}const Km={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Is(e,t){const r={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?Jt(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?Jt(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?Km[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&&(r.authorizationList=Jv(e.authorizationList)),r.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof r.v=="bigint"){if(r.v===0n||r.v===27n)return 0;if(r.v===1n||r.v===28n)return 1;if(r.v>=35n)return r.v%2n===0n?1:0}})(),r.type==="legacy"&&(delete r.accessList,delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas,delete r.yParity),r.type==="eip2930"&&(delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas),r.type==="eip1559"&&delete r.maxFeePerBlobGas,r}const Pc=Ac("transaction",Is);function Jv(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function gd(e,t){const r=(e.transactions??[]).map(n=>typeof n=="string"?n:Is(n));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:r,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const xd=Ac("block",gd);async function Ar(e,{blockHash:t,blockNumber:r,blockTag:n=e.experimental_blockTag??"latest",includeTransactions:s}={}){var l,u,d;const a=s??!1,o=r!==void 0?W(r):void 0;let i=null;if(t?i=await e.request({method:"eth_getBlockByHash",params:[t,a]},{dedupe:!0}):i=await e.request({method:"eth_getBlockByNumber",params:[o||n,a]},{dedupe:!!o}),!i)throw new Ym({blockHash:t,blockNumber:r});return(((d=(u=(l=e.chain)==null?void 0:l.formatters)==null?void 0:u.block)==null?void 0:d.format)||gd)(i,"getBlock")}async function wd(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function e8(e,t){return Zm(e,t)}async function Zm(e,t){var a,o;const{block:r,chain:n=e.chain,request:s}=t||{};try{const i=((a=n==null?void 0:n.fees)==null?void 0:a.maxPriorityFeePerGas)??((o=n==null?void 0:n.fees)==null?void 0:o.defaultPriorityFee);if(typeof i=="function"){const l=r||await ne(e,Ar,"getBlock")({}),u=await i({block:l,client:e,request:s});if(u===null)throw new Error;return u}if(typeof i<"u")return i;const c=await e.request({method:"eth_maxPriorityFeePerGas"});return ze(c)}catch{const[i,c]=await Promise.all([r?Promise.resolve(r):ne(e,Ar,"getBlock")({}),ne(e,wd,"getGasPrice")({})]);if(typeof i.baseFeePerGas!="bigint")throw new yd;const l=c-i.baseFeePerGas;return l<0n?0n:l}}async function t8(e,t){return vd(e,t)}async function vd(e,t){var p,h;const{block:r,chain:n=e.chain,request:s,type:a="eip1559"}=t||{},o=await(async()=>{var y,g;return typeof((y=n==null?void 0:n.fees)==null?void 0:y.baseFeeMultiplier)=="function"?n.fees.baseFeeMultiplier({block:r,client:e,request:s}):((g=n==null?void 0:n.fees)==null?void 0:g.baseFeeMultiplier)??1.2})();if(o<1)throw new qm;const c=10**(((p=o.toString().split(".")[1])==null?void 0:p.length)??0),l=y=>y*BigInt(Math.ceil(o*c))/BigInt(c),u=r||await ne(e,Ar,"getBlock")({});if(typeof((h=n==null?void 0:n.fees)==null?void 0:h.estimateFeesPerGas)=="function"){const y=await n.fees.estimateFeesPerGas({block:r,client:e,multiply:l,request:s,type:a});if(y!==null)return y}if(a==="eip1559"){if(typeof u.baseFeePerGas!="bigint")throw new yd;const y=typeof(s==null?void 0:s.maxPriorityFeePerGas)=="bigint"?s.maxPriorityFeePerGas:await Zm(e,{block:u,chain:n,request:s}),g=l(u.baseFeePerGas);return{maxFeePerGas:(s==null?void 0:s.maxFeePerGas)??g+y,maxPriorityFeePerGas:y}}return{gasPrice:(s==null?void 0:s.gasPrice)??l(await ne(e,wd,"getGasPrice")({}))}}async function kd(e,{address:t,blockTag:r="latest",blockNumber:n}){const s=await e.request({method:"eth_getTransactionCount",params:[t,typeof n=="bigint"?W(n):r]},{dedupe:!!n});return Jt(s)}function Ed(e){const{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),n=typeof e.blobs[0]=="string"?e.blobs.map(a=>er(a)):e.blobs,s=[];for(const a of n)s.push(Uint8Array.from(t.blobToKzgCommitment(a)));return r==="bytes"?s:s.map(a=>bt(a))}function Cd(e){const{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),n=typeof e.blobs[0]=="string"?e.blobs.map(o=>er(o)):e.blobs,s=typeof e.commitments[0]=="string"?e.commitments.map(o=>er(o)):e.commitments,a=[];for(let o=0;o<n.length;o++){const i=n[o],c=s[o];a.push(Uint8Array.from(t.computeBlobKzgProof(i,c)))}return r==="bytes"?a:a.map(o=>bt(o))}function r8(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);const s=BigInt(32),a=BigInt(4294967295),o=Number(r>>s&a),i=Number(r&a),c=n?4:0,l=n?0:4;e.setUint32(t+c,o,n),e.setUint32(t+l,i,n)}function n8(e,t,r){return e&t^~e&r}function s8(e,t,r){return e&t^e&r^t&r}class Xm extends Wu{constructor(t,r,n,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=s,this.buffer=new Uint8Array(t),this.view=Vu(this.buffer)}update(t){ba(this),t=wc(t),ws(t);const{view:r,buffer:n,blockLen:s}=this,a=t.length;for(let o=0;o<a;){const i=Math.min(s-this.pos,a-o);if(i===s){const c=Vu(t);for(;s<=a-o;o+=s)this.process(c,o);continue}n.set(t.subarray(o,o+i),this.pos),this.pos+=i,o+=i,this.pos===s&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){ba(this),lm(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:s,isLE:a}=this;let{pos:o}=this;r[o++]=128,Hn(this.buffer.subarray(o)),this.padOffset>s-o&&(this.process(n,0),o=0);for(let d=o;d<s;d++)r[d]=0;r8(n,s-8,BigInt(this.length*8),a),this.process(n,0);const i=Vu(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<l;d++)i.setUint32(4*d,u[d],a)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:n,length:s,finished:a,destroyed:o,pos:i}=this;return t.destroyed=o,t.finished=a,t.length=s,t.pos=i,s%r&&t.buffer.set(n),t}clone(){return this._cloneInto()}}const Vn=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),It=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),Ut=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),a8=Uint32Array.from([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,2756734187,3204031479,3329325298]),Wn=new Uint32Array(64);class o8 extends Xm{constructor(t=32){super(64,t,8,!1),this.A=Vn[0]|0,this.B=Vn[1]|0,this.C=Vn[2]|0,this.D=Vn[3]|0,this.E=Vn[4]|0,this.F=Vn[5]|0,this.G=Vn[6]|0,this.H=Vn[7]|0}get(){const{A:t,B:r,C:n,D:s,E:a,F:o,G:i,H:c}=this;return[t,r,n,s,a,o,i,c]}set(t,r,n,s,a,o,i,c){this.A=t|0,this.B=r|0,this.C=n|0,this.D=s|0,this.E=a|0,this.F=o|0,this.G=i|0,this.H=c|0}process(t,r){for(let d=0;d<16;d++,r+=4)Wn[d]=t.getUint32(r,!1);for(let d=16;d<64;d++){const p=Wn[d-15],h=Wn[d-2],y=Gr(p,7)^Gr(p,18)^p>>>3,g=Gr(h,17)^Gr(h,19)^h>>>10;Wn[d]=g+Wn[d-7]+y+Wn[d-16]|0}let{A:n,B:s,C:a,D:o,E:i,F:c,G:l,H:u}=this;for(let d=0;d<64;d++){const p=Gr(i,6)^Gr(i,11)^Gr(i,25),h=u+p+n8(i,c,l)+a8[d]+Wn[d]|0,g=(Gr(n,2)^Gr(n,13)^Gr(n,22))+s8(n,s,a)|0;u=l,l=c,c=i,i=o+h|0,o=a,a=s,s=n,n=h+g|0}n=n+this.A|0,s=s+this.B|0,a=a+this.C|0,o=o+this.D|0,i=i+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,s,a,o,i,c,l,u)}roundClean(){Hn(Wn)}destroy(){this.set(0,0,0,0,0,0,0,0),Hn(this.buffer)}}const Qm=om(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),i8=Qm[0],c8=Qm[1],qn=new Uint32Array(80),Yn=new Uint32Array(80);class Jm extends Xm{constructor(t=64){super(128,t,16,!1),this.Ah=Ut[0]|0,this.Al=Ut[1]|0,this.Bh=Ut[2]|0,this.Bl=Ut[3]|0,this.Ch=Ut[4]|0,this.Cl=Ut[5]|0,this.Dh=Ut[6]|0,this.Dl=Ut[7]|0,this.Eh=Ut[8]|0,this.El=Ut[9]|0,this.Fh=Ut[10]|0,this.Fl=Ut[11]|0,this.Gh=Ut[12]|0,this.Gl=Ut[13]|0,this.Hh=Ut[14]|0,this.Hl=Ut[15]|0}get(){const{Ah:t,Al:r,Bh:n,Bl:s,Ch:a,Cl:o,Dh:i,Dl:c,Eh:l,El:u,Fh:d,Fl:p,Gh:h,Gl:y,Hh:g,Hl:k}=this;return[t,r,n,s,a,o,i,c,l,u,d,p,h,y,g,k]}set(t,r,n,s,a,o,i,c,l,u,d,p,h,y,g,k){this.Ah=t|0,this.Al=r|0,this.Bh=n|0,this.Bl=s|0,this.Ch=a|0,this.Cl=o|0,this.Dh=i|0,this.Dl=c|0,this.Eh=l|0,this.El=u|0,this.Fh=d|0,this.Fl=p|0,this.Gh=h|0,this.Gl=y|0,this.Hh=g|0,this.Hl=k|0}process(t,r){for(let S=0;S<16;S++,r+=4)qn[S]=t.getUint32(r),Yn[S]=t.getUint32(r+=4);for(let S=16;S<80;S++){const C=qn[S-15]|0,_=Yn[S-15]|0,z=pa(C,_,1)^pa(C,_,8)^im(C,_,7),T=ha(C,_,1)^ha(C,_,8)^cm(C,_,7),m=qn[S-2]|0,b=Yn[S-2]|0,x=pa(m,b,19)^gc(m,b,61)^im(m,b,6),A=ha(m,b,19)^xc(m,b,61)^cm(m,b,6),I=A5(T,A,Yn[S-7],Yn[S-16]),U=P5(I,z,x,qn[S-7],qn[S-16]);qn[S]=U|0,Yn[S]=I|0}let{Ah:n,Al:s,Bh:a,Bl:o,Ch:i,Cl:c,Dh:l,Dl:u,Eh:d,El:p,Fh:h,Fl:y,Gh:g,Gl:k,Hh:v,Hl:w}=this;for(let S=0;S<80;S++){const C=pa(d,p,14)^pa(d,p,18)^gc(d,p,41),_=ha(d,p,14)^ha(d,p,18)^xc(d,p,41),z=d&h^~d&g,T=p&y^~p&k,m=I5(w,_,T,c8[S],Yn[S]),b=U5(m,v,C,z,i8[S],qn[S]),x=m|0,A=pa(n,s,28)^gc(n,s,34)^gc(n,s,39),I=ha(n,s,28)^xc(n,s,34)^xc(n,s,39),U=n&a^n&i^a&i,D=s&o^s&c^o&c;v=g|0,w=k|0,g=h|0,k=y|0,h=d|0,y=p|0,{h:d,l:p}=fn(l|0,u|0,b|0,x|0),l=i|0,u=c|0,i=a|0,c=o|0,a=n|0,o=s|0;const E=T5(x,I,D);n=S5(E,b,A,U),s=E|0}({h:n,l:s}=fn(this.Ah|0,this.Al|0,n|0,s|0)),{h:a,l:o}=fn(this.Bh|0,this.Bl|0,a|0,o|0),{h:i,l:c}=fn(this.Ch|0,this.Cl|0,i|0,c|0),{h:l,l:u}=fn(this.Dh|0,this.Dl|0,l|0,u|0),{h:d,l:p}=fn(this.Eh|0,this.El|0,d|0,p|0),{h,l:y}=fn(this.Fh|0,this.Fl|0,h|0,y|0),{h:g,l:k}=fn(this.Gh|0,this.Gl|0,g|0,k|0),{h:v,l:w}=fn(this.Hh|0,this.Hl|0,v|0,w|0),this.set(n,s,a,o,i,c,l,u,d,p,h,y,g,k,v,w)}roundClean(){Hn(qn,Yn)}destroy(){Hn(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class l8 extends Jm{constructor(){super(48),this.Ah=It[0]|0,this.Al=It[1]|0,this.Bh=It[2]|0,this.Bl=It[3]|0,this.Ch=It[4]|0,this.Cl=It[5]|0,this.Dh=It[6]|0,this.Dl=It[7]|0,this.Eh=It[8]|0,this.El=It[9]|0,this.Fh=It[10]|0,this.Fl=It[11]|0,this.Gh=It[12]|0,this.Gl=It[13]|0,this.Hh=It[14]|0,this.Hl=It[15]|0}}const Td=vc(()=>new o8),u8=vc(()=>new Jm),d8=vc(()=>new l8),e1=Td;function t1(e,t){const r=t||"hex",n=e1(Cr(e,{strict:!1})?un(e):e);return r==="bytes"?n:Oe(n)}function f8(e){const{commitment:t,version:r=1}=e,n=e.to??(typeof t=="string"?"hex":"bytes"),s=t1(t,"bytes");return s.set([r],0),n==="bytes"?s:bt(s)}function r1(e){const{commitments:t,version:r}=e,n=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const a of t)s.push(f8({commitment:a,to:n,version:r}));return s}const n1=6,s1=32,Sd=4096,a1=s1*Sd,o1=a1*n1-1-1*Sd*n1,i1=1;class p8 extends ${constructor({maxSize:t,size:r}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${r} bytes`],name:"BlobSizeTooLargeError"})}}class c1 extends ${constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class h8 extends ${constructor({hash:t,size:r}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${r}`],name:"InvalidVersionedHashSizeError"})}}class m8 extends ${constructor({hash:t,version:r}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${i1}`,`Received: ${r}`],name:"InvalidVersionedHashVersionError"})}}function b8(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),r=typeof e.data=="string"?er(e.data):e.data,n=it(r);if(!n)throw new c1;if(n>o1)throw new p8({maxSize:o1,size:n});const s=[];let a=!0,o=0;for(;a;){const i=rd(new Uint8Array(a1));let c=0;for(;c<Sd;){const l=r.slice(o,o+(s1-1));if(i.pushByte(0),i.pushBytes(l),l.length<31){i.pushByte(128),a=!1;break}c++,o+=31}s.push(i)}return t==="bytes"?s.map(i=>i.bytes):s.map(i=>bt(i.bytes))}function l1(e){const{data:t,kzg:r,to:n}=e,s=e.blobs??b8({data:t,to:n}),a=e.commitments??Ed({blobs:s,kzg:r,to:n}),o=e.proofs??Cd({blobs:s,commitments:a,kzg:r,to:n}),i=[];for(let c=0;c<s.length;c++)i.push({blob:s[c],commitment:a[c],proof:o[c]});return i}function Ad(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new Ov({transaction:e})}function Ic(e,{docsPath:t,...r}){const n=(()=>{const s=Sc(e,r);return s instanceof Wo?e:s})();return new Mv(n,{docsPath:t,...r})}async function Kn(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return Jt(t)}async function Pd(e,t){var m,b,x,A,I;const{account:r=e.account,accessList:n,authorizationList:s,chain:a=e.chain,blobVersionedHashes:o,blobs:i,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:p,maxPriorityFeePerGas:h,nonce:y,nonceManager:g,to:k,type:v,value:w,...S}=t,C=await(async()=>{if(!r||!g||typeof y<"u")return y;const U=Ke(r),D=a?a.id:await ne(e,Kn,"getChainId")({});return await g.consume({address:U.address,chainId:D,client:e})})();Vr(t);const _=(b=(m=a==null?void 0:a.formatters)==null?void 0:m.transactionRequest)==null?void 0:b.format,T=(_||Sr)({...As(S,{format:_}),account:r?Ke(r):void 0,accessList:n,authorizationList:s,blobs:i,blobVersionedHashes:o,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:p,maxPriorityFeePerGas:h,nonce:C,to:k,type:v,value:w},"fillTransaction");try{const U=await e.request({method:"eth_fillTransaction",params:[T]}),E=(((A=(x=a==null?void 0:a.formatters)==null?void 0:x.transaction)==null?void 0:A.format)||Is)(U.tx);delete E.blockHash,delete E.blockNumber,delete E.r,delete E.s,delete E.transactionIndex,delete E.v,delete E.yParity,E.data=E.input,E.gas&&(E.gas=t.gas??E.gas),E.gasPrice&&(E.gasPrice=t.gasPrice??E.gasPrice),E.maxFeePerBlobGas&&(E.maxFeePerBlobGas=t.maxFeePerBlobGas??E.maxFeePerBlobGas),E.maxFeePerGas&&(E.maxFeePerGas=t.maxFeePerGas??E.maxFeePerGas),E.maxPriorityFeePerGas&&(E.maxPriorityFeePerGas=t.maxPriorityFeePerGas??E.maxPriorityFeePerGas),E.nonce&&(E.nonce=t.nonce??E.nonce);const P=await(async()=>{var H,G;if(typeof((H=a==null?void 0:a.fees)==null?void 0:H.baseFeeMultiplier)=="function"){const J=await ne(e,Ar,"getBlock")({});return a.fees.baseFeeMultiplier({block:J,client:e,request:t})}return((G=a==null?void 0:a.fees)==null?void 0:G.baseFeeMultiplier)??1.2})();if(P<1)throw new qm;const B=10**(((I=P.toString().split(".")[1])==null?void 0:I.length)??0),L=H=>H*BigInt(Math.ceil(P*B))/BigInt(B);return E.maxFeePerGas&&!t.maxFeePerGas&&(E.maxFeePerGas=L(E.maxFeePerGas)),E.gasPrice&&!t.gasPrice&&(E.gasPrice=L(E.gasPrice)),{raw:U.raw,transaction:{from:T.from,...E}}}catch(U){throw Ic(U,{...t,chain:e.chain})}}const Id=["blobVersionedHashes","chainId","fees","gas","nonce","type"],u1=new Map,Ud=new ya(128);async function qo(e,t){var C,_,z;let r=t;r.account??(r.account=e.account),r.parameters??(r.parameters=Id);const{account:n,chain:s=e.chain,nonceManager:a,parameters:o}=r,i=(()=>{if(typeof(s==null?void 0:s.prepareTransactionRequest)=="function")return{fn:s.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(s==null?void 0:s.prepareTransactionRequest))return{fn:s.prepareTransactionRequest[0],runAt:s.prepareTransactionRequest[1].runAt}})();let c;async function l(){return c||(typeof r.chainId<"u"?r.chainId:s?s.id:(c=await ne(e,Kn,"getChainId")({}),c))}const u=n&&Ke(n);let d=r.nonce;if(o.includes("nonce")&&typeof d>"u"&&u&&a){const T=await l();d=await a.consume({address:u.address,chainId:T,client:e})}i!=null&&i.fn&&((C=i.runAt)!=null&&C.includes("beforeFillTransaction"))&&(r=await i.fn({...r,chain:s},{phase:"beforeFillTransaction"}),d??(d=r.nonce));const h=((o.includes("blobVersionedHashes")||o.includes("sidecars"))&&r.kzg&&r.blobs||Ud.get(e.uid)===!1||!["fees","gas"].some(m=>o.includes(m))?!1:!!(o.includes("chainId")&&typeof r.chainId!="number"||o.includes("nonce")&&typeof d!="number"||o.includes("fees")&&typeof r.gasPrice!="bigint"&&(typeof r.maxFeePerGas!="bigint"||typeof r.maxPriorityFeePerGas!="bigint")||o.includes("gas")&&typeof r.gas!="bigint"))?await ne(e,Pd,"fillTransaction")({...r,nonce:d}).then(T=>{const{chainId:m,from:b,gas:x,gasPrice:A,nonce:I,maxFeePerBlobGas:U,maxFeePerGas:D,maxPriorityFeePerGas:E,type:P,...M}=T.transaction;return Ud.set(e.uid,!0),{...r,...b?{from:b}:{},...P?{type:P}:{},...typeof m<"u"?{chainId:m}:{},...typeof x<"u"?{gas:x}:{},...typeof A<"u"?{gasPrice:A}:{},...typeof I<"u"?{nonce:I}:{},...typeof U<"u"?{maxFeePerBlobGas:U}:{},...typeof D<"u"?{maxFeePerGas:D}:{},...typeof E<"u"?{maxPriorityFeePerGas:E}:{},..."nonceKey"in M&&typeof M.nonceKey<"u"?{nonceKey:M.nonceKey}:{}}}).catch(T=>{var x;const m=T;return m.name!=="TransactionExecutionError"||((x=m.walk)==null?void 0:x.call(m,A=>{const I=A;return I.name==="MethodNotFoundRpcError"||I.name==="MethodNotSupportedRpcError"}))&&Ud.set(e.uid,!1),r}):r;d??(d=h.nonce),r={...h,...u?{from:u==null?void 0:u.address}:{},...d?{nonce:d}:{}};const{blobs:y,gas:g,kzg:k,type:v}=r;i!=null&&i.fn&&((_=i.runAt)!=null&&_.includes("beforeFillParameters"))&&(r=await i.fn({...r,chain:s},{phase:"beforeFillParameters"}));let w;async function S(){return w||(w=await ne(e,Ar,"getBlock")({blockTag:"latest"}),w)}if(o.includes("nonce")&&typeof d>"u"&&u&&!a&&(r.nonce=await ne(e,kd,"getTransactionCount")({address:u.address,blockTag:"pending"})),(o.includes("blobVersionedHashes")||o.includes("sidecars"))&&y&&k){const T=Ed({blobs:y,kzg:k});if(o.includes("blobVersionedHashes")){const m=r1({commitments:T,to:"hex"});r.blobVersionedHashes=m}if(o.includes("sidecars")){const m=Cd({blobs:y,commitments:T,kzg:k}),b=l1({blobs:y,commitments:T,proofs:m,to:"hex"});r.sidecars=b}}if(o.includes("chainId")&&(r.chainId=await l()),(o.includes("fees")||o.includes("type"))&&typeof v>"u")try{r.type=Ad(r)}catch{let T=u1.get(e.uid);if(typeof T>"u"){const m=await S();T=typeof(m==null?void 0:m.baseFeePerGas)=="bigint",u1.set(e.uid,T)}r.type=T?"eip1559":"legacy"}if(o.includes("fees"))if(r.type!=="legacy"&&r.type!=="eip2930"){if(typeof r.maxFeePerGas>"u"||typeof r.maxPriorityFeePerGas>"u"){const T=await S(),{maxFeePerGas:m,maxPriorityFeePerGas:b}=await vd(e,{block:T,chain:s,request:r});if(typeof r.maxPriorityFeePerGas>"u"&&r.maxFeePerGas&&r.maxFeePerGas<b)throw new Qv({maxPriorityFeePerGas:b});r.maxPriorityFeePerGas=b,r.maxFeePerGas=m}}else{if(typeof r.maxFeePerGas<"u"||typeof r.maxPriorityFeePerGas<"u")throw new yd;if(typeof r.gasPrice>"u"){const T=await S(),{gasPrice:m}=await vd(e,{block:T,chain:s,request:r,type:"legacy"});r.gasPrice=m}}return o.includes("gas")&&typeof g>"u"&&(r.gas=await ne(e,Od,"estimateGas")({...r,account:u,prepare:(u==null?void 0:u.type)==="local"?[]:["blobVersionedHashes"]})),i!=null&&i.fn&&((z=i.runAt)!=null&&z.includes("afterFillParameters"))&&(r=await i.fn({...r,chain:s},{phase:"afterFillParameters"})),Vr(r),delete r.parameters,r}async function Od(e,t){var o,i,c;const{account:r=e.account,prepare:n=!0}=t,s=r?Ke(r):void 0,a=(()=>{if(Array.isArray(n))return n;if((s==null?void 0:s.type)!=="local")return["blobVersionedHashes"]})();try{const l=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await Tc({authorization:t.authorizationList[0]}).catch(()=>{throw new $("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:u,authorizationList:d,blobs:p,blobVersionedHashes:h,blockNumber:y,blockTag:g,data:k,gas:v,gasPrice:w,maxFeePerBlobGas:S,maxFeePerGas:C,maxPriorityFeePerGas:_,nonce:z,value:T,stateOverride:m,...b}=n?await qo(e,{...t,parameters:a,to:l}):t;if(v&&t.gas!==v)return v;const A=(typeof y=="bigint"?W(y):void 0)||g,I=bd(m);Vr(t);const U=(c=(i=(o=e.chain)==null?void 0:o.formatters)==null?void 0:i.transactionRequest)==null?void 0:c.format,E=(U||Sr)({...As(b,{format:U}),account:s,accessList:u,authorizationList:d,blobs:p,blobVersionedHashes:h,data:k,gasPrice:w,maxFeePerBlobGas:S,maxFeePerGas:C,maxPriorityFeePerGas:_,nonce:z,to:l,value:T},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:I?[E,A??e.experimental_blockTag??"latest",I]:A?[E,A]:[E]}))}catch(l){throw qv(l,{...t,account:s,chain:e.chain})}}async function y8(e,t){const{abi:r,address:n,args:s,functionName:a,dataSuffix:o,...i}=t,c=nr({abi:r,args:s,functionName:a});try{return await ne(e,Od,"estimateGas")({data:`${c}${o?o.replace("0x",""):""}`,to:n,...i})}catch(l){const u=i.account?Ke(i.account):void 0;throw Ss(l,{abi:r,address:n,args:s,docsPath:"/docs/contract/estimateContractGas",functionName:a,sender:u==null?void 0:u.address})}}function Ta(e,t){if(!rt(e,{strict:!1}))throw new wt({address:e});if(!rt(t,{strict:!1}))throw new wt({address:t});return e.toLowerCase()===t.toLowerCase()}const d1="/docs/contract/decodeEventLog";function Uc(e){const{abi:t,data:r,strict:n,topics:s}=e,a=n??!0,[o,...i]=s;if(!o)throw new t5({docsPath:d1});const c=t.find(g=>g.type==="event"&&o===kc(Er(g)));if(!(c&&"name"in c)||c.type!=="event")throw new r5(o,{docsPath:d1});const{name:l,inputs:u}=c,d=u==null?void 0:u.some(g=>!("name"in g&&g.name)),p=d?[]:{},h=u.map((g,k)=>[g,k]).filter(([g])=>"indexed"in g&&g.indexed);for(let g=0;g<h.length;g++){const[k,v]=h[g],w=i[g];if(!w)throw new ju({abiItem:c,param:k});p[d?v:k.name||v]=g8({param:k,value:w})}const y=u.filter(g=>!("indexed"in g&&g.indexed));if(y.length>0){if(r&&r!=="0x")try{const g=Co(y,r);if(g)if(d)for(let k=0;k<u.length;k++)p[k]=p[k]??g.shift();else for(let k=0;k<y.length;k++)p[y[k].name]=g[k]}catch(g){if(a)throw g instanceof qh||g instanceof Um?new bc({abiItem:c,data:r,params:y,size:it(r)}):g}else if(a)throw new bc({abiItem:c,data:"0x",params:y,size:0})}return{eventName:l,args:Object.values(p).length>0?p:void 0}}function g8({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(Co([e],t)||[])[0]}function Bd(e){const{abi:t,args:r,logs:n,strict:s=!0}=e,a=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return n.map(o=>{var u;const i=t.filter(d=>d.type==="event"&&o.topics[0]===kc(d));if(i.length===0)return null;let c,l;for(const d of i)try{c=Uc({...o,abi:[d],strict:!0}),l=d;break}catch{}if(!c&&!s){l=i[0];try{c=Uc({...o,abi:[l],strict:!1})}catch{const d=(u=l.inputs)==null?void 0:u.some(p=>!("name"in p&&p.name));return{...o,args:d?[]:{},eventName:l.name}}}return!c||!l||a&&!a.includes(c.eventName)||!x8({args:c.args,inputs:l.inputs,matchArgs:r})?null:{...c,...o}}).filter(Boolean)}function x8(e){const{args:t,inputs:r,matchArgs:n}=e;if(!n)return!0;if(!t)return!1;function s(a,o,i){try{return a.type==="address"?Ta(o,i):a.type==="string"||a.type==="bytes"?At(un(o))===i:o===i}catch{return!1}}return Array.isArray(t)&&Array.isArray(n)?n.every((a,o)=>{if(a==null)return!0;const i=r[o];return i?(Array.isArray(a)?a:[a]).some(l=>s(i,l,t[o])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof n=="object"&&!Array.isArray(n)?Object.entries(n).every(([a,o])=>{if(o==null)return!0;const i=r.find(l=>l.name===a);return i?(Array.isArray(o)?o:[o]).some(l=>s(i,l,t[a])):!1}):!1}function Wr(e,{args:t,eventName:r}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}async function Md(e,{address:t,blockHash:r,fromBlock:n,toBlock:s,event:a,events:o,args:i,strict:c}={}){const l=c??!1,u=o??(a?[a]:void 0);let d=[];u&&(d=[u.flatMap(g=>Eo({abi:[g],eventName:g.name,args:o?void 0:i}))],a&&(d=d[0]));let p;r?p=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,blockHash:r}]}):p=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,fromBlock:typeof n=="bigint"?W(n):n,toBlock:typeof s=="bigint"?W(s):s}]});const h=p.map(y=>Wr(y));return u?Bd({abi:u,args:i,logs:h,strict:l}):h}async function f1(e,t){const{abi:r,address:n,args:s,blockHash:a,eventName:o,fromBlock:i,toBlock:c,strict:l}=t,u=o?ks({abi:r,name:o}):void 0,d=u?void 0:r.filter(p=>p.type==="event");return ne(e,Md,"getLogs")({address:n,args:s,blockHash:a,event:u,events:d,fromBlock:i,toBlock:c,strict:l})}const _d="/docs/contract/decodeFunctionResult";function Us(e){const{abi:t,args:r,functionName:n,data:s}=e;let a=t[0];if(n){const i=ks({abi:t,args:r,name:n});if(!i)throw new da(n,{docsPath:_d});a=i}if(a.type!=="function")throw new da(void 0,{docsPath:_d});if(!a.outputs)throw new Xh(a.name,{docsPath:_d});const o=Co(a.outputs,s);if(o&&o.length>1)return o;if(o&&o.length===1)return o[0]}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Dd=BigInt(0),Fd=BigInt(1);function Yo(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Nd(e){if(!Yo(e))throw new Error("Uint8Array expected")}function Ko(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function Oc(e){const t=e.toString(16);return t.length&1?"0"+t:t}function p1(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Dd:BigInt("0x"+e)}const h1=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",w8=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Zo(e){if(Nd(e),h1)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=w8[e[r]];return t}const hn={_0:48,_9:57,A:65,F:70,a:97,f:102};function m1(e){if(e>=hn._0&&e<=hn._9)return e-hn._0;if(e>=hn.A&&e<=hn.F)return e-(hn.A-10);if(e>=hn.a&&e<=hn.f)return e-(hn.a-10)}function Bc(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(h1)return Uint8Array.fromHex(e);const t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let s=0,a=0;s<r;s++,a+=2){const o=m1(e.charCodeAt(a)),i=m1(e.charCodeAt(a+1));if(o===void 0||i===void 0){const c=e[a]+e[a+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+a)}n[s]=o*16+i}return n}function Os(e){return p1(Zo(e))}function b1(e){return Nd(e),p1(Zo(Uint8Array.from(e).reverse()))}function Xo(e,t){return Bc(e.toString(16).padStart(t*2,"0"))}function y1(e,t){return Xo(e,t).reverse()}function dr(e,t,r){let n;if(typeof t=="string")try{n=Bc(t)}catch(a){throw new Error(e+" must be hex string or Uint8Array, cause: "+a)}else if(Yo(t))n=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const s=n.length;if(typeof r=="number"&&s!==r)throw new Error(e+" of length "+r+" expected, got "+s);return n}function Mc(...e){let t=0;for(let n=0;n<e.length;n++){const s=e[n];Nd(s),t+=s.length}const r=new Uint8Array(t);for(let n=0,s=0;n<e.length;n++){const a=e[n];r.set(a,s),s+=a.length}return r}const zd=e=>typeof e=="bigint"&&Dd<=e;function Ld(e,t,r){return zd(e)&&zd(t)&&zd(r)&&t<=e&&e<r}function Sa(e,t,r,n){if(!Ld(t,r,n))throw new Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)}function v8(e){let t;for(t=0;e>Dd;e>>=Fd,t+=1);return t}const _c=e=>(Fd<<BigInt(e))-Fd,Rd=e=>new Uint8Array(e),g1=e=>Uint8Array.from(e);function k8(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=Rd(e),s=Rd(e),a=0;const o=()=>{n.fill(1),s.fill(0),a=0},i=(...d)=>r(s,n,...d),c=(d=Rd(0))=>{s=i(g1([0]),d),n=i(),d.length!==0&&(s=i(g1([1]),d),n=i())},l=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let d=0;const p=[];for(;d<t;){n=i();const h=n.slice();p.push(h),d+=n.length}return Mc(...p)};return(d,p)=>{o(),c(d);let h;for(;!(h=p(l()));)c();return o(),h}}const E8={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||Yo(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function Dc(e,t,r={}){const n=(s,a,o)=>{const i=E8[a];if(typeof i!="function")throw new Error("invalid validator function");const c=e[s];if(!(o&&c===void 0)&&!i(c,e))throw new Error("param "+String(s)+" is invalid. Expected "+a+", got "+c)};for(const[s,a]of Object.entries(t))n(s,a,!1);for(const[s,a]of Object.entries(r))n(s,a,!0);return e}function x1(e){const t=new WeakMap;return(r,...n)=>{const s=t.get(r);if(s!==void 0)return s;const a=e(r,...n);return t.set(r,a),a}}const C8="0.1.1";function T8(){return C8}class ae extends Error{static setStaticOptions(t){ae.prototype.docsOrigin=t.docsOrigin,ae.prototype.showVersion=t.showVersion,ae.prototype.version=t.version}constructor(t,r={}){const n=(()=>{var u;if(r.cause instanceof ae){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause&&"details"in r.cause&&typeof r.cause.details=="string"?r.cause.details:(u=r.cause)!=null&&u.message?r.cause.message:r.details})(),s=r.cause instanceof ae&&r.cause.docsPath||r.docsPath,a=r.docsOrigin??ae.prototype.docsOrigin,o=`${a}${s??""}`,i=!!(r.version??ae.prototype.showVersion),c=r.version??ae.prototype.version,l=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...n||s||i?["",n?`Details: ${n}`:void 0,s?`See: ${o}`:void 0,i?`Version: ${c}`:void 0]:[]].filter(u=>typeof u=="string").join(`
|
|
39
|
-
`);super(l,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=r.cause,this.details=n,this.docs=o,this.docsOrigin=a,this.docsPath=s,this.shortMessage=t,this.showVersion=i,this.version=c}walk(t){return w1(this,t)}}Object.defineProperty(ae,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${T8()}`}}),ae.setStaticOptions(ae.defaultStaticOptions);function w1(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?w1(e.cause,t):t?null:e}function Aa(e,t){if(Pa(e)>t)throw new j8({givenSize:Pa(e),maxSize:t})}const mn={zero:48,nine:57,A:65,F:70,a:97,f:102};function v1(e){if(e>=mn.zero&&e<=mn.nine)return e-mn.zero;if(e>=mn.A&&e<=mn.F)return e-(mn.A-10);if(e>=mn.a&&e<=mn.f)return e-(mn.a-10)}function S8(e,t={}){const{dir:r,size:n=32}=t;if(n===0)return e;if(e.length>n)throw new V8({size:e.length,targetSize:n,type:"Bytes"});const s=new Uint8Array(n);for(let a=0;a<n;a++){const o=r==="right";s[o?a:n-a-1]=e[o?a:e.length-a-1]}return s}function k1(e,t={}){const{dir:r="left"}=t;let n=e,s=0;for(let a=0;a<n.length-1&&n[r==="left"?a:n.length-a-1].toString()==="0";a++)s++;return n=r==="left"?n.slice(s):n.slice(0,n.length-s),n}function Fc(e,t){if(ft(e)>t)throw new Z8({givenSize:ft(e),maxSize:t})}function A8(e,t){if(typeof t=="number"&&t>0&&t>ft(e)-1)throw new M1({offset:t,position:"start",size:ft(e)})}function P8(e,t,r){if(typeof t=="number"&&typeof r=="number"&&ft(e)!==r-t)throw new M1({offset:r,position:"end",size:ft(e)})}function E1(e,t={}){const{dir:r,size:n=32}=t;if(n===0)return e;const s=e.replace("0x","");if(s.length>n*2)throw new X8({size:Math.ceil(s.length/2),targetSize:n,type:"Hex"});return`0x${s[r==="right"?"padEnd":"padStart"](n*2,"0")}`}function I8(e,t={}){const{dir:r="left"}=t;let n=e.replace("0x",""),s=0;for(let a=0;a<n.length-1&&n[r==="left"?a:n.length-a-1].toString()==="0";a++)s++;return n=r==="left"?n.slice(s):n.slice(0,n.length-s),n==="0"?"0x":r==="right"&&n.length%2===1?`0x${n}0`:`0x${n}`}const U8="#__bigint";function Qo(e,t,r){return JSON.stringify(e,(n,s)=>typeof s=="bigint"?s.toString()+U8:s,r)}const O8=new TextDecoder,B8=new TextEncoder;function M8(e){if(!(e instanceof Uint8Array)){if(!e)throw new Nc(e);if(typeof e!="object")throw new Nc(e);if(!("BYTES_PER_ELEMENT"in e))throw new Nc(e);if(e.BYTES_PER_ELEMENT!==1||e.constructor.name!=="Uint8Array")throw new Nc(e)}}function _8(...e){let t=0;for(const n of e)t+=n.length;const r=new Uint8Array(t);for(let n=0,s=0;n<e.length;n++){const a=e[n];r.set(a,s),s+=a.length}return r}function Hd(e){return e instanceof Uint8Array?e:typeof e=="string"?Zn(e):D8(e)}function D8(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function Zn(e,t={}){const{size:r}=t;let n=e;r&&(Fc(e,r),n=Ms(e,r));let s=n.slice(2);s.length%2&&(s=`0${s}`);const a=s.length/2,o=new Uint8Array(a);for(let i=0,c=0;i<a;i++){const l=v1(s.charCodeAt(c++)),u=v1(s.charCodeAt(c++));if(l===void 0||u===void 0)throw new ae(`Invalid byte sequence ("${s[c-2]}${s[c-1]}" in "${s}").`);o[i]=l<<4|u}return o}function C1(e,t={}){const{size:r}=t,n=B8.encode(e);return typeof r=="number"?(Aa(n,r),F8(n,r)):n}function F8(e,t){return S8(e,{dir:"right",size:t})}function N8(e){return crypto.getRandomValues(new Uint8Array(e))}function Pa(e){return e.length}function z8(e,t,r,n={}){const{strict:s}=n;return e.slice(t,r)}function L8(e,t={}){const{size:r}=t;typeof r<"u"&&Aa(e,r);const n=Et(e,t);return pt(n,t)}function R8(e,t={}){const{size:r}=t;let n=e;if(typeof r<"u"&&(Aa(n,r),n=T1(n)),n.length>1||n[0]>1)throw new G8(n);return!!n[0]}function bn(e,t={}){const{size:r}=t;typeof r<"u"&&Aa(e,r);const n=Et(e,t);return ei(n,t)}function H8(e,t={}){const{size:r}=t;let n=e;return typeof r<"u"&&(Aa(n,r),n=S1(n)),O8.decode(n)}function T1(e){return k1(e,{dir:"left"})}function S1(e){return k1(e,{dir:"right"})}function $8(e){try{return M8(e),!0}catch{return!1}}class G8 extends ae{constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}class Nc extends ae{constructor(t){super(`Value \`${typeof t=="object"?Qo(t):t}\` of type \`${typeof t}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}let j8=class extends ae{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},V8=class extends ae{constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};const W8=new TextEncoder,q8=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Y8(e,t={}){const{strict:r=!1}=t;if(!e)throw new O1(e);if(typeof e!="string")throw new O1(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e))throw new B1(e);if(!e.startsWith("0x"))throw new B1(e)}function lt(...e){return`0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}function zc(e){return e instanceof Uint8Array?Et(e):Array.isArray(e)?Et(new Uint8Array(e)):e}function A1(e,t={}){const r=`0x${Number(e)}`;return typeof t.size=="number"?(Fc(r,t.size),Bs(r,t.size)):r}function Et(e,t={}){let r="";for(let s=0;s<e.length;s++)r+=q8[e[s]];const n=`0x${r}`;return typeof t.size=="number"?(Fc(n,t.size),Ms(n,t.size)):n}function X(e,t={}){const{signed:r,size:n}=t,s=BigInt(e);let a;n?r?a=(1n<<BigInt(n)*8n-1n)-1n:a=2n**(BigInt(n)*8n)-1n:typeof e=="number"&&(a=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof a=="bigint"&&r?-a-1n:0;if(a&&s>a||s<o){const l=typeof e=="bigint"?"n":"";throw new U1({max:a?`${a}${l}`:void 0,min:`${o}${l}`,signed:r,size:n,value:`${e}${l}`})}const c=`0x${(r&&s<0?BigInt.asUintN(n*8,BigInt(s)):s).toString(16)}`;return n?Bs(c,n):c}function Jo(e,t={}){return Et(W8.encode(e),t)}function Bs(e,t){return E1(e,{dir:"left",size:t})}function Ms(e,t){return E1(e,{dir:"right",size:t})}function P1(e){return Et(N8(e))}function Pe(e,t,r,n={}){const{strict:s}=n;A8(e,t);const a=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return s&&P8(a,t,r),a}function ft(e){return Math.ceil((e.length-2)/2)}function $d(e){return I8(e,{dir:"left"})}function pt(e,t={}){const{signed:r}=t;t.size&&Fc(e,t.size);const n=BigInt(e);if(!r)return n;const s=(e.length-2)/2,a=(1n<<BigInt(s)*8n)-1n,o=a>>1n;return n<=o?n:n-a-1n}function ei(e,t={}){const{signed:r,size:n}=t;return Number(!r&&!n?e:pt(e,t))}function I1(e,t={}){const{size:r}=t;let n=Zn(e);return r&&(Aa(n,r),n=S1(n)),new TextDecoder().decode(n)}function Pr(e,t={}){const{strict:r=!1}=t;try{return Y8(e,{strict:r}),!0}catch{return!1}}class U1 extends ae{constructor({max:t,min:r,signed:n,size:s,value:a}){super(`Number \`${a}\` is not in safe${s?` ${s*8}-bit`:""}${n?" signed":" unsigned"} integer range ${t?`(\`${r}\` to \`${t}\`)`:`(above \`${r}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class O1 extends ae{constructor(t){super(`Value \`${typeof t=="object"?Qo(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class B1 extends ae{constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class K8 extends ae{constructor(t){super(`Hex value \`"${t}"\` is an odd length (${t.length-2} nibbles).`,{metaMessages:["It must be an even length."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidLengthError"})}}class Z8 extends ae{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class M1 extends ae{constructor({offset:t,position:r,size:n}){super(`Slice ${r==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class X8 extends ae{constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function Q8(e){return{address:e.address,amount:X(e.amount),index:X(e.index),validatorIndex:X(e.validatorIndex)}}function _1(e){return{...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:X(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:X(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:X(e.gasLimit)},...typeof e.number=="bigint"&&{number:X(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:X(e.prevRandao)},...typeof e.time=="bigint"&&{time:X(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(Q8)}}}const Lc=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],Gd=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],D1=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],F1=[...D1,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],J8=[...D1,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],N1=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],z1=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],L1=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],R1=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],H1=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],e3="0x82ad56cb",$1="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",t3="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",r3="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",jd="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";class Vd extends ${constructor({blockNumber:t,chain:r,contract:n}){super(`Chain "${r.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...t&&n.blockCreated&&n.blockCreated>t?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${n.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class n3 extends ${constructor({chain:t,currentChainId:r}){super(`The current chain of the wallet (id: ${r}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID: ${r}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class s3 extends ${constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(`
|
|
40
|
-
`),{name:"ChainNotFoundError"})}}class G1 extends ${constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}let Ia=class extends ${constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}};const Wd="/docs/contract/encodeDeployData";function Rc(e){const{abi:t,args:r,bytecode:n}=e;if(!r||r.length===0)return n;const s=t.find(o=>"type"in o&&o.type==="constructor");if(!s)throw new Zw({docsPath:Wd});if(!("inputs"in s))throw new Wh({docsPath:Wd});if(!s.inputs||s.inputs.length===0)throw new Wh({docsPath:Wd});const a=$n(s.inputs,r);return rr([n,a])}function Ua({blockNumber:e,chain:t,contract:r}){var s;const n=(s=t==null?void 0:t.contracts)==null?void 0:s[r];if(!n)throw new Vd({chain:t,contract:{name:r}});if(e&&n.blockCreated&&n.blockCreated>e)throw new Vd({blockNumber:e,chain:t,contract:{name:r,blockCreated:n.blockCreated}});return n.address}function qd(e,{docsPath:t,...r}){const n=(()=>{const s=Sc(e,r);return s instanceof Wo?e:s})();return new Lm(n,{docsPath:t,...r})}function Yd(){let e=()=>{},t=()=>{};return{promise:new Promise((n,s)=>{e=n,t=s}),resolve:e,reject:t}}const Kd=new Map;function j1({fn:e,id:t,shouldSplitBatch:r,wait:n=0,sort:s}){const a=async()=>{const u=c();o();const d=u.map(({args:p})=>p);d.length!==0&&e(d).then(p=>{s&&Array.isArray(p)&&p.sort(s);for(let h=0;h<u.length;h++){const{resolve:y}=u[h];y==null||y([p[h],p])}}).catch(p=>{for(let h=0;h<u.length;h++){const{reject:y}=u[h];y==null||y(p)}})},o=()=>Kd.delete(t),i=()=>c().map(({args:u})=>u),c=()=>Kd.get(t)||[],l=u=>Kd.set(t,[...c(),u]);return{flush:o,async schedule(u){const{promise:d,resolve:p,reject:h}=Yd();return(r==null?void 0:r([...i(),u]))&&a(),c().length>0?(l({args:u,resolve:p,reject:h}),d):(l({args:u,resolve:p,reject:h}),setTimeout(a,n),d)}}}async function ti(e,t){var U,D,E,P;const{account:r=e.account,authorizationList:n,batch:s=!!((U=e.batch)!=null&&U.multicall),blockNumber:a,blockTag:o=e.experimental_blockTag??"latest",accessList:i,blobs:c,blockOverrides:l,code:u,data:d,factory:p,factoryData:h,gas:y,gasPrice:g,maxFeePerBlobGas:k,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:S,to:C,value:_,stateOverride:z,...T}=t,m=r?Ke(r):void 0;if(u&&(p||h))throw new $("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(u&&C)throw new $("Cannot provide both `code` & `to` as parameters.");const b=u&&d,x=p&&h&&C&&d,A=b||x,I=b?V1({code:u,data:d}):x?i3({data:d,factory:p,factoryData:h,to:C}):d;try{Vr(t);const B=(typeof a=="bigint"?W(a):void 0)||o,L=l?_1(l):void 0,H=bd(z),G=(P=(E=(D=e.chain)==null?void 0:D.formatters)==null?void 0:E.transactionRequest)==null?void 0:P.format,pe=(G||Sr)({...As(T,{format:G}),accessList:i,account:m,authorizationList:n,blobs:c,data:I,gas:y,gasPrice:g,maxFeePerBlobGas:k,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:S,to:A?void 0:C,value:_},"call");if(s&&a3({request:pe})&&!H&&!L)try{return await o3(e,{...pe,blockNumber:a,blockTag:o})}catch(fe){if(!(fe instanceof G1)&&!(fe instanceof Vd))throw fe}const be=(()=>{const fe=[pe,B];return H&&L?[...fe,H,L]:H?[...fe,H]:L?[...fe,{},L]:fe})(),ie=await e.request({method:"eth_call",params:be});return ie==="0x"?{data:void 0}:{data:ie}}catch(M){const B=c3(M),{offchainLookup:L,offchainLookupSignature:H}=await Promise.resolve().then(()=>mk);if(e.ccipRead!==!1&&(B==null?void 0:B.slice(0,10))===H&&C)return{data:await L(e,{data:B,to:C})};throw A&&(B==null?void 0:B.slice(0,10))==="0x101bb98d"?new Nv({factory:p}):qd(M,{...t,account:m,chain:e.chain})}}function a3({request:e}){const{data:t,to:r,...n}=e;return!(!t||t.startsWith(e3)||!r||Object.values(n).filter(s=>typeof s<"u").length>0)}async function o3(e,t){var g;const{batchSize:r=1024,deployless:n=!1,wait:s=0}=typeof((g=e.batch)==null?void 0:g.multicall)=="object"?e.batch.multicall:{},{blockNumber:a,blockTag:o=e.experimental_blockTag??"latest",data:i,to:c}=t,l=(()=>{if(n)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return Ua({blockNumber:a,chain:e.chain,contract:"multicall3"});throw new G1})(),d=(typeof a=="bigint"?W(a):void 0)||o,{schedule:p}=j1({id:`${e.uid}.${d}`,wait:s,shouldSplitBatch(k){return k.reduce((w,{data:S})=>w+(S.length-2),0)>r*2},fn:async k=>{const v=k.map(C=>({allowFailure:!0,callData:C.data,target:C.to})),w=nr({abi:Lc,args:[v],functionName:"aggregate3"}),S=await e.request({method:"eth_call",params:[{...l===null?{data:V1({code:jd,data:w})}:{to:l,data:w}},d]});return Us({abi:Lc,args:[v],functionName:"aggregate3",data:S||"0x"})}}),[{returnData:h,success:y}]=await p({data:i,to:c});if(!y)throw new Cc({data:h});return h==="0x"?{data:void 0}:{data:h}}function V1(e){const{code:t,data:r}=e;return Rc({abi:Hh(["constructor(bytes, bytes)"]),bytecode:$1,args:[t,r]})}function i3(e){const{data:t,factory:r,factoryData:n,to:s}=e;return Rc({abi:Hh(["constructor(address, bytes, address, bytes)"]),bytecode:t3,args:[s,t,r,n]})}function c3(e){var r;if(!(e instanceof $))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(r=t.data)==null?void 0:r.data:t.data}async function Ir(e,t){const{abi:r,address:n,args:s,functionName:a,...o}=t,i=nr({abi:r,args:s,functionName:a});try{const{data:c}=await ne(e,ti,"call")({...o,data:i,to:n});return Us({abi:r,args:s,functionName:a,data:c||"0x"})}catch(c){throw Ss(c,{abi:r,address:n,args:s,docsPath:"/docs/contract/readContract",functionName:a})}}async function l3(e,t){const{abi:r,address:n,args:s,dataSuffix:a,functionName:o,...i}=t,c=i.account?Ke(i.account):e.account,l=nr({abi:r,args:s,functionName:o});try{const{data:u}=await ne(e,ti,"call")({batch:!1,data:`${l}${a?a.replace("0x",""):""}`,to:n,...i,account:c}),d=Us({abi:r,args:s,functionName:o,data:u||"0x"}),p=r.filter(h=>"name"in h&&h.name===t.functionName);return{result:d,request:{abi:p,address:n,args:s,dataSuffix:a,functionName:o,...i,account:c}}}catch(u){throw Ss(u,{abi:r,address:n,args:s,docsPath:"/docs/contract/simulateContract",functionName:o,sender:c==null?void 0:c.address})}}const Zd=new Map,W1=new Map;let u3=0;function yn(e,t,r){const n=++u3,s=()=>Zd.get(e)||[],a=()=>{const u=s();Zd.set(e,u.filter(d=>d.id!==n))},o=()=>{const u=s();if(!u.some(p=>p.id===n))return;const d=W1.get(e);if(u.length===1&&d){const p=d();p instanceof Promise&&p.catch(()=>{})}a()},i=s();if(Zd.set(e,[...i,{id:n,fns:t}]),i&&i.length>0)return o;const c={};for(const u in t)c[u]=((...d)=>{var h,y;const p=s();if(p.length!==0)for(const g of p)(y=(h=g.fns)[u])==null||y.call(h,...d)});const l=r(c);return typeof l=="function"&&W1.set(e,l),o}async function Xd(e){return new Promise(t=>setTimeout(t,e))}function Oa(e,{emitOnBegin:t,initialWaitTime:r,interval:n}){let s=!0;const a=()=>s=!1;return(async()=>{let i;t&&(i=await e({unpoll:a}));const c=await(r==null?void 0:r(i))??n;await Xd(c);const l=async()=>{s&&(await e({unpoll:a}),await Xd(n),l())};l()})(),a}const d3=new Map,f3=new Map;function p3(e){const t=(s,a)=>({clear:()=>a.delete(s),get:()=>a.get(s),set:o=>a.set(s,o)}),r=t(e,d3),n=t(e,f3);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function h3(e,{cacheKey:t,cacheTime:r=Number.POSITIVE_INFINITY}){const n=p3(t),s=n.response.get();if(s&&r>0&&Date.now()-s.created.getTime()<r)return s.data;let a=n.promise.get();a||(a=e(),n.promise.set(a));try{const o=await a;return n.response.set({created:new Date,data:o}),o}finally{n.promise.clear()}}const m3=e=>`blockNumber.${e}`;async function ri(e,{cacheTime:t=e.cacheTime}={}){const r=await h3(()=>e.request({method:"eth_blockNumber"}),{cacheKey:m3(e.uid),cacheTime:t});return BigInt(r)}async function Hc(e,{filter:t}){const r="strict"in t&&t.strict,n=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof n[0]=="string")return n;const s=n.map(a=>Wr(a));return!("abi"in t)||!t.abi?s:Bd({abi:t.abi,logs:s,strict:r})}async function $c(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function b3(e,t){const{abi:r,address:n,args:s,batch:a=!0,eventName:o,fromBlock:i,onError:c,onLogs:l,poll:u,pollingInterval:d=e.pollingInterval,strict:p}=t;return(typeof u<"u"?u:typeof i=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")))?(()=>{const k=p??!1,v=dt(["watchContractEvent",n,s,a,e.uid,o,d,k,i]);return yn(v,{onLogs:l,onError:c},w=>{let S;i!==void 0&&(S=i-1n);let C,_=!1;const z=Oa(async()=>{var T;if(!_){try{C=await ne(e,Sm,"createContractEventFilter")({abi:r,address:n,args:s,eventName:o,strict:k,fromBlock:i})}catch{}_=!0;return}try{let m;if(C)m=await ne(e,Hc,"getFilterChanges")({filter:C});else{const b=await ne(e,ri,"getBlockNumber")({});S&&S<b?m=await ne(e,f1,"getContractEvents")({abi:r,address:n,args:s,eventName:o,fromBlock:S+1n,toBlock:b,strict:k}):m=[],S=b}if(m.length===0)return;if(a)w.onLogs(m);else for(const b of m)w.onLogs([b])}catch(m){C&&m instanceof Gn&&(_=!1),(T=w.onError)==null||T.call(w,m)}},{emitOnBegin:!0,interval:d});return async()=>{C&&await ne(e,$c,"uninstallFilter")({filter:C}),z()}})})():(()=>{const k=p??!1,v=dt(["watchContractEvent",n,s,a,e.uid,o,d,k]);let w=!0,S=()=>w=!1;return yn(v,{onLogs:l,onError:c},C=>((async()=>{try{const _=(()=>{if(e.transport.type==="fallback"){const m=e.transport.transports.find(b=>b.config.type==="webSocket"||b.config.type==="ipc");return m?m.value:e.transport}return e.transport})(),z=o?Eo({abi:r,eventName:o,args:s}):[],{unsubscribe:T}=await _.subscribe({params:["logs",{address:n,topics:z}],onData(m){var x;if(!w)return;const b=m.result;try{const{eventName:A,args:I}=Uc({abi:r,data:b.data,topics:b.topics,strict:p}),U=Wr(b,{args:I,eventName:A});C.onLogs([U])}catch(A){let I,U;if(A instanceof bc||A instanceof ju){if(p)return;I=A.abiItem.name,U=(x=A.abiItem.inputs)==null?void 0:x.some(E=>!("name"in E&&E.name))}const D=Wr(b,{args:U?[]:{},eventName:I});C.onLogs([D])}},onError(m){var b;(b=C.onError)==null||b.call(C,m)}});S=T,w||S()}catch(_){c==null||c(_)}})(),()=>S()))})()}class gn extends ${constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
|
|
41
|
-
`),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class _s extends ${constructor({docsPath:t,metaMessages:r,type:n}){super(`Account type "${n}" is not supported.`,{docsPath:t,metaMessages:r,name:"AccountTypeNotSupportedError"})}}function Qd({chain:e,currentChainId:t}){if(!e)throw new s3;if(t!==e.id)throw new n3({chain:e,currentChainId:t})}async function Jd(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const ef=new ya(128);async function Gc(e,t){var w,S,C,_;const{account:r=e.account,chain:n=e.chain,accessList:s,authorizationList:a,blobs:o,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:h,type:y,value:g,...k}=t;if(typeof r>"u")throw new gn({docsPath:"/docs/actions/wallet/sendTransaction"});const v=r?Ke(r):null;try{Vr(t);const z=await(async()=>{if(t.to)return t.to;if(t.to!==null&&a&&a.length>0)return await Tc({authorization:a[0]}).catch(()=>{throw new $("`to` is required. Could not infer from `authorizationList`.")})})();if((v==null?void 0:v.type)==="json-rpc"||v===null){let T;n!==null&&(T=await ne(e,Kn,"getChainId")({}),Qd({currentChainId:T,chain:n}));const m=(C=(S=(w=e.chain)==null?void 0:w.formatters)==null?void 0:S.transactionRequest)==null?void 0:C.format,x=(m||Sr)({...As(k,{format:m}),accessList:s,account:v,authorizationList:a,blobs:o,chainId:T,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:h,to:z,type:y,value:g},"sendTransaction"),A=ef.get(e.uid),I=A?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:I,params:[x]},{retryCount:0})}catch(U){if(A===!1)throw U;const D=U;if(D.name==="InvalidInputRpcError"||D.name==="InvalidParamsRpcError"||D.name==="MethodNotFoundRpcError"||D.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[x]},{retryCount:0}).then(E=>(ef.set(e.uid,!0),E)).catch(E=>{const P=E;throw P.name==="MethodNotFoundRpcError"||P.name==="MethodNotSupportedRpcError"?(ef.set(e.uid,!1),D):P});throw D}}if((v==null?void 0:v.type)==="local"){const T=await ne(e,qo,"prepareTransactionRequest")({account:v,accessList:s,authorizationList:a,blobs:o,chain:n,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:h,nonceManager:v.nonceManager,parameters:[...Id,"sidecars"],type:y,value:g,...k,to:z}),m=(_=n==null?void 0:n.serializers)==null?void 0:_.transaction,b=await v.signTransaction(T,{serializer:m});return await ne(e,Jd,"sendRawTransaction")({serializedTransaction:b})}throw(v==null?void 0:v.type)==="smart"?new _s({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new _s({docsPath:"/docs/actions/wallet/sendTransaction",type:v==null?void 0:v.type})}catch(z){throw z instanceof _s?z:Ic(z,{...t,account:v,chain:t.chain||void 0})}}async function ni(e,t){return ni.internal(e,Gc,"sendTransaction",t)}(function(e){async function t(r,n,s,a){const{abi:o,account:i=r.account,address:c,args:l,dataSuffix:u,functionName:d,...p}=a;if(typeof i>"u")throw new gn({docsPath:"/docs/contract/writeContract"});const h=i?Ke(i):null,y=nr({abi:o,args:l,functionName:d});try{return await ne(r,n,s)({data:`${y}${u?u.replace("0x",""):""}`,to:c,account:h,...p})}catch(g){throw Ss(g,{abi:o,address:c,args:l,docsPath:"/docs/contract/writeContract",functionName:d,sender:h==null?void 0:h.address})}}e.internal=t})(ni||(ni={}));class y3 extends ${constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}function jc(e,{delay:t=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((s,a)=>{const o=async({count:i=0}={})=>{const c=async({error:l})=>{const u=typeof t=="function"?t({count:i,error:l}):t;u&&await Xd(u),o({count:i+1})};try{const l=await e();s(l)}catch(l){if(i<r&&await n({count:i,error:l}))return c({error:l});a(l)}};o()})}const q1={"0x0":"reverted","0x1":"success"};function Vc(e,t){const r={...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(n=>Wr(n)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Jt(e.transactionIndex):null,status:e.status?q1[e.status]:null,type:e.type?Km[e.type]||e.type:null};return e.blobGasPrice&&(r.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(r.blobGasUsed=BigInt(e.blobGasUsed)),r}const tf=Ac("transactionReceipt",Vc),Y1="0x5792579257925792579257925792579257925792579257925792579257925792",K1=W(0,{size:32});async function Z1(e,t){const{account:r=e.account,capabilities:n,chain:s=e.chain,experimental_fallback:a,experimental_fallbackDelay:o=32,forceAtomic:i=!1,id:c,version:l="2.0.0"}=t,u=r?Ke(r):null,d=t.calls.map(p=>{const h=p,y=h.abi?nr({abi:h.abi,functionName:h.functionName,args:h.args}):h.data;return{data:h.dataSuffix&&y?tr([y,h.dataSuffix]):y,to:h.to,value:h.value?W(h.value):void 0}});try{const p=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:i,calls:d,capabilities:n,chainId:W(s.id),from:u==null?void 0:u.address,id:c,version:l}]},{retryCount:0});return typeof p=="string"?{id:p}:p}catch(p){const h=p;if(a&&(h.name==="MethodNotFoundRpcError"||h.name==="MethodNotSupportedRpcError"||h.name==="UnknownRpcError"||h.details.toLowerCase().includes("does not exist / is not available")||h.details.toLowerCase().includes("missing or invalid. request()")||h.details.toLowerCase().includes("did not match any variant of untagged enum")||h.details.toLowerCase().includes("account upgraded to unsupported contract")||h.details.toLowerCase().includes("eip-7702 not supported")||h.details.toLowerCase().includes("unsupported wc_ method")||h.details.toLowerCase().includes("feature toggled misconfigured")||h.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(n&&Object.values(n).some(w=>!w.optional)){const w="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new va(new $(w,{details:w}))}if(i&&d.length>1){const v="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new ka(new $(v,{details:v}))}const y=[];for(const v of d){const w=Gc(e,{account:u,chain:s,data:v.data,to:v.to,value:v.value?ze(v.value):void 0});y.push(w),o>0&&await new Promise(S=>setTimeout(S,o))}const g=await Promise.allSettled(y);if(g.every(v=>v.status==="rejected"))throw g[0].reason;const k=g.map(v=>v.status==="fulfilled"?v.value:K1);return{id:tr([...k,W(s.id,{size:32}),Y1])}}throw Ic(p,{...t,account:u,chain:t.chain})}}async function X1(e,t){async function r(u){if(u.endsWith(Y1.slice(2))){const p=$t(Xu(u,-64,-32)),h=Xu(u,0,-64).slice(2).match(/.{1,64}/g),y=await Promise.all(h.map(k=>K1.slice(2)!==k?e.request({method:"eth_getTransactionReceipt",params:[`0x${k}`]},{dedupe:!0}):void 0)),g=y.some(k=>k===null)?100:y.every(k=>(k==null?void 0:k.status)==="0x1")?200:y.every(k=>(k==null?void 0:k.status)==="0x0")?500:600;return{atomic:!1,chainId:Jt(p),receipts:y.filter(Boolean),status:g,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[u]})}const{atomic:n=!1,chainId:s,receipts:a,version:o="2.0.0",...i}=await r(t.id),[c,l]=(()=>{const u=i.status;return u>=100&&u<200?["pending",u]:u>=200&&u<300?["success",u]:u>=300&&u<700?["failure",u]:u==="CONFIRMED"?["success",200]:u==="PENDING"?["pending",100]:[void 0,u]})();return{...i,atomic:n,chainId:s?Jt(s):void 0,receipts:(a==null?void 0:a.map(u=>({...u,blockNumber:ze(u.blockNumber),gasUsed:ze(u.gasUsed),status:q1[u.status]})))??[],statusCode:l,status:c,version:o}}async function Q1(e,t){const{id:r,pollingInterval:n=e.pollingInterval,status:s=({statusCode:g})=>g===200||g>=300,retryCount:a=4,retryDelay:o=({count:g})=>~~(1<<g)*200,timeout:i=6e4,throwOnFailure:c=!1}=t,l=dt(["waitForCallsStatus",e.uid,r]),{promise:u,resolve:d,reject:p}=Yd();let h;const y=yn(l,{resolve:d,reject:p},g=>{const k=Oa(async()=>{const v=w=>{clearTimeout(h),k(),w(),y()};try{const w=await jc(async()=>{const S=await ne(e,X1,"getCallsStatus")({id:r});if(c&&S.status==="failure")throw new y3(S);return S},{retryCount:a,delay:o});if(!s(w))return;v(()=>g.resolve(w))}catch(w){v(()=>g.reject(w))}},{interval:n,emitOnBegin:!0});return k});return h=i?setTimeout(()=>{y(),clearTimeout(h),p(new g3({id:r}))},i):void 0,await u}class g3 extends ${constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}const rf=256;let Wc=rf,qc;function J1(e=11){if(!qc||Wc+e>rf*2){qc="",Wc=0;for(let t=0;t<rf;t++)qc+=(256+Math.random()*256|0).toString(16).substring(1)}return qc.substring(Wc,Wc+++e)}function eb(e){const{batch:t,chain:r,ccipRead:n,key:s="base",name:a="Base Client",type:o="base"}=e,i=e.experimental_blockTag??(typeof(r==null?void 0:r.experimental_preconfirmationTime)=="number"?"pending":void 0),c=(r==null?void 0:r.blockTime)??12e3,l=Math.min(Math.max(Math.floor(c/2),500),4e3),u=e.pollingInterval??l,d=e.cacheTime??u,p=e.account?Ke(e.account):void 0,{config:h,request:y,value:g}=e.transport({account:p,chain:r,pollingInterval:u}),k={...h,...g},v={account:p,batch:t,cacheTime:d,ccipRead:n,chain:r,key:s,name:a,pollingInterval:u,request:y,transport:k,type:o,uid:J1(),...i?{experimental_blockTag:i}:{}};function w(S){return C=>{const _=C(S);for(const T in v)delete _[T];const z={...S,..._};return Object.assign(z,{extend:w(z)})}}return Object.assign(v,{extend:w(v)})}function nf(e){var r,n,s,a,o,i;if(!(e instanceof $))return!1;const t=e.walk(c=>c instanceof ad);return t instanceof ad?((r=t.data)==null?void 0:r.errorName)==="HttpError"||((n=t.data)==null?void 0:n.errorName)==="ResolverError"||((s=t.data)==null?void 0:s.errorName)==="ResolverNotContract"||((a=t.data)==null?void 0:a.errorName)==="ResolverNotFound"||((o=t.data)==null?void 0:o.errorName)==="ReverseAddressMismatch"||((i=t.data)==null?void 0:i.errorName)==="UnsupportedResolverProfile":!1}function x3(e){const{abi:t,data:r}=e,n=vs(r,0,4),s=t.find(a=>a.type==="function"&&n===ko(Er(a)));if(!s)throw new n5(n,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:s.name,args:"inputs"in s&&s.inputs&&s.inputs.length>0?Co(s.inputs,vs(r,4)):void 0}}const sf="/docs/contract/encodeErrorResult";function tb(e){const{abi:t,errorName:r,args:n}=e;let s=t[0];if(r){const c=ks({abi:t,args:n,name:r});if(!c)throw new Yh(r,{docsPath:sf});s=c}if(s.type!=="error")throw new Yh(void 0,{docsPath:sf});const a=Er(s),o=ko(a);let i="0x";if(n&&n.length>0){if(!s.inputs)throw new e5(s.name,{docsPath:sf});i=$n(s.inputs,n)}return rr([o,i])}const af="/docs/contract/encodeFunctionResult";function w3(e){const{abi:t,functionName:r,result:n}=e;let s=t[0];if(r){const o=ks({abi:t,name:r});if(!o)throw new da(r,{docsPath:af});s=o}if(s.type!=="function")throw new da(void 0,{docsPath:af});if(!s.outputs)throw new Xh(s.name,{docsPath:af});const a=(()=>{if(s.outputs.length===0)return[];if(s.outputs.length===1)return[n];if(Array.isArray(n))return n;throw new Qh(n)})();return $n(s.outputs,a)}const si="x-batch-gateway:true";async function rb(e){const{data:t,ccipRequest:r}=e,{args:[n]}=x3({abi:Gd,data:t}),s=[],a=[];return await Promise.all(n.map(async(o,i)=>{try{a[i]=o.urls.includes(si)?await rb({data:o.data,ccipRequest:r}):await r(o),s[i]=!1}catch(c){s[i]=!0,a[i]=v3(c)}})),w3({abi:Gd,functionName:"query",result:[s,a]})}function v3(e){return e.name==="HttpRequestError"&&e.status?tb({abi:Gd,errorName:"HttpError",args:[e.status,e.shortMessage]}):tb({abi:[Pm],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}function nb(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const t=`0x${e.slice(1,65)}`;return Cr(t)?t:null}function of(e){let t=new Uint8Array(32).fill(0);if(!e)return bt(t);const r=e.split(".");for(let n=r.length-1;n>=0;n-=1){const s=nb(r[n]),a=s?un(s):At(xs(r[n]),"bytes");t=At(tr([t,a]),"bytes")}return bt(t)}function k3(e){return`[${e.slice(2)}]`}function E3(e){const t=new Uint8Array(32).fill(0);return e?nb(e)||At(xs(e)):bt(t)}function cf(e){const t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);const r=new Uint8Array(xs(t).byteLength+2);let n=0;const s=t.split(".");for(let a=0;a<s.length;a++){let o=xs(s[a]);o.byteLength>255&&(o=xs(k3(E3(s[a])))),r[n]=o.length,r.set(o,n+1),n+=o.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}async function C3(e,t){const{blockNumber:r,blockTag:n,coinType:s,name:a,gatewayUrls:o,strict:i}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Ua({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),u=c==null?void 0:c.ensTlds;if(u&&!u.some(p=>a.endsWith(p)))return null;const d=s!=null?[of(a),BigInt(s)]:[of(a)];try{const p=nr({abi:z1,functionName:"addr",args:d}),h={address:l,abi:F1,functionName:"resolveWithGateways",args:[Oe(cf(a)),p,o??[si]],blockNumber:r,blockTag:n},g=await ne(e,Ir,"readContract")(h);if(g[0]==="0x")return null;const k=Us({abi:z1,args:d,functionName:"addr",data:g[0]});return k==="0x"||$t(k)==="0x00"?null:k}catch(p){if(i)throw p;if(nf(p))return null;throw p}}class T3 extends ${constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"})}}class ai extends ${constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}}class lf extends ${constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class S3 extends ${constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const A3=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,P3=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,I3=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,U3=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function O3(e){try{const t=await fetch(e,{method:"HEAD"});if(t.status===200){const r=t.headers.get("content-type");return r==null?void 0:r.startsWith("image/")}return!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(r=>{const n=new Image;n.onload=()=>{r(!0)},n.onerror=()=>{r(!1)},n.src=e})}}function sb(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function ab({uri:e,gatewayUrls:t}){const r=I3.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};const n=sb(t==null?void 0:t.ipfs,"https://ipfs.io"),s=sb(t==null?void 0:t.arweave,"https://arweave.net"),a=e.match(A3),{protocol:o,subpath:i,target:c,subtarget:l=""}=(a==null?void 0:a.groups)||{},u=o==="ipns:/"||i==="ipns/",d=o==="ipfs:/"||i==="ipfs/"||P3.test(e);if(e.startsWith("http")&&!u&&!d){let h=e;return t!=null&&t.arweave&&(h=e.replace(/https:\/\/arweave.net/g,t==null?void 0:t.arweave)),{uri:h,isOnChain:!1,isEncoded:!1}}if((u||d)&&c)return{uri:`${n}/${u?"ipns":"ipfs"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if(o==="ar:/"&&c)return{uri:`${s}/${c}${l||""}`,isOnChain:!1,isEncoded:!1};let p=e.replace(U3,"");if(p.startsWith("<svg")&&(p=`data:image/svg+xml;base64,${btoa(p)}`),p.startsWith("data:")||p.startsWith("{"))return{uri:p,isOnChain:!0,isEncoded:!1};throw new lf({uri:e})}function ob(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new T3({data:e});return e.image||e.image_url||e.image_data}async function B3({gatewayUrls:e,uri:t}){try{const r=await fetch(t).then(s=>s.json());return await uf({gatewayUrls:e,uri:ob(r)})}catch{throw new lf({uri:t})}}async function uf({gatewayUrls:e,uri:t}){const{uri:r,isOnChain:n}=ab({uri:t,gatewayUrls:e});if(n||await O3(r))return r;throw new lf({uri:t})}function M3(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[r,n,s]=t.split("/"),[a,o]=r.split(":"),[i,c]=n.split(":");if(!a||a.toLowerCase()!=="eip155")throw new ai({reason:"Only EIP-155 supported"});if(!o)throw new ai({reason:"Chain ID not found"});if(!c)throw new ai({reason:"Contract address not found"});if(!s)throw new ai({reason:"Token ID not found"});if(!i)throw new ai({reason:"ERC namespace not found"});return{chainID:Number.parseInt(o,10),namespace:i.toLowerCase(),contractAddress:c,tokenID:s}}async function _3(e,{nft:t}){if(t.namespace==="erc721")return Ir(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return Ir(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new S3({namespace:t.namespace})}async function D3(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?F3(e,{gatewayUrls:t,record:r}):uf({uri:r,gatewayUrls:t})}async function F3(e,{gatewayUrls:t,record:r}){const n=M3(r),s=await _3(e,{nft:n}),{uri:a,isOnChain:o,isEncoded:i}=ab({uri:s,gatewayUrls:t});if(o&&(a.includes("data:application/json;base64,")||a.startsWith("{"))){const l=i?atob(a.replace("data:application/json;base64,","")):a,u=JSON.parse(l);return uf({uri:ob(u),gatewayUrls:t})}let c=n.tokenID;return n.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),B3({gatewayUrls:t,uri:a.replace(/(?:0x)?{id}/,c)})}async function ib(e,t){const{blockNumber:r,blockTag:n,key:s,name:a,gatewayUrls:o,strict:i}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Ua({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),u=c==null?void 0:c.ensTlds;if(u&&!u.some(d=>a.endsWith(d)))return null;try{const d={address:l,abi:F1,args:[Oe(cf(a)),nr({abi:N1,functionName:"text",args:[of(a),s]}),o??[si]],functionName:"resolveWithGateways",blockNumber:r,blockTag:n},h=await ne(e,Ir,"readContract")(d);if(h[0]==="0x")return null;const y=Us({abi:N1,functionName:"text",data:h[0]});return y===""?null:y}catch(d){if(i)throw d;if(nf(d))return null;throw d}}async function N3(e,{blockNumber:t,blockTag:r,assetGatewayUrls:n,name:s,gatewayUrls:a,strict:o,universalResolverAddress:i}){const c=await ne(e,ib,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:s,universalResolverAddress:i,gatewayUrls:a,strict:o});if(!c)return null;try{return await D3(e,{record:c,gatewayUrls:n})}catch{return null}}async function z3(e,t){const{address:r,blockNumber:n,blockTag:s,coinType:a=60n,gatewayUrls:o,strict:i}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Ua({blockNumber:n,chain:c,contract:"ensUniversalResolver"})})();try{const u={address:l,abi:J8,args:[r,a,o??[si]],functionName:"reverseWithGateways",blockNumber:n,blockTag:s},d=ne(e,Ir,"readContract"),[p]=await d(u);return p||null}catch(u){if(i)throw u;if(nf(u))return null;throw u}}async function L3(e,t){const{blockNumber:r,blockTag:n,name:s}=t,{chain:a}=e,o=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!a)throw new Error("client chain not configured. universalResolverAddress is required.");return Ua({blockNumber:r,chain:a,contract:"ensUniversalResolver"})})(),i=a==null?void 0:a.ensTlds;if(i&&!i.some(l=>s.endsWith(l)))throw new Error(`${s} is not a valid ENS TLD (${i==null?void 0:i.join(", ")}) for chain "${a.name}" (id: ${a.id}).`);const[c]=await ne(e,Ir,"readContract")({address:o,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[Oe(cf(s))],blockNumber:r,blockTag:n});return c}async function cb(e,t){var k,v,w;const{account:r=e.account,blockNumber:n,blockTag:s="latest",blobs:a,data:o,gas:i,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:d,to:p,value:h,...y}=t,g=r?Ke(r):void 0;try{Vr(t);const C=(typeof n=="bigint"?W(n):void 0)||s,_=(w=(v=(k=e.chain)==null?void 0:k.formatters)==null?void 0:v.transactionRequest)==null?void 0:w.format,T=(_||Sr)({...As(y,{format:_}),account:g,blobs:a,data:o,gas:i,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:d,to:p,value:h},"createAccessList"),m=await e.request({method:"eth_createAccessList",params:[T,C]});return{accessList:m.accessList,gasUsed:BigInt(m.gasUsed)}}catch(S){throw qd(S,{...t,account:g,chain:e.chain})}}async function R3(e){const t=Ec(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}}async function lb(e,{address:t,args:r,event:n,events:s,fromBlock:a,strict:o,toBlock:i}={}){const c=s??(n?[n]:void 0),l=Ec(e,{method:"eth_newFilter"});let u=[];c&&(u=[c.flatMap(h=>Eo({abi:[h],eventName:h.name,args:r}))],n&&(u=u[0]));const d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof a=="bigint"?W(a):a,toBlock:typeof i=="bigint"?W(i):i,...u.length?{topics:u}:{}}]});return{abi:c,args:r,eventName:n?n.name:void 0,fromBlock:a,id:d,request:l(d),strict:!!o,toBlock:i,type:"event"}}async function ub(e){const t=Ec(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:t(r),type:"transaction"}}async function H3(e,{address:t,blockNumber:r,blockTag:n=e.experimental_blockTag??"latest"}){const s=typeof r=="bigint"?W(r):void 0,a=await e.request({method:"eth_getBalance",params:[t,s||n]});return BigInt(a)}async function $3(e){const t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}async function G3(e,{blockHash:t,blockNumber:r,blockTag:n="latest"}={}){const s=r!==void 0?W(r):void 0;let a;return t?a=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):a=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[s||n]},{dedupe:!!s}),Jt(a)}async function Yc(e,{address:t,blockNumber:r,blockTag:n="latest"}){const s=r!==void 0?W(r):void 0,a=await e.request({method:"eth_getCode",params:[t,s||n]},{dedupe:!!s});if(a!=="0x")return a}class j3 extends ${constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function V3(e,t){const{address:r,factory:n,factoryData:s}=t;try{const[a,o,i,c,l,u,d]=await ne(e,Ir,"readContract")({abi:W3,address:r,functionName:"eip712Domain",factory:n,factoryData:s});return{domain:{name:o,version:i,chainId:Number(c),verifyingContract:l,salt:u},extensions:d,fields:a}}catch(a){const o=a;throw o.name==="ContractFunctionExecutionError"&&o.cause.name==="ContractFunctionZeroDataError"?new j3({address:r}):o}}const W3=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];function q3(e){var t;return{baseFeePerGas:e.baseFeePerGas.map(r=>BigInt(r)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:(t=e.reward)==null?void 0:t.map(r=>r.map(n=>BigInt(n)))}}async function Y3(e,{blockCount:t,blockNumber:r,blockTag:n="latest",rewardPercentiles:s}){const a=typeof r=="bigint"?W(r):void 0,o=await e.request({method:"eth_feeHistory",params:[W(t),a||n,s]},{dedupe:!!a});return q3(o)}async function K3(e,{filter:t}){const r=t.strict??!1,s=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(a=>Wr(a));return t.abi?Bd({abi:t.abi,logs:s,strict:r}):s}function Z3(e){const{authorizationList:t}=e;if(t)for(const r of t){const{chainId:n}=r,s=r.address;if(!rt(s))throw new wt({address:s});if(n<0)throw new Ia({chainId:n})}df(e)}function X3(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new c1;for(const r of t){const n=it(r),s=Jt(vs(r,0,1));if(n!==32)throw new h8({hash:r,size:n});if(s!==i1)throw new m8({hash:r,version:s})}}df(e)}function df(e){const{chainId:t,maxPriorityFeePerGas:r,maxFeePerGas:n,to:s}=e;if(t<=0)throw new Ia({chainId:t});if(s&&!rt(s))throw new wt({address:s});if(n&&n>Ps)throw new jn({maxFeePerGas:n});if(r&&n&&r>n)throw new Ca({maxFeePerGas:n,maxPriorityFeePerGas:r})}function Q3(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:a}=e;if(t<=0)throw new Ia({chainId:t});if(a&&!rt(a))throw new wt({address:a});if(r||s)throw new $("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>Ps)throw new jn({maxFeePerGas:n})}function J3(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:a}=e;if(a&&!rt(a))throw new wt({address:a});if(typeof t<"u"&&t<=0)throw new Ia({chainId:t});if(r||s)throw new $("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>Ps)throw new jn({maxFeePerGas:n})}function oi(e){if(!e||e.length===0)return[];const t=[];for(let r=0;r<e.length;r++){const{address:n,storageKeys:s}=e[r];for(let a=0;a<s.length;a++)if(s[a].length-2!==64)throw new Bv({storageKey:s[a]});if(!rt(n,{strict:!1}))throw new wt({address:n});t.push([n,s])}return t}function Kc(e,t){const r=Ad(e);return r==="eip1559"?rk(e,t):r==="eip2930"?nk(e,t):r==="eip4844"?tk(e,t):r==="eip7702"?ek(e,t):sk(e,t)}function ek(e,t){const{authorizationList:r,chainId:n,gas:s,nonce:a,to:o,value:i,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:d}=e;Z3(e);const p=oi(u),h=ak(r);return rr(["0x04",jr([W(n),a?W(a):"0x",l?W(l):"0x",c?W(c):"0x",s?W(s):"0x",o??"0x",i?W(i):"0x",d??"0x",p,h,...Ba(e,t)])])}function tk(e,t){const{chainId:r,gas:n,nonce:s,to:a,value:o,maxFeePerBlobGas:i,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:d}=e;X3(e);let p=e.blobVersionedHashes,h=e.sidecars;if(e.blobs&&(typeof p>"u"||typeof h>"u")){const S=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(z=>bt(z)),C=e.kzg,_=Ed({blobs:S,kzg:C});if(typeof p>"u"&&(p=r1({commitments:_})),typeof h>"u"){const z=Cd({blobs:S,commitments:_,kzg:C});h=l1({blobs:S,commitments:_,proofs:z})}}const y=oi(u),g=[W(r),s?W(s):"0x",l?W(l):"0x",c?W(c):"0x",n?W(n):"0x",a??"0x",o?W(o):"0x",d??"0x",y,i?W(i):"0x",p??[],...Ba(e,t)],k=[],v=[],w=[];if(h)for(let S=0;S<h.length;S++){const{blob:C,commitment:_,proof:z}=h[S];k.push(C),v.push(_),w.push(z)}return rr(["0x03",jr(h?[g,k,v,w]:g)])}function rk(e,t){const{chainId:r,gas:n,nonce:s,to:a,value:o,maxFeePerGas:i,maxPriorityFeePerGas:c,accessList:l,data:u}=e;df(e);const d=oi(l),p=[W(r),s?W(s):"0x",c?W(c):"0x",i?W(i):"0x",n?W(n):"0x",a??"0x",o?W(o):"0x",u??"0x",d,...Ba(e,t)];return rr(["0x02",jr(p)])}function nk(e,t){const{chainId:r,gas:n,data:s,nonce:a,to:o,value:i,accessList:c,gasPrice:l}=e;Q3(e);const u=oi(c),d=[W(r),a?W(a):"0x",l?W(l):"0x",n?W(n):"0x",o??"0x",i?W(i):"0x",s??"0x",u,...Ba(e,t)];return rr(["0x01",jr(d)])}function sk(e,t){const{chainId:r=0,gas:n,data:s,nonce:a,to:o,value:i,gasPrice:c}=e;J3(e);let l=[a?W(a):"0x",c?W(c):"0x",n?W(n):"0x",o??"0x",i?W(i):"0x",s??"0x"];if(t){const u=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(r>0)return BigInt(r*2)+BigInt(35n+t.v-27n);const h=27n+(t.v===27n?0n:1n);if(t.v!==h)throw new Uv({v:t.v});return h})(),d=$t(t.r),p=$t(t.s);l=[...l,W(u),d==="0x00"?"0x":d,p==="0x00"?"0x":p]}else r>0&&(l=[...l,W(r),"0x","0x"]);return jr(l)}function Ba(e,t){const r=t??e,{v:n,yParity:s}=r;if(typeof r.r>"u")return[];if(typeof r.s>"u")return[];if(typeof n>"u"&&typeof s>"u")return[];const a=$t(r.r),o=$t(r.s);return[typeof s=="number"?s?W(1):"0x":n===0n?"0x":n===1n?W(1):n===27n?"0x":W(1),a==="0x00"?"0x":a,o==="0x00"?"0x":o]}function ak(e){if(!e||e.length===0)return[];const t=[];for(const r of e){const{chainId:n,nonce:s,...a}=r,o=r.address;t.push([n?Oe(n):"0x",o,s?Oe(s):"0x",...Ba({},a)])}return t}async function ok({address:e,authorization:t,signature:r}){return Ta(Ku(e),await Tc({authorization:t,signature:r}))}const Zc=new ya(8192);function ik(e,{enabled:t=!0,id:r}){if(!t||!r)return e();if(Zc.get(r))return Zc.get(r);const n=e().finally(()=>Zc.delete(r));return Zc.set(r,n),n}function ck(e,t={}){return async(r,n={})=>{var d;const{dedupe:s=!1,methods:a,retryDelay:o=150,retryCount:i=3,uid:c}={...t,...n},{method:l}=r;if((d=a==null?void 0:a.exclude)!=null&&d.includes(l))throw new Ts(new Error("method not supported"),{method:l});if(a!=null&&a.include&&!a.include.includes(l))throw new Ts(new Error("method not supported"),{method:l});const u=s?fa(`${c}.${dt(r)}`):void 0;return ik(()=>jc(async()=>{try{return await e(r)}catch(p){const h=p;switch(h.code){case Po.code:throw new Po(h);case Io.code:throw new Io(h);case Uo.code:throw new Uo(h,{method:r.method});case Oo.code:throw new Oo(h);case Cs.code:throw new Cs(h);case Gn.code:throw new Gn(h);case Bo.code:throw new Bo(h);case Mo.code:throw new Mo(h);case _o.code:throw new _o(h);case Ts.code:throw new Ts(h,{method:r.method});case xa.code:throw new xa(h);case Do.code:throw new Do(h);case wa.code:throw new wa(h);case Fo.code:throw new Fo(h);case No.code:throw new No(h);case zo.code:throw new zo(h);case Lo.code:throw new Lo(h);case Ro.code:throw new Ro(h);case va.code:throw new va(h);case Ho.code:throw new Ho(h);case $o.code:throw new $o(h);case Go.code:throw new Go(h);case jo.code:throw new jo(h);case Vo.code:throw new Vo(h);case ka.code:throw new ka(h);case 5e3:throw new wa(h);default:throw p instanceof $?p:new Lv(h)}}},{delay:({count:p,error:h})=>{var y;if(h&&h instanceof Es){const g=(y=h==null?void 0:h.headers)==null?void 0:y.get("Retry-After");if(g!=null&&g.match(/\d/))return Number.parseInt(g,10)*1e3}return~~(1<<p)*o},retryCount:i,shouldRetry:({error:p})=>lk(p)}),{enabled:s,id:u})}}function lk(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===xa.code||e.code===Cs.code:e instanceof Es&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:!0}class uk extends ${constructor({callbackSelector:t,cause:r,data:n,extraData:s,sender:a,urls:o}){var i;super(r.shortMessage||"An error occurred while fetching for an offchain result.",{cause:r,metaMessages:[...r.metaMessages||[],(i=r.metaMessages)!=null&&i.length?"":[],"Offchain Gateway Call:",o&&[" Gateway URL(s):",...o.map(c=>` ${Ao(c)}`)],` Sender: ${a}`,` Data: ${n}`,` Callback selector: ${t}`,` Extra data: ${s}`].flat(),name:"OffchainLookupError"})}}class dk extends ${constructor({result:t,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${Ao(r)}`,`Response: ${dt(t)}`],name:"OffchainLookupResponseMalformedError"})}}class fk extends ${constructor({sender:t,to:r}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${t}`],name:"OffchainLookupSenderMismatchError"})}}const pk="0x556f1830",db={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function hk(e,{blockNumber:t,blockTag:r,data:n,to:s}){const{args:a}=Bm({data:n,abi:[db]}),[o,i,c,l,u]=a,{ccipRead:d}=e,p=d&&typeof(d==null?void 0:d.request)=="function"?d.request:fb;try{if(!Ta(s,o))throw new fk({sender:o,to:s});const h=i.includes(si)?await rb({data:c,ccipRequest:p}):await p({data:c,sender:o,urls:i}),{data:y}=await ti(e,{blockNumber:t,blockTag:r,data:tr([l,$n([{type:"bytes"},{type:"bytes"}],[h,u])]),to:s});return y}catch(h){throw new uk({callbackSelector:l,cause:h,data:n,extraData:u,sender:o,urls:i})}}async function fb({data:e,sender:t,urls:r}){var s;let n=new Error("An unknown error occurred.");for(let a=0;a<r.length;a++){const o=r[a],i=o.includes("{data}")?"GET":"POST",c=i==="POST"?{data:e,sender:t}:void 0,l=i==="POST"?{"Content-Type":"application/json"}:{};try{const u=await fetch(o.replace("{sender}",t.toLowerCase()).replace("{data}",e),{body:JSON.stringify(c),headers:l,method:i});let d;if((s=u.headers.get("Content-Type"))!=null&&s.startsWith("application/json")?d=(await u.json()).data:d=await u.text(),!u.ok){n=new Es({body:c,details:d!=null&&d.error?dt(d.error):u.statusText,headers:u.headers,status:u.status,url:o});continue}if(!Cr(d)){n=new dk({result:d,url:o});continue}return d}catch(u){n=new Es({body:c,details:u.message,url:o})}}throw n}const mk=Object.freeze(Object.defineProperty({__proto__:null,ccipRequest:fb,offchainLookup:hk,offchainLookupAbiItem:db,offchainLookupSignature:pk},Symbol.toStringTag,{value:"Module"}));function f(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};function r(n){return s=>{const a=typeof s=="function"?s(n):s,o={...n,...a};return Object.assign(o,{extend:r(o)})}}return Object.assign(t,{extend:r(t)})}function bk(){return{}}function yk(e,{errorInstance:t=new Error("timed out"),timeout:r,signal:n}){return new Promise((s,a)=>{(async()=>{let o;try{const i=new AbortController;r>0&&(o=setTimeout(()=>{n&&i.abort()},r)),s(await e({signal:(i==null?void 0:i.signal)||null}))}catch(i){(i==null?void 0:i.name)==="AbortError"&&a(t),a(i)}finally{clearTimeout(o)}})()})}function gk(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const pb=gk();function xk(e,t={}){return{async request(r){var p;const{body:n,fetchFn:s=t.fetchFn??fetch,onRequest:a=t.onRequest,onResponse:o=t.onResponse,timeout:i=t.timeout??1e4}=r,c={...t.fetchOptions??{},...r.fetchOptions??{}},{headers:l,method:u,signal:d}=c;try{const h=await yk(async({signal:g})=>{const k={...c,body:Array.isArray(n)?dt(n.map(C=>({jsonrpc:"2.0",id:C.id??pb.take(),...C}))):dt({jsonrpc:"2.0",id:n.id??pb.take(),...n}),headers:{"Content-Type":"application/json",...l},method:u||"POST",signal:d||(i>0?g:null)},v=new Request(e,k),w=await(a==null?void 0:a(v,k))??{...k,url:e};return await s(w.url??e,w)},{errorInstance:new Hm({body:n,url:e}),timeout:i,signal:!0});o&&await o(h);let y;if((p=h.headers.get("Content-Type"))!=null&&p.startsWith("application/json"))y=await h.json();else{y=await h.text();try{y=JSON.parse(y||"{}")}catch(g){if(h.ok)throw g;y={error:y}}}if(!h.ok)throw new Es({body:n,details:dt(y.error)||h.statusText,headers:h.headers,status:h.status,url:e});return y}catch(h){throw h instanceof Es||h instanceof Hm?h:new Es({body:n,cause:h,url:e})}}}}const wk=`Ethereum Signed Message:
|
|
42
|
-
`;function vk(e){const t=typeof e=="string"?fa(e):typeof e.raw=="string"?e.raw:bt(e.raw),r=fa(`${wk}${it(t)}`);return tr([r,t])}function hb(e,t){return At(vk(e),t)}class kk extends ${constructor({domain:t}){super(`Invalid domain "${dt(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class Ek extends ${constructor({primaryType:t,types:r}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(r))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class Ck extends ${constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function Tk(e){const{domain:t,message:r,primaryType:n,types:s}=e,a=(c,l)=>{const u={...l};for(const d of c){const{name:p,type:h}=d;h==="address"&&(u[p]=u[p].toLowerCase())}return u},o=s.EIP712Domain?t?a(s.EIP712Domain,t):{}:{},i=(()=>{if(n!=="EIP712Domain")return a(s[n],r)})();return dt({domain:o,message:i,primaryType:n,types:s})}function mb(e){const{domain:t,message:r,primaryType:n,types:s}=e,a=(o,i)=>{for(const c of o){const{name:l,type:u}=c,d=i[l],p=u.match(km);if(p&&(typeof d=="number"||typeof d=="bigint")){const[g,k,v]=p;W(d,{signed:k==="int",size:Number.parseInt(v,10)/8})}if(u==="address"&&typeof d=="string"&&!rt(d))throw new wt({address:d});const h=u.match(tv);if(h){const[g,k]=h;if(k&&it(d)!==Number.parseInt(k,10))throw new a5({expectedSize:Number.parseInt(k,10),givenSize:it(d)})}const y=s[u];y&&(Sk(u),a(y,d))}};if(s.EIP712Domain&&t){if(typeof t!="object")throw new kk({domain:t});a(s.EIP712Domain,t)}if(n!=="EIP712Domain")if(s[n])a(s[n],r);else throw new Ek({primaryType:n,types:s})}function bb({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function Sk(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new Ck({type:e})}function Ak(e){const{domain:t={},message:r,primaryType:n}=e,s={EIP712Domain:bb({domain:t}),...e.types};mb({domain:t,message:r,primaryType:n,types:s});const a=["0x1901"];return t&&a.push(Pk({domain:t,types:s})),n!=="EIP712Domain"&&a.push(yb({data:r,primaryType:n,types:s})),At(tr(a))}function Pk({domain:e,types:t}){return yb({data:e,primaryType:"EIP712Domain",types:t})}function yb({data:e,primaryType:t,types:r}){const n=gb({data:e,primaryType:t,types:r});return At(n)}function gb({data:e,primaryType:t,types:r}){const n=[{type:"bytes32"}],s=[Ik({primaryType:t,types:r})];for(const a of r[t]){const[o,i]=wb({types:r,name:a.name,type:a.type,value:e[a.name]});n.push(o),s.push(i)}return $n(n,s)}function Ik({primaryType:e,types:t}){const r=Oe(Uk({primaryType:e,types:t}));return At(r)}function Uk({primaryType:e,types:t}){let r="";const n=xb({primaryType:e,types:t});n.delete(e);const s=[e,...Array.from(n).sort()];for(const a of s)r+=`${a}(${t[a].map(({name:o,type:i})=>`${i} ${o}`).join(",")})`;return r}function xb({primaryType:e,types:t},r=new Set){const n=e.match(/^\w*/u),s=n==null?void 0:n[0];if(r.has(s)||t[s]===void 0)return r;r.add(s);for(const a of t[s])xb({primaryType:a.type,types:t},r);return r}function wb({types:e,name:t,type:r,value:n}){if(e[r]!==void 0)return[{type:"bytes32"},At(gb({data:n,primaryType:r,types:e}))];if(r==="bytes")return[{type:"bytes32"},At(n)];if(r==="string")return[{type:"bytes32"},At(Oe(n))];if(r.lastIndexOf("]")===r.length-1){const s=r.slice(0,r.lastIndexOf("[")),a=n.map(o=>wb({name:t,type:s,types:e,value:o}));return[{type:"bytes32"},At($n(a.map(([o])=>o),a.map(([,o])=>o)))]}return[{type:r},n]}class Ok extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const r=super.get(t);return super.has(t)&&r!==void 0&&(this.delete(t),super.set(t,r)),r}set(t,r){if(super.set(t,r),this.maxSize&&this.size>this.maxSize){const n=this.keys().next().value;n&&this.delete(n)}return this}}const ff={checksum:new Ok(8192)}.checksum;function ii(e,t={}){const{as:r=typeof e=="string"?"Hex":"Bytes"}=t,n=ym(Hd(e));return r==="Bytes"?n:Et(n)}function Bk(e,t={}){const{as:r=typeof e=="string"?"Hex":"Bytes"}=t,n=e1(Hd(e));return r==="Bytes"?n:Et(n)}function Mk(e){return Pr(e)&&ft(e)===32}function vb(e,t={}){const{compressed:r}=t,{prefix:n,x:s,y:a}=e;if(r===!1||typeof s=="bigint"&&typeof a=="bigint"){if(n!==4)throw new Eb({prefix:n,cause:new Lk});return}if(r===!0||typeof s=="bigint"&&typeof a>"u"){if(n!==3&&n!==2)throw new Eb({prefix:n,cause:new zk});return}throw new Nk({publicKey:e})}function _k(e){const t=(()=>{if(Pr(e))return kb(e);if($8(e))return Dk(e);const{prefix:r,x:n,y:s}=e;return typeof n=="bigint"&&typeof s=="bigint"?{prefix:r??4,x:n,y:s}:{prefix:r,x:n}})();return vb(t),t}function Dk(e){return kb(Et(e))}function kb(e){if(e.length!==132&&e.length!==130&&e.length!==68)throw new Rk({publicKey:e});if(e.length===130){const n=BigInt(Pe(e,0,32)),s=BigInt(Pe(e,32,64));return{prefix:4,x:n,y:s}}if(e.length===132){const n=Number(Pe(e,0,1)),s=BigInt(Pe(e,1,33)),a=BigInt(Pe(e,33,65));return{prefix:n,x:s,y:a}}const t=Number(Pe(e,0,1)),r=BigInt(Pe(e,1,33));return{prefix:t,x:r}}function Fk(e,t={}){return Zn(pf(e,t))}function pf(e,t={}){vb(e);const{prefix:r,x:n,y:s}=e,{includePrefix:a=!0}=t;return lt(a?X(r,{size:1}):"0x",X(n,{size:32}),typeof s=="bigint"?X(s,{size:32}):"0x")}class Nk extends ae{constructor({publicKey:t}){super(`Value \`${Qo(t)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}class Eb extends ae{constructor({prefix:t,cause:r}){super(`Prefix "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}class zk extends ae{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}class Lk extends ae{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}let Rk=class extends ae{constructor({publicKey:t}){super(`Value \`${t}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${ft(zc(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}};const Hk=/^0x[a-fA-F0-9]{40}$/;function Ur(e,t={}){const{strict:r=!0}=t;if(!Hk.test(e))throw new Cb({address:e,cause:new Gk});if(r){if(e.toLowerCase()===e)return;if(hf(e)!==e)throw new Cb({address:e,cause:new jk})}}function hf(e){if(ff.has(e))return ff.get(e);Ur(e,{strict:!1});const t=e.substring(2).toLowerCase(),r=ii(C1(t),{as:"Bytes"}),n=t.split("");for(let a=0;a<40;a+=2)r[a>>1]>>4>=8&&n[a]&&(n[a]=n[a].toUpperCase()),(r[a>>1]&15)>=8&&n[a+1]&&(n[a+1]=n[a+1].toUpperCase());const s=`0x${n.join("")}`;return ff.set(e,s),s}function $k(e,t={}){const{checksum:r=!1}=t;return Ur(e),r?hf(e):e}function Xc(e,t={}){const r=ii(`0x${pf(e).slice(4)}`).substring(26);return $k(`0x${r}`,t)}function mf(e,t){return Ur(e,{strict:!1}),Ur(t,{strict:!1}),e.toLowerCase()===t.toLowerCase()}function Qc(e,t={}){const{strict:r=!0}=t??{};try{return Ur(e,{strict:r}),!0}catch{return!1}}class Cb extends ae{constructor({address:t,cause:r}){super(`Address "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class Gk extends ae{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class jk extends ae{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const Vk=/^(.*)\[([0-9]*)\]$/,Wk=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Tb=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,Sb=2n**256n-1n;function Ma(e,t,r){const{checksumAddress:n,staticPosition:s}=r,a=xf(t.type);if(a){const[o,i]=a;return Yk(e,{...t,type:i},{checksumAddress:n,length:o,staticPosition:s})}if(t.type==="tuple")return Qk(e,t,{checksumAddress:n,staticPosition:s});if(t.type==="address")return qk(e,{checksum:n});if(t.type==="bool")return Kk(e);if(t.type.startsWith("bytes"))return Zk(e,t,{staticPosition:s});if(t.type.startsWith("uint")||t.type.startsWith("int"))return Xk(e,t);if(t.type==="string")return Jk(e,{staticPosition:s});throw new Ef(t.type)}const Ab=32,bf=32;function qk(e,t={}){const{checksum:r=!1}=t,n=e.readBytes(32);return[(a=>r?hf(a):a)(Et(z8(n,-20))),32]}function Yk(e,t,r){const{checksumAddress:n,length:s,staticPosition:a}=r;if(!s){const c=bn(e.readBytes(bf)),l=a+c,u=l+Ab;e.setPosition(l);const d=bn(e.readBytes(Ab)),p=ci(t);let h=0;const y=[];for(let g=0;g<d;++g){e.setPosition(u+(p?g*32:h));const[k,v]=Ma(e,t,{checksumAddress:n,staticPosition:u});h+=v,y.push(k)}return e.setPosition(a+32),[y,32]}if(ci(t)){const c=bn(e.readBytes(bf)),l=a+c,u=[];for(let d=0;d<s;++d){e.setPosition(l+d*32);const[p]=Ma(e,t,{checksumAddress:n,staticPosition:l});u.push(p)}return e.setPosition(a+32),[u,32]}let o=0;const i=[];for(let c=0;c<s;++c){const[l,u]=Ma(e,t,{checksumAddress:n,staticPosition:a+o});o+=u,i.push(l)}return[i,o]}function Kk(e){return[R8(e.readBytes(32),{size:32}),32]}function Zk(e,t,{staticPosition:r}){const[n,s]=t.type.split("bytes");if(!s){const o=bn(e.readBytes(32));e.setPosition(r+o);const i=bn(e.readBytes(32));if(i===0)return e.setPosition(r+32),["0x",32];const c=e.readBytes(i);return e.setPosition(r+32),[Et(c),32]}return[Et(e.readBytes(Number.parseInt(s,10),32)),32]}function Xk(e,t){const r=t.type.startsWith("int"),n=Number.parseInt(t.type.split("int")[1]||"256",10),s=e.readBytes(32);return[n>48?L8(s,{signed:r}):bn(s,{signed:r}),32]}function Qk(e,t,r){const{checksumAddress:n,staticPosition:s}=r,a=t.components.length===0||t.components.some(({name:c})=>!c),o=a?[]:{};let i=0;if(ci(t)){const c=bn(e.readBytes(bf)),l=s+c;for(let u=0;u<t.components.length;++u){const d=t.components[u];e.setPosition(l+i);const[p,h]=Ma(e,d,{checksumAddress:n,staticPosition:l});i+=h,o[a?u:d==null?void 0:d.name]=p}return e.setPosition(s+32),[o,32]}for(let c=0;c<t.components.length;++c){const l=t.components[c],[u,d]=Ma(e,l,{checksumAddress:n,staticPosition:s});o[a?c:l==null?void 0:l.name]=u,i+=d}return[o,i]}function Jk(e,{staticPosition:t}){const r=bn(e.readBytes(32)),n=t+r;e.setPosition(n);const s=bn(e.readBytes(32));if(s===0)return e.setPosition(t+32),["",32];const a=e.readBytes(s,32),o=H8(T1(a));return e.setPosition(t+32),[o,32]}function eE({checksumAddress:e,parameters:t,values:r}){const n=[];for(let s=0;s<t.length;s++)n.push(yf({checksumAddress:e,parameter:t[s],value:r[s]}));return n}function yf({checksumAddress:e=!1,parameter:t,value:r}){const n=t,s=xf(n.type);if(s){const[a,o]=s;return rE(r,{checksumAddress:e,length:a,parameter:{...n,type:o}})}if(n.type==="tuple")return iE(r,{checksumAddress:e,parameter:n});if(n.type==="address")return tE(r,{checksum:e});if(n.type==="bool")return sE(r);if(n.type.startsWith("uint")||n.type.startsWith("int")){const a=n.type.startsWith("int"),[,,o="256"]=Tb.exec(n.type)??[];return aE(r,{signed:a,size:Number(o)})}if(n.type.startsWith("bytes"))return nE(r,{type:n.type});if(n.type==="string")return oE(r);throw new Ef(n.type)}function gf(e){let t=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?t+=32:t+=ft(i)}const r=[],n=[];let s=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?(r.push(X(t+s,{size:32})),n.push(i),s+=ft(i)):r.push(i)}return lt(...r,...n)}function tE(e,t){const{checksum:r=!1}=t;return Ur(e,{strict:r}),{dynamic:!1,encoded:Bs(e.toLowerCase())}}function rE(e,t){const{checksumAddress:r,length:n,parameter:s}=t,a=n===null;if(!Array.isArray(e))throw new mE(e);if(!a&&e.length!==n)throw new hE({expectedLength:n,givenLength:e.length,type:`${s.type}[${n}]`});let o=!1;const i=[];for(let c=0;c<e.length;c++){const l=yf({checksumAddress:r,parameter:s,value:e[c]});l.dynamic&&(o=!0),i.push(l)}if(a||o){const c=gf(i);if(a){const l=X(i.length,{size:32});return{dynamic:!0,encoded:i.length>0?lt(l,c):l}}if(o)return{dynamic:!0,encoded:c}}return{dynamic:!1,encoded:lt(...i.map(({encoded:c})=>c))}}function nE(e,{type:t}){const[,r]=t.split("bytes"),n=ft(e);if(!r){let s=e;return n%32!==0&&(s=Ms(s,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:lt(Bs(X(n,{size:32})),s)}}if(n!==Number.parseInt(r,10))throw new Ub({expectedSize:Number.parseInt(r,10),value:e});return{dynamic:!1,encoded:Ms(e)}}function sE(e){if(typeof e!="boolean")throw new ae(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Bs(A1(e))}}function aE(e,{signed:t,size:r}){if(typeof r=="number"){const n=2n**(BigInt(r)-(t?1n:0n))-1n,s=t?-n-1n:0n;if(e>n||e<s)throw new U1({max:n.toString(),min:s.toString(),signed:t,size:r/8,value:e.toString()})}return{dynamic:!1,encoded:X(e,{size:32,signed:t})}}function oE(e){const t=Jo(e),r=Math.ceil(ft(t)/32),n=[];for(let s=0;s<r;s++)n.push(Ms(Pe(t,s*32,(s+1)*32)));return{dynamic:!0,encoded:lt(Ms(X(ft(t),{size:32})),...n)}}function iE(e,t){const{checksumAddress:r,parameter:n}=t;let s=!1;const a=[];for(let o=0;o<n.components.length;o++){const i=n.components[o],c=Array.isArray(e)?o:i.name,l=yf({checksumAddress:r,parameter:i,value:e[c]});a.push(l),l.dynamic&&(s=!0)}return{dynamic:s,encoded:s?gf(a):lt(...a.map(({encoded:o})=>o))}}function xf(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function ci(e){var n;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(n=e.components)==null?void 0:n.some(ci);const r=xf(e.type);return!!(r&&ci({...e,type:r[1]}))}const cE={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 uE({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new lE({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Pb({offset:e});const 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 Pb({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const 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,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function wf(e,{recursiveReadLimit:t=8192}={}){const r=Object.create(cE);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}class Pb extends ae{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class lE extends ae{constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class uE extends ae{constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}function dE(e,t,r={}){const{as:n="Array",checksumAddress:s=!1}=r,a=typeof t=="string"?Zn(t):t,o=wf(a);if(Pa(a)===0&&e.length>0)throw new pE;if(Pa(a)&&Pa(a)<32)throw new fE({data:typeof t=="string"?t:Et(t),parameters:e,size:Pa(a)});let i=0;const c=n==="Array"?[]:{};for(let l=0;l<e.length;++l){const u=e[l];o.setPosition(i);const[d,p]=Ma(o,u,{checksumAddress:s,staticPosition:0});i+=p,n==="Array"?c.push(d):c[u.name??l]=d}return c}function vf(e,t,r){const{checksumAddress:n=!1}={};if(e.length!==t.length)throw new Ob({expectedLength:e.length,givenLength:t.length});const s=eE({checksumAddress:n,parameters:e,values:t}),a=gf(s);return a.length===0?"0x":a}function kf(e,t){if(e.length!==t.length)throw new Ob({expectedLength:e.length,givenLength:t.length});const r=[];for(let n=0;n<e.length;n++){const s=e[n],a=t[n];r.push(kf.encode(s,a))}return lt(...r)}(function(e){function t(r,n,s=!1){if(r==="address"){const c=n;return Ur(c),Bs(c.toLowerCase(),s?32:0)}if(r==="string")return Jo(n);if(r==="bytes")return n;if(r==="bool")return Bs(A1(n),s?32:1);const a=r.match(Tb);if(a){const[c,l,u="256"]=a,d=Number.parseInt(u,10)/8;return X(n,{size:s?32:d,signed:l==="int"})}const o=r.match(Wk);if(o){const[c,l]=o;if(Number.parseInt(l,10)!==(n.length-2)/2)throw new Ub({expectedSize:Number.parseInt(l,10),value:n});return Ms(n,s?32:0)}const i=r.match(Vk);if(i&&Array.isArray(n)){const[c,l]=i,u=[];for(let d=0;d<n.length;d++)u.push(t(l,n[d],!0));return u.length===0?"0x":lt(...u)}throw new Ef(r)}e.encode=t})(kf||(kf={}));function Ib(e){return Array.isArray(e)&&typeof e[0]=="string"||typeof e=="string"?Gh(e):e}class fE extends ae{constructor({data:t,parameters:r,size:n}){super(`Data size of ${n} bytes is too small for given parameters.`,{metaMessages:[`Params: (${la(r)})`,`Data: ${t} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class pE extends ae{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class hE extends ae{constructor({expectedLength:t,givenLength:r,type:n}){super(`Array length mismatch for type \`${n}\`. Expected: \`${t}\`. Given: \`${r}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class Ub extends ae{constructor({expectedSize:t,value:r}){super(`Size of bytes "${r}" (bytes${ft(r)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class Ob extends ae{constructor({expectedLength:t,givenLength:r}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${r}`].join(`
|
|
43
|
-
`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class mE extends ae{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class Ef extends ae{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function bE(e){return yE(e,"Hex")}function yE(e,t){const r=t,n=(()=>{if(typeof e=="string"){if(e.length>3&&e.length%2!==0)throw new K8(e);return Zn(e)}return e})(),s=wf(n,{recursiveReadLimit:Number.POSITIVE_INFINITY});return Bb(s,r)}function Bb(e,t="Hex"){if(e.bytes.length===0)return t==="Hex"?Et(e.bytes):e.bytes;const r=e.readByte();if(r<128&&e.decrementPosition(1),r<192){const s=Mb(e,r,128),a=e.readBytes(s);return t==="Hex"?Et(a):a}const n=Mb(e,r,192);return gE(e,n,t)}function Mb(e,t,r){if(r===128&&t<128)return 1;if(t<=r+55)return t-r;if(t===r+55+1)return e.readUint8();if(t===r+55+2)return e.readUint16();if(t===r+55+3)return e.readUint24();if(t===r+55+4)return e.readUint32();throw new ae("Invalid RLP prefix")}function gE(e,t,r){const n=e.position,s=[];for(;e.position-n<t;)s.push(Bb(e,r));return s}function xE(e,t){const{as:r}=t,n=_b(e),s=wf(new Uint8Array(n.length));return n.encode(s),r==="Hex"?Et(s.bytes):s.bytes}function wE(e,t={}){const{as:r="Hex"}=t;return xE(e,{as:r})}function _b(e){return Array.isArray(e)?vE(e.map(t=>_b(t))):kE(e)}function vE(e){const t=e.reduce((s,a)=>s+a.length,0),r=Db(t);return{length:t<=55?1+t:1+r+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+r),r===1?s.pushUint8(t):r===2?s.pushUint16(t):r===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:a}of e)a(s)}}}function kE(e){const t=typeof e=="string"?Zn(e):e,r=Db(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+r),r===1?s.pushUint8(t.length):r===2?s.pushUint16(t.length):r===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function Db(e){if(e<=255)return 1;if(e<=65535)return 2;if(e<=16777215)return 3;if(e<=4294967295)return 4;throw new ae("Length is too large.")}class Fb extends Wu{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,B5(t);const n=wc(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,a=new Uint8Array(s);a.set(n.length>s?t.create().update(n).digest():n);for(let o=0;o<a.length;o++)a[o]^=54;this.iHash.update(a),this.oHash=t.create();for(let o=0;o<a.length;o++)a[o]^=106;this.oHash.update(a),Hn(a)}update(t){return ba(this),this.iHash.update(t),this}digestInto(t){ba(this),ws(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:r,iHash:n,finished:s,destroyed:a,blockLen:o,outputLen:i}=this;return t=t,t.finished=s,t.destroyed=a,t.blockLen=o,t.outputLen=i,t.oHash=r._cloneInto(t.oHash),t.iHash=n._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Nb=(e,t,r)=>new Fb(e,t).update(r).digest();Nb.create=(e,t)=>new Fb(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Vt=BigInt(0),Nt=BigInt(1),Ds=BigInt(2),EE=BigInt(3),zb=BigInt(4),Lb=BigInt(5),Rb=BigInt(8);function Wt(e,t){const r=e%t;return r>=Vt?r:t+r}function fr(e,t,r){let n=e;for(;t-- >Vt;)n*=n,n%=r;return n}function Cf(e,t){if(e===Vt)throw new Error("invert: expected non-zero number");if(t<=Vt)throw new Error("invert: expected positive modulus, got "+t);let r=Wt(e,t),n=t,s=Vt,a=Nt;for(;r!==Vt;){const i=n/r,c=n%r,l=s-a*i;n=r,r=c,s=a,a=l}if(n!==Nt)throw new Error("invert: does not exist");return Wt(s,t)}function Hb(e,t){const r=(e.ORDER+Nt)/zb,n=e.pow(t,r);if(!e.eql(e.sqr(n),t))throw new Error("Cannot find square root");return n}function CE(e,t){const r=(e.ORDER-Lb)/Rb,n=e.mul(t,Ds),s=e.pow(n,r),a=e.mul(t,s),o=e.mul(e.mul(a,Ds),s),i=e.mul(a,e.sub(o,e.ONE));if(!e.eql(e.sqr(i),t))throw new Error("Cannot find square root");return i}function TE(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-Nt,r=0;for(;t%Ds===Vt;)t/=Ds,r++;let n=Ds;const s=_a(e);for(;Gb(s,n)===1;)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return Hb;let a=s.pow(n,t);const o=(t+Nt)/Ds;return function(c,l){if(c.is0(l))return l;if(Gb(c,l)!==1)throw new Error("Cannot find square root");let u=r,d=c.mul(c.ONE,a),p=c.pow(l,t),h=c.pow(l,o);for(;!c.eql(p,c.ONE);){if(c.is0(p))return c.ZERO;let y=1,g=c.sqr(p);for(;!c.eql(g,c.ONE);)if(y++,g=c.sqr(g),y===u)throw new Error("Cannot find square root");const k=Nt<<BigInt(u-y-1),v=c.pow(d,k);u=y,d=c.sqr(v),p=c.mul(p,d),h=c.mul(h,v)}return h}}function SE(e){return e%zb===EE?Hb:e%Rb===Lb?CE:TE(e)}const AE=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function PE(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=AE.reduce((n,s)=>(n[s]="function",n),t);return Dc(e,r)}function IE(e,t,r){if(r<Vt)throw new Error("invalid exponent, negatives unsupported");if(r===Vt)return e.ONE;if(r===Nt)return t;let n=e.ONE,s=t;for(;r>Vt;)r&Nt&&(n=e.mul(n,s)),s=e.sqr(s),r>>=Nt;return n}function $b(e,t,r=!1){const n=new Array(t.length).fill(r?e.ZERO:void 0),s=t.reduce((o,i,c)=>e.is0(i)?o:(n[c]=o,e.mul(o,i)),e.ONE),a=e.inv(s);return t.reduceRight((o,i,c)=>e.is0(i)?o:(n[c]=e.mul(o,n[c]),e.mul(o,i)),a),n}function Gb(e,t){const r=(e.ORDER-Nt)/Ds,n=e.pow(t,r),s=e.eql(n,e.ONE),a=e.eql(n,e.ZERO),o=e.eql(n,e.neg(e.ONE));if(!s&&!a&&!o)throw new Error("invalid Legendre symbol result");return s?1:a?0:-1}function jb(e,t){t!==void 0&&xo(t);const r=t!==void 0?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function _a(e,t,r=!1,n={}){if(e<=Vt)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:s,nByteLength:a}=jb(e,t);if(a>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let o;const i=Object.freeze({ORDER:e,isLE:r,BITS:s,BYTES:a,MASK:_c(s),ZERO:Vt,ONE:Nt,create:c=>Wt(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return Vt<=c&&c<e},is0:c=>c===Vt,isOdd:c=>(c&Nt)===Nt,neg:c=>Wt(-c,e),eql:(c,l)=>c===l,sqr:c=>Wt(c*c,e),add:(c,l)=>Wt(c+l,e),sub:(c,l)=>Wt(c-l,e),mul:(c,l)=>Wt(c*l,e),pow:(c,l)=>IE(i,c,l),div:(c,l)=>Wt(c*Cf(l,e),e),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>Cf(c,e),sqrt:n.sqrt||(c=>(o||(o=SE(e)),o(i,c))),toBytes:c=>r?y1(c,a):Xo(c,a),fromBytes:c=>{if(c.length!==a)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+c.length);return r?b1(c):Os(c)},invertBatch:c=>$b(i,c),cmov:(c,l,u)=>u?l:c});return Object.freeze(i)}function Vb(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function Wb(e){const t=Vb(e);return t+Math.ceil(t/2)}function UE(e,t,r=!1){const n=e.length,s=Vb(t),a=Wb(t);if(n<16||n<a||n>1024)throw new Error("expected "+a+"-1024 bytes of input, got "+n);const o=r?b1(e):Os(e),i=Wt(o,t-Nt)+Nt;return r?y1(i,s):Xo(i,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const qb=BigInt(0),Tf=BigInt(1);function Sf(e,t){const r=t.negate();return e?r:t}function Yb(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Af(e,t){Yb(e,t);const r=Math.ceil(t/e)+1,n=2**(e-1),s=2**e,a=_c(e),o=BigInt(e);return{windows:r,windowSize:n,mask:a,maxNumber:s,shiftBy:o}}function Kb(e,t,r){const{windowSize:n,mask:s,maxNumber:a,shiftBy:o}=r;let i=Number(e&s),c=e>>o;i>n&&(i-=a,c+=Tf);const l=t*n,u=l+Math.abs(i)-1,d=i===0,p=i<0,h=t%2!==0;return{nextN:c,offset:u,isZero:d,isNeg:p,isNegF:h,offsetF:l}}function OE(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,n)=>{if(!(r instanceof t))throw new Error("invalid point at index "+n)})}function BE(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,n)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+n)})}const Pf=new WeakMap,Zb=new WeakMap;function If(e){return Zb.get(e)||1}function ME(e,t){return{constTimeNegate:Sf,hasPrecomputes(r){return If(r)!==1},unsafeLadder(r,n,s=e.ZERO){let a=r;for(;n>qb;)n&Tf&&(s=s.add(a)),a=a.double(),n>>=Tf;return s},precomputeWindow(r,n){const{windows:s,windowSize:a}=Af(n,t),o=[];let i=r,c=i;for(let l=0;l<s;l++){c=i,o.push(c);for(let u=1;u<a;u++)c=c.add(i),o.push(c);i=c.double()}return o},wNAF(r,n,s){let a=e.ZERO,o=e.BASE;const i=Af(r,t);for(let c=0;c<i.windows;c++){const{nextN:l,offset:u,isZero:d,isNeg:p,isNegF:h,offsetF:y}=Kb(s,c,i);s=l,d?o=o.add(Sf(h,n[y])):a=a.add(Sf(p,n[u]))}return{p:a,f:o}},wNAFUnsafe(r,n,s,a=e.ZERO){const o=Af(r,t);for(let i=0;i<o.windows&&s!==qb;i++){const{nextN:c,offset:l,isZero:u,isNeg:d}=Kb(s,i,o);if(s=c,!u){const p=n[l];a=a.add(d?p.negate():p)}}return a},getPrecomputes(r,n,s){let a=Pf.get(n);return a||(a=this.precomputeWindow(n,r),r!==1&&Pf.set(n,s(a))),a},wNAFCached(r,n,s){const a=If(r);return this.wNAF(a,this.getPrecomputes(a,r,s),n)},wNAFCachedUnsafe(r,n,s,a){const o=If(r);return o===1?this.unsafeLadder(r,n,a):this.wNAFUnsafe(o,this.getPrecomputes(o,r,s),n,a)},setWindowSize(r,n){Yb(n,t),Zb.set(r,n),Pf.delete(r)}}}function _E(e,t,r,n){OE(r,e),BE(n,t);const s=r.length,a=n.length;if(s!==a)throw new Error("arrays of points and scalars must have equal length");const o=e.ZERO,i=v8(BigInt(s));let c=1;i>12?c=i-3:i>4?c=i-2:i>0&&(c=2);const l=_c(c),u=new Array(Number(l)+1).fill(o),d=Math.floor((t.BITS-1)/c)*c;let p=o;for(let h=d;h>=0;h-=c){u.fill(o);for(let g=0;g<a;g++){const k=n[g],v=Number(k>>BigInt(h)&l);u[v]=u[v].add(r[g])}let y=o;for(let g=u.length-1,k=o;g>0;g--)k=k.add(u[g]),y=y.add(k);if(p=p.add(y),h!==0)for(let g=0;g<c;g++)p=p.double()}return p}function Xb(e){return PE(e.Fp),Dc(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...jb(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Qb(e){e.lowS!==void 0&&Ko("lowS",e.lowS),e.prehash!==void 0&&Ko("prehash",e.prehash)}function DE(e){const t=Xb(e);Dc(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:r,Fp:n,a:s}=t;if(r){if(!n.eql(s,n.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}class FE extends Error{constructor(t=""){super(t)}}const xn={Err:FE,_tlv:{encode:(e,t)=>{const{Err:r}=xn;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length&1)throw new r("tlv.encode: unpadded data");const n=t.length/2,s=Oc(n);if(s.length/2&128)throw new r("tlv.encode: long form length too big");const a=n>127?Oc(s.length/2|128):"";return Oc(e)+a+s+t},decode(e,t){const{Err:r}=xn;let n=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[n++]!==e)throw new r("tlv.decode: wrong tlv");const s=t[n++],a=!!(s&128);let o=0;if(!a)o=s;else{const c=s&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");const l=t.subarray(n,n+c);if(l.length!==c)throw new r("tlv.decode: length bytes not complete");if(l[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(const u of l)o=o<<8|u;if(n+=c,o<128)throw new r("tlv.decode(long): not minimal encoding")}const i=t.subarray(n,n+o);if(i.length!==o)throw new r("tlv.decode: wrong value length");return{v:i,l:t.subarray(n+o)}}},_int:{encode(e){const{Err:t}=xn;if(e<wn)throw new t("integer: negative integers are not allowed");let r=Oc(e);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){const{Err:t}=xn;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return Os(e)}},toSig(e){const{Err:t,_int:r,_tlv:n}=xn,s=dr("signature",e),{v:a,l:o}=n.decode(48,s);if(o.length)throw new t("invalid signature: left bytes after parsing");const{v:i,l:c}=n.decode(2,a),{v:l,l:u}=n.decode(2,c);if(u.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(i),s:r.decode(l)}},hexFromSig(e){const{_tlv:t,_int:r}=xn,n=t.encode(2,r.encode(e.r)),s=t.encode(2,r.encode(e.s)),a=n+s;return t.encode(48,a)}};function Uf(e,t){return Zo(Xo(e,t))}const wn=BigInt(0),Ct=BigInt(1);BigInt(2);const Of=BigInt(3),NE=BigInt(4);function zE(e){const t=DE(e),{Fp:r}=t,n=_a(t.n,t.nBitLength),s=t.toBytes||((S,C,_)=>{const z=C.toAffine();return Mc(Uint8Array.from([4]),r.toBytes(z.x),r.toBytes(z.y))}),a=t.fromBytes||(S=>{const C=S.subarray(1),_=r.fromBytes(C.subarray(0,r.BYTES)),z=r.fromBytes(C.subarray(r.BYTES,2*r.BYTES));return{x:_,y:z}});function o(S){const{a:C,b:_}=t,z=r.sqr(S),T=r.mul(z,S);return r.add(r.add(T,r.mul(S,C)),_)}function i(S,C){const _=r.sqr(C),z=o(S);return r.eql(_,z)}if(!i(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const c=r.mul(r.pow(t.a,Of),NE),l=r.mul(r.sqr(t.b),BigInt(27));if(r.is0(r.add(c,l)))throw new Error("bad curve params: a or b");function u(S){return Ld(S,Ct,t.n)}function d(S){const{allowedPrivateKeyLengths:C,nByteLength:_,wrapPrivateKey:z,n:T}=t;if(C&&typeof S!="bigint"){if(Yo(S)&&(S=Zo(S)),typeof S!="string"||!C.includes(S.length))throw new Error("invalid private key");S=S.padStart(_*2,"0")}let m;try{m=typeof S=="bigint"?S:Os(dr("private key",S,_))}catch{throw new Error("invalid private key, expected hex or "+_+" bytes, got "+typeof S)}return z&&(m=Wt(m,T)),Sa("private key",m,Ct,T),m}function p(S){if(!(S instanceof g))throw new Error("ProjectivePoint expected")}const h=x1((S,C)=>{const{px:_,py:z,pz:T}=S;if(r.eql(T,r.ONE))return{x:_,y:z};const m=S.is0();C==null&&(C=m?r.ONE:r.inv(T));const b=r.mul(_,C),x=r.mul(z,C),A=r.mul(T,C);if(m)return{x:r.ZERO,y:r.ZERO};if(!r.eql(A,r.ONE))throw new Error("invZ was invalid");return{x:b,y:x}}),y=x1(S=>{if(S.is0()){if(t.allowInfinityPoint&&!r.is0(S.py))return;throw new Error("bad point: ZERO")}const{x:C,y:_}=S.toAffine();if(!r.isValid(C)||!r.isValid(_))throw new Error("bad point: x or y not FE");if(!i(C,_))throw new Error("bad point: equation left != right");if(!S.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class g{constructor(C,_,z){if(C==null||!r.isValid(C))throw new Error("x required");if(_==null||!r.isValid(_)||r.is0(_))throw new Error("y required");if(z==null||!r.isValid(z))throw new Error("z required");this.px=C,this.py=_,this.pz=z,Object.freeze(this)}static fromAffine(C){const{x:_,y:z}=C||{};if(!C||!r.isValid(_)||!r.isValid(z))throw new Error("invalid affine point");if(C instanceof g)throw new Error("projective point not allowed");const T=m=>r.eql(m,r.ZERO);return T(_)&&T(z)?g.ZERO:new g(_,z,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(C){const _=$b(r,C.map(z=>z.pz));return C.map((z,T)=>z.toAffine(_[T])).map(g.fromAffine)}static fromHex(C){const _=g.fromAffine(a(dr("pointHex",C)));return _.assertValidity(),_}static fromPrivateKey(C){return g.BASE.multiply(d(C))}static msm(C,_){return _E(g,n,C,_)}_setWindowSize(C){w.setWindowSize(this,C)}assertValidity(){y(this)}hasEvenY(){const{y:C}=this.toAffine();if(r.isOdd)return!r.isOdd(C);throw new Error("Field doesn't support isOdd")}equals(C){p(C);const{px:_,py:z,pz:T}=this,{px:m,py:b,pz:x}=C,A=r.eql(r.mul(_,x),r.mul(m,T)),I=r.eql(r.mul(z,x),r.mul(b,T));return A&&I}negate(){return new g(this.px,r.neg(this.py),this.pz)}double(){const{a:C,b:_}=t,z=r.mul(_,Of),{px:T,py:m,pz:b}=this;let x=r.ZERO,A=r.ZERO,I=r.ZERO,U=r.mul(T,T),D=r.mul(m,m),E=r.mul(b,b),P=r.mul(T,m);return P=r.add(P,P),I=r.mul(T,b),I=r.add(I,I),x=r.mul(C,I),A=r.mul(z,E),A=r.add(x,A),x=r.sub(D,A),A=r.add(D,A),A=r.mul(x,A),x=r.mul(P,x),I=r.mul(z,I),E=r.mul(C,E),P=r.sub(U,E),P=r.mul(C,P),P=r.add(P,I),I=r.add(U,U),U=r.add(I,U),U=r.add(U,E),U=r.mul(U,P),A=r.add(A,U),E=r.mul(m,b),E=r.add(E,E),U=r.mul(E,P),x=r.sub(x,U),I=r.mul(E,D),I=r.add(I,I),I=r.add(I,I),new g(x,A,I)}add(C){p(C);const{px:_,py:z,pz:T}=this,{px:m,py:b,pz:x}=C;let A=r.ZERO,I=r.ZERO,U=r.ZERO;const D=t.a,E=r.mul(t.b,Of);let P=r.mul(_,m),M=r.mul(z,b),B=r.mul(T,x),L=r.add(_,z),H=r.add(m,b);L=r.mul(L,H),H=r.add(P,M),L=r.sub(L,H),H=r.add(_,T);let G=r.add(m,x);return H=r.mul(H,G),G=r.add(P,B),H=r.sub(H,G),G=r.add(z,T),A=r.add(b,x),G=r.mul(G,A),A=r.add(M,B),G=r.sub(G,A),U=r.mul(D,H),A=r.mul(E,B),U=r.add(A,U),A=r.sub(M,U),U=r.add(M,U),I=r.mul(A,U),M=r.add(P,P),M=r.add(M,P),B=r.mul(D,B),H=r.mul(E,H),M=r.add(M,B),B=r.sub(P,B),B=r.mul(D,B),H=r.add(H,B),P=r.mul(M,H),I=r.add(I,P),P=r.mul(G,H),A=r.mul(L,A),A=r.sub(A,P),P=r.mul(L,M),U=r.mul(G,U),U=r.add(U,P),new g(A,I,U)}subtract(C){return this.add(C.negate())}is0(){return this.equals(g.ZERO)}wNAF(C){return w.wNAFCached(this,C,g.normalizeZ)}multiplyUnsafe(C){const{endo:_,n:z}=t;Sa("scalar",C,wn,z);const T=g.ZERO;if(C===wn)return T;if(this.is0()||C===Ct)return this;if(!_||w.hasPrecomputes(this))return w.wNAFCachedUnsafe(this,C,g.normalizeZ);let{k1neg:m,k1:b,k2neg:x,k2:A}=_.splitScalar(C),I=T,U=T,D=this;for(;b>wn||A>wn;)b&Ct&&(I=I.add(D)),A&Ct&&(U=U.add(D)),D=D.double(),b>>=Ct,A>>=Ct;return m&&(I=I.negate()),x&&(U=U.negate()),U=new g(r.mul(U.px,_.beta),U.py,U.pz),I.add(U)}multiply(C){const{endo:_,n:z}=t;Sa("scalar",C,Ct,z);let T,m;if(_){const{k1neg:b,k1:x,k2neg:A,k2:I}=_.splitScalar(C);let{p:U,f:D}=this.wNAF(x),{p:E,f:P}=this.wNAF(I);U=w.constTimeNegate(b,U),E=w.constTimeNegate(A,E),E=new g(r.mul(E.px,_.beta),E.py,E.pz),T=U.add(E),m=D.add(P)}else{const{p:b,f:x}=this.wNAF(C);T=b,m=x}return g.normalizeZ([T,m])[0]}multiplyAndAddUnsafe(C,_,z){const T=g.BASE,m=(x,A)=>A===wn||A===Ct||!x.equals(T)?x.multiplyUnsafe(A):x.multiply(A),b=m(this,_).add(m(C,z));return b.is0()?void 0:b}toAffine(C){return h(this,C)}isTorsionFree(){const{h:C,isTorsionFree:_}=t;if(C===Ct)return!0;if(_)return _(g,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:C,clearCofactor:_}=t;return C===Ct?this:_?_(g,this):this.multiplyUnsafe(t.h)}toRawBytes(C=!0){return Ko("isCompressed",C),this.assertValidity(),s(g,this,C)}toHex(C=!0){return Ko("isCompressed",C),Zo(this.toRawBytes(C))}}g.BASE=new g(t.Gx,t.Gy,r.ONE),g.ZERO=new g(r.ZERO,r.ONE,r.ZERO);const{endo:k,nBitLength:v}=t,w=ME(g,k?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:g,normPrivateKeyToScalar:d,weierstrassEquation:o,isWithinCurveOrder:u}}function LE(e){const t=Xb(e);return Dc(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function RE(e){const t=LE(e),{Fp:r,n,nByteLength:s,nBitLength:a}=t,o=r.BYTES+1,i=2*r.BYTES+1;function c(E){return Wt(E,n)}function l(E){return Cf(E,n)}const{ProjectivePoint:u,normPrivateKeyToScalar:d,weierstrassEquation:p,isWithinCurveOrder:h}=zE({...t,toBytes(E,P,M){const B=P.toAffine(),L=r.toBytes(B.x),H=Mc;return Ko("isCompressed",M),M?H(Uint8Array.from([P.hasEvenY()?2:3]),L):H(Uint8Array.from([4]),L,r.toBytes(B.y))},fromBytes(E){const P=E.length,M=E[0],B=E.subarray(1);if(P===o&&(M===2||M===3)){const L=Os(B);if(!Ld(L,Ct,r.ORDER))throw new Error("Point is not on curve");const H=p(L);let G;try{G=r.sqrt(H)}catch(be){const ie=be instanceof Error?": "+be.message:"";throw new Error("Point is not on curve"+ie)}const J=(G&Ct)===Ct;return(M&1)===1!==J&&(G=r.neg(G)),{x:L,y:G}}else if(P===i&&M===4){const L=r.fromBytes(B.subarray(0,r.BYTES)),H=r.fromBytes(B.subarray(r.BYTES,2*r.BYTES));return{x:L,y:H}}else{const L=o,H=i;throw new Error("invalid Point, expected length of "+L+", or uncompressed "+H+", got "+P)}}});function y(E){const P=n>>Ct;return E>P}function g(E){return y(E)?c(-E):E}const k=(E,P,M)=>Os(E.slice(P,M));class v{constructor(P,M,B){Sa("r",P,Ct,n),Sa("s",M,Ct,n),this.r=P,this.s=M,B!=null&&(this.recovery=B),Object.freeze(this)}static fromCompact(P){const M=s;return P=dr("compactSignature",P,M*2),new v(k(P,0,M),k(P,M,2*M))}static fromDER(P){const{r:M,s:B}=xn.toSig(dr("DER",P));return new v(M,B)}assertValidity(){}addRecoveryBit(P){return new v(this.r,this.s,P)}recoverPublicKey(P){const{r:M,s:B,recovery:L}=this,H=T(dr("msgHash",P));if(L==null||![0,1,2,3].includes(L))throw new Error("recovery id invalid");const G=L===2||L===3?M+t.n:M;if(G>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const J=(L&1)===0?"02":"03",pe=u.fromHex(J+Uf(G,r.BYTES)),be=l(G),ie=c(-H*be),fe=c(B*be),Ue=u.BASE.multiplyAndAddUnsafe(pe,ie,fe);if(!Ue)throw new Error("point at infinify");return Ue.assertValidity(),Ue}hasHighS(){return y(this.s)}normalizeS(){return this.hasHighS()?new v(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Bc(this.toDERHex())}toDERHex(){return xn.hexFromSig(this)}toCompactRawBytes(){return Bc(this.toCompactHex())}toCompactHex(){const P=s;return Uf(this.r,P)+Uf(this.s,P)}}const w={isValidPrivateKey(E){try{return d(E),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const E=Wb(t.n);return UE(t.randomBytes(E),t.n)},precompute(E=8,P=u.BASE){return P._setWindowSize(E),P.multiply(BigInt(3)),P}};function S(E,P=!0){return u.fromPrivateKey(E).toRawBytes(P)}function C(E){if(typeof E=="bigint")return!1;if(E instanceof u)return!0;const M=dr("key",E).length,B=r.BYTES,L=B+1,H=2*B+1;if(!(t.allowedPrivateKeyLengths||s===L))return M===L||M===H}function _(E,P,M=!0){if(C(E)===!0)throw new Error("first arg must be private key");if(C(P)===!1)throw new Error("second arg must be public key");return u.fromHex(P).multiply(d(E)).toRawBytes(M)}const z=t.bits2int||function(E){if(E.length>8192)throw new Error("input is too large");const P=Os(E),M=E.length*8-a;return M>0?P>>BigInt(M):P},T=t.bits2int_modN||function(E){return c(z(E))},m=_c(a);function b(E){return Sa("num < 2^"+a,E,wn,m),Xo(E,s)}function x(E,P,M=A){if(["recovered","canonical"].some(ve=>ve in M))throw new Error("sign() legacy options not supported");const{hash:B,randomBytes:L}=t;let{lowS:H,prehash:G,extraEntropy:J}=M;H==null&&(H=!0),E=dr("msgHash",E),Qb(M),G&&(E=dr("prehashed msgHash",B(E)));const pe=T(E),be=d(P),ie=[b(be),b(pe)];if(J!=null&&J!==!1){const ve=J===!0?L(r.BYTES):J;ie.push(dr("extraEntropy",ve))}const fe=Mc(...ie),Ue=pe;function Q(ve){const _e=z(ve);if(!h(_e))return;const $e=l(_e),ot=u.BASE.multiply(_e).toAffine(),Se=c(ot.x);if(Se===wn)return;const ke=c($e*c(Ue+Se*be));if(ke===wn)return;let ye=(ot.x===Se?0:2)|Number(ot.y&Ct),Ze=ke;return H&&y(ke)&&(Ze=g(ke),ye^=1),new v(Se,Ze,ye)}return{seed:fe,k2sig:Q}}const A={lowS:t.lowS,prehash:!1},I={lowS:t.lowS,prehash:!1};function U(E,P,M=A){const{seed:B,k2sig:L}=x(E,P,M),H=t;return k8(H.hash.outputLen,H.nByteLength,H.hmac)(B,L)}u.BASE._setWindowSize(8);function D(E,P,M,B=I){var ye;const L=E;P=dr("msgHash",P),M=dr("publicKey",M);const{lowS:H,prehash:G,format:J}=B;if(Qb(B),"strict"in B)throw new Error("options.strict was renamed to lowS");if(J!==void 0&&J!=="compact"&&J!=="der")throw new Error("format must be compact or der");const pe=typeof L=="string"||Yo(L),be=!pe&&!J&&typeof L=="object"&&L!==null&&typeof L.r=="bigint"&&typeof L.s=="bigint";if(!pe&&!be)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let ie,fe;try{if(be&&(ie=new v(L.r,L.s)),pe){try{J!=="compact"&&(ie=v.fromDER(L))}catch(Ze){if(!(Ze instanceof xn.Err))throw Ze}!ie&&J!=="der"&&(ie=v.fromCompact(L))}fe=u.fromHex(M)}catch{return!1}if(!ie||H&&ie.hasHighS())return!1;G&&(P=t.hash(P));const{r:Ue,s:Q}=ie,ve=T(P),_e=l(Q),$e=c(ve*_e),ot=c(Ue*_e),Se=(ye=u.BASE.multiplyAndAddUnsafe(fe,$e,ot))==null?void 0:ye.toAffine();return Se?c(Se.x)===Ue:!1}return{CURVE:t,getPublicKey:S,getSharedSecret:_,sign:U,verify:D,ProjectivePoint:u,Signature:v,utils:w}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function HE(e){return{hash:e,hmac:(t,...r)=>Nb(e,t,z5(...r)),randomBytes:L5}}function Jc(e,t){const r=n=>RE({...e,...HE(n)});return{...r(t),create:r}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Jb=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),ey=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),$E=BigInt(0),GE=BigInt(1),Bf=BigInt(2),ty=(e,t)=>(e+t/Bf)/t;function jE(e){const t=Jb,r=BigInt(3),n=BigInt(6),s=BigInt(11),a=BigInt(22),o=BigInt(23),i=BigInt(44),c=BigInt(88),l=e*e*e%t,u=l*l*e%t,d=fr(u,r,t)*u%t,p=fr(d,r,t)*u%t,h=fr(p,Bf,t)*l%t,y=fr(h,s,t)*h%t,g=fr(y,a,t)*y%t,k=fr(g,i,t)*g%t,v=fr(k,c,t)*k%t,w=fr(v,i,t)*g%t,S=fr(w,r,t)*u%t,C=fr(S,o,t)*y%t,_=fr(C,n,t)*l%t,z=fr(_,Bf,t);if(!Mf.eql(Mf.sqr(z),e))throw new Error("Cannot find square root");return z}const Mf=_a(Jb,void 0,void 0,{sqrt:jE}),li=Jc({a:$E,b:BigInt(7),Fp:Mf,n:ey,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=ey,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-GE*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,o=BigInt("0x100000000000000000000000000000000"),i=ty(a*e,t),c=ty(-n*e,t);let l=Wt(e-i*r-c*s,t),u=Wt(-i*n-c*a,t);const d=l>o,p=u>o;if(d&&(l=t-l),p&&(u=t-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:l,k2neg:p,k2:u}}}},Td),VE=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:li},Symbol.toStringTag,{value:"Module"}));function el(e,t={}){const{recovered:r}=t;if(typeof e.r>"u")throw new zf({signature:e});if(typeof e.s>"u")throw new zf({signature:e});if(r&&typeof e.yParity>"u")throw new zf({signature:e});if(e.r<0n||e.r>Sb)throw new QE({value:e.r});if(e.s<0n||e.s>Sb)throw new JE({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new rl({value:e.yParity})}function WE(e){return _f(Et(e))}function _f(e){if(e.length!==130&&e.length!==132)throw new XE({signature:e});const t=BigInt(Pe(e,0,32)),r=BigInt(Pe(e,32,64)),n=(()=>{const s=+`0x${e.slice(130)}`;if(!Number.isNaN(s))try{return Ff(s)}catch{throw new rl({value:s})}})();return typeof n>"u"?{r:t,s:r}:{r:t,s:r,yParity:n}}function ry(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return tl(e)}function tl(e){const t=typeof e=="string"?_f(e):e instanceof Uint8Array?WE(e):typeof e.r=="string"?Df(e):e.v?qE(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return el(t),t}function qE(e){return{r:e.r,s:e.s,yParity:Ff(e.v)}}function Df(e){const t=(()=>{const r=e.v?Number(e.v):void 0;let n=e.yParity?Number(e.yParity):void 0;if(typeof r=="number"&&typeof n!="number"&&(n=Ff(r)),typeof n!="number")throw new rl({value:e.yParity});return n})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function YE(e){const[t,r,n]=e;return tl({r:r==="0x"?0n:BigInt(r),s:n==="0x"?0n:BigInt(n),yParity:t==="0x"?0:Number(t)})}function KE(e){el(e);const t=e.r,r=e.s;return lt(X(t,{size:32}),X(r,{size:32}),typeof e.yParity=="number"?X(Nf(e.yParity),{size:1}):"0x")}function ny(e){const{r:t,s:r,yParity:n}=e;return{r:X(t,{size:32}),s:X(r,{size:32}),yParity:n===0?"0x0":"0x1"}}function ZE(e){const{r:t,s:r,yParity:n}=e;return[n?"0x01":"0x",t===0n?"0x":$d(X(t)),r===0n?"0x":$d(X(r))]}function Ff(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new eC({value:e})}function Nf(e){if(e===0)return 27;if(e===1)return 28;throw new rl({value:e})}class XE extends ae{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${ft(zc(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class zf extends ae{constructor({signature:t}){super(`Signature \`${Qo(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class QE extends ae{constructor({value:t}){super(`Value \`${t}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class JE extends ae{constructor({value:t}){super(`Value \`${t}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class rl extends ae{constructor({value:t}){super(`Value \`${t}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class eC extends ae{constructor({value:t}){super(`Value \`${t}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function tC(e,t={}){return typeof e.chainId=="string"?sy(e):{...e,...t.signature}}function sy(e){const{address:t,chainId:r,nonce:n}=e,s=ry(e);return{address:t,chainId:Number(r),nonce:BigInt(n),...s}}function rC(e){return e.map(sy)}function nC(e){const{address:t,chainId:r,nonce:n,...s}=e;return{address:t,chainId:X(r),nonce:X(n),...ny(s)}}function sC(e){return e.map(nC)}function ay(e){return Xc(aC(e))}function aC(e){const{payload:t,signature:r}=e,{r:n,s,yParity:a}=r,i=new li.Signature(BigInt(n),BigInt(s)).addRecoveryBit(a).recoverPublicKey(zc(t).substring(2));return _k(i)}function oC(e){const{address:t,hash:r,payload:n,publicKey:s,signature:a}=e;return t?mf(t,ay({payload:n,signature:a})):li.verify(a,Hd(n),Fk(s),...r?[{prehash:!0,lowS:!0}]:[])}const iC="0x8010801080108010801080108010801080108010801080108010801080108010",cC=Ib("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function oy(e){if(typeof e=="string"){if(Pe(e,-32)!==iC)throw new dC(e)}else el(e.authorization)}function lC(e){oy(e);const t=ei(Pe(e,-64,-32)),r=Pe(e,-t-64,-64),n=Pe(e,0,-t-64),[s,a,o]=dE(cC,r);return{authorization:tC({address:s.delegation,chainId:Number(s.chainId),nonce:s.nonce,yParity:s.yParity,r:s.r,s:s.s}),signature:n,...o&&o!=="0x"?{data:o,to:a}:{}}}function uC(e){try{return oy(e),!0}catch{return!1}}let dC=class extends ae{constructor(t){super(`Value \`${t}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}};function fC(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function pC(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?Jt(e.nonce):void 0,storageProof:e.storageProof?fC(e.storageProof):void 0}}async function hC(e,{address:t,blockNumber:r,blockTag:n,storageKeys:s}){const a=n??"latest",o=r!==void 0?W(r):void 0,i=await e.request({method:"eth_getProof",params:[t,s,o||a]});return pC(i)}async function mC(e,{address:t,blockNumber:r,blockTag:n="latest",slot:s}){const a=r!==void 0?W(r):void 0;return await e.request({method:"eth_getStorageAt",params:[t,s,a||n]})}async function Lf(e,{blockHash:t,blockNumber:r,blockTag:n,hash:s,index:a,sender:o,nonce:i}){var p,h,y;const c=n||"latest",l=r!==void 0?W(r):void 0;let u=null;if(s?u=await e.request({method:"eth_getTransactionByHash",params:[s]},{dedupe:!0}):t?u=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,W(a)]},{dedupe:!0}):typeof a=="number"?u=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[l||c,W(a)]},{dedupe:!!l}):o&&typeof i=="number"&&(u=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[o,W(i)]},{dedupe:!0})),!u)throw new Fm({blockHash:t,blockNumber:r,blockTag:c,hash:s,index:a});return(((y=(h=(p=e.chain)==null?void 0:p.formatters)==null?void 0:h.transaction)==null?void 0:y.format)||Is)(u,"getTransaction")}async function bC(e,{hash:t,transactionReceipt:r}){const[n,s]=await Promise.all([ne(e,ri,"getBlockNumber")({}),t?ne(e,Lf,"getTransaction")({hash:t}):void 0]),a=(r==null?void 0:r.blockNumber)||(s==null?void 0:s.blockNumber);return a?n-a+1n:0n}async function nl(e,{hash:t}){var s,a,o;const r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!r)throw new Nm({hash:t});return(((o=(a=(s=e.chain)==null?void 0:s.formatters)==null?void 0:a.transactionReceipt)==null?void 0:o.format)||Vc)(r,"getTransactionReceipt")}async function yC(e,t){var w;const{account:r,authorizationList:n,allowFailure:s=!0,blockNumber:a,blockOverrides:o,blockTag:i,stateOverride:c}=t,l=t.contracts,{batchSize:u=t.batchSize??1024,deployless:d=t.deployless??!1}=typeof((w=e.batch)==null?void 0:w.multicall)=="object"?e.batch.multicall:{},p=(()=>{if(t.multicallAddress)return t.multicallAddress;if(d)return null;if(e.chain)return Ua({blockNumber:a,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),h=[[]];let y=0,g=0;for(let S=0;S<l.length;S++){const{abi:C,address:_,args:z,functionName:T}=l[S];try{const m=nr({abi:C,args:z,functionName:T});g+=(m.length-2)/2,u>0&&g>u&&h[y].length>0&&(y++,g=(m.length-2)/2,h[y]=[]),h[y]=[...h[y],{allowFailure:!0,callData:m,target:_}]}catch(m){const b=Ss(m,{abi:C,address:_,args:z,docsPath:"/docs/contract/multicall",functionName:T,sender:r});if(!s)throw b;h[y]=[...h[y],{allowFailure:!0,callData:"0x",target:_}]}}const k=await Promise.allSettled(h.map(S=>ne(e,Ir,"readContract")({...p===null?{code:jd}:{address:p},abi:Lc,account:r,args:[S],authorizationList:n,blockNumber:a,blockOverrides:o,blockTag:i,functionName:"aggregate3",stateOverride:c}))),v=[];for(let S=0;S<k.length;S++){const C=k[S];if(C.status==="rejected"){if(!s)throw C.reason;for(let z=0;z<h[S].length;z++)v.push({status:"failure",error:C.reason,result:void 0});continue}const _=C.value;for(let z=0;z<_.length;z++){const{returnData:T,success:m}=_[z],{callData:b}=h[S][z],{abi:x,address:A,functionName:I,args:U}=l[v.length];try{if(b==="0x")throw new go;if(!m)throw new Cc({data:T});const D=Us({abi:x,args:U,data:T,functionName:I});v.push(s?{result:D,status:"success"}:D)}catch(D){const E=Ss(D,{abi:x,address:A,args:U,docsPath:"/docs/contract/multicall",functionName:I});if(!s)throw E;v.push({error:E,result:void 0,status:"failure"})}}}if(v.length!==l.length)throw new $("multicall results mismatch");return v}async function Rf(e,t){const{blockNumber:r,blockTag:n=e.experimental_blockTag??"latest",blocks:s,returnFullTransactions:a,traceTransfers:o,validation:i}=t;try{const c=[];for(const p of s){const h=p.blockOverrides?_1(p.blockOverrides):void 0,y=p.calls.map(k=>{const v=k,w=v.account?Ke(v.account):void 0,S=v.abi?nr(v):v.data,C={...v,account:w,data:v.dataSuffix?tr([S||"0x",v.dataSuffix]):S,from:v.from??(w==null?void 0:w.address)};return Vr(C),Sr(C)}),g=p.stateOverrides?bd(p.stateOverrides):void 0;c.push({blockOverrides:h,calls:y,stateOverrides:g})}const u=(typeof r=="bigint"?W(r):void 0)||n;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:a,traceTransfers:o,validation:i},u]})).map((p,h)=>({...gd(p),calls:p.calls.map((y,g)=>{var x,A;const{abi:k,args:v,functionName:w,to:S}=s[h].calls[g],C=((x=y.error)==null?void 0:x.data)??y.returnData,_=BigInt(y.gasUsed),z=(A=y.logs)==null?void 0:A.map(I=>Wr(I)),T=y.status==="0x1"?"success":"failure",m=k&&T==="success"&&C!=="0x"?Us({abi:k,data:C,functionName:w}):null,b=(()=>{var U;if(T==="success")return;let I;if(((U=y.error)==null?void 0:U.data)==="0x"?I=new go:y.error&&(I=new Cc(y.error)),!!I)return Ss(I,{abi:k??[],address:S??"0x",args:v,functionName:w??"<unknown>"})})();return{data:C,gasUsed:_,logs:z,status:T,...T==="success"?{result:m}:{error:b}}})}))}catch(c){const l=c,u=Sc(l,{});throw u instanceof Wo?l:u}}function Hf(e){let t=!0,r="",n=0,s="",a=!1;for(let o=0;o<e.length;o++){const i=e[o];if(["(",")",","].includes(i)&&(t=!0),i==="("&&n++,i===")"&&n--,!!t){if(n===0){if(i===" "&&["event","function","error",""].includes(s))s="";else if(s+=i,i===")"){a=!0;break}continue}if(i===" "){e[o-1]!==","&&r!==","&&r!==",("&&(r="",t=!1);continue}s+=i,r+=i}}if(!a)throw new ae("Unable to normalize signature.");return s}function $f(e,t){const r=typeof e,n=t.type;switch(n){case"address":return Qc(e,{strict:!1});case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in t?Object.values(t.components).every((s,a)=>$f(Object.values(e)[a],s)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(e)&&e.every(s=>$f(s,{...t,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function iy(e,t,r){for(const n in e){const s=e[n],a=t[n];if(s.type==="tuple"&&a.type==="tuple"&&"components"in s&&"components"in a)return iy(s.components,a.components,r[n]);const o=[s.type,a.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")?Qc(r[n],{strict:!1}):o.includes("address")&&o.includes("bytes")?Qc(r[n],{strict:!1}):!1)return o}}function cy(e,t={}){const{prepare:r=!0}=t,n=Array.isArray(e)||typeof e=="string"?$h(e):e;return{...n,...r?{hash:Da(n)}:{}}}function sl(e,t,r){const{args:n=[],prepare:s=!0}=r??{},a=Pr(t,{strict:!1}),o=e.filter(l=>a?l.type==="function"||l.type==="error"?ly(l)===Pe(t,0,4):l.type==="event"?Da(l)===t:!1:"name"in l&&l.name===t);if(o.length===0)throw new al({name:t});if(o.length===1)return{...o[0],...s?{hash:Da(o[0])}:{}};let i;for(const l of o){if(!("inputs"in l))continue;if(!n||n.length===0){if(!l.inputs||l.inputs.length===0)return{...l,...s?{hash:Da(l)}:{}};continue}if(!l.inputs||l.inputs.length===0||l.inputs.length!==n.length)continue;if(n.every((d,p)=>{const h="inputs"in l&&l.inputs[p];return h?$f(d,h):!1})){if(i&&"inputs"in i&&i.inputs){const d=iy(l.inputs,i.inputs,n);if(d)throw new xC({abiItem:l,type:d[0]},{abiItem:i,type:d[1]})}i=l}}const c=(()=>{if(i)return i;const[l,...u]=o;return{...l,overloads:u}})();if(!c)throw new al({name:t});return{...c,...s?{hash:Da(c)}:{}}}function ly(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,n]=e;return sl(r,n)}return e[0]})();return Pe(Da(t),0,4)}function gC(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,s]=e;return sl(n,s)}return e[0]})(),r=typeof t=="string"?t:pc(t);return Hf(r)}function Da(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,n]=e;return sl(r,n)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:ii(Jo(gC(t)))}class xC extends ae{constructor(t,r){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${Hf(pc(t.abiItem))}\`, and`,`\`${r.type}\` in \`${Hf(pc(r.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}class al extends ae{constructor({name:t,data:r,type:n="item"}){const s=t?` with name "${t}"`:r?` with data "${r}"`:"";super(`ABI ${n}${s} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}function wC(...e){var a;const[t,r]=(()=>{if(Array.isArray(e[0])){const[o,i]=e;return[kC(o),i]}return e})(),{bytecode:n,args:s}=r;return lt(n,(a=t.inputs)!=null&&a.length&&(s!=null&&s.length)?vf(t.inputs,s):"0x")}function vC(e){return cy(e)}function kC(e){const t=e.find(r=>r.type==="constructor");if(!t)throw new al({name:"constructor"});return t}function EC(...e){const[t,r=[]]=(()=>{if(Array.isArray(e[0])){const[l,u,d]=e;return[uy(l,u,{args:d}),d]}const[i,c]=e;return[i,c]})(),{overloads:n}=t,s=n?uy([t,...n],t.name,{args:r}):t,a=CC(s),o=r.length>0?vf(s.inputs,r):void 0;return o?lt(a,o):a}function Fa(e,t={}){return cy(e,t)}function uy(e,t,r){const n=sl(e,t,r);if(n.type!=="function")throw new al({name:t,type:"function"});return n}function CC(e){return ly(e)}const TC="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",qr="0x0000000000000000000000000000000000000000",SC="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function AC(e,t){const{blockNumber:r,blockTag:n,calls:s,stateOverrides:a,traceAssetChanges:o,traceTransfers:i,validation:c}=t,l=t.account?Ke(t.account):void 0;if(o&&!l)throw new $("`account` is required when `traceAssetChanges` is true");const u=l?wC(vC("constructor(bytes, bytes)"),{bytecode:$1,args:[SC,EC(Fa("function getBalance(address)"),[l.address])]}):void 0,d=o?await Promise.all(t.calls.map(async B=>{if(!B.data&&!B.abi)return;const{accessList:L}=await cb(e,{account:l.address,...B,data:B.abi?nr(B):B.data});return L.map(({address:H,storageKeys:G})=>G.length>0?H:null)})).then(B=>B.flat().filter(Boolean)):[],p=await Rf(e,{blockNumber:r,blockTag:n,blocks:[...o?[{calls:[{data:u}],stateOverrides:a},{calls:d.map((B,L)=>({abi:[Fa("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:B,from:qr,nonce:L})),stateOverrides:[{address:qr,nonce:0}]}]:[],{calls:[...s,{}].map(B=>({...B,from:l==null?void 0:l.address})),stateOverrides:a},...o?[{calls:[{data:u}]},{calls:d.map((B,L)=>({abi:[Fa("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:B,from:qr,nonce:L})),stateOverrides:[{address:qr,nonce:0}]},{calls:d.map((B,L)=>({to:B,abi:[Fa("function decimals() returns (uint256)")],functionName:"decimals",from:qr,nonce:L})),stateOverrides:[{address:qr,nonce:0}]},{calls:d.map((B,L)=>({to:B,abi:[Fa("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:qr,nonce:L})),stateOverrides:[{address:qr,nonce:0}]},{calls:d.map((B,L)=>({to:B,abi:[Fa("function symbol() returns (string)")],functionName:"symbol",from:qr,nonce:L})),stateOverrides:[{address:qr,nonce:0}]}]:[]],traceTransfers:i,validation:c}),h=o?p[2]:p[0],[y,g,,k,v,w,S,C]=o?p:[],{calls:_,...z}=h,T=_.slice(0,-1)??[],m=(y==null?void 0:y.calls)??[],b=(g==null?void 0:g.calls)??[],x=[...m,...b].map(B=>B.status==="success"?ze(B.data):null),A=(k==null?void 0:k.calls)??[],I=(v==null?void 0:v.calls)??[],U=[...A,...I].map(B=>B.status==="success"?ze(B.data):null),D=((w==null?void 0:w.calls)??[]).map(B=>B.status==="success"?B.result:null),E=((C==null?void 0:C.calls)??[]).map(B=>B.status==="success"?B.result:null),P=((S==null?void 0:S.calls)??[]).map(B=>B.status==="success"?B.result:null),M=[];for(const[B,L]of U.entries()){const H=x[B];if(typeof L!="bigint"||typeof H!="bigint")continue;const G=D[B-1],J=E[B-1],pe=P[B-1],be=B===0?{address:TC,decimals:18,symbol:"ETH"}:{address:d[B-1],decimals:pe||G?Number(G??1):void 0,symbol:J??void 0};M.some(ie=>ie.token.address===be.address)||M.push({token:be,value:{pre:H,post:L,diff:L-H}})}return{assetChanges:M,block:z,results:T}}const dy="0x6492649264926492649264926492649264926492649264926492649264926492";function PC(e){if(Pe(e,-32)!==dy)throw new OC(e)}function IC(e){const{data:t,signature:r,to:n}=e;return lt(vf(Ib("address, bytes, bytes"),[n,t,r]),dy)}function UC(e){try{return PC(e),!0}catch{return!1}}class OC extends ae{constructor(t){super(`Value \`${t}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}function BC({r:e,s:t,to:r="hex",v:n,yParity:s}){const a=(()=>{if(s===0||s===1)return s;if(n&&(n===27n||n===28n||n>=35n))return n%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),o=`0x${new li.Signature(ze(e),ze(t)).toCompactHex()}${a===0?"1b":"1c"}`;return r==="hex"?o:er(o)}async function ui(e,t){var c,l,u,d;const{address:r,chain:n=e.chain,hash:s,erc6492VerifierAddress:a=t.universalSignatureVerifierAddress??((l=(c=n==null?void 0:n.contracts)==null?void 0:c.erc6492Verifier)==null?void 0:l.address),multicallAddress:o=t.multicallAddress??((d=(u=n==null?void 0:n.contracts)==null?void 0:u.multicall3)==null?void 0:d.address)}=t;if(n!=null&&n.verifyHash)return await n.verifyHash(e,t);const i=(()=>{const p=t.signature;return Cr(p)?p:typeof p=="object"&&"r"in p&&"s"in p?BC(p):bt(p)})();try{return uC(i)?await MC(e,{...t,multicallAddress:o,signature:i}):await _C(e,{...t,verifierAddress:a,signature:i})}catch(p){try{if(Ta(Ku(r),await Gm({hash:s,signature:i})))return!0}catch{}if(p instanceof Fs)return!1;throw p}}async function MC(e,t){var k;const{address:r,blockNumber:n,blockTag:s,hash:a,multicallAddress:o}=t,{authorization:i,data:c,signature:l,to:u}=lC(t.signature);if(await Yc(e,{address:r,blockNumber:n,blockTag:s})===rr(["0xef0100",i.address]))return await DC(e,{address:r,blockNumber:n,blockTag:s,hash:a,signature:l});const p={address:i.address,chainId:Number(i.chainId),nonce:Number(i.nonce),r:W(i.r,{size:32}),s:W(i.s,{size:32}),yParity:i.yParity};if(!await ok({address:r,authorization:p}))throw new Fs;const y=await ne(e,Ir,"readContract")({...o?{address:o}:{code:jd},authorizationList:[p],abi:Lc,blockNumber:n,blockTag:"pending",functionName:"aggregate3",args:[[...c?[{allowFailure:!0,target:u??r,callData:c}]:[],{allowFailure:!0,target:r,callData:nr({abi:L1,functionName:"isValidSignature",args:[a,l]})}]]}),g=(k=y[y.length-1])==null?void 0:k.returnData;if(g!=null&&g.startsWith("0x1626ba7e"))return!0;throw new Fs}async function _C(e,t){const{address:r,factory:n,factoryData:s,hash:a,signature:o,verifierAddress:i,...c}=t,l=await(async()=>!n&&!s||UC(o)?o:IC({data:s,signature:o,to:n}))(),u=i?{to:i,data:nr({abi:R1,functionName:"isValidSig",args:[r,a,l]}),...c}:{data:Rc({abi:R1,args:[r,a,l],bytecode:r3}),...c},{data:d}=await ne(e,ti,"call")(u).catch(p=>{throw p instanceof Lm?new Fs:p});if(h5(d??"0x0"))return!0;throw new Fs}async function DC(e,t){const{address:r,blockNumber:n,blockTag:s,hash:a,signature:o}=t;if((await ne(e,Ir,"readContract")({address:r,abi:L1,args:[a,o],blockNumber:n,blockTag:s,functionName:"isValidSignature"}).catch(c=>{throw c instanceof Rm?new Fs:c})).startsWith("0x1626ba7e"))return!0;throw new Fs}let Fs=class extends Error{};async function FC(e,{address:t,message:r,factory:n,factoryData:s,signature:a,...o}){const i=hb(r);return ne(e,ui,"verifyHash")({address:t,factory:n,factoryData:s,hash:i,signature:a,...o})}async function NC(e,t){const{address:r,factory:n,factoryData:s,signature:a,message:o,primaryType:i,types:c,domain:l,...u}=t,d=Ak({message:o,primaryType:i,types:c,domain:l});return ne(e,ui,"verifyHash")({address:r,factory:n,factoryData:s,hash:d,signature:a,...u})}function fy(e,{emitOnBegin:t=!1,emitMissed:r=!1,onBlockNumber:n,onError:s,poll:a,pollingInterval:o=e.pollingInterval}){const i=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc"));let c;return i?(()=>{const d=dt(["watchBlockNumber",e.uid,t,r,o]);return yn(d,{onBlockNumber:n,onError:s},p=>Oa(async()=>{var h;try{const y=await ne(e,ri,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(y===c)return;if(y-c>1&&r)for(let g=c+1n;g<y;g++)p.onBlockNumber(g,c),c=g}(c===void 0||y>c)&&(p.onBlockNumber(y,c),c=y)}catch(y){(h=p.onError)==null||h.call(p,y)}},{emitOnBegin:t,interval:o}))})():(()=>{const d=dt(["watchBlockNumber",e.uid,t,r]);return yn(d,{onBlockNumber:n,onError:s},p=>{let h=!0,y=()=>h=!1;return(async()=>{try{const g=(()=>{if(e.transport.type==="fallback"){const v=e.transport.transports.find(w=>w.config.type==="webSocket"||w.config.type==="ipc");return v?v.value:e.transport}return e.transport})(),{unsubscribe:k}=await g.subscribe({params:["newHeads"],onData(v){var S;if(!h)return;const w=ze((S=v.result)==null?void 0:S.number);p.onBlockNumber(w,c),c=w},onError(v){var w;(w=p.onError)==null||w.call(p,v)}});y=k,h||y()}catch(g){s==null||s(g)}})(),()=>y()})})()}async function py(e,t){const{checkReplacement:r=!0,confirmations:n=1,hash:s,onReplaced:a,retryCount:o=6,retryDelay:i=({count:_})=>~~(1<<_)*200,timeout:c=18e4}=t,l=dt(["waitForTransactionReceipt",e.uid,s]),u=(()=>{var _;return t.pollingInterval?t.pollingInterval:(_=e.chain)!=null&&_.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval})();let d,p,h,y=!1,g,k;const{promise:v,resolve:w,reject:S}=Yd(),C=c?setTimeout(()=>{k==null||k(),g==null||g(),S(new _v({hash:s}))},c):void 0;return g=yn(l,{onReplaced:a,resolve:w,reject:S},async _=>{if(h=await ne(e,nl,"getTransactionReceipt")({hash:s}).catch(()=>{}),h&&n<=1){clearTimeout(C),_.resolve(h),g==null||g();return}k=ne(e,fy,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:u,async onBlockNumber(z){const T=b=>{clearTimeout(C),k==null||k(),b(),g==null||g()};let m=z;if(!y)try{if(h){if(n>1&&(!h.blockNumber||m-h.blockNumber+1n<n))return;T(()=>_.resolve(h));return}if(r&&!d&&(y=!0,await jc(async()=>{d=await ne(e,Lf,"getTransaction")({hash:s}),d.blockNumber&&(m=d.blockNumber)},{delay:i,retryCount:o}),y=!1),h=await ne(e,nl,"getTransactionReceipt")({hash:s}),n>1&&(!h.blockNumber||m-h.blockNumber+1n<n))return;T(()=>_.resolve(h))}catch(b){if(b instanceof Fm||b instanceof Nm){if(!d){y=!1;return}try{p=d,y=!0;const x=await jc(()=>ne(e,Ar,"getBlock")({blockNumber:m,includeTransactions:!0}),{delay:i,retryCount:o,shouldRetry:({error:U})=>U instanceof Ym});y=!1;const A=x.transactions.find(({from:U,nonce:D})=>U===p.from&&D===p.nonce);if(!A||(h=await ne(e,nl,"getTransactionReceipt")({hash:A.hash}),n>1&&(!h.blockNumber||m-h.blockNumber+1n<n)))return;let I="replaced";A.to===p.to&&A.value===p.value&&A.input===p.input?I="repriced":A.from===A.to&&A.value===0n&&(I="cancelled"),T(()=>{var U;(U=_.onReplaced)==null||U.call(_,{reason:I,replacedTransaction:p,transaction:A,transactionReceipt:h}),_.resolve(h)})}catch(x){T(()=>_.reject(x))}}else T(()=>_.reject(b))}}})}),v}function zC(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:s,onError:a,includeTransactions:o,poll:i,pollingInterval:c=e.pollingInterval}){const l=typeof i<"u"?i:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),u=o??!1;let d;return l?(()=>{const y=dt(["watchBlocks",e.uid,t,r,n,u,c]);return yn(y,{onBlock:s,onError:a},g=>Oa(async()=>{var k;try{const v=await ne(e,Ar,"getBlock")({blockTag:t,includeTransactions:u});if(v.number!==null&&(d==null?void 0:d.number)!=null){if(v.number===d.number)return;if(v.number-d.number>1&&r)for(let w=(d==null?void 0:d.number)+1n;w<v.number;w++){const S=await ne(e,Ar,"getBlock")({blockNumber:w,includeTransactions:u});g.onBlock(S,d),d=S}}((d==null?void 0:d.number)==null||t==="pending"&&(v==null?void 0:v.number)==null||v.number!==null&&v.number>d.number)&&(g.onBlock(v,d),d=v)}catch(v){(k=g.onError)==null||k.call(g,v)}},{emitOnBegin:n,interval:c}))})():(()=>{let y=!0,g=!0,k=()=>y=!1;return(async()=>{try{n&&ne(e,Ar,"getBlock")({blockTag:t,includeTransactions:u}).then(S=>{y&&g&&(s(S,void 0),g=!1)}).catch(a);const v=(()=>{if(e.transport.type==="fallback"){const S=e.transport.transports.find(C=>C.config.type==="webSocket"||C.config.type==="ipc");return S?S.value:e.transport}return e.transport})(),{unsubscribe:w}=await v.subscribe({params:["newHeads"],async onData(S){var _;if(!y)return;const C=await ne(e,Ar,"getBlock")({blockNumber:(_=S.result)==null?void 0:_.number,includeTransactions:u}).catch(()=>{});y&&(s(C,d),g=!1,d=C)},onError(S){a==null||a(S)}});k=w,y||k()}catch(v){a==null||a(v)}})(),()=>k()})()}function LC(e,{address:t,args:r,batch:n=!0,event:s,events:a,fromBlock:o,onError:i,onLogs:c,poll:l,pollingInterval:u=e.pollingInterval,strict:d}){const p=typeof l<"u"?l:typeof o=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),h=d??!1;return p?(()=>{const k=dt(["watchEvent",t,r,n,e.uid,s,u,o]);return yn(k,{onLogs:c,onError:i},v=>{let w;o!==void 0&&(w=o-1n);let S,C=!1;const _=Oa(async()=>{var z;if(!C){try{S=await ne(e,lb,"createEventFilter")({address:t,args:r,event:s,events:a,strict:h,fromBlock:o})}catch{}C=!0;return}try{let T;if(S)T=await ne(e,Hc,"getFilterChanges")({filter:S});else{const m=await ne(e,ri,"getBlockNumber")({});w&&w!==m?T=await ne(e,Md,"getLogs")({address:t,args:r,event:s,events:a,fromBlock:w+1n,toBlock:m}):T=[],w=m}if(T.length===0)return;if(n)v.onLogs(T);else for(const m of T)v.onLogs([m])}catch(T){S&&T instanceof Gn&&(C=!1),(z=v.onError)==null||z.call(v,T)}},{emitOnBegin:!0,interval:u});return async()=>{S&&await ne(e,$c,"uninstallFilter")({filter:S}),_()}})})():(()=>{let k=!0,v=()=>k=!1;return(async()=>{try{const w=(()=>{if(e.transport.type==="fallback"){const z=e.transport.transports.find(T=>T.config.type==="webSocket"||T.config.type==="ipc");return z?z.value:e.transport}return e.transport})(),S=a??(s?[s]:void 0);let C=[];S&&(C=[S.flatMap(T=>Eo({abi:[T],eventName:T.name,args:r}))],s&&(C=C[0]));const{unsubscribe:_}=await w.subscribe({params:["logs",{address:t,topics:C}],onData(z){var m;if(!k)return;const T=z.result;try{const{eventName:b,args:x}=Uc({abi:S??[],data:T.data,topics:T.topics,strict:h}),A=Wr(T,{args:x,eventName:b});c([A])}catch(b){let x,A;if(b instanceof bc||b instanceof ju){if(d)return;x=b.abiItem.name,A=(m=b.abiItem.inputs)==null?void 0:m.some(U=>!("name"in U&&U.name))}const I=Wr(T,{args:A?[]:{},eventName:x});c([I])}},onError(z){i==null||i(z)}});v=_,k||v()}catch(w){i==null||i(w)}})(),()=>v()})()}function RC(e,{batch:t=!0,onError:r,onTransactions:n,poll:s,pollingInterval:a=e.pollingInterval}){return(typeof s<"u"?s:e.transport.type!=="webSocket"&&e.transport.type!=="ipc")?(()=>{const l=dt(["watchPendingTransactions",e.uid,t,a]);return yn(l,{onTransactions:n,onError:r},u=>{let d;const p=Oa(async()=>{var h;try{if(!d)try{d=await ne(e,ub,"createPendingTransactionFilter")({});return}catch(g){throw p(),g}const y=await ne(e,Hc,"getFilterChanges")({filter:d});if(y.length===0)return;if(t)u.onTransactions(y);else for(const g of y)u.onTransactions([g])}catch(y){(h=u.onError)==null||h.call(u,y)}},{emitOnBegin:!0,interval:a});return async()=>{d&&await ne(e,$c,"uninstallFilter")({filter:d}),p()}})})():(()=>{let l=!0,u=()=>l=!1;return(async()=>{try{const{unsubscribe:d}=await e.transport.subscribe({params:["newPendingTransactions"],onData(p){if(!l)return;const h=p.result;n([h])},onError(p){r==null||r(p)}});u=d,l||u()}catch(d){r==null||r(d)}})(),()=>u()})()}function HC(e){var d,p,h;const{scheme:t,statement:r,...n}=((d=e.match($C))==null?void 0:d.groups)??{},{chainId:s,expirationTime:a,issuedAt:o,notBefore:i,requestId:c,...l}=((p=e.match(GC))==null?void 0:p.groups)??{},u=(h=e.split("Resources:")[1])==null?void 0:h.split(`
|
|
44
|
-
- `).slice(1);return{...n,...l,...s?{chainId:Number(s)}:{},...a?{expirationTime:new Date(a)}:{},...o?{issuedAt:new Date(o)}:{},...i?{notBefore:new Date(i)}:{},...c?{requestId:c}:{},...u?{resources:u}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}const $C=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,GC=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function jC(e){const{address:t,domain:r,message:n,nonce:s,scheme:a,time:o=new Date}=e;if(r&&n.domain!==r||s&&n.nonce!==s||a&&n.scheme!==a||n.expirationTime&&o>=n.expirationTime||n.notBefore&&o<n.notBefore)return!1;try{if(!n.address||!rt(n.address,{strict:!1})||t&&!Ta(n.address,t))return!1}catch{return!1}return!0}async function VC(e,t){const{address:r,domain:n,message:s,nonce:a,scheme:o,signature:i,time:c=new Date,...l}=t,u=HC(s);if(!u.address||!jC({address:r,domain:n,message:u,nonce:a,scheme:o,time:c}))return!1;const p=hb(s);return ui(e,{address:u.address,hash:p,signature:i,...l})}async function Gf(e,{serializedTransaction:t,throwOnReceiptRevert:r,timeout:n}){var i,c,l;const s=await e.request({method:"eth_sendRawTransactionSync",params:n?[t,W(n)]:[t]},{retryCount:0}),o=(((l=(c=(i=e.chain)==null?void 0:i.formatters)==null?void 0:c.transactionReceipt)==null?void 0:l.format)||Vc)(s);if(o.status==="reverted"&&r)throw new zm({receipt:o});return o}function WC(e){return{call:t=>ti(e,t),createAccessList:t=>cb(e,t),createBlockFilter:()=>R3(e),createContractEventFilter:t=>Sm(e,t),createEventFilter:t=>lb(e,t),createPendingTransactionFilter:()=>ub(e),estimateContractGas:t=>y8(e,t),estimateGas:t=>Od(e,t),getBalance:t=>H3(e,t),getBlobBaseFee:()=>$3(e),getBlock:t=>Ar(e,t),getBlockNumber:t=>ri(e,t),getBlockTransactionCount:t=>G3(e,t),getBytecode:t=>Yc(e,t),getChainId:()=>Kn(e),getCode:t=>Yc(e,t),getContractEvents:t=>f1(e,t),getEip712Domain:t=>V3(e,t),getEnsAddress:t=>C3(e,t),getEnsAvatar:t=>N3(e,t),getEnsName:t=>z3(e,t),getEnsResolver:t=>L3(e,t),getEnsText:t=>ib(e,t),getFeeHistory:t=>Y3(e,t),estimateFeesPerGas:t=>t8(e,t),getFilterChanges:t=>Hc(e,t),getFilterLogs:t=>K3(e,t),getGasPrice:()=>wd(e),getLogs:t=>Md(e,t),getProof:t=>hC(e,t),estimateMaxPriorityFeePerGas:t=>e8(e,t),fillTransaction:t=>Pd(e,t),getStorageAt:t=>mC(e,t),getTransaction:t=>Lf(e,t),getTransactionConfirmations:t=>bC(e,t),getTransactionCount:t=>kd(e,t),getTransactionReceipt:t=>nl(e,t),multicall:t=>yC(e,t),prepareTransactionRequest:t=>qo(e,t),readContract:t=>Ir(e,t),sendRawTransaction:t=>Jd(e,t),sendRawTransactionSync:t=>Gf(e,t),simulate:t=>Rf(e,t),simulateBlocks:t=>Rf(e,t),simulateCalls:t=>AC(e,t),simulateContract:t=>l3(e,t),verifyHash:t=>ui(e,t),verifyMessage:t=>FC(e,t),verifySiweMessage:t=>VC(e,t),verifyTypedData:t=>NC(e,t),uninstallFilter:t=>$c(e,t),waitForTransactionReceipt:t=>py(e,t),watchBlocks:t=>zC(e,t),watchBlockNumber:t=>fy(e,t),watchContractEvent:t=>b3(e,t),watchEvent:t=>LC(e,t),watchPendingTransactions:t=>RC(e,t)}}function qC(e){const{key:t="public",name:r="Public Client"}=e;return eb({...e,key:t,name:r,type:"publicClient"}).extend(WC)}async function YC(e,{chain:t}){const{id:r,name:n,nativeCurrency:s,rpcUrls:a,blockExplorers:o}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:W(r),chainName:n,nativeCurrency:s,rpcUrls:a.default.http,blockExplorerUrls:o?Object.values(o).map(({url:i})=>i):void 0}]},{dedupe:!0,retryCount:0})}function KC(e,t){const{abi:r,args:n,bytecode:s,...a}=t,o=Rc({abi:r,args:n,bytecode:s});return Gc(e,{...a,...a.authorizationList?{to:null}:{},data:o})}async function ZC(e){var r;return((r=e.account)==null?void 0:r.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(n=>vo(n))}async function XC(e,t={}){const{account:r=e.account,chainId:n}=t,s=r?Ke(r):void 0,a=n?[s==null?void 0:s.address,[W(n)]]:[s==null?void 0:s.address],o=await e.request({method:"wallet_getCapabilities",params:a}),i={};for(const[c,l]of Object.entries(o)){i[Number(c)]={};for(let[u,d]of Object.entries(l))u==="addSubAccount"&&(u="unstable_addSubAccount"),i[Number(c)][u]=d}return typeof n=="number"?i[n]:i}async function QC(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function hy(e,t){var c;const{account:r=e.account,chainId:n,nonce:s}=t;if(!r)throw new gn({docsPath:"/docs/eip7702/prepareAuthorization"});const a=Ke(r),o=(()=>{if(t.executor)return t.executor==="self"?t.executor:Ke(t.executor)})(),i={address:t.contractAddress??t.address,chainId:n,nonce:s};return typeof i.chainId>"u"&&(i.chainId=((c=e.chain)==null?void 0:c.id)??await ne(e,Kn,"getChainId")({})),typeof i.nonce>"u"&&(i.nonce=await ne(e,kd,"getTransactionCount")({address:a.address,blockTag:"pending"}),(o==="self"||o!=null&&o.address&&Ta(o.address,a.address))&&(i.nonce+=1)),i}async function JC(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(r=>Ku(r))}async function e7(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function t7(e,t){const{chain:r=e.chain}=t,n=t.timeout??Math.max(((r==null?void 0:r.blockTime)??0)*3,5e3),s=await Z1(e,t);return await Q1(e,{...t,id:s.id,timeout:n})}const jf=new ya(128);async function my(e,t){var _,z,T,m;const{account:r=e.account,chain:n=e.chain,accessList:s,authorizationList:a,blobs:o,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:h,pollingInterval:y,throwOnReceiptRevert:g,type:k,value:v,...w}=t,S=t.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3);if(typeof r>"u")throw new gn({docsPath:"/docs/actions/wallet/sendTransactionSync"});const C=r?Ke(r):null;try{Vr(t);const b=await(async()=>{if(t.to)return t.to;if(t.to!==null&&a&&a.length>0)return await Tc({authorization:a[0]}).catch(()=>{throw new $("`to` is required. Could not infer from `authorizationList`.")})})();if((C==null?void 0:C.type)==="json-rpc"||C===null){let x;n!==null&&(x=await ne(e,Kn,"getChainId")({}),Qd({currentChainId:x,chain:n}));const A=(T=(z=(_=e.chain)==null?void 0:_.formatters)==null?void 0:z.transactionRequest)==null?void 0:T.format,U=(A||Sr)({...As(w,{format:A}),accessList:s,account:C,authorizationList:a,blobs:o,chainId:x,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:h,to:b,type:k,value:v},"sendTransaction"),D=jf.get(e.uid),E=D?"wallet_sendTransaction":"eth_sendTransaction",P=await(async()=>{try{return await e.request({method:E,params:[U]},{retryCount:0})}catch(B){if(D===!1)throw B;const L=B;if(L.name==="InvalidInputRpcError"||L.name==="InvalidParamsRpcError"||L.name==="MethodNotFoundRpcError"||L.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[U]},{retryCount:0}).then(H=>(jf.set(e.uid,!0),H)).catch(H=>{const G=H;throw G.name==="MethodNotFoundRpcError"||G.name==="MethodNotSupportedRpcError"?(jf.set(e.uid,!1),L):G});throw L}})(),M=await ne(e,py,"waitForTransactionReceipt")({checkReplacement:!1,hash:P,pollingInterval:y,timeout:S});if(g&&M.status==="reverted")throw new zm({receipt:M});return M}if((C==null?void 0:C.type)==="local"){const x=await ne(e,qo,"prepareTransactionRequest")({account:C,accessList:s,authorizationList:a,blobs:o,chain:n,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:h,nonceManager:C.nonceManager,parameters:[...Id,"sidecars"],type:k,value:v,...w,to:b}),A=(m=n==null?void 0:n.serializers)==null?void 0:m.transaction,I=await C.signTransaction(x,{serializer:A});return await ne(e,Gf,"sendRawTransactionSync")({serializedTransaction:I,throwOnReceiptRevert:g})}throw(C==null?void 0:C.type)==="smart"?new _s({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new _s({docsPath:"/docs/actions/wallet/sendTransactionSync",type:C==null?void 0:C.type})}catch(b){throw b instanceof _s?b:Ic(b,{...t,account:C,chain:t.chain||void 0})}}async function r7(e,t){const{id:r}=t;await e.request({method:"wallet_showCallsStatus",params:[r]})}async function n7(e,t){const{account:r=e.account}=t;if(!r)throw new gn({docsPath:"/docs/eip7702/signAuthorization"});const n=Ke(r);if(!n.signAuthorization)throw new _s({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const s=await hy(e,t);return n.signAuthorization(s)}async function s7(e,{account:t=e.account,message:r}){if(!t)throw new gn({docsPath:"/docs/actions/wallet/signMessage"});const n=Ke(t);if(n.signMessage)return n.signMessage({message:r});const s=typeof r=="string"?fa(r):r.raw instanceof Uint8Array?Oe(r.raw):r.raw;return e.request({method:"personal_sign",params:[s,n.address]},{retryCount:0})}async function a7(e,t){var l,u,d,p;const{account:r=e.account,chain:n=e.chain,...s}=t;if(!r)throw new gn({docsPath:"/docs/actions/wallet/signTransaction"});const a=Ke(r);Vr({account:a,...t});const o=await ne(e,Kn,"getChainId")({});n!==null&&Qd({currentChainId:o,chain:n});const i=(n==null?void 0:n.formatters)||((l=e.chain)==null?void 0:l.formatters),c=((u=i==null?void 0:i.transactionRequest)==null?void 0:u.format)||Sr;return a.signTransaction?a.signTransaction({...s,chainId:o},{serializer:(p=(d=e.chain)==null?void 0:d.serializers)==null?void 0:p.transaction}):await e.request({method:"eth_signTransaction",params:[{...c({...s,account:a},"signTransaction"),chainId:W(o),from:a.address}]},{retryCount:0})}async function o7(e,t){const{account:r=e.account,domain:n,message:s,primaryType:a}=t;if(!r)throw new gn({docsPath:"/docs/actions/wallet/signTypedData"});const o=Ke(r),i={EIP712Domain:bb({domain:n}),...t.types};if(mb({domain:n,message:s,primaryType:a,types:i}),o.signTypedData)return o.signTypedData({domain:n,message:s,primaryType:a,types:i});const c=Tk({domain:n,message:s,primaryType:a,types:i});return e.request({method:"eth_signTypedData_v4",params:[o.address,c]},{retryCount:0})}async function i7(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:W(t)}]},{retryCount:0})}async function c7(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}async function l7(e,t){return ni.internal(e,my,"sendTransactionSync",t)}function u7(e){return{addChain:t=>YC(e,t),deployContract:t=>KC(e,t),fillTransaction:t=>Pd(e,t),getAddresses:()=>ZC(e),getCallsStatus:t=>X1(e,t),getCapabilities:t=>XC(e,t),getChainId:()=>Kn(e),getPermissions:()=>QC(e),prepareAuthorization:t=>hy(e,t),prepareTransactionRequest:t=>qo(e,t),requestAddresses:()=>JC(e),requestPermissions:t=>e7(e,t),sendCalls:t=>Z1(e,t),sendCallsSync:t=>t7(e,t),sendRawTransaction:t=>Jd(e,t),sendRawTransactionSync:t=>Gf(e,t),sendTransaction:t=>Gc(e,t),sendTransactionSync:t=>my(e,t),showCallsStatus:t=>r7(e,t),signAuthorization:t=>n7(e,t),signMessage:t=>s7(e,t),signTransaction:t=>a7(e,t),signTypedData:t=>o7(e,t),switchChain:t=>i7(e,t),waitForCallsStatus:t=>Q1(e,t),watchAsset:t=>c7(e,t),writeContract:t=>ni(e,t),writeContractSync:t=>l7(e,t)}}function d7(e){const{key:t="wallet",name:r="Wallet Client",transport:n}=e;return eb({...e,key:t,name:r,transport:n,type:"walletClient"}).extend(u7)}function by({key:e,methods:t,name:r,request:n,retryCount:s=3,retryDelay:a=150,timeout:o,type:i},c){const l=J1();return{config:{key:e,methods:t,name:r,request:n,retryCount:s,retryDelay:a,timeout:o,type:i},request:ck(n,{methods:t,retryCount:s,retryDelay:a,uid:l}),value:c}}function f7(e,t={}){const{key:r="custom",methods:n,name:s="Custom Provider",retryDelay:a}=t;return({retryCount:o})=>by({key:r,methods:n,name:s,request:e.request.bind(e),retryCount:t.retryCount??o,retryDelay:a,type:"custom"})}class p7 extends ${constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function h7(e,t={}){const{batch:r,fetchFn:n,fetchOptions:s,key:a="http",methods:o,name:i="HTTP JSON-RPC",onFetchRequest:c,onFetchResponse:l,retryDelay:u,raw:d}=t;return({chain:p,retryCount:h,timeout:y})=>{const{batchSize:g=1e3,wait:k=0}=typeof r=="object"?r:{},v=t.retryCount??h,w=y??t.timeout??1e4,S=p==null?void 0:p.rpcUrls.default.http[0];if(!S)throw new p7;const C=xk(S,{fetchFn:n,fetchOptions:s,onRequest:c,onResponse:l,timeout:w});return by({key:a,methods:o,name:i,async request({method:_,params:z}){const T={method:_,params:z},{schedule:m}=j1({id:S,wait:k,shouldSplitBatch(I){return I.length>g},fn:I=>C.request({body:I}),sort:(I,U)=>I.id-U.id}),b=async I=>r?m(I):[await C.request({body:I})],[{error:x,result:A}]=await b(T);if(d)return{error:x,result:A};if(x)throw new od({body:T,error:x,url:S});return A},retryCount:v,retryDelay:u,timeout:w,type:"http"},{fetchOptions:s,url:S})}}function m7(e){const{r:t,s:r}=li.Signature.fromCompact(e.slice(2,130)),n=+`0x${e.slice(130)}`,[s,a]=(()=>{if(n===0||n===1)return[void 0,n];if(n===27)return[BigInt(n),0];if(n===28)return[BigInt(n),1];throw new Error("Invalid yParityOrV value")})();return typeof s<"u"?{r:W(t,{size:32}),s:W(r,{size:32}),v:s,yParity:a}:{r:W(t,{size:32}),s:W(r,{size:32}),yParity:a}}const b7=f({id:16600,name:"0G Newton Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-newton.0g.ai"}},testnet:!0}),y7=f({id:16601,name:"0G Galileo Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-galileo.0g.ai"}},testnet:!0}),g7=f({id:16661,name:"0G Mainnet",nativeCurrency:{name:"0G",symbol:"0G",decimals:18},rpcUrls:{default:{http:["https://evmrpc.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan.0g.ai"}},testnet:!1}),x7=f({id:16602,name:"0G Galileo Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-galileo.0g.ai"}},testnet:!0}),w7=f({id:995,name:"5ireChain",nativeCurrency:{name:"5ire Token",symbol:"5IRE",decimals:18},rpcUrls:{default:{http:["https://rpc.5ire.network"]}},blockExplorers:{default:{name:"5ireChain Mainnet Explorer",url:"https://5irescan.io/"}},testnet:!1}),v7=f({id:179,name:"ABEY Mainnet",nativeCurrency:{name:"ABEY",symbol:"ABEY",decimals:18},rpcUrls:{default:{http:["https://rpc.abeychain.com"]}},blockExplorers:{default:{name:"Abey Scan",url:"https://abeyscan.com"}},testnet:!1}),Vf=50000n,yy=Xv*32n,gy={block:xd({format(e){var r;const t=(r=e.transactions)==null?void 0:r.map(n=>{var a;if(typeof n=="string")return n;const s=(a=gy.transaction)==null?void 0:a.format(n);return s.typeHex==="0x71"?s.type="eip712":s.typeHex==="0xff"&&(s.type="priority"),s});return{l1BatchNumber:e.l1BatchNumber?ze(e.l1BatchNumber):null,l1BatchTimestamp:e.l1BatchTimestamp?ze(e.l1BatchTimestamp):null,transactions:t}}}),transaction:Pc({format(e){const t={};return e.type==="0x71"?t.type="eip712":e.type==="0xff"&&(t.type="priority"),{...t,l1BatchNumber:e.l1BatchNumber?ze(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?ze(e.l1BatchTxIndex):null}}}),transactionReceipt:tf({format(e){return{l1BatchNumber:e.l1BatchNumber?ze(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?ze(e.l1BatchTxIndex):null,logs:e.logs.map(t=>({...Wr(t),l1BatchNumber:t.l1BatchNumber?ze(t.l1BatchNumber):null,transactionLogIndex:Jt(t.transactionLogIndex),logType:t.logType})),l2ToL1Logs:e.l2ToL1Logs.map(t=>({blockNumber:ze(t.blockHash),blockHash:t.blockHash,l1BatchNumber:t.l1BatchNumber?ze(t.l1BatchNumber):null,transactionIndex:ze(t.transactionIndex),shardId:ze(t.shardId),isService:t.isService,sender:t.sender,key:t.key,value:t.value,transactionHash:t.transactionHash,logIndex:ze(t.logIndex)}))}}}),transactionRequest:md({exclude:["customSignature","factoryDeps","gasPerPubdata","paymaster","paymasterInput"],format(e){return e.gasPerPubdata||e.paymaster&&e.paymasterInput||e.factoryDeps||e.customSignature?{eip712Meta:{...e.gasPerPubdata?{gasPerPubdata:Oe(e.gasPerPubdata)}:{gasPerPubdata:Oe(Vf)},...e.paymaster&&e.paymasterInput?{paymasterParams:{paymaster:e.paymaster,paymasterInput:Array.from(er(e.paymasterInput))}}:{},...e.factoryDeps?{factoryDeps:e.factoryDeps.map(t=>Array.from(er(t)))}:{},...e.customSignature?{customSignature:Array.from(er(e.customSignature))}:{}},type:"0x71"}:{}}})};class k7 extends ${constructor(){super(["Transaction is not an EIP712 transaction.","","Transaction must:",' - include `type: "eip712"`'," - include one of the following: `customSignature`, `paymaster`, `paymasterInput`, `gasPerPubdata`, `factoryDeps`"].join(`
|
|
45
|
-
`),{name:"InvalidEip712TransactionError"})}}function xy(e){return!!(e.type==="eip712"||"customSignature"in e&&e.customSignature||"paymaster"in e&&e.paymaster||"paymasterInput"in e&&e.paymasterInput||"gasPerPubdata"in e&&typeof e.gasPerPubdata=="bigint"||"factoryDeps"in e&&e.factoryDeps)}function wy(e){const{chainId:t,to:r,from:n,paymaster:s,paymasterInput:a}=e;if(!xy(e))throw new k7;if(!t||t<=0)throw new Ia({chainId:t});if(r&&!rt(r))throw new wt({address:r});if(n&&!rt(n))throw new wt({address:n});if(s&&!rt(s))throw new wt({address:s});if(s&&!a)throw new $("`paymasterInput` must be provided when `paymaster` is defined");if(!s&&a)throw new $("`paymaster` must be provided when `paymasterInput` is defined")}function E7(e,t){return xy(e)?T7(e):Kc(e,t)}const C7={transaction:E7};function T7(e){const{chainId:t,gas:r,nonce:n,to:s,from:a,value:o,maxFeePerGas:i,maxPriorityFeePerGas:c,customSignature:l,factoryDeps:u,paymaster:d,paymasterInput:p,gasPerPubdata:h,data:y}=e;wy(e);const g=[n?Oe(n):"0x",c?Oe(c):"0x",i?Oe(i):"0x",r?Oe(r):"0x",s??"0x",o?Oe(o):"0x",y??"0x",Oe(t),Oe(""),Oe(""),Oe(t),a??"0x",Oe(h||Vf),u??[],l??"0x",d&&p?[d,p]:[]];return rr(["0x71",jr(g)])}class S7 extends ${constructor({givenLength:t,maxBytecodeSize:r}){super(`Bytecode cannot be longer than ${r} bytes. Given length: ${t}`,{name:"BytecodeLengthExceedsMaxSizeError"})}}class A7 extends ${constructor({givenLengthInWords:t}){super(`Bytecode length in 32-byte words must be odd. Given length in words: ${t}`,{name:"BytecodeLengthInWordsMustBeOddError"})}}class P7 extends ${constructor({givenLength:t}){super(`The bytecode length in bytes must be divisible by 32. Given length: ${t}`,{name:"BytecodeLengthMustBeDivisibleBy32Error"})}}function I7(e){const t=un(e);if(t.length%32!==0)throw new P7({givenLength:t.length});if(t.length>yy)throw new S7({givenLength:t.length,maxBytecodeSize:yy});const r=t1(t),n=un(r),s=t.length/32;if(s%2===0)throw new A7({givenLengthInWords:s});const a=un(s),o=gs(a,{size:2}),i=new Uint8Array([1,0]);return n.set(i,0),n.set(o,2),n}const U7=e=>{wy(e);const t=O7(e);return{domain:{name:"zkSync",version:"2",chainId:e.chainId},types:{Transaction:[{name:"txType",type:"uint256"},{name:"from",type:"uint256"},{name:"to",type:"uint256"},{name:"gasLimit",type:"uint256"},{name:"gasPerPubdataByteLimit",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymaster",type:"uint256"},{name:"nonce",type:"uint256"},{name:"value",type:"uint256"},{name:"data",type:"bytes"},{name:"factoryDeps",type:"bytes32[]"},{name:"paymasterInput",type:"bytes"}]},primaryType:"Transaction",message:t}};function O7(e){const{gas:t,nonce:r,to:n,from:s,value:a,maxFeePerGas:o,maxPriorityFeePerGas:i,factoryDeps:c,paymaster:l,paymasterInput:u,gasPerPubdata:d,data:p}=e;return{txType:113n,from:BigInt(s),to:n?BigInt(n):0n,gasLimit:t??0n,gasPerPubdataByteLimit:d??Vf,maxFeePerGas:o??0n,maxPriorityFeePerGas:i??0n,paymaster:l?BigInt(l):0n,nonce:r?BigInt(r):0n,value:a??0n,data:p??"0x",factoryDeps:(c==null?void 0:c.map(h=>Oe(I7(h))))??[],paymasterInput:u||"0x"}}const ar={blockTime:1e3,formatters:gy,serializers:C7,custom:{getEip712Domain:U7}},B7=f({...ar,blockTime:200,id:2741,name:"Abstract",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://api.mainnet.abs.xyz"],webSocket:["wss://api.mainnet.abs.xyz/ws"]}},blockExplorers:{default:{name:"Etherscan",url:"https://abscan.org"},native:{name:"Abstract Explorer",url:"https://explorer.mainnet.abs.xyz"}},contracts:{multicall3:{address:"0xAa4De41dba0Ca5dCBb288b7cC6b708F3aaC759E7",blockCreated:5288},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:5263}}}),M7=f({...ar,blockTime:200,id:11124,name:"Abstract Testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://api.testnet.abs.xyz"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.abscan.org"},native:{name:"Abstract Explorer",url:"https://explorer.testnet.abs.xyz"}},testnet:!0,contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963",blockCreated:358349},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:431682}}}),_7=f({id:787,name:"Acala",network:"acala",nativeCurrency:{name:"Acala",symbol:"ACA",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-acala.aca-api.network"],webSocket:["wss://eth-rpc-acala.aca-api.network"]}},blockExplorers:{default:{name:"Acala Blockscout",url:"https://blockscout.acala.network",apiUrl:"https://blockscout.acala.network/api"}},testnet:!1}),D7=f({id:47,name:"Acria IntelliChain",nativeCurrency:{decimals:18,name:"ACRIA",symbol:"ACRIA"},rpcUrls:{default:{http:["https://aic.acria.ai"]}},blockExplorers:{default:{name:"Acria Explorer",url:"https://explorer.acria.ai"}},testnet:!1}),F7=f({id:1215,name:"ADF Chain",nativeCurrency:{name:"ADDFILL",symbol:"ADF",decimals:18},rpcUrls:{default:{http:["https://mainnet.adftechnology.com"]}},blockExplorers:{default:{name:"ADF Mainnet Explorer",url:"https://explorer.adftechnology.com"}},testnet:!1}),N7=f({id:9990,name:"Agung Network",nativeCurrency:{decimals:18,name:"Agung",symbol:"AGNG"},rpcUrls:{default:{http:["https://wss-async.agung.peaq.network"],webSocket:["wss://wss-async.agung.peaq.network"]}},blockExplorers:{default:{name:"Subscan",url:"https://agung-testnet.subscan.io"}},testnet:!0}),z7=f({id:168,name:"AIOZ Network",nativeCurrency:{decimals:18,name:"AIOZ",symbol:"AIOZ"},rpcUrls:{default:{http:["https://eth-dataseed.aioz.network"]}},blockExplorers:{default:{name:"AIOZ Explorer",url:"https://explorer.aioz.network"}},testnet:!1}),L7=f({id:41455,name:"Aleph Zero",nativeCurrency:{name:"Aleph Zero",symbol:"AZERO",decimals:18},rpcUrls:{default:{http:["https://rpc.alephzero.raas.gelato.cloud"]}},blockExplorers:{default:{name:"Aleph Zero EVM Explorer",url:"https://evm-explorer.alephzero.org",apiUrl:"https://evm-explorer.alephzero.org/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4603377}}}),R7=f({id:2039,name:"Aleph Zero Testnet",nativeCurrency:{name:"TZERO",symbol:"TZERO",decimals:18},rpcUrls:{default:{http:["https://rpc.alephzero-testnet.gelato.digital"],webSocket:["wss://ws.alephzero-testnet.gelato.digital"]}},blockExplorers:{default:{name:"Aleph Zero EVM Testnet explorer",url:"https://evm-explorer-testnet.alephzero.org",apiUrl:"https://evm-explorer-testnet.alephzero.org/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2861745}},testnet:!0}),H7=f({id:10241024,name:"AlienX Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.alienxchain.io/http"]}},blockExplorers:{default:{name:"AlienX Explorer",url:"https://explorer.alienxchain.io"}},testnet:!1}),$7=f({id:10241025,name:"ALIENX Hal Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://hal-rpc.alienxchain.io/http"]}},blockExplorers:{default:{name:"AlienX Explorer",url:"https://hal-explorer.alienxchain.io"}},testnet:!0}),vy={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},Wf={block:xd({format(e){var r;return{transactions:(r=e.transactions)==null?void 0:r.map(n=>{if(typeof n=="string")return n;const s=Is(n);return s.typeHex==="0x7e"&&(s.isSystemTx=n.isSystemTx,s.mint=n.mint?ze(n.mint):void 0,s.sourceHash=n.sourceHash,s.type="deposit"),s}),stateRoot:e.stateRoot}}}),transaction:Pc({format(e){const t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?ze(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:tf({format(e){return{l1GasPrice:e.l1GasPrice?ze(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?ze(e.l1GasUsed):null,l1Fee:e.l1Fee?ze(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};function ky(e,t){return V7(e)?j7(e):Kc(e,t)}const G7={transaction:ky};function j7(e){W7(e);const{sourceHash:t,data:r,from:n,gas:s,isSystemTx:a,mint:o,to:i,value:c}=e,l=[t,n,i??"0x",o?Oe(o):"0x",c?Oe(c):"0x",s?Oe(s):"0x",a?"0x1":"0x",r??"0x"];return rr(["0x7e",jr(l)])}function V7(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function W7(e){const{from:t,to:r}=e;if(t&&!rt(t))throw new wt({address:t});if(r&&!rt(r))throw new wt({address:r})}const j={blockTime:2e3,contracts:vy,formatters:Wf,serializers:G7},ol=1,q7=f({...j,id:888888888,name:"Ancient8",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.ancient8.gg"]}},blockExplorers:{default:{name:"Ancient8 explorer",url:"https://scan.ancient8.gg",apiUrl:"https://scan.ancient8.gg/api"}},contracts:{...j.contracts,l2OutputOracle:{[ol]:{address:"0xB09DC08428C8b4EFB4ff9C0827386CDF34277996"}},portal:{[ol]:{address:"0x639F2AECE398Aa76b07e59eF6abe2cFe32bacb68",blockCreated:19070571}},l1StandardBridge:{[ol]:{address:"0xd5e3eDf5b68135D559D572E26bF863FBC1950033",blockCreated:19070571}}},sourceId:ol}),il=11155111,Y7=f({...j,id:28122024,name:"Ancient8 Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpcv2-testnet.ancient8.gg"]}},blockExplorers:{default:{name:"Ancient8 Celestia Testnet explorer",url:"https://scanv2-testnet.ancient8.gg",apiUrl:"https://scanv2-testnet.ancient8.gg/api"}},contracts:{...j.contracts,l2OutputOracle:{[il]:{address:"0x942fD5017c0F60575930D8574Eaca13BEcD6e1bB"}},portal:{[il]:{address:"0xfa1d9E26A6aCD7b22115D27572c1221B9803c960",blockCreated:4972908}},l1StandardBridge:{[il]:{address:"0xF6Bc0146d3c74D48306e79Ae134A260E418C9335",blockCreated:4972908}}},sourceId:il}),K7=f({id:31337,name:"Anvil",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}}),Z7=f({id:33139,name:"ApeChain",nativeCurrency:{name:"ApeCoin",symbol:"APE",decimals:18},rpcUrls:{default:{http:["https://rpc.apechain.com/http"],webSocket:["wss://rpc.apechain.com/ws"]}},blockExplorers:{default:{name:"Apescan",url:"https://apescan.io",apiUrl:"https://api.apescan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:20889}},sourceId:42161}),X7=f({id:3993,name:"APEX Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.apexlayer.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp-testnet.apexlayer.xyz",apiUrl:"https://exp-testnet.apexlayer.xyz/api"}},contracts:{multicall3:{address:"0xf7642be33a6b18D16a995657adb5a68CD0438aE2",blockCreated:283775}},testnet:!0}),Q7=f({id:62606,name:"Apollo",nativeCurrency:{decimals:18,name:"Apollo",symbol:"APOLLO"},rpcUrls:{default:{http:["https://mainnet-rpc.apolloscan.io"]}},blockExplorers:{default:{name:"Apollo Explorer",url:"https://apolloscan.io"}}}),J7=f({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:250,rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),eT=f({id:421613,name:"Arbitrum Goerli",nativeCurrency:{name:"Arbitrum Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://goerli.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:88114}},testnet:!0}),tT=f({id:42170,name:"Arbitrum Nova",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://nova.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://nova.arbiscan.io",apiUrl:"https://api-nova.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1746963}}}),rT=f({id:421614,name:"Arbitrum Sepolia",blockTime:250,nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://sepolia.arbiscan.io",apiUrl:"https://api-sepolia.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:81930}},testnet:!0}),nT=f({id:5042002,name:"Arc Testnet",nativeCurrency:{name:"USDC",symbol:"USDC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.arc.network","https://rpc.quicknode.testnet.arc.network","https://rpc.blockdaemon.testnet.arc.network"],webSocket:["wss://rpc.testnet.arc.network","wss://rpc.quicknode.testnet.arc.network"]}},blockExplorers:{default:{name:"ArcScan",url:"https://testnet.arcscan.app",apiUrl:"https://testnet.arcscan.app/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!0}),sT=f({id:7897,name:"Arena-Z",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.arena-z.gg"]}},blockExplorers:{default:{name:"Arena-Z Explorer",url:"https://explorer.arena-z.gg",apiUrl:"https://explorer.arena-z.gg"}}}),aT=f({id:463,name:"Areon Network",nativeCurrency:{decimals:18,name:"AREA",symbol:"AREA"},rpcUrls:{default:{http:["https://mainnet-rpc.areon.network"],webSocket:["wss://mainnet-ws.areon.network"]}},blockExplorers:{default:{name:"Areonscan",url:"https://areonscan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:353286}},testnet:!1}),oT=f({id:462,name:"Areon Network Testnet",nativeCurrency:{decimals:18,name:"TAREA",symbol:"TAREA"},rpcUrls:{default:{http:["https://testnet-rpc.areon.network"],webSocket:["wss://testnet-ws.areon.network"]}},blockExplorers:{default:{name:"Areonscan",url:"https://areonscan.com"}},testnet:!0}),iT=f({id:463,name:"Areum",nativeCurrency:{decimals:18,name:"AREA",symbol:"AREA"},rpcUrls:{default:{http:["https://mainnet-rpc.areum.network"],webSocket:["wss://mainnet-ws.areum.network"]}},blockExplorers:{default:{name:"Areum Explorer",url:"https://explorer.areum.network"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:353286}},testnet:!1}),cT=f({id:11822,name:"Artela Testnet",nativeCurrency:{name:"ART",symbol:"ART",decimals:18},rpcUrls:{default:{http:["https://betanet-rpc1.artela.network"]}},blockExplorers:{default:{name:"Artela",url:"https://betanet-scan.artela.network",apiUrl:"https://betanet-scan.artela.network/api"}},contracts:{multicall3:{address:"0xd07c8635f76e8745Ee7092fbb6e8fbc5FeF09DD7",blockCreated:7001871}},testnet:!0}),lT=f({id:10242,name:"Arthera",nativeCurrency:{name:"Arthera",symbol:"AA",decimals:18},rpcUrls:{default:{http:["https://rpc.arthera.net"]}},blockExplorers:{default:{name:"Arthera EVM Explorer",url:"https://explorer.arthera.net",apiUrl:"https://explorer.arthera.net/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4502791}}}),uT=f({id:10243,name:"Arthera Testnet",nativeCurrency:{name:"Arthera",symbol:"AA",decimals:18},rpcUrls:{default:{http:["https://rpc-test.arthera.net"]}},blockExplorers:{default:{name:"Arthera EVM Explorer",url:"https://explorer-test.arthera.net",apiUrl:"https://explorer-test.arthera.net/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:22051}}}),dT=f({id:42420,name:"AssetChain Mainnet",nativeCurrency:{decimals:18,name:"Real World Asset",symbol:"RWA"},rpcUrls:{default:{http:["https://mainnet-rpc.assetchain.org"]}},blockExplorers:{default:{name:"Asset Chain Explorer",url:"https://scan.assetchain.org",apiUrl:"https://scan.assetchain.org/api"}},testnet:!1,contracts:{}}),fT=f({id:42421,name:"AssetChain Testnet",nativeCurrency:{decimals:18,name:"Real World Asset",symbol:"RWA"},rpcUrls:{default:{http:["https://enugu-rpc.assetchain.org"]}},blockExplorers:{default:{name:"Asset Chain Testnet Explorer",url:"https://scan-testnet.assetchain.org",apiUrl:"https://scan-testnet.assetchain.org/api"}},testnet:!0,contracts:{multicall3:{address:"0x989F832D35988cb5e3eB001Fa2Fe789469EC31Ea",blockCreated:17177}}}),pT=f({id:592,name:"Astar",network:"astar-mainnet",nativeCurrency:{name:"Astar",symbol:"ASTR",decimals:18},rpcUrls:{default:{http:["https://astar.api.onfinality.io/public"]}},blockExplorers:{default:{name:"Astar Subscan",url:"https://astar.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:761794}},testnet:!1}),hT=f({id:3776,name:"Astar zkEVM",network:"AstarZkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-zkevm.astar.network"]}},blockExplorers:{default:{name:"Astar zkEVM Explorer",url:"https://astar-zkevm.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:93528}},testnet:!1}),mT=f({id:6038361,name:"Astar zkEVM Testnet zKyoto",network:"zKyoto",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.startale.com/zkyoto"]}},blockExplorers:{default:{name:"zKyoto Explorer",url:"https://zkyoto.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:196153}},testnet:!0}),bT=f({id:2340,name:"Atleta Olympia",nativeCurrency:{decimals:18,name:"Atla",symbol:"ATLA"},rpcUrls:{default:{http:["https://testnet-rpc.atleta.network:9944","https://testnet-rpc.atleta.network"],ws:["wss://testnet-rpc.atleta.network:9944"]}},blockExplorers:{default:{name:"Atleta Olympia Explorer",url:"https://blockscout.atleta.network",apiUrl:"https://blockscout.atleta.network/api"}},contracts:{multicall3:{address:"0x1472ec6392180fb84F345d2455bCC75B26577115",blockCreated:1076473}},testnet:!0}),yT=f({id:1313161554,name:"Aurora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.aurora.dev"]}},blockExplorers:{default:{name:"Aurorascan",url:"https://aurorascan.dev",apiUrl:"https://aurorascan.dev/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:62907816}}}),gT=f({id:1313161555,name:"Aurora Testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.aurora.dev"]}},blockExplorers:{default:{name:"Aurorascan",url:"https://testnet.aurorascan.dev",apiUrl:"https://testnet.aurorascan.dev/api"}},testnet:!0}),xT=f({id:205205,name:"Auroria Testnet",network:"auroria",nativeCurrency:{name:"Auroria Stratis",symbol:"tSTRAX",decimals:18},rpcUrls:{default:{http:["https://auroria.rpc.stratisevm.com"]}},blockExplorers:{default:{name:"Auroria Testnet Explorer",url:"https://auroria.explorer.stratisevm.com"}},testnet:!0}),wT=f({id:785,name:"Autheo Testnet",nativeCurrency:{decimals:18,name:"Autheo",symbol:"THEO"},rpcUrls:{default:{http:["https://testnet-rpc1.autheo.com","https://testnet-rpc2.autheo.com"]}},blockExplorers:{default:{name:"Autheo Testnet Block Explorer",url:"https://testnet-explorer.autheo.com/"}}}),vT=f({id:43114,name:"Avalanche",blockTime:1700,nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://snowtrace.io",apiUrl:"https://api.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),kT=f({id:43113,name:"Avalanche Fuji",nativeCurrency:{decimals:18,name:"Avalanche Fuji",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax-test.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://testnet.snowtrace.io",apiUrl:"https://api-testnet.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7096959}},testnet:!0}),ET=f({id:8333,name:"B3",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.b3.fun/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.b3.fun"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}},sourceId:8453}),CT=f({id:1993,name:"B3 Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.b3.fun/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia.explorer.b3.fun"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}},testnet:!0,sourceId:168587773}),TT=f({id:5165,network:"bahamut",name:"Bahamut",nativeCurrency:{name:"Fasttoken",symbol:"FTN",decimals:18},rpcUrls:{default:{http:["https://rpc1.bahamut.io","https://bahamut-rpc.publicnode.com","https://rpc2.bahamut.io"],webSocket:["wss://ws1.sahara.bahamutchain.com","wss://bahamut-rpc.publicnode.com","wss://ws2.sahara.bahamutchain.com"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://www.ftnscan.com",apiUrl:"https://www.ftnscan.com/api"}}}),di=1,Ey=f({...j,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:{...j.contracts,disputeGameFactory:{[di]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[di]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[di]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[di]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:di}),ST=f({...Ey,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://mainnet-preconf.base.org"]}}}),AT=f({id:123420001114,name:"Basecamp Testnet",nativeCurrency:{decimals:18,name:"Camp",symbol:"CAMP"},rpcUrls:{default:{http:["https://rpc.basecamp.t.raas.gelato.cloud"]}},blockExplorers:{default:{name:"basecamp",url:"https://basecamp.cloud.blockscout.com"}},testnet:!0}),cl=5,PT=f({...j,id:84531,name:"Base Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://goerli.basescan.org",apiUrl:"https://goerli.basescan.org/api"}},contracts:{...j.contracts,l2OutputOracle:{[cl]:{address:"0x2A35891ff30313CcFa6CE88dcf3858bb075A2298"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1376988},portal:{[cl]:{address:"0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA"}},l1StandardBridge:{[cl]:{address:"0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a"}}},testnet:!0,sourceId:cl}),fi=11155111,Cy=f({...j,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:{...j.contracts,disputeGameFactory:{[fi]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[fi]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[fi]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[fi]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:fi}),IT=f({...Cy,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-preconf.base.org"]}}}),UT=f({id:4337,name:"Beam",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{default:{http:["https://build.onbeam.com/rpc"],webSocket:["wss://build.onbeam.com/ws"]}},blockExplorers:{default:{name:"Beam Explorer",url:"https://subnets.avax.network/beam"}},contracts:{multicall3:{address:"0x4956f15efdc3dc16645e90cc356eafa65ffc65ec",blockCreated:1}}}),OT=f({id:13337,name:"Beam Testnet",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{default:{http:["https://build.onbeam.com/rpc/testnet"],webSocket:["wss://build.onbeam.com/ws/testnet"]}},blockExplorers:{default:{name:"Beam Explorer",url:"https://subnets-test.avax.network/beam"}},contracts:{multicall3:{address:"0x9bf49b704ee2a095b95c1f2d4eb9010510c41c9e",blockCreated:3}},testnet:!0}),BT=f({id:641230,name:"Bear Network Chain Mainnet",nativeCurrency:{decimals:18,name:"BearNetworkChain",symbol:"BRNKC"},rpcUrls:{default:{http:["https://brnkc-mainnet.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkScan",url:"https://brnkscan.bearnetwork.net",apiUrl:"https://brnkscan.bearnetwork.net/api"}}}),MT=f({id:751230,name:"Bear Network Chain Testnet",nativeCurrency:{decimals:18,name:"tBRNKC",symbol:"tBRNKC"},rpcUrls:{default:{http:["https://brnkc-test.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkTestScan",url:"https://brnktest-scan.bearnetwork.net",apiUrl:"https://brnktest-scan.bearnetwork.net/api"}},testnet:!0}),_T=f({id:80094,name:"Berachain",blockTime:2e3,nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},ensRegistry:{address:"0x5b22280886a2f5e09a49bea7e320eab0e5320e28",blockCreated:877007},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:9310021}},rpcUrls:{default:{http:["https://rpc.berachain.com"]}},blockExplorers:{default:{name:"Berascan",url:"https://berascan.com"}},ensTlds:[".bera"],testnet:!1}),DT=f({id:80069,blockTime:2e3,name:"Berachain Bepolia",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},rpcUrls:{default:{http:["https://bepolia.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berascan",url:"https://bepolia.beratrail.io"}},testnet:!0}),FT=f({id:80085,name:"Berachain Artio",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},rpcUrls:{default:{http:["https://artio.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berachain",url:"https://artio.beratrail.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:866924}},testnet:!0}),NT=f({id:80084,name:"Berachain bArtio",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:109269},ensRegistry:{address:"0xB0eef18971290b333450586D33dcA6cE122651D2",blockCreated:7736794},ensUniversalResolver:{address:"0x41692Ef1EA0C79E6b73077E4A67572D2BDbD7057",blockCreated:7736795}},ensTlds:[".bera"],rpcUrls:{default:{http:["https://bartio.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berachain bArtio Beratrail",url:"https://bartio.beratrail.io"}},testnet:!0}),zT=f({id:11501,name:"BEVM Mainnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet-1.bevm.io"]}},blockExplorers:{default:{name:"Bevmscan",url:"https://scan-mainnet.bevm.io",apiUrl:"https://scan-mainnet-api.bevm.io/api"}}}),LT=f({id:3068,name:"Bifrost Mainnet",nativeCurrency:{name:"BFC",symbol:"BFC",decimals:18},rpcUrls:{default:{http:["https://public-01.mainnet.bifrostnetwork.com/rpc"]}},blockExplorers:{default:{name:"Bifrost Blockscout",url:"https://explorer.mainnet.bifrostnetwork.com"}},testnet:!1}),RT=f({id:53456,name:"BirdLayer",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.birdlayer.xyz","https://rpc1.birdlayer.xyz"],webSocket:["wss://rpc.birdlayer.xyz/ws"]}},blockExplorers:{default:{name:"BirdLayer Explorer",url:"https://scan.birdlayer.xyz"}}}),HT=f({id:32520,name:"Bitgert Mainnet",nativeCurrency:{decimals:18,name:"Brise",symbol:"Brise"},rpcUrls:{default:{http:["https://rpc-bitgert.icecreamswap.com"]}},blockExplorers:{default:{name:"Bitgert Scan",url:"https://brisescan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2118034}},testnet:!1}),$T=f({id:96,name:"KUB Mainnet",nativeCurrency:{name:"KUB Coin",symbol:"KUB",decimals:18},rpcUrls:{default:{http:["https://rpc.bitkubchain.io"]}},blockExplorers:{default:{name:"KUB Chain Mainnet Explorer",url:"https://www.bkcscan.com",apiUrl:"https://www.bkcscan.com/api"}}}),GT=f({id:25925,name:"Bitkub Testnet",network:"Bitkub Testnet",nativeCurrency:{name:"Bitkub Test",symbol:"tKUB",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.bitkubchain.io"]}},blockExplorers:{default:{name:"Bitkub Chain Testnet Explorer",url:"https://testnet.bkcscan.com",apiUrl:"https://testnet.bkcscan.com/api"}},testnet:!0}),jT=f({id:200901,name:"Bitlayer Mainnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bitlayer.org"],webSocket:["wss://ws.bitlayer.org"]}},blockExplorers:{default:{name:"bitlayer mainnet scan",url:"https://www.btrscan.com"}},contracts:{multicall3:{address:"0x5B256fE9e993902eCe49D138a5b1162cBb529474",blockCreated:2421963}}}),VT=f({id:200810,name:"Bitlayer Testnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bitlayer.org"],webSocket:["wss://testnet-ws.bitlayer.org"]}},blockExplorers:{default:{name:"bitlayer testnet scan",url:"https://testnet.btrscan.com"}},contracts:{multicall3:{address:"0x5B256fE9e993902eCe49D138a5b1162cBb529474",blockCreated:4135671}},testnet:!0}),WT=f({id:7171,name:"Bitrock Mainnet",nativeCurrency:{name:"BROCK",symbol:"BROCK",decimals:18},rpcUrls:{default:{http:["https://brockrpc.io"]}},blockExplorers:{default:{name:"Bitrock Explorer",url:"https://explorer.bit-rock.io"}},testnet:!1}),qT=f({id:199,name:"BitTorrent",network:"bittorrent-chain-mainnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://rpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://bttcscan.com",apiUrl:"https://api.bttcscan.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:31078552}}}),YT=f({id:1028,name:"BitTorrent Chain Testnet",network:"bittorrent-chain-testnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://testrpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://testnet.bttcscan.com",apiUrl:"https://testnet.bttcscan.com/api"}},testnet:!0}),ll=1,KT=f({...j,id:81457,name:"Blast",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.blast.io"]}},blockExplorers:{default:{name:"Blastscan",url:"https://blastscan.io",apiUrl:"https://api.blastscan.io/api"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:212929},l2OutputOracle:{[ll]:{address:"0x826D1B0D4111Ad9146Eb8941D7Ca2B6a44215c76",blockCreated:19300358}},portal:{[ll]:{address:"0x0Ec68c5B10F21EFFb74f2A5C61DFe6b08C0Db6Cb",blockCreated:19300357}},l1StandardBridge:{[ll]:{address:"0x697402166Fbf2F22E970df8a6486Ef171dbfc524",blockCreated:19300360}}},sourceId:ll}),ZT=f({id:168587773,name:"Blast Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.blast.io"]}},blockExplorers:{default:{name:"Blastscan",url:"https://sepolia.blastscan.io",apiUrl:"https://api-sepolia.blastscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:756690}},testnet:!0,sourceId:11155111}),qf=1,XT=f({...j,id:60808,name:"BOB",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.gobob.xyz"],webSocket:["wss://rpc.gobob.xyz"]}},blockExplorers:{default:{name:"BOB Explorer",url:"https://explorer.gobob.xyz"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:23131},l2OutputOracle:{[qf]:{address:"0xdDa53E23f8a32640b04D7256e651C1db98dB11C1",blockCreated:4462615}},portal:{[qf]:{address:"0x8AdeE124447435fE03e3CD24dF3f4cAE32E65a3E",blockCreated:4462615}}},sourceId:qf}),QT=f({id:288,name:"Boba Network",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.boba.network"]}},blockExplorers:{default:{name:"BOBAScan",url:"https://bobascan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:446859}}}),JT=f({id:28882,name:"Boba Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.boba.network"]}},blockExplorers:{default:{name:"BOBAScan",url:"https://testnet.bobascan.com"}},testnet:!0}),Yf=11155111,e9=f({...j,id:808813,name:"BOB Sepolia",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://bob-sepolia.rpc.gobob.xyz"],webSocket:["wss://bob-sepolia.rpc.gobob.xyz"]}},blockExplorers:{default:{name:"BOB Sepolia Explorer",url:"https://bob-sepolia.explorer.gobob.xyz"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:35677},l2OutputOracle:{[Yf]:{address:"0x14D0069452b4AE2b250B395b8adAb771E4267d2f",blockCreated:4462615}},portal:{[Yf]:{address:"0x867B1Aa872b9C8cB5E9F7755feDC45BB24Ad0ae4",blockCreated:4462615}}},testnet:!0,sourceId:Yf}),t9=f({id:11100,name:"Bool Beta Mainnet",nativeCurrency:{decimals:18,name:"BOL",symbol:"BOL"},rpcUrls:{default:{http:["https://beta-rpc-node-http.bool.network"]}},blockExplorers:{default:{name:"BoolScan",url:"https://beta-mainnet.boolscan.com/"}},testnet:!1}),r9=f({id:3637,name:"Botanix",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.botanixlabs.com"],webSocket:["wss://rpc.botanixlabs.com/ws"]}},blockExplorers:{default:{name:"Botanixscan",url:"https://botanixscan.io"}}}),n9=f({id:3636,name:"Botanix Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://node.botanixlabs.dev"]}},blockExplorers:{default:{name:"Botanix Testnet Explorer",url:"https://testnet.botanixscan.io"}},testnet:!0}),s9=f({id:6001,name:"BounceBit Mainnet",nativeCurrency:{name:"BounceBit",symbol:"BB",decimals:18},rpcUrls:{default:{http:["https://fullnode-mainnet.bouncebitapi.com"]}},blockExplorers:{default:{name:"BB Scan",url:"https://bbscan.io"}},testnet:!1}),a9=f({id:6e3,name:"BounceBit Testnet",nativeCurrency:{name:"BounceBit",symbol:"BB",decimals:18},rpcUrls:{default:{http:["https://fullnode-testnet.bouncebitapi.com"]}},blockExplorers:{default:{name:"BB Scan",url:"https://testnet.bbscan.io"}},testnet:!0}),o9=f({id:1039,name:"Bronos",nativeCurrency:{decimals:18,name:"BRO",symbol:"BRO"},rpcUrls:{default:{http:["https://evm.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://broscan.bronos.org"}}}),i9=f({id:1038,name:"Bronos Testnet",nativeCurrency:{decimals:18,name:"Bronos Coin",symbol:"tBRO"},rpcUrls:{default:{http:["https://evm-testnet.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://tbroscan.bronos.org"}},testnet:!0}),c9=f({id:56,name:"BNB Smart Chain",blockTime:750,nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://56.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}}),l9=f({id:1017,name:"BNB Greenfield Chain",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://greenfield-chain.bnbchain.org"]}},blockExplorers:{default:{name:"BNB Greenfield Mainnet Scan",url:"https://greenfieldscan.com"}},testnet:!1}),u9=f({id:97,name:"BNB Smart Chain Testnet",nativeCurrency:{decimals:18,name:"BNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]}},blockExplorers:{default:{name:"BscScan",url:"https://testnet.bscscan.com",apiUrl:"https://api-testnet.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:17422483}},testnet:!0}),d9=f({id:223,name:"B2",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bsquared.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.bsquared.network"}}}),f9=f({id:1123,name:"B2 Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bsquared.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://testnet-explorer.bsquared.network"}},testnet:!0}),p9=f({id:200901,name:"Bitlayer",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bitlayer.org","https://rpc.bitlayer-rpc.com"],webSocket:["wss://ws.bitlayer.org","wss://ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"Bitlayer(BTR) Scan",url:"https://www.btrscan.com"}}}),h9=f({id:200810,name:"Bitlayer Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bitlayer.org"],webSocket:["wss://testnet-ws.bitlayer.org","wss://testnet-ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"Bitlayer(BTR) Scan",url:"https://testnet.btrscan.com"}},testnet:!0}),m9=f({id:4999,name:"BlackFort Exchange Network",nativeCurrency:{name:"BlackFort Token",symbol:"BXN",decimals:18},rpcUrls:{default:{http:["https://mainnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.blackfort.network",apiUrl:"https://explorer.blackfort.network/api"}}}),b9=f({id:4777,name:"BlackFort Exchange Network Testnet",nativeCurrency:{name:"BlackFort Testnet Token",symbol:"TBXN",decimals:18},rpcUrls:{default:{http:["https://testnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.blackfort.network",apiUrl:"https://testnet-explorer.blackfort.network/api"}},testnet:!0}),y9=f({id:13370,name:"Cannon",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),g9=f({id:7700,name:"Canto",nativeCurrency:{decimals:18,name:"Canto",symbol:"CANTO"},rpcUrls:{default:{http:["https://canto.gravitychain.io"]}},blockExplorers:{default:{name:"Tuber.Build (Blockscout)",url:"https://tuber.build"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2905789}}}),x9={estimateFeesPerGas:async e=>{var s;if(!((s=e.request)!=null&&s.feeCurrency))return null;const[t,r]=await Promise.all([w9(e.client,e.request.feeCurrency),v9(e.client,e.request.feeCurrency)]);return{maxFeePerGas:e.multiply(t-r)+r,maxPriorityFeePerGas:r}}};async function w9(e,t){const r=await e.request({method:"eth_gasPrice",params:[t]});return BigInt(r)}async function v9(e,t){const r=await e.request({method:"eth_maxPriorityFeePerGas",params:[t]});return BigInt(r)}function Ty(e){return e===0||e===0n||e===void 0||e===null||e==="0"||e===""||typeof e=="string"&&($t(e).toLowerCase()==="0x"||$t(e).toLowerCase()==="0x00")}function pi(e){return!Ty(e)}function k9(e){return typeof e.maxFeePerGas<"u"&&typeof e.maxPriorityFeePerGas<"u"}function Sy(e){return e.type==="cip64"?!0:k9(e)&&pi(e.feeCurrency)}const E9={block:xd({format(e){var r;return{transactions:(r=e.transactions)==null?void 0:r.map(n=>typeof n=="string"?n:{...Is(n),...n.gatewayFee?{gatewayFee:ze(n.gatewayFee),gatewayFeeRecipient:n.gatewayFeeRecipient}:{},feeCurrency:n.feeCurrency})}}}),transaction:Pc({format(e){if(e.type==="0x7e")return{isSystemTx:e.isSystemTx,mint:e.mint?ze(e.mint):void 0,sourceHash:e.sourceHash,type:"deposit"};const t={feeCurrency:e.feeCurrency};return e.type==="0x7b"?t.type="cip64":(e.type==="0x7c"&&(t.type="cip42"),t.gatewayFee=e.gatewayFee?ze(e.gatewayFee):null,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}}),transactionRequest:md({format(e){const t={};return e.feeCurrency&&(t.feeCurrency=e.feeCurrency),Sy(e)&&(t.type="0x7b"),t}})};function C9(e,t){return Sy(e)?S9(e,t):ky(e,t)}const T9={transaction:C9};function S9(e,t){P9(e);const{chainId:r,gas:n,nonce:s,to:a,value:o,maxFeePerGas:i,maxPriorityFeePerGas:c,accessList:l,feeCurrency:u,data:d}=e,p=[Oe(r),s?Oe(s):"0x",c?Oe(c):"0x",i?Oe(i):"0x",n?Oe(n):"0x",a??"0x",o?Oe(o):"0x",d??"0x",oi(l),u,...Ba(e,t)];return rr(["0x7b",jr(p)])}const A9=Ps;function P9(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:a,feeCurrency:o}=e;if(t<=0)throw new Ia({chainId:t});if(a&&!rt(a))throw new wt({address:a});if(n)throw new $("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(pi(s)&&s>A9)throw new jn({maxFeePerGas:s});if(pi(r)&&pi(s)&&r>s)throw new Ca({maxFeePerGas:s,maxPriorityFeePerGas:r});if(pi(o)&&!rt(o))throw new $("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(Ty(o))throw new $("`feeCurrency` must be provided for CIP-64 transactions.")}const hi={blockTime:1e3,contracts:vy,formatters:E9,serializers:T9,fees:x9},I9=f({...hi,id:42220,name:"Celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://celoscan.io",apiUrl:"https://api.celoscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13112599}},testnet:!1}),ul=17e3,U9=f({...hi,id:44787,name:"Alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"A-CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Alfajores Explorer",url:"https://celo-alfajores.blockscout.com",apiUrl:"https://celo-alfajores.blockscout.com/api"}},contracts:{...hi.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:14569001},portal:{[ul]:{address:"0x82527353927d8D069b3B452904c942dA149BA381",blockCreated:2411324}},disputeGameFactory:{[ul]:{address:"0xE28AAdcd9883746c0e5068F58f9ea06027b214cb",blockCreated:2411324}},l2OutputOracle:{[ul]:{address:"0x4a2635e9e4f6e45817b1D402ac4904c1d1752438",blockCreated:2411324}},l1StandardBridge:{[ul]:{address:"0xD1B0E0581973c9eB7f886967A606b9441A897037",blockCreated:2411324}}},testnet:!0}),Kf=11155111,O9=f({...hi,id:11142220,name:"Celo Sepolia Testnet",nativeCurrency:{decimals:18,name:"CELO",symbol:"S-CELO"},rpcUrls:{default:{http:["https://forno.celo-sepolia.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Sepolia Explorer",url:"https://celo-sepolia.blockscout.com/",apiUrl:"https://celo-sepolia.blockscout.com/api"}},contracts:{...hi.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1},portal:{[Kf]:{address:"0x44ae3d41a335a7d05eb533029917aad35662dcc2",blockCreated:8825790}},disputeGameFactory:{[Kf]:{address:"0x57c45d82d1a995f1e135b8d7edc0a6bb5211cfaa",blockCreated:8825790}},l1StandardBridge:{[Kf]:{address:"0xec18a3c30131a0db4246e785355fbc16e2eaf408",blockCreated:8825790}}},testnet:!0}),B9=f({id:5858,name:"Chang Chain Foundation Mainnet",nativeCurrency:{decimals:18,name:"CTH",symbol:"CTH"},rpcUrls:{default:{http:["https://rpc.cthscan.com"]}},blockExplorers:{default:{name:"Chang Chain explorer",url:"https://cthscan.com"}}}),M9=f({id:88888,name:"Chiliz Chain",network:"chiliz-chain",nativeCurrency:{decimals:18,name:"CHZ",symbol:"CHZ"},rpcUrls:{default:{http:["https://rpc.chiliz.com"]}},blockExplorers:{default:{name:"Chiliz Explorer",url:"https://scan.chiliz.com",apiUrl:"https://scan.chiliz.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:8080847}}}),_9=f({id:2882,name:"Chips Network",network:"CHIPS",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://node.chips.ooo/wasp/api/v1/chains/iota1pp3d3mnap3ufmgqnjsnw344sqmf5svjh26y2khnmc89sv6788y3r207a8fn/evm"]}}}),D9=f({id:5115,name:"Citrea Testnet",nativeCurrency:{name:"cBTC",symbol:"cBTC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.citrea.xyz"]}},blockExplorers:{default:{name:"Citrea Explorer",url:"https://explorer.testnet.citrea.xyz",apiUrl:"https://explorer.testnet.citrea.xyz/api"}},testnet:!0}),F9=f({id:61,name:"Ethereum Classic",nativeCurrency:{decimals:18,name:"ETC",symbol:"ETC"},rpcUrls:{default:{http:["https://etc.rivet.link"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.com/etc/mainnet"}}}),N9=f({id:112,name:"Coinbit Mainnet",nativeCurrency:{name:"GIDR",symbol:"GIDR",decimals:18},rpcUrls:{default:{http:["https://coinbit-rpc-mainnet.chain.sbcrypto.app"]}},blockExplorers:{default:{name:"Coinbit Explorer",url:"https://coinbit-explorer.chain.sbcrypto.app"}},testnet:!1}),z9=f({id:52,name:"CoinEx Mainnet",nativeCurrency:{name:"cet",symbol:"cet",decimals:18},rpcUrls:{default:{http:["https://rpc.coinex.net"]}},blockExplorers:{default:{name:"CoinEx Explorer",url:"https://www.coinex.net"}},testnet:!1}),L9=f({id:1030,name:"Conflux eSpace",nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evm.confluxrpc.com"],webSocket:["wss://evm.confluxrpc.com/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evm.confluxscan.org"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:68602935}}}),R9=f({id:71,name:"Conflux eSpace Testnet",network:"cfx-espace-testnet",testnet:!0,nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evmtestnet.confluxrpc.com"],webSocket:["wss://evmtestnet.confluxrpc.com/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evmtestnet.confluxscan.org"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:117499050}}}),H9=f({id:1116,name:"Core Dao",nativeCurrency:{decimals:18,name:"Core",symbol:"CORE"},rpcUrls:{default:{http:["https://rpc.coredao.org"]}},blockExplorers:{default:{name:"CoreDao",url:"https://scan.coredao.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:11907934}},testnet:!1}),$9=f({id:1115,name:"Core Testnet",nativeCurrency:{decimals:18,name:"tCore",symbol:"TCORE"},rpcUrls:{default:{http:["https://rpc.test.btcs.network"]}},blockExplorers:{default:{name:"Core Testnet",url:"https://scan.test.btcs.network",apiUrl:"https://api.test.btcs.network/api"}},contracts:{multicall3:{address:"0xCcddF20A1932537123C2E48Bd8e00b108B8f7569",blockCreated:29350509}},testnet:!0}),G9=f({id:1114,name:"Core Testnet2",nativeCurrency:{decimals:18,name:"tCore2",symbol:"TCORE2"},rpcUrls:{default:{http:["https://rpc.test2.btcs.network"]}},blockExplorers:{default:{name:"Core Testnet2",url:"https://scan.test2.btcs.network",apiUrl:"https://api.test2.btcs.network/api"}},contracts:{multicall3:{address:"0x3CB285ff3Cd5C7C7e570b1E7DE3De17A0f985e56",blockCreated:3838600}},testnet:!0}),j9=f({id:21e6,name:"Corn",nativeCurrency:{decimals:18,name:"Bitcorn",symbol:"BTCN"},rpcUrls:{default:{http:["https://21000000.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Corn Explorer",url:"https://cornscan.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/21000000/etherscan/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3228}},sourceId:1}),V9=f({id:21000001,name:"Corn Testnet",nativeCurrency:{decimals:18,name:"Bitcorn",symbol:"BTCN"},rpcUrls:{default:{http:["https://21000001.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Corn Testnet Explorer",url:"https://testnet.cornscan.io",apiUrl:"https://api.routescan.io/v2/network/testnet/evm/21000001/etherscan/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4886}},testnet:!0,sourceId:11155111}),W9=f({id:44,name:"Crab Network",nativeCurrency:{decimals:18,name:"Crab Network Native Token",symbol:"CRAB"},rpcUrls:{default:{http:["https://crab-rpc.darwinia.network"],webSocket:["wss://crab-rpc.darwinia.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://crab-scan.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3032593}}}),q9=f({id:66665,name:"Creator",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.creatorchain.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.creatorchain.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!0}),Y9=f({id:102032,name:"Creditcoin Devnet",nativeCurrency:{name:"Devnet CTC",symbol:"devCTC",decimals:18},rpcUrls:{default:{http:["https://rpc.cc3-devnet.creditcoin.network"],webSocket:["wss://rpc.cc3-devnet.creditcoin.network/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://creditcoin-devnet.blockscout.com",apiUrl:"https://creditcoin3-dev.subscan.io"}},testnet:!0}),K9=f({id:102030,name:"Creditcoin",nativeCurrency:{name:"Creditcoin",symbol:"CTC",decimals:18},rpcUrls:{default:{http:["https://mainnet3.creditcoin.network"],webSocket:["wss://mainnet3.creditcoin.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://creditcoin.blockscout.com",apiUrl:"https://creditcoin.blockscout.com/api"}},testnet:!1}),Z9=f({id:102031,name:"Creditcoin Testnet",nativeCurrency:{name:"Creditcoin Testnet",symbol:"tCTC",decimals:18},rpcUrls:{default:{http:["https://rpc.cc3-testnet.creditcoin.network"],webSocket:["wss://rpc.cc3-testnet.creditcoin.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://creditcoin-testnet.blockscout.com",apiUrl:"https://creditcoin-testnet.blockscout.com/api"}},testnet:!0}),X9=f({id:25,name:"Cronos Mainnet",nativeCurrency:{decimals:18,name:"Cronos",symbol:"CRO"},rpcUrls:{default:{http:["https://evm.cronos.org"]}},blockExplorers:{default:{name:"Cronos Explorer",url:"https://explorer.cronos.org",apiUrl:"https://explorer-api.cronos.org/mainnet/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1963112}}}),Q9=f({id:338,name:"Cronos Testnet",nativeCurrency:{decimals:18,name:"CRO",symbol:"tCRO"},rpcUrls:{default:{http:["https://evm-t3.cronos.org"]}},blockExplorers:{default:{name:"Cronos Explorer (Testnet)",url:"https://explorer.cronos.org/testnet"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:10191251}},testnet:!0}),J9=f({id:388,name:"Cronos zkEVM Mainnet",nativeCurrency:{decimals:18,name:"Cronos zkEVM CRO",symbol:"zkCRO"},rpcUrls:{default:{http:["https://mainnet.zkevm.cronos.org"]}},blockExplorers:{default:{name:"Cronos zkEVM (Mainnet) Chain Explorer",url:"https://explorer.zkevm.cronos.org"}},contracts:{multicall3:{address:"0x06f4487d7c4a5983d2660db965cc6d2565e4cfaa",blockCreated:72}}}),eS=f({id:282,name:"Cronos zkEVM Testnet",nativeCurrency:{decimals:18,name:"Cronos zkEVM Test Coin",symbol:"zkTCRO"},rpcUrls:{default:{http:["https://testnet.zkevm.cronos.org"]}},blockExplorers:{default:{name:"Cronos zkEVM Testnet Explorer",url:"https://explorer.zkevm.cronos.org/testnet"}},testnet:!0}),tS=f({id:3737,name:"Crossbell",nativeCurrency:{decimals:18,name:"CSB",symbol:"CSB"},rpcUrls:{default:{http:["https://rpc.crossbell.io"]}},blockExplorers:{default:{name:"CrossScan",url:"https://scan.crossbell.io",apiUrl:"https://scan.crossbell.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:38246031}}}),rS=f({id:4158,name:"CrossFi Mainnet",nativeCurrency:{decimals:18,name:"CrossFi",symbol:"XFI"},rpcUrls:{default:{http:["https://rpc.mainnet.ms"]}},blockExplorers:{default:{name:"CrossFi Blockchain Explorer",url:"https://xfiscan.com"}},testnet:!1}),nS=f({id:33111,name:"Curtis",nativeCurrency:{name:"ApeCoin",symbol:"APE",decimals:18},rpcUrls:{default:{http:["https://rpc.curtis.apechain.com"]}},blockExplorers:{default:{name:"Curtis Explorer",url:"https://explorer.curtis.apechain.com"}},testnet:!0}),sS=f({id:7560,name:"Cyber",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cyber.alt.technology"]}},blockExplorers:{default:{name:"Blockscout",url:"https://cyberscan.co",apiUrl:"https://cyberscan.co/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),aS=f({id:111557560,name:"Cyber Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cyber-testnet.alt.technology"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet.cyberscan.co",apiUrl:"https://testnet.cyberscan.co/api"}},contracts:{multicall3:{address:"0xffc391F0018269d4758AEA1a144772E8FB99545E",blockCreated:304545}},testnet:!0}),oS=f({id:824,name:"Daily Network Mainnet",nativeCurrency:{decimals:18,name:"Daily",symbol:"DLY"},rpcUrls:{default:{http:["https://rpc.mainnet.dailycrypto.net"]}},blockExplorers:{default:{name:"Daily Mainnet Explorer",url:"https://explorer.mainnet.dailycrypto.net"}},testnet:!1}),iS=f({id:825,name:"Daily Network Testnet",nativeCurrency:{decimals:18,name:"Daily",symbol:"DLY"},rpcUrls:{default:{http:["https://rpc.testnet.dailycrypto.net"]}},blockExplorers:{default:{name:"Daily Testnet Explorer",url:"https://explorer.testnet.dailycrypto.net"}},testnet:!0}),cS=f({id:46,name:"Darwinia Network",nativeCurrency:{decimals:18,name:"RING",symbol:"RING"},rpcUrls:{default:{http:["https://rpc.darwinia.network"],webSocket:["wss://rpc.darwinia.network"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:69420}}}),lS=f({id:55931,name:"Datahaven Testnet",nativeCurrency:{decimals:18,name:"MOCK",symbol:"MOCK"},rpcUrls:{default:{http:["https://services.datahaven-testnet.network/testnet"],webSocket:["wss://services.datahaven-testnet.network/testnet"]}},blockExplorers:{default:{name:"DhScan",url:"https://testnet.dhscan.io/",apiUrl:"https://testnet.dhscan.io/api-docs"}},contracts:{},testnet:!0}),uS=f({id:20240603,name:"DBK chain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.dbkchain.io"]}},blockExplorers:{default:{name:"DBK Chain Explorer",url:"https://scan.dbkchain.io"}},testnet:!1}),dS=f({...j,id:2716446429837e3,name:"Dchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://dchain-2716446429837000-1.jsonrpc.sagarpc.io"]}},blockExplorers:{default:{name:"Dchain Explorer",url:"https://dchain-2716446429837000-1.sagaexplorer.io",apiUrl:"https://api-dchain-2716446429837000-1.sagaexplorer.io/api"}},contracts:{...j.contracts}}),fS=f({...j,id:2713017997578e3,name:"Dchain Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://dchaintestnet-2713017997578000-1.jsonrpc.testnet.sagarpc.io"]}},blockExplorers:{default:{name:"Dchain Explorer",url:"https://dchaintestnet-2713017997578000-1.testnet.sagaexplorer.io",apiUrl:"https://api-dchaintestnet-2713017997578000-1.testnet.sagaexplorer.io/api"}},contracts:{...j.contracts}}),pS=f({id:1130,network:"defichain-evm",name:"DeFiChain EVM Mainnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:18},rpcUrls:{default:{http:["https://eth.mainnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:137852}}}),hS=f({id:1131,network:"defichain-evm-testnet",name:"DeFiChain EVM Testnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:18},rpcUrls:{default:{http:["https://eth.testnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live/?network=TestNet"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:156462}},testnet:!0}),mS=f({id:666666666,name:"Degen",nativeCurrency:{decimals:18,name:"Degen",symbol:"DEGEN"},rpcUrls:{default:{http:["https://rpc.degen.tips"],webSocket:["wss://rpc.degen.tips"]}},blockExplorers:{default:{name:"Degen Chain Explorer",url:"https://explorer.degen.tips",apiUrl:"https://explorer.degen.tips/api/v2"}}}),bS=f({id:53935,name:"DFK Chain",nativeCurrency:{decimals:18,name:"Jewel",symbol:"JEWEL"},rpcUrls:{default:{http:["https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"]}},blockExplorers:{default:{name:"DFKSubnetScan",url:"https://subnets.avax.network/defi-kingdoms"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14790551}}}),yS=f({id:15,name:"Diode Prenet",nativeCurrency:{decimals:18,name:"DIODE",symbol:"DIODE"},rpcUrls:{default:{http:["https://prenet.diode.io:8443"],webSocket:["wss://prenet.diode.io:8443/ws"]}},blockExplorers:{default:{name:"Diode Explorer",url:"https://diode.io/prenet"}},testnet:!1}),gS=f({id:513100,name:"DisChain",nativeCurrency:{decimals:18,name:"DIS",symbol:"DIS"},rpcUrls:{default:{http:["https://rpc.dischain.xyz"]}},blockExplorers:{default:{name:"DisChain Explorer",url:"https://www.oklink.com/dis"}}}),xS=f({id:53457,name:"DODOchain Testnet",nativeCurrency:{decimals:18,name:"DODO",symbol:"DODO"},rpcUrls:{default:{http:["https://dodochain-testnet.alt.technology"],webSocket:["wss://dodochain-testnet.alt.technology/ws"]}},blockExplorers:{default:{name:"DODOchain Testnet (Sepolia) Explorer",url:"https://testnet-scan.dodochain.com"}},testnet:!0}),wS=f({id:2e3,name:"Dogechain",nativeCurrency:{decimals:18,name:"Wrapped Dogecoin",symbol:"WDOGE"},rpcUrls:{default:{http:["https://rpc.dogechain.dog"]}},blockExplorers:{default:{name:"DogeChainExplorer",url:"https://explorer.dogechain.dog",apiUrl:"https://explorer.dogechain.dog/api"}},contracts:{multicall3:{address:"0x68a8609a60a008EFA633dfdec592c03B030cC508",blockCreated:25384031}}}),vS=f({id:97476,name:"Doma Testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc-testnet.doma.xyz"]}},blockExplorers:{default:{name:"Doma Testnet Explorer",url:"https://explorer-testnet.doma.xyz"}},testnet:!0}),kS=f({id:42026,name:"Donatuz",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.donatuz.com"]}},blockExplorers:{default:{name:"Donatuz Explorer",url:"https://explorer.donatuz.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}}}),ES=f({id:7979,name:"DOS Chain",nativeCurrency:{decimals:18,name:"DOS Chain",symbol:"DOS"},rpcUrls:{default:{http:["https://main.doschain.com"]}},blockExplorers:{default:{name:"DOS Chain Explorer",url:"https://doscan.io",apiUrl:"https://api.doscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:161908}}}),CS=f({id:3939,name:"DOS Chain Testnet",nativeCurrency:{decimals:18,name:"DOS Chain Testnet",symbol:"DOS"},rpcUrls:{default:{http:["https://test.doschain.com"]}},blockExplorers:{default:{name:"DOS Chain Testnet Explorer",url:"https://test.doscan.io",apiUrl:"https://api-test.doscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:69623}},testnet:!0}),TS=f({id:23451,name:"DreyerX Mainnet",nativeCurrency:{name:"DreyerX",symbol:"DRX",decimals:18},rpcUrls:{default:{http:["https://rpc.dreyerx.com"]}},blockExplorers:{default:{name:"DreyerX Scan",url:"https://scan.dreyerx.com"}}}),SS=f({id:23452,name:"DreyerX Testnet",nativeCurrency:{name:"DreyerX",symbol:"DRX",decimals:18},rpcUrls:{default:{http:["http://testnet-rpc.dreyerx.com"]}},blockExplorers:{default:{name:"DreyerX Testnet Scan",url:"https://testnet-scan.dreyerx.com"}},testnet:!0}),AS=f({id:555888,name:"DustBoy IoT",nativeCurrency:{name:"Ether",symbol:"DST",decimals:18},rpcUrls:{default:{http:["https://dustboy-rpc.jibl2.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://dustboy.jibl2.com",apiUrl:"https://dustboy.jibl2.com/api"}},contracts:{multicall3:{address:"0xFFD34aa2C62B2D52E00A361e466C229788f4eD6a",blockCreated:526569}},testnet:!1}),PS=f({id:1100,name:"Dymension",nativeCurrency:{name:"DYM",symbol:"DYM",decimals:18},rpcUrls:{default:{http:["https://dymension-evm-rpc.publicnode.com"],webSocket:["wss://dymension-evm-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Dym FYI",url:"https://dym.fyi"}},testnet:!1}),IS=f({id:5424,name:"edeXa",nativeCurrency:{name:"edeXa",symbol:"EDX",decimals:18},rpcUrls:{default:{http:["https://rpc.edexa.network"]}},blockExplorers:{default:{name:"edeXa Explorer",url:"https://explorer.edexa.network",apiUrl:"https://explorer.edexa.network/api/v2"}}}),US=f({id:1995,name:"edeXa Testnet",nativeCurrency:{name:"edeXa",symbol:"tEDX",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.edexa.network"]}},blockExplorers:{default:{name:"edeXa Testnet Explorer",url:"https://explorer.testnet.edexa.network",apiUrl:"https://explorer.testnet.edexa.network/api/v2"}},testnet:!0}),OS=f({id:2026,name:"Edgeless Network",nativeCurrency:{name:"Edgeless Wrapped ETH",symbol:"EwETH",decimals:18},rpcUrls:{default:{http:["https://rpc.edgeless.network/http"],webSocket:["wss://rpc.edgeless.network/ws"]}},blockExplorers:{default:{name:"Edgeless Explorer",url:"https://explorer.edgeless.network"}}}),BS=f({id:202,name:"Edgeless Testnet",nativeCurrency:{name:"Edgeless Wrapped ETH",symbol:"EwETH",decimals:18},rpcUrls:{default:{http:["https://edgeless-testnet.rpc.caldera.xyz/http"],webSocket:["wss://edgeless-testnet.rpc.caldera.xyz/ws"]}},blockExplorers:{default:{name:"Edgeless Testnet Explorer",url:"https://testnet.explorer.edgeless.network"}}}),MS=f({id:2021,name:"Edgeware EdgeEVM Mainnet",nativeCurrency:{decimals:18,name:"Edgeware",symbol:"EDG"},rpcUrls:{default:{http:["https://edgeware-evm.jelliedowl.net"]}},blockExplorers:{default:{name:"Edgscan by Bharathcoorg",url:"https://edgscan.live",apiUrl:"https://edgscan.live/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:18117872}}}),_S=f({id:2022,name:"Beresheet BereEVM Testnet",nativeCurrency:{decimals:18,name:"Testnet EDG",symbol:"tEDG"},rpcUrls:{default:{http:["https://beresheet-evm.jelliedowl.net"]}},blockExplorers:{default:{name:"Edgscan by Bharathcoorg",url:"https://testnet.edgscan.live",apiUrl:"https://testnet.edgscan.live/api"}}}),DS=f({id:41923,name:"EDU Chain",nativeCurrency:{decimals:18,name:"EDU",symbol:"EDU"},rpcUrls:{default:{http:["https://rpc.edu-chain.raas.gelato.cloud"]}},blockExplorers:{default:{name:"EDU Chain Explorer",url:"https://educhain.blockscout.com/"}},testnet:!1}),FS=f({id:656476,name:"EDU Chain Testnet",nativeCurrency:{decimals:18,name:"EDU",symbol:"EDU"},rpcUrls:{default:{http:["https://rpc.open-campus-codex.gelato.digital/"],webSocket:["wss://ws.open-campus-codex.gelato.digital"]}},blockExplorers:{default:{name:"EDU Chain Testnet Explorer",url:"https://opencampus-codex.blockscout.com",apiUrl:"https://opencampus-codex.blockscout.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:15514133}},testnet:!0}),NS=f({id:1994,name:"Ekta",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{default:{http:["https://main.ekta.io"]}},blockExplorers:{default:{name:"Ektascan",url:"https://ektascan.io",apiUrl:"https://ektascan.io/api"}}}),zS=f({id:1004,name:"Ekta Testnet",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{default:{http:["https://test.ekta.io:8545"]}},blockExplorers:{default:{name:"Test Ektascan",url:"https://test.ektascan.io",apiUrl:"https://test.ektascan.io/api"}},testnet:!0}),LS=f({id:20,name:"Elastos Smart Chain",nativeCurrency:{name:"ELA",symbol:"ELA",decimals:18},rpcUrls:{default:{http:["https://api2.elastos.io/eth"]}},blockExplorers:{default:{name:"Elastos Explorer",url:"https://esc.elastos.io"}},testnet:!1}),RS=f({id:21,name:"Elastos Smart Chain Testnet",nativeCurrency:{name:"tELA",symbol:"tELA",decimals:18},rpcUrls:{default:{http:["https://api-testnet.elastos.io/eth"]}},blockExplorers:{default:{name:"Elastos Explorer",url:"https://esc-testnet.elastos.io"}},testnet:!0}),HS=f({id:52014,name:"Electroneum Mainnet",nativeCurrency:{name:"ETN",symbol:"ETN",decimals:18},rpcUrls:{default:{http:["https://rpc.electroneum.com"]}},blockExplorers:{default:{name:"Electroneum Block Explorer",url:"https://blockexplorer.electroneum.com"}},testnet:!1}),$S=f({id:5201420,name:"Electroneum Testnet",nativeCurrency:{name:"ETN",symbol:"ETN",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.electroneum.com"]}},blockExplorers:{default:{name:"Electroneum Block Explorer",url:"https://blockexplorer.thesecurityteam.rocks"}},testnet:!0}),GS=f({...j,id:1338,name:"Elysium Testnet",nativeCurrency:{decimals:18,name:"LAVA",symbol:"LAVA"},rpcUrls:{default:{http:["https://elysium-test-rpc.vulcanforged.com"]}},blockExplorers:{default:{name:"Elysium testnet explorer",url:"https://elysium-explorer.vulcanforged.com"}},testnet:!0}),jS=f({id:246,name:"Energy Mainnet",nativeCurrency:{name:"EWT",symbol:"EWT",decimals:18},rpcUrls:{default:{http:["https://rpc.energyweb.org"]}},blockExplorers:{default:{name:"EnergyWeb Explorer",url:"https://explorer.energyweb.org"}},testnet:!1}),VS=f({id:173,name:"ENI Mainnet",nativeCurrency:{decimals:18,name:"ENI",symbol:"ENI"},rpcUrls:{default:{http:["https://rpc.eniac.network"]}},blockExplorers:{default:{name:"ENI Explorer",url:"https://scan.eniac.network"}},testnet:!1}),WS=f({id:6912115,name:"ENI Testnet",nativeCurrency:{decimals:18,name:"ENI Testnet Token",symbol:"ENI"},rpcUrls:{default:{http:["https://rpc-testnet.eniac.network"]}},blockExplorers:{default:{name:"ENI Testnet Explorer",url:"https://scan-testnet.eniac.network"}},testnet:!0}),qS=f({id:119,name:"ENULS Mainnet",nativeCurrency:{decimals:18,name:"NULS",symbol:"NULS"},rpcUrls:{default:{http:["https://evmapi2.nuls.io"]}},blockExplorers:{default:{name:"ENULS Explorer",url:"https://evmscan.nuls.io"}},testnet:!1}),YS=f({id:7332,name:"Horizen EON",nativeCurrency:{decimals:18,name:"ZEN",symbol:"ZEN"},rpcUrls:{default:{http:["https://eon-rpc.horizenlabs.io/ethv1"]}},blockExplorers:{default:{name:"EON Explorer",url:"https://eon-explorer.horizenlabs.io"}},contracts:{}}),KS=f({id:17777,name:"EOS EVM",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.evm.eosnetwork.com"]}},blockExplorers:{default:{name:"EOS EVM Explorer",url:"https://explorer.evm.eosnetwork.com",apiUrl:"https://explorer.evm.eosnetwork.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7943933}}}),ZS=f({id:15557,name:"EOS EVM Testnet",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.testnet.evm.eosnetwork.com"]}},blockExplorers:{default:{name:"EOS EVM Testnet Explorer",url:"https://explorer.testnet.evm.eosnetwork.com",apiUrl:"https://explorer.testnet.evm.eosnetwork.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:9067940}},testnet:!0}),XS=f({id:140,name:"Eteria",nativeCurrency:{name:"Eteria",symbol:"ERA",decimals:18},rpcUrls:{default:{http:["https://mainnet.eteria.io/v1"]}},blockExplorers:{default:{name:"Eteria Explorer",url:"https://explorer.eteria.io",apiUrl:"https://explorer.eteria.io/api"}}}),QS=f({id:42793,name:"Etherlink",blockTime:4830,nativeCurrency:{decimals:18,name:"Tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.mainnet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink",url:"https://explorer.etherlink.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:33899}}}),JS=f({id:127823,name:"Etherlink Shadownet Testnet",nativeCurrency:{decimals:18,name:"tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.shadownet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink Shadownet Testnet Explorer",url:"https://shadownet.explorer.etherlink.com"}},testnet:!0}),e4=f({id:128123,name:"Etherlink Testnet",nativeCurrency:{decimals:18,name:"Tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.ghostnet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink Testnet",url:"https://testnet.explorer.etherlink.com"}},testnet:!0}),t4=f({id:183,name:"Ethernity",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.ethernitychain.io"]}},blockExplorers:{default:{name:"Ethernity Explorer",url:"https://ernscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!1}),r4=f({id:20256789,name:"ETP Mainnet",nativeCurrency:{decimals:18,name:"ETP Chain Native Token",symbol:"ETP"},rpcUrls:{default:{http:["https://rpc.etpscan.xyz"]}},blockExplorers:{default:{name:"ETP Scan",url:"https://etpscan.xyz"}}}),n4=f({id:9001,name:"Evmos",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.org:8545"]}},blockExplorers:{default:{name:"Evmos Block Explorer",url:"https://escan.live"}}}),s4=f({id:9e3,name:"Evmos Testnet",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.dev:8545"]}},blockExplorers:{default:{name:"Evmos Testnet Block Explorer",url:"https://evm.evmos.dev/"}}}),a4=f({id:22052002,name:"Excelon Mainnet",network:"XLON",nativeCurrency:{decimals:18,name:"Excelon",symbol:"xlon"},rpcUrls:{default:{http:["https://edgewallet1.xlon.org"]}},blockExplorers:{default:{name:"Excelon explorer",url:"https://explorer.excelon.io"}}}),o4=f({id:2,name:"Expanse Network",nativeCurrency:{decimals:18,name:"EXP",symbol:"EXP"},rpcUrls:{default:{http:["https://node.expanse.tech"]}},blockExplorers:{default:{name:"Expanse Explorer",url:"https://explorer.expanse.tech"}},testnet:!1}),i4=f({id:7200,name:"exSat Network",nativeCurrency:{decimals:18,name:"BTC",symbol:"BTC"},rpcUrls:{default:{http:["https://evm.exsat.network"]}},blockExplorers:{default:{name:"exSat Explorer",url:"https://scan.exsat.network",apiUrl:"https://scan.exsat.network/api"}}}),c4=f({id:839999,name:"exSat Testnet",nativeCurrency:{decimals:18,name:"BTC",symbol:"BTC"},rpcUrls:{default:{http:["https://evm-tst3.exsat.network"]}},blockExplorers:{default:{name:"exSat Explorer",url:"https://scan-testnet.exsat.network",apiUrl:"https://scan-testnet.exsat.network/api"}}}),l4=f({id:250,name:"Fantom",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://250.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"FTMScan",url:"https://ftmscan.com",apiUrl:"https://api.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:33001987}}}),u4=f({id:64240,name:"Fantom Sonic Open Testnet",network:"fantom-sonic-testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpcapi.sonic.fantom.network"]}},blockExplorers:{default:{name:"Fantom Sonic Open Testnet Explorer",url:"https://public-sonic.fantom.network"}},testnet:!0}),d4=f({id:4002,name:"Fantom Testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.testnet.fantom.network"]}},blockExplorers:{default:{name:"FTMScan",url:"https://testnet.ftmscan.com",apiUrl:"https://testnet.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:8328688}},testnet:!0}),f4=f({id:12306,name:"Fibo Chain",nativeCurrency:{decimals:18,name:"fibo",symbol:"FIBO"},rpcUrls:{default:{http:["https://network.hzroc.art"]}},blockExplorers:{default:{name:"FiboScan",url:"https://scan.fibochain.org"}}}),p4=f({id:314,name:"Filecoin Mainnet",nativeCurrency:{decimals:18,name:"filecoin",symbol:"FIL"},rpcUrls:{default:{http:["https://api.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://filfox.info/en"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3328594}}}),h4=f({id:314159,name:"Filecoin Calibration",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.calibration.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filscan",url:"https://calibration.filscan.io"}},testnet:!0}),m4=f({id:3141,name:"Filecoin Hyperspace",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.hyperspace.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://hyperspace.filfox.info/en"}},testnet:!0}),b4=f({id:253368190,name:"Flame",network:"flame",nativeCurrency:{symbol:"TIA",name:"TIA",decimals:18},rpcUrls:{default:{http:["https://rpc.flame.astria.org"],webSocket:["wss://ws.flame.astria.org"]}},blockExplorers:{default:{name:"Flame Explorer",url:"https://explorer.flame.astria.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:6829148}}}),y4=f({id:14,name:"Flare Mainnet",nativeCurrency:{decimals:18,name:"Flare",symbol:"FLR"},rpcUrls:{default:{http:["https://flare-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Flare Explorer",url:"https://flare-explorer.flare.network",apiUrl:"https://flare-explorer.flare.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3002461}}}),g4=f({id:114,name:"Flare Testnet Coston2",nativeCurrency:{decimals:18,name:"Coston2 Flare",symbol:"C2FLR"},rpcUrls:{default:{http:["https://coston2-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Coston2 Explorer",url:"https://coston2-explorer.flare.network",apiUrl:"https://coston2-explorer.flare.network/api"}},testnet:!0}),x4=f({id:747,name:"Flow EVM Mainnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://mainnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Mainnet Explorer",url:"https://evm.flowscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6205}},blockTime:800}),w4=f({id:646,name:"Flow EVM Previewnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://previewnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Previewnet Explorer",url:"https://previewnet.flowdiver.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6205}}}),v4=f({id:545,name:"Flow EVM Testnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://testnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Flow Diver",url:"https://evm-testnet.flowscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:137518}},testnet:!0,blockTime:800}),k4=f({id:9999999,name:"Fluence",nativeCurrency:{name:"FLT",symbol:"FLT",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.fluence.dev"],webSocket:["wss://ws.mainnet.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.mainnet.fluence.dev",apiUrl:"https://blockscout.mainnet.fluence.dev/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:207583}}}),E4=f({id:123420000220,name:"Fluence Stage",nativeCurrency:{name:"tFLT",symbol:"tFLT",decimals:18},rpcUrls:{default:{http:["https://rpc.stage.fluence.dev"],webSocket:["wss://ws.stage.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.stage.fluence.dev",apiUrl:"https://blockscout.stage.fluence.dev/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83227}},testnet:!0}),C4=f({id:52164803,name:"Fluence Testnet",nativeCurrency:{name:"tFLT",symbol:"tFLT",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.fluence.dev"],webSocket:["wss://ws.testnet.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.testnet.fluence.dev",apiUrl:"https://blockscout.testnet.fluence.dev/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96424}},testnet:!0}),T4=f({id:20993,name:"Fluent Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.dev.gblend.xyz"]}},blockExplorers:{default:{name:"Fluent Explorer",url:"https://blockscout.dev.gblend.xyz"}},testnet:!0}),Na=1,S4=f({id:478,name:"Form Network",nativeCurrency:{decimals:18,name:"Ethereum",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.form.network/http"],webSocket:["wss://rpc.form.network/ws"]}},blockExplorers:{default:{name:"Form Explorer",url:"https://explorer.form.network"}},contracts:{...j.contracts,addressManager:{[Na]:{address:"0x15c249E46A2F924C2dB3A1560CF86729bAD1f07B"}},l1CrossDomainMessenger:{[Na]:{address:"0xF333158DCCad1dF6C3F0a3aEe8BC31fA94d9eD5c"}},l2OutputOracle:{[Na]:{address:"0x4ccAAF69F41c5810cA875183648B577CaCf1F67E"}},portal:{[Na]:{address:"0x4E259Ee5F4136408908160dD32295A5031Fa426F"}},l1StandardBridge:{[Na]:{address:"0xdc20aA63D3DE59574E065957190D8f24e0F7B8Ba"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},sourceId:Na}),A4=f({id:984122,name:"Forma",network:"forma",nativeCurrency:{symbol:"TIA",name:"TIA",decimals:18},rpcUrls:{default:{http:["https://rpc.forma.art"],webSocket:["wss://ws.forma.art"]}},blockExplorers:{default:{name:"Forma Explorer",url:"https://explorer.forma.art"}},contracts:{multicall3:{address:"0xd53C6FFB123F7349A32980F87faeD8FfDc9ef079",blockCreated:252705}}}),za=11155111,P4=f({id:132902,name:"Form Testnet",nativeCurrency:{decimals:18,name:"Ethereum",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia-rpc.form.network/http"],webSocket:["wss://sepolia-rpc.form.network/ws"]}},blockExplorers:{default:{name:"Form Testnet Explorer",url:"https://sepolia-explorer.form.network"}},contracts:{...j.contracts,addressManager:{[za]:{address:"0xd5C38fa934f7fd7477D4800F4f38a1c5BFdF1373"}},l1CrossDomainMessenger:{[za]:{address:"0x37A68565c4BE9700b3E3Ec60cC4416cAC3052FAa"}},l2OutputOracle:{[za]:{address:"0x9eA2239E65a59EC9C7F1ED4C116dD58Da71Fc1e2"}},portal:{[za]:{address:"0x60377e3cE15dF4CCA24c4beF076b60314240b032"}},l1StandardBridge:{[za]:{address:"0xD4531f633942b2725896F47cD2aFd260b44Ab1F7"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!0,sourceId:za}),I4=f({id:80931,name:"Forta Chain",nativeCurrency:{symbol:"FORT",name:"FORT",decimals:18},rpcUrls:{default:{http:["https://rpc-forta-chain-8gj1qndmfc.t.conduit.xyz"]}},blockExplorers:{default:{name:"Forta Explorer",url:"https://explorer.forta.org"}}}),U4=f({id:31337,name:"Foundry",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}}),dl=1,O4=f({...j,id:252,name:"Fraxtal",nativeCurrency:{name:"Frax",symbol:"FRAX",decimals:18},rpcUrls:{default:{http:["https://rpc.frax.com"]}},blockExplorers:{default:{name:"fraxscan",url:"https://fraxscan.com",apiUrl:"https://api.fraxscan.com/api"}},contracts:{...j.contracts,l2OutputOracle:{[dl]:{address:"0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[dl]:{address:"0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D",blockCreated:19135323}},l1StandardBridge:{[dl]:{address:"0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2",blockCreated:19135323}}},sourceId:dl}),fl=17e3,B4=f({...j,id:2522,name:"Fraxtal Testnet",nativeCurrency:{name:"Frax",symbol:"FRAX",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.frax.com"]}},blockExplorers:{default:{name:"fraxscan testnet",url:"https://holesky.fraxscan.com",apiUrl:"https://api-holesky.fraxscan.com/api"}},contracts:{...j.contracts,l2OutputOracle:{[fl]:{address:"0x715EA64DA13F4d0831ece4Ad3E8c1aa013167F32"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[fl]:{address:"0xB9c64BfA498d5b9a8398Ed6f46eb76d90dE5505d",blockCreated:318416}},l1StandardBridge:{[fl]:{address:"0x0BaafC217162f64930909aD9f2B27125121d6332",blockCreated:318416}}},sourceId:fl}),M4=f({...j,id:33979,name:"Funki",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.funkichain.com"]}},blockExplorers:{default:{name:"Funki Mainnet Explorer",url:"https://funkiscan.io"}},contracts:{...j.contracts},sourceId:1}),_4=f({...j,id:3397901,network:"funkiSepolia",name:"Funki Sepolia Sandbox",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://funki-testnet.alt.technology"]}},blockExplorers:{default:{name:"Funki Sepolia Sandbox Explorer",url:"https://sepolia-sandbox.funkichain.com/"}},testnet:!0,contracts:{...j.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204}},sourceId:11155111}),D4=f({id:122,name:"Fuse",nativeCurrency:{name:"Fuse",symbol:"FUSE",decimals:18},rpcUrls:{default:{http:["https://rpc.fuse.io"]}},blockExplorers:{default:{name:"Fuse Explorer",url:"https://explorer.fuse.io",apiUrl:"https://explorer.fuse.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:16146628}}}),F4=f({id:123,name:"Fuse Sparknet",nativeCurrency:{name:"Spark",symbol:"SPARK",decimals:18},rpcUrls:{default:{http:["https://rpc.fusespark.io"]}},blockExplorers:{default:{name:"Sparkent Explorer",url:"https://explorer.fusespark.io",apiUrl:"https://explorer.fusespark.io/api"}}}),N4=f({id:32659,name:"Fusion Mainnet",nativeCurrency:{name:"Fusion",symbol:"FSN",decimals:18},rpcUrls:{default:{http:["https://mainnet.fusionnetwork.io"],webSocket:["wss://mainnet.fusionnetwork.io"]}},blockExplorers:{default:{name:"FSNscan",url:"https://fsnscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10441605}},testnet:!1}),z4=f({id:46688,name:"Fusion Testnet",nativeCurrency:{name:"Fusion",symbol:"FSN",decimals:18},rpcUrls:{default:{http:["https://testnet.fusionnetwork.io"],webSocket:["wss://testnet.fusionnetwork.io"]}},blockExplorers:{default:{name:"FSNscan",url:"https://testnet.fsnscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10428309}},testnet:!0}),pl=17e3,L4=f({...j,name:"Garnet Testnet",testnet:!0,id:17069,sourceId:pl,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.garnetchain.com"],webSocket:["wss://rpc.garnetchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.garnetchain.com"}},contracts:{...j.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[pl]:{address:"0x57ee40586fbE286AfC75E67cb69511A6D9aF5909",blockCreated:1274684}},l2OutputOracle:{[pl]:{address:"0xCb8E7AC561b8EF04F2a15865e9fbc0766FEF569B",blockCreated:1274684}},l1StandardBridge:{[pl]:{address:"0x09bcDd311FE398F80a78BE37E489f5D440DB95DE",blockCreated:1274684}}}}),R4=f({id:86,name:"GateChain Mainnet",nativeCurrency:{name:"GateChainToken",symbol:"GT",decimals:18},rpcUrls:{default:{http:["https://evm.nodeinfo.cc"],webSocket:["wss://evm-ws.gatenode.cc"]}},blockExplorers:{default:{name:"Gate Scan",url:"https://www.gatescan.org",apiUrl:"https://gatescan.org/api"}},testnet:!1}),H4=f({id:63157,name:"Geist Mainnet",nativeCurrency:{decimals:18,name:"Aavegotchi GHST Token",symbol:"GHST"},rpcUrls:{default:{http:["https://geist-mainnet.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Blockscout",url:"https://geist-mainnet.explorer.alchemy.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:660735}}}),$4=f({id:16507,name:"Genesys Mainnet",nativeCurrency:{decimals:18,name:"GSYS",symbol:"GSYS"},rpcUrls:{default:{http:["https://rpc.genesys.network"]}},blockExplorers:{default:{name:"Genesys Explorer",url:"https://gchainexplorer.genesys.network"}},testnet:!1}),hl=11155111,Ay=f({...j,id:91342,network:"giwa-sepolia",name:"GIWA Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://sepolia-rpc.giwa.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-explorer.giwa.io",apiUrl:"https://sepolia-explorer.giwa.io/api"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},disputeGameFactory:{[hl]:{address:"0x37347caB2afaa49B776372279143D71ad1f354F6"}},portal:{[hl]:{address:"0x956962C34687A954e611A83619ABaA37Ce6bC78A"}},l1StandardBridge:{[hl]:{address:"0x77b2ffc0F57598cAe1DB76cb398059cF5d10A7E7"}}},testnet:!0,sourceId:hl}),G4=f({...Ay,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-rpc-flashblocks.giwa.io"]}}}),j4=f({id:251,name:"Glide L1 Protocol XP",nativeCurrency:{name:"GLXP",symbol:"GLXP",decimals:18},rpcUrls:{default:{http:["https://rpc-api.glideprotocol.xyz/l1-rpc"],webSocket:["wss://rpc-api.glideprotocol.xyz/l1-rpc"]}},blockExplorers:{default:{name:"Glide Protocol Explore",url:"https://blockchain-explorer.glideprotocol.xyz"}},testnet:!1}),V4=f({id:253,name:"Glide L2 Protocol XP",nativeCurrency:{name:"GLXP",symbol:"GLXP",decimals:18},rpcUrls:{default:{http:["https://rpc-api.glideprotocol.xyz/l2-rpc"],webSocket:["wss://rpc-api.glideprotocol.xyz/l2-rpc"]}},blockExplorers:{default:{name:"Glide Protocol Explore",url:"https://blockchain-explorer.glideprotocol.xyz"}},testnet:!1}),W4=f({id:100,name:"Gnosis",nativeCurrency:{decimals:18,name:"xDAI",symbol:"XDAI"},blockTime:5e3,rpcUrls:{default:{http:["https://rpc.gnosischain.com"],webSocket:["wss://rpc.gnosischain.com/wss"]}},blockExplorers:{default:{name:"Gnosisscan",url:"https://gnosisscan.io",apiUrl:"https://api.gnosisscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:21022491}}}),q4=f({id:10200,name:"Gnosis Chiado",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},blockTime:5e3,rpcUrls:{default:{http:["https://rpc.chiadochain.net"],webSocket:["wss://rpc.chiadochain.net/wss"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.chiadochain.net",apiUrl:"https://blockscout.chiadochain.net/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4967313}},testnet:!0}),Y4=f({id:2345,name:"GOAT",nativeCurrency:{decimals:18,name:"Bitcoin",symbol:"BTC"},rpcUrls:{default:{http:["https://rpc.goat.network"]}},blockExplorers:{default:{name:"Goat Explorer",url:"https://explorer.goat.network"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),K4=f({id:1663,name:"Horizen Gobi Testnet",nativeCurrency:{decimals:18,name:"Test ZEN",symbol:"tZEN"},rpcUrls:{default:{http:["https://gobi-testnet.horizenlabs.io/ethv1"]}},blockExplorers:{default:{name:"Gobi Explorer",url:"https://gobi-explorer.horizen.io"}},contracts:{},testnet:!0}),Z4=f({id:60,name:"GoChain",nativeCurrency:{decimals:18,name:"GO",symbol:"GO"},rpcUrls:{default:{http:["https://rpc.gochain.io"]}},blockExplorers:{default:{name:"GoChain Explorer",url:"https://explorer.gochain.io"}},testnet:!1}),X4=f({id:71402,name:"Godwoken Mainnet",nativeCurrency:{decimals:18,name:"pCKB",symbol:"pCKB"},rpcUrls:{default:{http:["https://v1.mainnet.godwoken.io/rpc"]}},blockExplorers:{default:{name:"GW Scan",url:"https://v1.gwscan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:15034}},testnet:!1}),Q4=f({id:5,name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://5.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.etherscan.io",apiUrl:"https://api-goerli.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xfc4AC75C46C914aF5892d6d3eFFcebD7917293F1",blockCreated:10339206},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),J4=f({id:440017,name:"Graphite Network",nativeCurrency:{name:"Graphite",symbol:"@G",decimals:18},rpcUrls:{default:{http:["https://anon-entrypoint-1.atgraphite.com"],webSocket:["wss://ws-anon-entrypoint-1.atgraphite.com"]}},blockExplorers:{default:{name:"Graphite Spectre",url:"https://main.atgraphite.com",apiUrl:"https://api.main.atgraphite.com/api"}},testnet:!1}),eA=f({id:54170,name:"Graphite Network Testnet",nativeCurrency:{name:"Graphite",symbol:"@G",decimals:18},rpcUrls:{default:{http:["https://anon-entrypoint-test-1.atgraphite.com"],webSocket:["wss://ws-anon-entrypoint-test-1.atgraphite.com"]}},blockExplorers:{default:{name:"Graphite Testnet Spectre",url:"https://test.atgraphite.com",apiUrl:"https://api.test.atgraphite.com/api"}},testnet:!0}),tA=f({id:1625,name:"Gravity Alpha Mainnet",nativeCurrency:{name:"G",symbol:"G",decimals:18},rpcUrls:{default:{http:["https://rpc.gravity.xyz"]}},blockExplorers:{default:{name:"Gravity Explorer",url:"https://explorer.gravity.xyz",apiUrl:"https://explorer.gravity.xyz/api"}},contracts:{multicall3:{address:"0xf8ac4BEB2F75d2cFFb588c63251347fdD629B92c",blockCreated:16851}}}),rA=f({id:43419,name:"Gunz Mainnet",nativeCurrency:{name:"GUN",symbol:"GUN",decimals:18},rpcUrls:{default:{http:["https://rpc.gunzchain.io/ext/bc/2M47TxWHGnhNtq6pM5zPXdATBtuqubxn5EPFgFmEawCQr9WFML/rpc"]}},blockExplorers:{default:{name:"Gunz Explorer",url:"https://gunzscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:70502}}}),nA=f({id:260,name:"Guru Network Mainnet",nativeCurrency:{name:"GURU Token",symbol:"GURU",decimals:18},rpcUrls:{default:{http:["https://rpc-main.gurunetwork.ai","https://rpc.gurunetwork.ai/archive/260"]}},blockExplorers:{default:{name:"Guruscan",url:"https://scan.gurunetwork.ai"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:271691}},testnet:!1}),sA=f({id:261,name:"Guru Network Testnet",nativeCurrency:{name:"tGURU Token",symbol:"tGURU",decimals:18},rpcUrls:{default:{http:["https://rpc-test.gurunetwork.ai","https://rpc.gurunetwork.ai/archive/261"]}},blockExplorers:{default:{name:"Guruscan",url:"https://sepolia.gurunetwork.ai"}},testnet:!0}),aA=f({id:5112,name:"Ham",nativeCurrency:{decimals:18,name:"Ham",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.ham.fun"],webSocket:["wss://rpc.ham.fun"]}},blockExplorers:{default:{name:"Ham Chain Explorer",url:"https://explorer.ham.fun",apiUrl:"https://explorer.ham.fun/api/v2"}}}),oA=f({id:216,name:"Happychain Testnet",nativeCurrency:{symbol:"HAPPY",name:"HAPPY",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.happy.tech/http"],webSocket:["wss://rpc.testnet.happy.tech/ws"]}},blockExplorers:{default:{name:"Happy Chain Testnet Explorer",url:"https://explorer.testnet.happy.tech"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1}},testnet:!0}),iA=f({id:11235,name:"HAQQ Mainnet",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLM"},rpcUrls:{default:{http:["https://rpc.eth.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.haqq.network",apiUrl:"https://explorer.haqq.network/api"}}}),cA=f({id:54211,name:"HAQQ Testedge 2",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLMT"},rpcUrls:{default:{http:["https://rpc.eth.testedge2.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.testedge2.haqq.network",apiUrl:"https://explorer.testedge2.haqq.network/api"}}}),lA=f({id:31337,name:"Hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),uA=f({id:16666e5,name:"Harmony One",nativeCurrency:{name:"Harmony",symbol:"ONE",decimals:18},rpcUrls:{default:{http:["https://1666600000.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Harmony Explorer",url:"https://explorer.harmony.one"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:24185753}}}),dA=f({id:177,name:"HashKey Chain",nativeCurrency:{decimals:18,name:"HashKey EcoPoints",symbol:"HSK"},rpcUrls:{default:{http:["https://mainnet.hsk.xyz"]}},blockExplorers:{default:{name:"HashKey Chain Explorer",url:"https://hashkey.blockscout.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}}}),fA=f({id:133,name:"HashKey Chain Testnet",nativeCurrency:{decimals:18,name:"HashKey EcoPoints",symbol:"HSK"},rpcUrls:{default:{http:["https://testnet.hsk.xyz"]}},blockExplorers:{default:{name:"HashKey Chain Testnet explorer",url:"https://testnet-explorer.hsk.xyz"}},testnet:!0}),pA=f({id:1523903251,name:"Haust Network Testnet",nativeCurrency:{decimals:18,name:"HAUST",symbol:"HAUST"},rpcUrls:{default:{http:["https://rpc-testnet.haust.app"]}},blockExplorers:{default:{name:"Haust Network Testnet Explorer",url:"https://explorer-testnet.haust.app"}},testnet:!0}),hA=f({id:295,name:"Hedera Mainnet",network:"hedera-mainnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://mainnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/mainnet"}},testnet:!1}),mA=f({id:297,name:"Hedera Previewnet",network:"hedera-previewnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://previewnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/previewnet"}},testnet:!0}),bA=f({id:296,name:"Hedera Testnet",network:"hedera-testnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://testnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/testnet"}},testnet:!0}),yA=f({id:8668,name:"Hela Mainnet",nativeCurrency:{name:"HLUSD",symbol:"HLUSD",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.helachain.com"]}},blockExplorers:{default:{name:"Hela explorer",url:"https://mainnet-blockexplorer.helachain.com"}},testnet:!1}),gA=f({id:42e3,name:"Helios Testnet",network:"helios-testnet",nativeCurrency:{symbol:"HLS",name:"Helios",decimals:18},rpcUrls:{default:{http:["https://testnet1.helioschainlabs.org"]}},blockExplorers:{default:{name:"Helios Testnet Explorer",url:"https://explorer.helioschainlabs.org/"}},testnet:!0}),xA=f({id:43111,name:"Hemi",network:"Hemi",blockTime:12e3,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hemi.network/rpc"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.hemi.xyz"}},testnet:!1}),wA=f({id:743111,name:"Hemi Sepolia",network:"Hemi Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.rpc.hemi.network/rpc"]}},blockExplorers:{default:{name:"Hemi Sepolia explorer",url:"https://testnet.explorer.hemi.xyz"}},testnet:!0}),vA=f({id:68414,name:"Henesys",nativeCurrency:{name:"NEXPACE",symbol:"NXPC",decimals:18},rpcUrls:{default:{http:["https://henesys-rpc.msu.io"]}},blockExplorers:{default:{name:"Avalanche Explorer",url:"https://subnets.avax.network/henesys"}}}),kA=f({id:17e3,name:"Holesky",nativeCurrency:{name:"Holesky Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://holesky.etherscan.io",apiUrl:"https://api-holesky.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:77},ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:4295055}},testnet:!0}),EA=f({id:560048,name:"Hoodi",nativeCurrency:{name:"Hoodi Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hoodi.ethpandaops.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://hoodi.etherscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2589}},testnet:!0}),CA=f({id:269,name:"High Performance Blockchain",nativeCurrency:{name:"HPB",symbol:"HPB",decimals:18},rpcUrls:{default:{http:["https://hpbnode.com"]}},blockExplorers:{default:{name:"hpbScan",url:"https://hscan.org"}},testnet:!1}),TA=f({id:190415,name:"HPP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.hpp.io"],webSocket:["wss://mainnet.hpp.io"]}},blockExplorers:{default:{name:"HPP Mainnet Explorer",url:"https://explorer.hpp.io"}},testnet:!1}),SA=f({id:181228,name:"HPP Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.hpp.io"],webSocket:["wss://testnet.hpp.io"]}},blockExplorers:{default:{name:"HPP Sepolia Explorer",url:"https://sepolia-explorer.hpp.io"}},testnet:!0}),AA=f({id:12323,name:"Huddle01 dRTC Chain",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://huddle01.calderachain.xyz/http"],webSocket:["wss://huddle01.calderachain.xyz/ws"]}},blockExplorers:{default:{name:"Huddle01 Caldera Explorer",url:"https://huddle01.calderaexplorer.xyz",apiUrl:"https://huddle01.calderaexplorer.xyz/api"}},sourceId:42161}),PA=f({id:2524852,name:"Huddle01 dRTC Chain Testnet",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://huddle-testnet.rpc.caldera.xyz/http"],webSocket:["wss://huddle-testnet.rpc.caldera.xyz/ws"]}},blockExplorers:{default:{name:"Huddle01 Caldera Explorer",url:"https://huddle-testnet.explorer.caldera.xyz",apiUrl:"https://huddle-testnet.explorer.caldera.xyz/api"}},sourceId:421614}),IA=f({id:6985385,name:"Humanity",nativeCurrency:{name:"H",symbol:"H",decimals:18},rpcUrls:{default:{http:["https://humanity-mainnet.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Humanity Mainnet Explorer",url:"https://humanity-mainnet.explorer.alchemy.com",apiUrl:"https://humanity-mainnet.explorer.alchemy.com/api"}},testnet:!1}),UA=f({id:7080969,name:"Humanity Testnet",nativeCurrency:{name:"tHP",symbol:"tHP",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.humanity.org"]}},blockExplorers:{default:{name:"Humanity Testnet Explorer",url:"https://humanity-testnet.explorer.alchemy.com",apiUrl:"https://humanity-testnet.explorer.alchemy.com/api"}},testnet:!0}),OA=f({id:5234,name:"Humanode",nativeCurrency:{name:"HMND",symbol:"HMND",decimals:18},rpcUrls:{default:{http:["https://explorer-rpc-http.mainnet.stages.humanode.io"],webSocket:["wss://explorer-rpc-ws.mainnet.stages.humanode.io"]}},blockExplorers:{default:{name:"Subscan",url:"https://humanode.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4413097}}}),BA=f({id:14853,name:"Humanode Testnet 5",nativeCurrency:{name:"HMND",symbol:"HMND",decimals:18},rpcUrls:{default:{http:["https://explorer-rpc-http.testnet5.stages.humanode.io"],webSocket:["wss://explorer-rpc-ws.testnet5.stages.humanode.io"]}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}}}),MA=f({id:2911,name:"HYCHAIN",nativeCurrency:{name:"HYTOPIA",symbol:"TOPIA",decimals:18},rpcUrls:{default:{http:["https://rpc.hychain.com/http"]}},blockExplorers:{default:{name:"HYCHAIN Explorer",url:"https://explorer.hychain.com"}},testnet:!1}),_A=f({id:29112,name:"HYCHAIN Testnet",nativeCurrency:{name:"HYTOPIA",symbol:"TOPIA",decimals:18},rpcUrls:{default:{http:["https://rpc.hychain.com/http"]}},blockExplorers:{default:{name:"HYCHAIN Explorer",url:"https://testnet-rpc.hychain.com/http"}},testnet:!0}),Py=f({id:999,name:"HyperEVM",nativeCurrency:{name:"HYPE",symbol:"HYPE",decimals:18},blockExplorers:{default:{name:"HyperEVMScan",url:"https://hyperevmscan.io"}},rpcUrls:{default:{http:["https://rpc.hyperliquid.xyz/evm"]}},testnet:!1}),DA=f({id:998,name:"Hyperliquid EVM Testnet",nativeCurrency:{name:"HYPE",symbol:"HYPE",decimals:18},rpcUrls:{default:{http:["https://rpc.hyperliquid-testnet.xyz/evm"]}},testnet:!0}),FA=f({id:73115,name:"ICB Network",nativeCurrency:{decimals:18,name:"ICB Native Token",symbol:"ICBX"},rpcUrls:{default:{http:["https://rpc1-mainnet.icbnetwork.info"]}},blockExplorers:{default:{name:"ICB Explorer",url:"https://icbscan.io",apiUrl:"https://icbscan.io/api"}},testnet:!1}),NA=f({id:74,name:"IDChain Mainnet",nativeCurrency:{decimals:18,name:"EIDI",symbol:"EIDI"},rpcUrls:{default:{http:["https://idchain.one/rpc"],webSocket:["wss://idchain.one/ws"]}},blockExplorers:{default:{name:"IDChain Explorer",url:"https://explorer.idchain.one"}},testnet:!1}),zA=f({id:13371,name:"Immutable zkEVM",nativeCurrency:{decimals:18,name:"Immutable Coin",symbol:"IMX"},rpcUrls:{default:{http:["https://rpc.immutable.com"]}},blockExplorers:{default:{name:"Immutable Explorer",url:"https://explorer.immutable.com",apiUrl:"https://explorer.immutable.com/api"}},contracts:{multicall3:{address:"0x236bdA4589e44e6850f5aC6a74BfCa398a86c6c0",blockCreated:4335972}}}),LA=f({id:13473,name:"Immutable zkEVM Testnet",nativeCurrency:{decimals:18,name:"Immutable Coin",symbol:"IMX"},rpcUrls:{default:{http:["https://rpc.testnet.immutable.com"]}},blockExplorers:{default:{name:"Immutable Testnet Explorer",url:"https://explorer.testnet.immutable.com/"}},contracts:{multicall3:{address:"0x2CC787Ed364600B0222361C4188308Fa8E68bA60",blockCreated:5977391}},testnet:!0}),RA=f({id:2525,name:"inEVM Mainnet",nativeCurrency:{decimals:18,name:"Injective",symbol:"INJ"},rpcUrls:{default:{http:["https://mainnet.rpc.inevm.com/http"]}},blockExplorers:{default:{name:"inEVM Explorer",url:"https://inevm.calderaexplorer.xyz",apiUrl:"https://inevm.calderaexplorer.xyz/api/v2"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:118606}}}),HA=f({id:7233,name:"InitVerse Mainnet",nativeCurrency:{decimals:18,name:"InitVerse",symbol:"INI"},rpcUrls:{default:{http:["https://rpc-mainnet.inichain.com"]}},blockExplorers:{default:{name:"InitVerseScan",url:"https://www.iniscan.com",apiUrl:"https://explorer-api.inichain.com/api"}},contracts:{multicall3:{address:"0x83466BE48A067115FFF91f7b892Ed1726d032e47",blockCreated:2318}}}),$A=f({id:7234,name:"InitVerse Genesis Testnet",nativeCurrency:{decimals:18,name:"InitVerse",symbol:"INI"},rpcUrls:{default:{http:["https://rpc-testnet.inichain.com"]}},blockExplorers:{default:{name:"InitVerseGenesisScan",url:"https://genesis-testnet.iniscan.com",apiUrl:"https://explorer-testnet-api.inichain.com/api"}},contracts:{multicall3:{address:"0x0cF32CBDd6c437331EA4f85ed2d881A5379B5a6F",blockCreated:16361}},testnet:!0}),GA=f({id:1776,name:"Injective",nativeCurrency:{decimals:18,name:"Injective",symbol:"INJ"},rpcUrls:{default:{http:["https://sentry.evm-rpc.injective.network"],webSocket:["wss://sentry.evm-ws.injective.network"]}},blockExplorers:{default:{name:"Injective Explorer",url:"https://blockscout.injective.network",apiUrl:"https://blockscout.injective.network/api"}},testnet:!1}),jA=f({id:1439,name:"Injective Testnet",nativeCurrency:{decimals:18,name:"Injective",symbol:"INJ"},rpcUrls:{default:{http:["https://k8s.testnet.json-rpc.injective.network"],webSocket:["wss://k8s.testnet.ws.injective.network"]}},blockExplorers:{default:{name:"Injective Explorer",url:"https://testnet.blockscout.injective.network",apiUrl:"https://testnet.blockscout.injective.network/api"}},testnet:!0}),ml=1,VA=f({...j,id:57073,name:"Ink",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-gel.inkonchain.com","https://rpc-qnd.inkonchain.com"],webSocket:["wss://rpc-gel.inkonchain.com","wss://rpc-qnd.inkonchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.inkonchain.com",apiUrl:"https://explorer.inkonchain.com/api/v2"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},...j.contracts,disputeGameFactory:{[ml]:{address:"0x10d7b35078d3baabb96dd45a9143b94be65b12cd"}},portal:{[ml]:{address:"0x5d66c1782664115999c47c9fa5cd031f495d3e4f"}},l1StandardBridge:{[ml]:{address:"0x88ff1e5b602916615391f55854588efcbb7663f0"}}},testnet:!1,sourceId:ml}),bl=11155111,WA=f({...j,id:763373,name:"Ink Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-gel-sepolia.inkonchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer-sepolia.inkonchain.com/",apiUrl:"https://explorer-sepolia.inkonchain.com/api/v2"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},disputeGameFactory:{[bl]:{address:"0x860e626c700af381133d9f4af31412a2d1db3d5d"}},portal:{[bl]:{address:"0x5c1d29c6c9c8b0800692acc95d700bcb4966a1d7"}},l1StandardBridge:{[bl]:{address:"0x33f60714bbd74d62b66d79213c348614de51901c"}}},testnet:!0,sourceId:bl}),qA=f({id:8822,name:"IOTA EVM",network:"iotaevm",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://json-rpc.evm.iotaledger.net"],webSocket:["wss://ws.json-rpc.evm.iotaledger.net"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.evm.iota.org",apiUrl:"https://explorer.evm.iota.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:25022}}}),YA=f({id:1075,name:"IOTA EVM Testnet",network:"iotaevm-testnet",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://json-rpc.evm.testnet.iotaledger.net"],webSocket:["wss://ws.json-rpc.evm.testnet.iotaledger.net"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.evm.testnet.iotaledger.net",apiUrl:"https://explorer.evm.testnet.iotaledger.net/api"}},testnet:!0}),KA=f({id:4689,name:"IoTeX",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.mainnet.iotex.io"],webSocket:["wss://babel-api.mainnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://iotexscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:22163670}}}),ZA=f({id:4690,name:"IoTeX Testnet",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.testnet.iotex.io"],webSocket:["wss://babel-api.testnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://testnet.iotexscan.io"}},contracts:{multicall3:{address:"0xb5cecD6894c6f473Ec726A176f1512399A2e355d",blockCreated:24347592}},testnet:!0}),XA=f({id:8017,name:"iSunCoin Mainnet",nativeCurrency:{decimals:18,name:"ISC",symbol:"ISC"},rpcUrls:{default:{http:["https://mainnet.isuncoin.com"]}},blockExplorers:{default:{name:"iSunCoin Explorer",url:"https://baifa.io/app/chains/8017"}}}),QA=f({id:680,name:"Jasmy Chain",network:"jasmyChain",nativeCurrency:{name:"JasmyCoin",symbol:"JASMY",decimals:18},rpcUrls:{default:{http:["https://rpc.jasmychain.io"],webSocket:["wss://rpc.jasmychain.io"]}},testnet:!1}),JA=f({id:681,name:"Jasmy Chain Testnet",network:"jasmyChainTestnet",nativeCurrency:{name:"JasmyCoin",symbol:"JASMY",decimals:18},rpcUrls:{default:{http:["https://rpc_testnet.jasmychain.io"],webSocket:["wss://rpc_testnet.jasmychain.io"]}},testnet:!0}),eP=f({id:8899,name:"JB Chain",network:"jbc",nativeCurrency:{name:"JBC",symbol:"JBC",decimals:18},rpcUrls:{default:{http:["https://rpc-l1.jibchain.net"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp-l1.jibchain.net",apiUrl:"https://exp-l1.jibchain.net/api"}},contracts:{multicall3:{address:"0xc0C8C486D1466C57Efe13C2bf000d4c56F47CBdC",blockCreated:2299048}},testnet:!1}),tP=f({id:88991,name:"Jibchain Testnet",nativeCurrency:{name:"tJBC",symbol:"tJBC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.jibchain.net"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp.testnet.jibchain.net",apiUrl:"https://exp.testnet.jibchain.net/api"}},contracts:{multicall3:{address:"0xa1a858ad9041B4741e620355a3F96B3c78e70ecE",blockCreated:32848}},testnet:!0}),rP=f({id:81,name:"Japan Open Chain Mainnet",nativeCurrency:{decimals:18,name:"Japan Open Chain Token",symbol:"JOC"},rpcUrls:{default:{http:["https://rpc-1.japanopenchain.org:8545","https://rpc-2.japanopenchain.org:8545","https://rpc-3.japanopenchain.org"]}},blockExplorers:{default:{name:"Block Explorer",url:"https://explorer.japanopenchain.org"}},testnet:!1}),nP=f({id:10081,name:"Japan Open Chain Testnet",nativeCurrency:{decimals:18,name:"Japan Open Chain Testnet Token",symbol:"JOCT"},rpcUrls:{default:{http:["https://rpc-1.testnet.japanopenchain.org:8545","https://rpc-2.testnet.japanopenchain.org:8545","https://rpc-3.testnet.japanopenchain.org"]}},blockExplorers:{default:{name:"Testnet Block Explorer",url:"https://explorer.testnet.japanopenchain.org"}},testnet:!0}),sP=f({id:5734951,name:"Jovay Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.jovay.io"]}},blockExplorers:{default:{name:"Jovay Explorer",url:"https://explorer.jovay.io/l2"}},testnet:!1}),aP=f({id:2019775,name:"Jovay Sepolia Testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://api.zan.top/public/jovay-testnet"]}},blockExplorers:{default:{name:"Jovay Testnet Explorer",url:"https://sepolia-explorer.jovay.io/l2"}},testnet:!0}),oP=f({id:45003,name:"Juneo JUNE-Chain",nativeCurrency:{decimals:18,name:"JUNE-Chain",symbol:"JUNE"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/JUNE/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/2",apiUrl:"https://juneoscan.io/chain/2/api"}}}),iP=f({id:45013,name:"Juneo BCH1-Chain",nativeCurrency:{decimals:18,name:"Juneo BCH1-Chain",symbol:"BCH1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/BCH1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/12",apiUrl:"https://juneoscan.io/chain/12/api"}}}),cP=f({id:45004,name:"Juneo DAI1-Chain",nativeCurrency:{decimals:18,name:"Juneo DAI1-Chain",symbol:"DAI1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/DAI1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/5",apiUrl:"https://juneoscan.io/chain/5/api"}}}),lP=f({id:45010,name:"Juneo DOGE1-Chain",nativeCurrency:{decimals:18,name:"Juneo DOGE1-Chain",symbol:"DOGE1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/DOGE1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/10",apiUrl:"https://juneoscan.io/chain/10/api"}}}),uP=f({id:45011,name:"Juneo EUR1-Chain",nativeCurrency:{decimals:18,name:"Juneo EUR1-Chain",symbol:"EUR1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/EUR1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/6",apiUrl:"https://juneoscan.io/chain/6/api"}}}),dP=f({id:45008,name:"Juneo GLD1-Chain",nativeCurrency:{decimals:18,name:"Juneo GLD1-Chain",symbol:"GLD1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/GLD1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/8",apiUrl:"https://juneoscan.io/chain/8/api"}}}),fP=f({id:45014,name:"Juneo LINK1-Chain",nativeCurrency:{decimals:18,name:"Juneo LINK1-Chain",symbol:"LINK1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/LINK1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/13",apiUrl:"https://juneoscan.io/chain/13/api"}}}),pP=f({id:45009,name:"Juneo LTC1-Chain",nativeCurrency:{decimals:18,name:"Juneo LTC1-Chain",symbol:"LTC1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/LTC1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/11",apiUrl:"https://juneoscan.io/chain/11/api"}}}),hP=f({id:45007,name:"Juneo mBTC1-Chain",nativeCurrency:{decimals:18,name:"Juneo mBTC1-Chain",symbol:"mBTC1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/mBTC1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/9",apiUrl:"https://juneoscan.io/chain/9/api"}}}),mP=f({id:45012,name:"Juneo SGD1-Chain",nativeCurrency:{decimals:18,name:"Juneo SGD1-Chain",symbol:"SGD1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/SGD1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/7",apiUrl:"https://juneoscan.io/chain/7/api"}}}),bP=f({id:101003,name:"Socotra JUNE-Chain",nativeCurrency:{decimals:18,name:"Socotra JUNE-Chain",symbol:"JUNE"},rpcUrls:{default:{http:["https://rpc.socotra-testnet.network/ext/bc/JUNE/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://socotra.juneoscan.io/chain/2",apiUrl:"https://socotra.juneoscan.io/chain/2/api"}},testnet:!0}),yP=f({id:45006,name:"Juneo USD1-Chain",nativeCurrency:{decimals:18,name:"Juneo USD1-Chain",symbol:"USD1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/USD1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/4",apiUrl:"https://juneoscan.io/chain/4/api"}}}),gP=f({id:45005,name:"Juneo USDT1-Chain",nativeCurrency:{decimals:18,name:"Juneo USDT1-Chain",symbol:"USDT1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/USDT1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/3",apiUrl:"https://juneoscan.io/chain/3/api"}}}),xP=f({id:8217,name:"Kaia",nativeCurrency:{decimals:18,name:"Kaia",symbol:"KAIA"},rpcUrls:{default:{http:["https://public-en.node.kaia.io"]}},blockExplorers:{default:{name:"KaiaScan",url:"https://kaiascan.io",apiUrl:"https://api-cypress.klaytnscope.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96002415}}}),wP=f({id:1001,name:"Kairos Testnet",network:"kairos",nativeCurrency:{decimals:18,name:"Kairos KAIA",symbol:"KAIA"},rpcUrls:{default:{http:["https://public-en-kairos.node.kaia.io"]}},blockExplorers:{default:{name:"KaiaScan",url:"https://kairos.kaiascan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:123390593}},testnet:!0}),vP=f({id:1802203764,name:"Kakarot Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.kakarot.org"]}},blockExplorers:{default:{name:"Kakarot Scan",url:"https://sepolia.kakarotscan.org"}},testnet:!0}),kP=f({id:920637907288165,name:"Kakarot Starknet Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.kakarot.org"]}},blockExplorers:{default:{name:"Kakarot Scan",url:"https://sepolia.kakarotscan.org"}},testnet:!0}),EP=f({id:24,name:"KardiaChain Mainnet",nativeCurrency:{name:"KAI",symbol:"KAI",decimals:18},rpcUrls:{default:{http:["https://rpc.kardiachain.io"]}},blockExplorers:{default:{name:"KardiaChain Explorer",url:"https://explorer.kardiachain.io"}},testnet:!1}),CP=f({id:686,name:"Karura",network:"karura",nativeCurrency:{name:"Karura",symbol:"KAR",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-karura.aca-api.network"],webSocket:["wss://eth-rpc-karura.aca-api.network"]}},blockExplorers:{default:{name:"Karura Blockscout",url:"https://blockscout.karura.network",apiUrl:"https://blockscout.karura.network/api"}},testnet:!1}),TP=f({id:747474,name:"Katana",network:"katana",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.katana.network"]}},blockExplorers:{default:{name:"katana explorer",url:"https://katanascan.com"}},testnet:!1}),SP=f({id:2222,name:"Kava EVM",network:"kava-mainnet",nativeCurrency:{name:"Kava",symbol:"KAVA",decimals:18},rpcUrls:{default:{http:["https://evm.kava.io"]}},blockExplorers:{default:{name:"Kava EVM Explorer",url:"https://kavascan.com",apiUrl:"https://kavascan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3661165}},testnet:!1}),AP=f({id:2221,name:"Kava EVM Testnet",network:"kava-testnet",nativeCurrency:{name:"Kava",symbol:"KAVA",decimals:18},rpcUrls:{default:{http:["https://evm.testnet.kava.io"]}},blockExplorers:{default:{name:"Kava EVM Testnet Explorer",url:"https://testnet.kavascan.com/",apiUrl:"https://testnet.kavascan.com/api"}},contracts:{multicall3:{address:"0xDf1D724A7166261eEB015418fe8c7679BBEa7fd6",blockCreated:7242179}},testnet:!0}),PP=f({id:321,name:"KCC Mainnet",network:"KCC Mainnet",nativeCurrency:{decimals:18,name:"KCS",symbol:"KCS"},rpcUrls:{default:{http:["https://kcc-rpc.com"]}},blockExplorers:{default:{name:"KCC Explorer",url:"https://explorer.kcc.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11760430}},testnet:!1}),IP=f({id:1336,name:"Kii Testnet Oro",network:"kii-testnet-oro",nativeCurrency:{name:"Kii",symbol:"KII",decimals:18},rpcUrls:{default:{http:["https://json-rpc.uno.sentry.testnet.v3.kiivalidator.com"]}},blockExplorers:{default:{name:"KiiExplorer",url:"https://explorer.kiichain.io/testnet"}},testnet:!0}),UP=f({id:7887,name:"Kinto Mainnet",network:"Kinto Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.kinto.xyz/http"]}},blockExplorers:{default:{name:"Kinto Explorer",url:"https://explorer.kinto.xyz"}},testnet:!1}),OP=f({id:8217,name:"Klaytn",nativeCurrency:{decimals:18,name:"Klaytn",symbol:"KLAY"},rpcUrls:{default:{http:["https://public-en-cypress.klaytn.net"]}},blockExplorers:{default:{name:"KlaytnScope",url:"https://scope.klaytn.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96002415}}}),BP=f({id:1001,name:"Klaytn Baobab Testnet",network:"klaytn-baobab",nativeCurrency:{decimals:18,name:"Baobab Klaytn",symbol:"KLAY"},rpcUrls:{default:{http:["https://public-en-baobab.klaytn.net"]}},blockExplorers:{default:{name:"KlaytnScope",url:"https://baobab.klaytnscope.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:123390593}},testnet:!0}),MP=f({id:701,name:"Koi Network",nativeCurrency:{decimals:18,name:"Koi Network Native Token",symbol:"KRING"},rpcUrls:{default:{http:["https://koi-rpc.darwinia.network"],webSocket:["wss://koi-rpc.darwinia.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://koi-scan.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:180001}},testnet:!0}),_P=f({id:255,name:"Kroma",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://api.kroma.network"]}},blockExplorers:{default:{name:"Kroma Explorer",url:"https://blockscout.kroma.network",apiUrl:"https://blockscout.kroma.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:16054868}},testnet:!1}),DP=f({id:2358,name:"Kroma Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://api.sepolia.kroma.network"]}},blockExplorers:{default:{name:"Kroma Sepolia Explorer",url:"https://blockscout.sepolia.kroma.network",apiUrl:"https://blockscout.sepolia.kroma.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:8900914}},testnet:!0}),FP=f({id:12324,name:"L3X Protocol",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.l3x.com"],webSocket:["wss://rpc-mainnet.l3x.com"]}},blockExplorers:{default:{name:"L3X Mainnet Explorer",url:"https://explorer.l3x.com",apiUrl:"https://explorer.l3x.com/api/v2"}},testnet:!1}),NP=f({id:12325,name:"L3X Protocol Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.l3x.com"],webSocket:["wss://rpc-testnet.l3x.com"]}},blockExplorers:{default:{name:"L3X Testnet Explorer",url:"https://explorer-testnet.l3x.com",apiUrl:"https://explorer-testnet.l3x.com/api/v2"}},testnet:!0}),zP=f({id:360890,name:"LAVITA Mainnet",nativeCurrency:{name:"vTFUEL",symbol:"vTFUEL",decimals:18},rpcUrls:{default:{http:["https://tsub360890-eth-rpc.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"LAVITA Explorer",url:"https://tsub360890-explorer.thetatoken.org"}},testnet:!1}),LP=f({id:232,name:"Lens",nativeCurrency:{name:"GHO",symbol:"GHO",decimals:18},rpcUrls:{default:{http:["https://rpc.lens.xyz"]}},blockExplorers:{default:{name:"Lens Block Explorer",url:"https://explorer.lens.xyz",apiUrl:"https://explorer.lens.xyz/api"}}}),RP=f({id:37111,name:"Lens Testnet",nativeCurrency:{name:"GRASS",symbol:"GRASS",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.lens.dev"],webSocket:["wss://rpc.testnet.lens.dev/ws"]}},blockExplorers:{default:{name:"Lens Block Explorer",url:"https://block-explorer.testnet.lens.dev",apiUrl:"https://block-explorer-api.staging.lens.dev/api"}},testnet:!0}),HP=f({id:21363,name:"Lestnet",nativeCurrency:{name:"Lestnet Ether",symbol:"LETH",decimals:18},rpcUrls:{default:{http:["https://service.lestnet.org"]}},blockExplorers:{default:{name:"Lestnet Explorer",url:"https://explore.lestnet.org"}},testnet:!0}),$P=f({id:1891,name:"LightLink Pegasus Testnet",network:"lightlink-pegasus",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://replicator.pegasus.lightlink.io/rpc/v1"]}},blockExplorers:{default:{name:"LightLink Pegasus Explorer",url:"https://pegasus.lightlink.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:127188532}},testnet:!0}),GP=f({id:1890,name:"LightLink Phoenix Mainnet",network:"lightlink-phoenix",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://replicator.phoenix.lightlink.io/rpc/v1"]}},blockExplorers:{default:{name:"LightLink Phoenix Explorer",url:"https://phoenix.lightlink.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:125499184}},testnet:!1});async function jP(e,t){var s,a,o;const{account:r=e.account}=t;if(!r)throw new gn;const n=Ke(r);try{const{accessList:i,blockNumber:c,blockTag:l,data:u,gas:d,gasPrice:p,maxFeePerGas:h,maxPriorityFeePerGas:y,nonce:g,to:k,value:v,...w}=t,C=(typeof c=="bigint"?W(c):void 0)||l;Vr(t);const _=(o=(a=(s=e.chain)==null?void 0:s.formatters)==null?void 0:a.transactionRequest)==null?void 0:o.format,T=(_||Sr)({...As(w,{format:_}),account:n,accessList:i,data:u,gas:d,gasPrice:p,maxFeePerGas:h,maxPriorityFeePerGas:y,nonce:g,to:k,value:v},"estimateGas"),{baseFeePerGas:m,gasLimit:b,priorityFeePerGas:x}=await e.request({method:"linea_estimateGas",params:C?[T,C]:[T]});return{baseFeePerGas:BigInt(m),gasLimit:BigInt(b),priorityFeePerGas:BigInt(x)}}catch(i){throw qd(i,{...t,account:n,chain:e.chain})}}const Zf={fees:{estimateFeesPerGas:Iy,async maxPriorityFeePerGas({block:e,client:t,request:r}){const n=await Iy({block:e,client:t,multiply:s=>s,request:r,type:"eip1559"});return n!=null&&n.maxPriorityFeePerGas?n.maxPriorityFeePerGas:null}}};async function Iy({client:e,multiply:t,request:r,type:n}){try{const s=await jP(e,{...r,account:r==null?void 0:r.account}),{priorityFeePerGas:a}=s,i=t(BigInt(s.baseFeePerGas))+a;return n==="legacy"?{gasPrice:i}:{maxFeePerGas:i,maxPriorityFeePerGas:a}}catch{return null}}const VP=f({...Zf,id:59144,name:"Linea Mainnet",blockTime:2e3,nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build",apiUrl:"https://api.lineascan.build/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:42},ensRegistry:{address:"0x50130b669B28C339991d8676FA73CF122a121267",blockCreated:6682888},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:22222151}},ensTlds:[".linea.eth"],testnet:!1}),WP=f({id:59140,name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build",apiUrl:"https://api-goerli.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:498623}},testnet:!0}),qP=f({...Zf,id:59141,name:"Linea Sepolia Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.sepolia.linea.build"],webSocket:["wss://rpc.sepolia.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.lineascan.build",apiUrl:"https://api-sepolia.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:227427},ensRegistry:{address:"0x5B2636F0f2137B4aE722C01dd5122D7d3e9541f7",blockCreated:2395094},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:17168484}},ensTlds:[".linea.eth"],testnet:!0}),YP=f({id:59140,name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build",apiUrl:"https://goerli.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:498623}},testnet:!0}),yl=1,KP=f({...j,id:1135,name:"Lisk",network:"lisk",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.api.lisk.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.lisk.com",apiUrl:"https://blockscout.lisk.com/api"}},contracts:{...j.contracts,multicall3:{address:"0xA9d71E1dd7ca26F26e656E66d6AA81ed7f745bf0"},l2OutputOracle:{[yl]:{address:"0x113cB99283AF242Da0A0C54347667edF531Aa7d6"}},portal:{[yl]:{address:"0x26dB93F8b8b4f7016240af62F7730979d353f9A7"}},l1StandardBridge:{[yl]:{address:"0x2658723Bf70c7667De6B25F99fcce13A16D25d08"}}},sourceId:yl}),gl=11155111,ZP=f({...j,id:4202,network:"lisk-sepolia",name:"Lisk Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.sepolia-api.lisk.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-blockscout.lisk.com",apiUrl:"https://sepolia-blockscout.lisk.com/api"}},contracts:{...j.contracts,l2OutputOracle:{[gl]:{address:"0xA0E35F56C318DE1bD5D9ca6A94Fe7e37C5663348"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[gl]:{address:"0xe3d90F21490686Ec7eF37BE788E02dfC12787264"}},l1StandardBridge:{[gl]:{address:"0x1Fb30e446eA791cd1f011675E5F3f5311b70faF5"}}},testnet:!0,sourceId:gl}),XP=f({id:9496,name:"Load Alphanet",nativeCurrency:{name:"Testnet LOAD",symbol:"tLOAD",decimals:18},rpcUrls:{default:{http:["https://alphanet.load.network"]}},blockExplorers:{default:{name:"Load Alphanet Explorer",url:"https://explorer.load.network"}},testnet:!0}),QP=f({id:1337,name:"Localhost",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),JP=f({id:15551,name:"LoopNetwork Mainnet",nativeCurrency:{name:"LOOP",symbol:"LOOP",decimals:18},rpcUrls:{default:{http:["https://api.mainnetloop.com"]}},blockExplorers:{default:{name:"LoopNetwork Blockchain Explorer",url:"https://explorer.mainnetloop.com/"}},testnet:!1}),eI=f({id:42,network:"lukso",name:"LUKSO",nativeCurrency:{name:"LUKSO",symbol:"LYX",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.lukso.network"],webSocket:["wss://ws-rpc.mainnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Mainnet Explorer",url:"https://explorer.execution.mainnet.lukso.network",apiUrl:"https://api.explorer.execution.mainnet.lukso.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:468183}}}),tI=f({id:4201,name:"LUKSO Testnet",nativeCurrency:{decimals:18,name:"LUKSO Testnet",symbol:"LYXt"},rpcUrls:{default:{http:["https://rpc.testnet.lukso.network"],webSocket:["wss://ws-rpc.testnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Testnet Explorer",url:"https://explorer.execution.testnet.lukso.network",apiUrl:"https://api.explorer.execution.testnet.lukso.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:605348}},testnet:!0}),rI=f({id:994873017,name:"Lumia Mainnet",network:"LumiaMainnet",nativeCurrency:{name:"Lumia",symbol:"LUMIA",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.lumia.org"]}},blockExplorers:{default:{name:"Lumia Explorer",url:"https://explorer.lumia.org/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3975939}},testnet:!1}),nI=f({id:1952959480,name:"Lumia Testnet",network:"LumiaTestnet",nativeCurrency:{name:"Lumia",symbol:"LUMIA",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.lumia.org"]}},blockExplorers:{default:{name:"Lumia Testnet Explorer",url:"https://testnet-explorer.lumia.org/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2235063}},testnet:!0}),sI=f({id:96370,name:"Lumoz",nativeCurrency:{decimals:18,name:"Lumoz Token",symbol:"MOZ"},rpcUrls:{default:{http:["https://rpc.lumoz.org"]}},blockExplorers:{default:{name:"Lumoz Scan",url:"https://scan.lumoz.info"}},testnet:!1}),aI=f({id:105363,name:"Lumoz Testnet",nativeCurrency:{decimals:18,name:"Lumoz Testnet Token",symbol:"MOZ"},rpcUrls:{default:{http:["https://testnet-rpc.lumoz.org"]}},testnet:!0}),oI=f({id:721,name:"Lycan",nativeCurrency:{decimals:18,name:"Lycan",symbol:"LYC"},rpcUrls:{default:{http:["https://rpc.lycanchain.com","https://us-east.lycanchain.com","https://us-west.lycanchain.com","https://eu-north.lycanchain.com","https://eu-west.lycanchain.com","https://asia-southeast.lycanchain.com"],webSocket:["wss://rpc.lycanchain.com","wss://us-east.lycanchain.com","wss://us-west.lycanchain.com","wss://eu-north.lycanchain.com","wss://eu-west.lycanchain.com","wss://asia-southeast.lycanchain.com"]}},blockExplorers:{default:{name:"Lycan Explorer",url:"https://explorer.lycanchain.com"}}}),iI=f({id:957,name:"Lyra Chain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.lyra.finance"]}},blockExplorers:{default:{name:"Lyra Explorer",url:"https://explorer.lyra.finance",apiUrl:"https://explorer.lyra.finance/api/v2"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1935198}}}),cI=f({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),lI=f({id:595,name:"Mandala TC9",network:"mandala",nativeCurrency:{name:"Mandala",symbol:"mACA",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-tc9.aca-staging.network"],webSocket:["wss://eth-rpc-tc9.aca-staging.network"]}},blockExplorers:{default:{name:"Mandala Blockscout",url:"https://blockscout.mandala.aca-staging.network",apiUrl:"https://blockscout.mandala.aca-staging.network/api"}},testnet:!0}),uI=f({id:169,name:"Manta Pacific Mainnet",network:"manta",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://pacific-rpc.manta.network/http"]}},blockExplorers:{default:{name:"Manta Explorer",url:"https://pacific-explorer.manta.network",apiUrl:"https://pacific-explorer.manta.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:332890}}}),dI=f({id:3441006,name:"Manta Pacific Sepolia Testnet",network:"manta-sepolia",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://pacific-rpc.sepolia-testnet.manta.network/http"]}},blockExplorers:{default:{name:"Manta Sepolia Testnet Explorer",url:"https://pacific-explorer.sepolia-testnet.manta.network",apiUrl:"https://pacific-explorer.sepolia-testnet.manta.network/api"}},contracts:{multicall3:{address:"0xca54918f7B525C8df894668846506767412b53E3",blockCreated:479584}},testnet:!0}),fI=f({id:3441005,name:"Manta Pacific Testnet",network:"manta-testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://manta-testnet.calderachain.xyz/http"]}},blockExplorers:{default:{name:"Manta Testnet Explorer",url:"https://pacific-explorer.testnet.manta.network",apiUrl:"https://pacific-explorer.testnet.manta.network/api"}},contracts:{multicall3:{address:"0x211B1643b95Fe76f11eD8880EE810ABD9A4cf56C",blockCreated:419915}},testnet:!0}),pI=f({id:5e3,name:"Mantle",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Explorer",url:"https://mantlescan.xyz/",apiUrl:"https://api.mantlescan.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:304717}}}),hI=f({id:5003,name:"Mantle Sepolia Testnet",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.sepolia.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Testnet Explorer",url:"https://explorer.sepolia.mantle.xyz/",apiUrl:"https://explorer.sepolia.mantle.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4584012}},testnet:!0}),mI=f({id:5001,name:"Mantle Testnet",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.testnet.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Testnet Explorer",url:"https://explorer.testnet.mantle.xyz",apiUrl:"https://explorer.testnet.mantle.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:561333}},testnet:!0}),bI=f({id:5887,name:"MANTRA DuKong EVM Testnet",nativeCurrency:{decimals:18,name:"MANTRA",symbol:"MANTRA"},rpcUrls:{default:{http:["https://evm.dukong.mantrachain.io"]}},blockExplorers:{default:{name:"MANTRAScan",url:"https://mantrascan.io/dukong"}},testnet:!0}),yI=f({id:5888,name:"MANTRA EVM",nativeCurrency:{decimals:18,name:"OM",symbol:"OM"},rpcUrls:{default:{http:["https://evm.mantrachain.io"],webSocket:["https://evm.mantrachain.io/ws"]}},blockExplorers:{default:{name:"MANTRA Scan",url:"https://mantrascan.io/mainnet"}}}),gI=f({id:22776,name:"MAP Protocol",nativeCurrency:{decimals:18,name:"MAPO",symbol:"MAPO"},rpcUrls:{default:{http:["https://rpc.maplabs.io"]}},blockExplorers:{default:{name:"MAPO Scan",url:"https://maposcan.io"}},testnet:!1}),xI=f({id:698,name:"Matchain",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://rpc.matchain.io"]}},blockExplorers:{default:{name:"Matchain Scan",url:"https://matchscan.io"}}}),wI=f({id:699,name:"Matchain Testnet",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.matchain.io"]}},blockExplorers:{default:{name:"Matchain Scan",url:"https://testnet.matchscan.io"}},testnet:!0}),vI=f({id:29548,name:"MCH Verse",nativeCurrency:{name:"Oasys",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.oasys.mycryptoheroes.net"]}},blockExplorers:{default:{name:"MCH Verse Explorer",url:"https://explorer.oasys.mycryptoheroes.net",apiUrl:"https://explorer.oasys.mycryptoheroes.net/api"}},testnet:!1}),kI=f({id:6342,blockTime:1e3,name:"MegaETH Testnet",nativeCurrency:{name:"MegaETH Testnet Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://carrot.megaeth.com/rpc"],webSocket:["wss://carrot.megaeth.com/ws"]}},blockExplorers:{default:{name:"MegaETH Testnet Explorer",url:"https://www.megaexplorer.xyz/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!0}),EI=f({id:7078815900,name:"Mekong Pectra Devnet",nativeCurrency:{name:"eth",symbol:"eth",decimals:18},rpcUrls:{default:{http:["https://rpc.mekong.ethpandaops.io"]}},blockExplorers:{default:{name:"Block Explorer",url:"https://explorer.mekong.ethpandaops.io"}},testnet:!0}),CI=f({id:333000333,name:"Meld",nativeCurrency:{decimals:18,name:"Meld",symbol:"MELD"},rpcUrls:{default:{http:["https://rpc-1.meld.com"]}},blockExplorers:{default:{name:"MELDscan",url:"https://meldscan.io"}},contracts:{multicall3:{address:"0x769ee5a8e82c15c1b6e358f62ac8eb6e3abe8dc5",blockCreated:360069}}}),TI=f({id:4352,name:"MemeCore",nativeCurrency:{decimals:18,name:"M",symbol:"M"},rpcUrls:{default:{http:["https://rpc.memecore.net"],webSocket:["wss://ws.memecore.net"]}},blockExplorers:{default:{name:"MemeCore Explorer",url:"https://memecorescan.io",apiUrl:"https://api.memecorescan.io/api"},okx:{name:"MemeCore Explorer",url:"https://web3.okx.com/explorer/memecore"},memecore:{name:"MemeCore Explorer",url:"https://blockscout.memecore.com",apiUrl:"https://blockscout.memecore.com/api"}}}),SI=f({id:43521,name:"Formicarium",nativeCurrency:{decimals:18,name:"M",symbol:"M"},rpcUrls:{default:{http:["https://rpc.formicarium.memecore.net"],webSocket:["wss://ws.formicarium.memecore.net"]}},blockExplorers:{default:{name:"MemeCore Testnet Explorer",url:"https://formicarium.memecorescan.io"},okx:{name:"MemeCore Testnet Explorer",url:"https://web3.okx.com/explorer/formicarium-testnet"},memecore:{name:"MemeCore Testnet Explorer",url:"https://formicarium.blockscout.memecore.com",apiUrl:"https://formicarium.blockscout.memecore.com/api"}},testnet:!0}),AI=f({id:4200,name:"Merlin",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.merlinchain.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://scan.merlinchain.io",apiUrl:"https://scan.merlinchain.io/api"}}}),PI=f({id:4203,name:"Merlin Erigon Testnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-erigon-rpc.merlinchain.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://testnet-erigon-scan.merlinchain.io",apiUrl:"https://testnet-erigon-scan.merlinchain.io/api"}},testnet:!0}),II=f({id:571,name:"MetaChain Mainnet",nativeCurrency:{name:"Metatime Coin",symbol:"MTC",decimals:18},rpcUrls:{default:{http:["https://rpc.metatime.com"]}},blockExplorers:{default:{name:"MetaExplorer",url:"https://explorer.metatime.com"}},contracts:{multicall3:{address:"0x0000000000000000000000000000000000003001",blockCreated:0}}}),UI=f({id:1453,name:"MetaChain Istanbul",nativeCurrency:{name:"Metatime Coin",symbol:"MTC",decimals:18},rpcUrls:{default:{http:["https://istanbul-rpc.metachain.dev"]}},blockExplorers:{default:{name:"MetaExplorer",url:"https://istanbul-explorer.metachain.dev"}},contracts:{multicall3:{address:"0x0000000000000000000000000000000000003001",blockCreated:0}},testnet:!0}),OI=f({id:11,name:"Metadium Network",nativeCurrency:{decimals:18,name:"META",symbol:"META"},rpcUrls:{default:{http:["https://api.metadium.com/prod"]}},blockExplorers:{default:{name:"Metadium Explorer",url:"https://explorer.metadium.com"}},testnet:!1}),xl=1,BI=f({...j,id:1750,name:"Metal L2",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.metall2.com"],webSocket:["wss://rpc.metall2.com"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.metall2.com",apiUrl:"https://explorer.metall2.com/api"}},contracts:{...j.contracts,l2OutputOracle:{[xl]:{address:"0x3B1F7aDa0Fcc26B13515af752Dd07fB1CAc11426"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},portal:{[xl]:{address:"0x3F37aBdE2C6b5B2ed6F8045787Df1ED1E3753956"}},l1StandardBridge:{[xl]:{address:"0x6d0f65D59b55B0FEC5d2d15365154DcADC140BF3"}}},sourceId:xl}),MI=f({id:82,name:"Meter",nativeCurrency:{decimals:18,name:"MTR",symbol:"MTR"},rpcUrls:{default:{http:["https://rpc.meter.io"]}},blockExplorers:{default:{name:"MeterScan",url:"https://scan.meter.io"}}}),_I=f({id:83,name:"Meter Testnet",nativeCurrency:{decimals:18,name:"MTR",symbol:"MTR"},rpcUrls:{default:{http:["https://rpctest.meter.io"]}},blockExplorers:{default:{name:"MeterTestnetScan",url:"https://scan-warringstakes.meter.io"}}}),DI=f({id:1088,name:"Metis",nativeCurrency:{decimals:18,name:"Metis",symbol:"METIS"},rpcUrls:{default:{http:["https://metis.rpc.hypersync.xyz","https://metis-pokt.nodies.app","https://api.blockeden.xyz/metis/67nCBdZQSH9z3YqDDjdm","https://metis-andromeda.rpc.thirdweb.com","https://metis-andromeda.gateway.tenderly.co","https://metis.api.onfinality.io/public","https://andromeda.metis.io/?owner=1088","https://metis-mainnet.public.blastapi.io"],webSocket:["wss://metis-rpc.publicnode.com","wss://metis.drpc.org"]}},blockExplorers:{default:{name:"Metis Explorer",url:"https://explorer.metis.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2338552}}}),FI=f({id:599,name:"Metis Goerli",nativeCurrency:{decimals:18,name:"Metis Goerli",symbol:"METIS"},rpcUrls:{default:{http:["https://goerli.gateway.metisdevops.link"]}},blockExplorers:{default:{name:"Metis Goerli Explorer",url:"https://goerli.explorer.metisdevops.link",apiUrl:"https://goerli.explorer.metisdevops.link/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1006207}}}),NI=f({id:59902,name:"Metis Sepolia",nativeCurrency:{decimals:18,name:"Test Metis",symbol:"tMETIS"},rpcUrls:{default:{http:["https://sepolia.metisdevops.link","https://metis-sepolia-rpc.publicnode.com","https://metis-sepolia.gateway.tenderly.co"],webSocket:["wss://metis-sepolia-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Metis Sepolia Explorer",url:"https://sepolia-explorer.metisdevops.link",apiUrl:"https://sepolia-explorer.metisdevops.link/api-docs"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:224185}}}),zI=f({id:7518,name:"MEVerse Chain Mainnet",nativeCurrency:{decimals:18,name:"MEVerse",symbol:"MEV"},rpcUrls:{default:{http:["https://rpc.meversemainnet.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://www.meversescan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:86881340}}}),LI=f({id:4759,name:"MEVerse Chain Testnet",nativeCurrency:{decimals:18,name:"MEVerse",symbol:"MEV"},rpcUrls:{default:{http:["https://rpc.meversetestnet.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.meversescan.io/"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:64371115}},testnet:!0}),RI=f({id:185,name:"Mint Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.mintchain.io"]}},blockExplorers:{default:{name:"Mintchain explorer",url:"https://explorer.mintchain.io"}},testnet:!1}),HI=f({id:1686,name:"Mint Sepolia Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.mintchain.io"]}},blockExplorers:{default:{name:"Mintchain Testnet explorer",url:"https://testnet-explorer.mintchain.io"}},testnet:!0}),$I=f({id:124832,name:"Mitosis Testnet",nativeCurrency:{name:"MITO",symbol:"MITO",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.mitosis.org"]}},blockExplorers:{default:{name:"Mitosis testnet explorer",url:"https://testnet.mitosiscan.xyz"}},testnet:!0}),wl=1,GI=f({...j,id:34443,name:"Mode Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.mode.network"]}},blockExplorers:{default:{name:"Modescan",url:"https://modescan.io"}},contracts:{...j.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2465882},l2OutputOracle:{[wl]:{address:"0x4317ba146D4933D889518a3e5E11Fe7a53199b04"}},portal:{[wl]:{address:"0x8B34b14c7c7123459Cf3076b8Cb929BE097d0C07"}},l1StandardBridge:{[wl]:{address:"0x735aDBbE72226BD52e818E7181953f42E3b0FF21"}}},sourceId:wl}),vl=11155111,jI=f({...j,id:919,name:"Mode Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.mode.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia.explorer.mode.network",apiUrl:"https://sepolia.explorer.mode.network/api"}},contracts:{...j.contracts,l2OutputOracle:{[vl]:{address:"0x2634BD65ba27AB63811c74A63118ACb312701Bfa",blockCreated:3778393}},portal:{[vl]:{address:"0x320e1580effF37E008F1C92700d1eBa47c1B23fD",blockCreated:3778395}},l1StandardBridge:{[vl]:{address:"0xbC5C679879B2965296756CD959C3C739769995E2",blockCreated:3778392}},multicall3:{address:"0xBAba8373113Fb7a68f195deF18732e01aF8eDfCF",blockCreated:3019007}},testnet:!0,sourceId:vl}),VI=f({id:143,name:"Monad",blockTime:400,nativeCurrency:{name:"Monad",symbol:"MON",decimals:18},rpcUrls:{default:{http:["https://rpc.monad.xyz","https://rpc1.monad.xyz"],webSocket:["wss://rpc.monad.xyz","wss://rpc1.monad.xyz"]}},blockExplorers:{default:{name:"MonadVision",url:"https://monadvision.com"},monadscan:{name:"Monadscan",url:"https://monadscan.com",apiUrl:"https://api.monadscan.com/api"}},testnet:!1,contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:9248132}}}),WI=f({id:10143,name:"Monad Testnet",blockTime:400,nativeCurrency:{name:"Testnet MON Token",symbol:"MON",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.monad.xyz"]}},blockExplorers:{default:{name:"Monad Testnet explorer",url:"https://testnet.monadexplorer.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:251449}},testnet:!0}),qI=f({id:1287,name:"Moonbase Alpha",nativeCurrency:{decimals:18,name:"DEV",symbol:"DEV"},rpcUrls:{default:{http:["https://rpc.api.moonbase.moonbeam.network"],webSocket:["wss://wss.api.moonbase.moonbeam.network"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonbase.moonscan.io",apiUrl:"https://moonbase.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1850686}},testnet:!0}),YI=f({id:1284,name:"Moonbeam",nativeCurrency:{decimals:18,name:"GLMR",symbol:"GLMR"},rpcUrls:{default:{http:["https://rpc.api.moonbeam.network"],webSocket:["wss://wss.api.moonbeam.network"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonscan.io",apiUrl:"https://api-moonbeam.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:609002}},testnet:!1}),KI=f({id:1281,name:"Moonbeam Development Node",nativeCurrency:{decimals:18,name:"DEV",symbol:"DEV"},rpcUrls:{default:{http:["http://127.0.0.1:9944"],webSocket:["wss://127.0.0.1:9944"]}}}),ZI=f({id:1285,name:"Moonriver",nativeCurrency:{decimals:18,name:"MOVR",symbol:"MOVR"},rpcUrls:{default:{http:["https://rpc.api.moonriver.moonbeam.network"],webSocket:["wss://wss.api.moonriver.moonbeam.network"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonriver.moonscan.io",apiUrl:"https://api-moonriver.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1597904}},testnet:!1}),XI=f({id:2818,name:"Morph",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.morphl2.io"],webSocket:["wss://rpc.morphl2.io:8443"]}},blockExplorers:{default:{name:"Morph Explorer",url:"https://explorer.morphl2.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3654913}},testnet:!1}),QI=f({id:2810,name:"Morph Holesky",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-quicknode-holesky.morphl2.io"],webSocket:["wss://rpc-quicknode-holesky.morphl2.io"]}},blockExplorers:{default:{name:"Morph Holesky Explorer",url:"https://explorer-holesky.morphl2.io",apiUrl:"https://explorer-api-holesky.morphl2.io/api?"}},testnet:!0}),JI=f({id:2710,name:"Morph Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.morphl2.io"]}},blockExplorers:{default:{name:"Morph Testnet Explorer",url:"https://explorer-testnet.morphl2.io",apiUrl:"https://explorer-api-testnet.morphl2.io/api"}},testnet:!0}),eU=f({id:5551,name:"Nahmii 2 Mainnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://l2.nahmii.io"]}},blockExplorers:{default:{name:"Nahmii 2 Explorer",url:"https://explorer.n2.nahmii.io"}},testnet:!1}),tU=f({id:22222,name:"Nautilus Mainnet",nativeCurrency:{name:"ZBC",symbol:"ZBC",decimals:9},rpcUrls:{default:{http:["https://api.nautilus.nautchain.xyz"]}},blockExplorers:{default:{name:"NautScan",url:"https://nautscan.com"}}}),rU=f({id:397,name:"NEAR Protocol",nativeCurrency:{decimals:18,name:"NEAR",symbol:"NEAR"},rpcUrls:{default:{http:["https://eth-rpc.mainnet.near.org"]}},blockExplorers:{default:{name:"NEAR Explorer",url:"https://eth-explorer.near.org"}},testnet:!1}),nU=f({id:398,name:"NEAR Protocol Testnet",nativeCurrency:{decimals:18,name:"NEAR",symbol:"NEAR"},rpcUrls:{default:{http:["https://eth-rpc.testnet.near.org"]}},blockExplorers:{default:{name:"NEAR Explorer",url:"https://eth-explorer-testnet.near.org"}},testnet:!0}),sU=f({id:245022926,name:"Neon EVM DevNet",nativeCurrency:{name:"NEON",symbol:"NEON",decimals:18},rpcUrls:{default:{http:["https://devnet.neonevm.org"]}},blockExplorers:{default:{name:"Neonscan",url:"https://devnet.neonscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:205206112}},testnet:!0}),aU=f({id:245022934,network:"neonMainnet",name:"Neon EVM MainNet",nativeCurrency:{name:"NEON",symbol:"NEON",decimals:18},rpcUrls:{default:{http:["https://neon-proxy-mainnet.solana.p2p.org"]}},blockExplorers:{default:{name:"Neonscan",url:"https://neonscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:206545524}},testnet:!1}),oU=f({id:47763,name:"Neo X Mainnet",nativeCurrency:{name:"Gas",symbol:"GAS",decimals:18},rpcUrls:{default:{http:["https://mainnet-1.rpc.banelabs.org","https://mainnet-2.rpc.banelabs.org"]}},blockExplorers:{default:{name:"Neo X - Explorer",url:"https://xexplorer.neo.org"}},testnet:!1}),iU=f({id:12227332,name:"Neo X Testnet T4",nativeCurrency:{name:"Gas",symbol:"GAS",decimals:18},rpcUrls:{default:{http:["https://testnet.rpc.banelabs.org/"]}},blockExplorers:{default:{name:"neox-scan",url:"https://xt4scan.ngd.network"}},testnet:!0}),cU=f({id:1012,name:"Newton",nativeCurrency:{name:"Newton",symbol:"NEW",decimals:18},rpcUrls:{default:{http:["https://global.rpc.mainnet.newtonproject.org"]}},blockExplorers:{default:{name:"NewFi explorer",url:"https://explorer.newtonproject.org/"}},testnet:!1}),lU=f({id:4242,name:"Nexi",nativeCurrency:{name:"Nexi",symbol:"NEXI",decimals:18},rpcUrls:{default:{http:["https://rpc.chain.nexi.technology"]}},blockExplorers:{default:{name:"NexiScan",url:"https://www.nexiscan.com",apiUrl:"https://www.nexiscan.com/api"}},contracts:{multicall3:{address:"0x0277A46Cc69A57eE3A6C8c158bA874832F718B8E",blockCreated:25770160}}}),uU=f({id:240,name:"Nexilix Smart Chain",nativeCurrency:{decimals:18,name:"Nexilix",symbol:"NEXILIX"},rpcUrls:{default:{http:["https://rpcurl.pos.nexilix.com"]}},blockExplorers:{default:{name:"NexilixScan",url:"https://scan.nexilix.com"}},contracts:{multicall3:{address:"0x58381c8e2BF9d0C2C4259cA14BdA9Afe02831244",blockCreated:74448}}}),dU=f({id:6900,name:"Nibiru",nativeCurrency:{decimals:18,name:"NIBI",symbol:"NIBI"},rpcUrls:{default:{http:["https://evm-rpc.nibiru.fi"]}},blockExplorers:{default:{name:"NibiScan",url:"https://nibiscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:19587573}}}),fU=f({id:200024,name:"Nitrograph Testnet",testnet:!0,rpcUrls:{default:{http:["https://rpc-testnet.nitrograph.foundation"]}},nativeCurrency:{name:"Nitro",symbol:"NOS",decimals:18},blockExplorers:{default:{url:"https://explorer-testnet.nitrograph.foundation",name:"Nitrograph Explorer"}}}),pU=f({id:166,name:"Nomina",nativeCurrency:{name:"Nomina",symbol:"NOM",decimals:18},rpcUrls:{default:{http:["https://mainnet.nomina.io"],webSocket:["wss://mainnet.nomina.io"]}},blockExplorers:{default:{name:"Nomina Explorer",url:"https://nomscan.io"}},testnet:!1}),hU=f({id:4090,network:"oasis-testnet",name:"Oasis Testnet",nativeCurrency:{name:"Fasttoken",symbol:"FTN",decimals:18},rpcUrls:{default:{http:["https://rpc1.oasis.bahamutchain.com"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://oasis.ftnscan.com",apiUrl:"https://oasis.ftnscan.com/api"}},testnet:!0}),mU=f({id:248,name:"Oasys",nativeCurrency:{name:"Oasys",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.oasys.games"]}},blockExplorers:{default:{name:"OasysScan",url:"https://scan.oasys.games",apiUrl:"https://scan.oasys.games/api"}}}),bU=f({id:911867,name:"Odyssey Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://odyssey.ithaca.xyz"]}},blockExplorers:{default:{name:"Odyssey Explorer",url:"https://odyssey-explorer.ithaca.xyz",apiUrl:"https://odyssey-explorer.ithaca.xyz/api"}},testnet:!0}),yU=f({id:66,name:"OKC",nativeCurrency:{decimals:18,name:"OKT",symbol:"OKT"},rpcUrls:{default:{http:["https://exchainrpc.okex.org"]}},blockExplorers:{default:{name:"oklink",url:"https://www.oklink.com/okc"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10364792}}}),gU=f({id:311,name:"Omax Mainnet",nativeCurrency:{decimals:18,name:"OMAX",symbol:"OMAX"},rpcUrls:{default:{http:["https://mainapi.omaxray.com"]}},blockExplorers:{default:{name:"Omax Explorer",url:"https://omaxscan.com"}},testnet:!1}),xU=f({id:166,name:"Omni",nativeCurrency:{name:"Omni",symbol:"OMNI",decimals:18},rpcUrls:{default:{http:["https://mainnet.omni.network"],webSocket:["wss://mainnet.omni.network"]}},blockExplorers:{default:{name:"OmniScan",url:"https://omniscan.network"}},testnet:!1}),wU=f({id:164,name:"Omni Omega",nativeCurrency:{name:"Omni",symbol:"OMNI",decimals:18},rpcUrls:{default:{http:["https://omega.omni.network"],webSocket:["wss://omega.omni.network"]}},blockExplorers:{default:{name:"Omega OmniScan",url:"https://omega.omniscan.network/"}},testnet:!0}),vU=f({id:309075,name:"One World Chain Mainnet",nativeCurrency:{decimals:18,name:"OWCT",symbol:"OWCT"},rpcUrls:{default:{http:["https://mainnet-rpc.oneworldchain.org"]}},blockExplorers:{default:{name:"One World Explorer",url:"https://mainnet.oneworldchain.org"}},testnet:!1}),kU=f({id:9700,name:"OORT MainnetDev",nativeCurrency:{decimals:18,name:"OORT",symbol:"OORT"},rpcUrls:{default:{http:["https://dev-rpc.oortech.com"]}},blockExplorers:{default:{name:"OORT MainnetDev Explorer",url:"https://dev-scan.oortech.com"}}}),kl=56,EU=f({id:204,name:"opBNB",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://opbnb-mainnet-rpc.bnbchain.org"]}},blockExplorers:{default:{name:"opBNB (BSCScan)",url:"https://opbnb.bscscan.com",apiUrl:"https://api-opbnb.bscscan.com/api"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:512881},l2OutputOracle:{[kl]:{address:"0x153CAB79f4767E2ff862C94aa49573294B13D169"}},portal:{[kl]:{address:"0x1876EA7702C0ad0C6A2ae6036DE7733edfBca519"}},l1StandardBridge:{[kl]:{address:"0xF05F0e4362859c3331Cb9395CBC201E3Fa6757Ea"}}},sourceId:kl}),El=97,CU=f({id:5611,name:"opBNB Testnet",nativeCurrency:{decimals:18,name:"tBNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://opbnb-testnet-rpc.bnbchain.org"]}},blockExplorers:{default:{name:"opbnbscan",url:"https://testnet.opbnbscan.com"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3705108},l2OutputOracle:{[El]:{address:"0xFf2394Bb843012562f4349C6632a0EcB92fC8810"}},portal:{[El]:{address:"0x4386C8ABf2009aC0c263462Da568DD9d46e52a31"}},l1StandardBridge:{[El]:{address:"0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840"}}},testnet:!0,sourceId:El}),TU=f({id:1612,name:"OpenLedger",nativeCurrency:{name:"Open",symbol:"OPEN",decimals:18},rpcUrls:{default:{http:["https://rpc.openledger.xyz"]}},blockExplorers:{default:{name:"OpenLedger Explorer",url:"https://scan.openledger.xyz"}},testnet:!1}),mi=1,SU=f({...j,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:{...j.contracts,disputeGameFactory:{[mi]:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{[mi]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[mi]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[mi]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:mi}),Cl=5,AU=f({...j,id:420,name:"Optimism Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli.optimism.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io",apiUrl:"https://goerli-optimism.etherscan.io/api"}},contracts:{...j.contracts,l2OutputOracle:{[Cl]:{address:"0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461},portal:{[Cl]:{address:"0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383"}},l1StandardBridge:{[Cl]:{address:"0x636Af16bf2f682dD3109e60102b8E1A089FedAa8"}}},testnet:!0,sourceId:Cl}),bi=11155111,PU=f({...j,id:11155420,name:"OP Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.optimism.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com",apiUrl:"https://optimism-sepolia.blockscout.com/api"}},contracts:{...j.contracts,disputeGameFactory:{[bi]:{address:"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1"}},l2OutputOracle:{[bi]:{address:"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204},portal:{[bi]:{address:"0x16Fc5058F25648194471939df75CF27A2fdC48BC"}},l1StandardBridge:{[bi]:{address:"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1"}}},testnet:!0,sourceId:bi}),IU=f({id:62050,name:"Optopia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.optopia.ai"]}},blockExplorers:{default:{name:"Optopia Explorer",url:"https://scan.optopia.ai"}},testnet:!1}),UU=f({id:62049,name:"Optopia Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.optopia.ai"]}},blockExplorers:{default:{name:"Optopia Explorer",url:"https://scan-testnet.optopia.ai"}},testnet:!0}),OU=f({id:291,name:"Orderly",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.orderly.network"]}},blockExplorers:{default:{name:"Orderly Explorer",url:"https://explorer.orderly.network"}},testnet:!1}),BU=f({id:4460,name:"Orderly Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://l2-orderly-l2-4460-sepolia-8tc3sd7dvy.t.conduit.xyz"]}},blockExplorers:{default:{name:"Orderly Explorer",url:"https://explorerl2new-orderly-l2-4460-sepolia-8tc3sd7dvy.t.conduit.xyz"}},testnet:!0}),MU=f({id:41144114,name:"Otim Devnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["http://devnet.otim.xyz"]}},contracts:{batchInvoker:{address:"0x5FbDB2315678afecb367f032d93F642f64180aa3"}}}),_U=f({id:11297108109,name:"Palm",nativeCurrency:{decimals:18,name:"PALM",symbol:"PALM"},rpcUrls:{default:{http:["https://palm-mainnet.public.blastapi.io"],webSocket:["wss://palm-mainnet.public.blastapi.io"]}},blockExplorers:{default:{name:"Chainlens",url:"https://palm.chainlens.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15429248}}}),DU=f({id:11297108099,name:"Palm Testnet",nativeCurrency:{decimals:18,name:"PALM",symbol:"PALM"},rpcUrls:{default:{http:["https://palm-mainnet.public.blastapi.io"],webSocket:["wss://palm-mainnet.public.blastapi.io"]}},blockExplorers:{default:{name:"Chainlens",url:"https://palm.chainlens.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15429248}},testnet:!0}),FU=f({id:3338,name:"Peaq",nativeCurrency:{decimals:18,name:"peaq",symbol:"PEAQ"},rpcUrls:{default:{http:["https://quicknode1.peaq.xyz","https://quicknode2.peaq.xyz","https://quicknode3.peaq.xyz"],webSocket:["wss://quicknode1.peaq.xyz","wss://quicknode2.peaq.xyz","wss://quicknode3.peaq.xyz"]}},blockExplorers:{default:{name:"Subscan",url:"https://peaq.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3566354}}}),Tl=1,NU=f({id:424,network:"pgn",name:"PGN",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.publicgoods.network"]}},blockExplorers:{default:{name:"PGN Explorer",url:"https://explorer.publicgoods.network",apiUrl:"https://explorer.publicgoods.network/api"}},contracts:{l2OutputOracle:{[Tl]:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3380209},portal:{[Tl]:{address:"0xb26Fd985c5959bBB382BAFdD0b879E149e48116c"}},l1StandardBridge:{[Tl]:{address:"0xD0204B9527C1bA7bD765Fa5CCD9355d38338272b"}}},formatters:Wf,sourceId:Tl}),Sl=11155111,zU=f({id:58008,network:"pgn-testnet",name:"PGN",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.publicgoods.network"]}},blockExplorers:{default:{name:"PGN Testnet Explorer",url:"https://explorer.sepolia.publicgoods.network",apiUrl:"https://explorer.sepolia.publicgoods.network/api"}},contracts:{l2OutputOracle:{[Sl]:{address:"0xD5bAc3152ffC25318F848B3DD5dA6C85171BaEEe"}},portal:{[Sl]:{address:"0xF04BdD5353Bb0EFF6CA60CfcC78594278eBfE179"}},l1StandardBridge:{[Sl]:{address:"0xFaE6abCAF30D23e233AC7faF747F2fC3a5a6Bfa3"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3754925}},formatters:Wf,sourceId:Sl,testnet:!0}),LU=f({id:13381,name:"Phoenix Blockchain",nativeCurrency:{name:"Phoenix",symbol:"PHX",decimals:18},rpcUrls:{default:{http:["https://rpc.phoenixplorer.com"]}},blockExplorers:{default:{name:"Phoenixplorer",url:"https://phoenixplorer.com",apiUrl:"https://phoenixplorer.com/api"}},contracts:{multicall3:{address:"0x498cF757a575cFF2c2Ed9f532f56Efa797f86442",blockCreated:5620192}}}),RU=f({id:7070,name:"Planq Mainnet",nativeCurrency:{decimals:18,name:"PLQ",symbol:"PLQ"},rpcUrls:{default:{http:["https://planq-rpc.nodies.app","https://evm-rpc.planq.network","https://jsonrpc.planq.nodestake.top"]}},blockExplorers:{default:{name:"Planq Explorer",url:"https://evm.planq.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:8470015}},testnet:!1}),HU=f({id:9745,name:"Plasma",blockTime:1e3,nativeCurrency:{name:"Plasma",symbol:"XPL",decimals:18},rpcUrls:{default:{http:["https://rpc.plasma.to"]}},blockExplorers:{default:{name:"PlasmaScan",url:"https://plasmascan.to"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),$U=f({id:9747,name:"Plasma Devnet",nativeCurrency:{name:"Devnet Plasma",symbol:"XPL",decimals:18},rpcUrls:{default:{http:["https://devnet-rpc.plasma.to"]}},testnet:!0,contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),GU=f({id:9746,name:"Plasma Testnet",nativeCurrency:{name:"Testnet Plasma",symbol:"XPL",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.plasma.to"]}},blockExplorers:{default:{name:"RouteScan",url:"https://testnet.plasmascan.to"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!0}),jU=f({...ar,id:1612127,name:"PlayFi Albireo Testnet",network:"albireo",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://albireo-rpc.playfi.ai"],webSocket:["wss://albireo-rpc-ws.playfi.ai/ws"]}},blockExplorers:{default:{name:"PlayFi Albireo Explorer",url:"https://albireo-explorer.playfi.ai"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"}},testnet:!0}),VU=f({id:242,name:"Plinga",nativeCurrency:{name:"Plinga",symbol:"PLINGA",decimals:18},rpcUrls:{default:{http:["https://rpcurl.mainnet.plgchain.com"]}},blockExplorers:{default:{name:"Plgscan",url:"https://www.plgscan.com"}},contracts:{multicall3:{address:"0x0989576160f2e7092908BB9479631b901060b6e4",blockCreated:204489}}}),WU=f({id:98865,name:"Plume (Legacy)",nativeCurrency:{name:"Plume Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.plumenetwork.xyz"],webSocket:["wss://rpc.plumenetwork.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.plumenetwork.xyz",apiUrl:"https://explorer.plumenetwork.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:48577}},sourceId:1}),qU=f({id:98864,name:"Plume Devnet (Legacy)",nativeCurrency:{name:"Plume Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://test-rpc.plumenetwork.xyz"],webSocket:["wss://test-rpc.plumenetwork.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://test-explorer.plumenetwork.xyz",apiUrl:"https://test-explorer.plumenetwork.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:481948}},testnet:!0,sourceId:11155111}),YU=f({id:98866,name:"Plume",nativeCurrency:{name:"Plume",symbol:"PLUME",decimals:18},rpcUrls:{default:{http:["https://rpc.plume.org"],webSocket:["wss://rpc.plume.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.plume.org",apiUrl:"https://explorer.plume.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:39679}},sourceId:1}),KU=f({id:98867,name:"Plume Testnet",nativeCurrency:{name:"Plume",symbol:"PLUME",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.plume.org"],webSocket:["wss://testnet-rpc.plume.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.plume.org",apiUrl:"https://testnet-explorer.plume.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:199712}},testnet:!0,sourceId:11155111}),ZU=f({id:161221135,name:"Plume Testnet (Legacy)",nativeCurrency:{name:"Plume Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.plumenetwork.xyz/http"],webSocket:["wss://testnet-rpc.plumenetwork.xyz/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.plumenetwork.xyz",apiUrl:"https://testnet-explorer.plumenetwork.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:6022332}},testnet:!0,sourceId:11155111}),XU=f({id:631571,name:"Polter Testnet",nativeCurrency:{decimals:18,name:"Polter GHST",symbol:"GHST"},rpcUrls:{default:{http:["https://geist-polter.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Blockscout",url:"https://polter-testnet.explorer.alchemy.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11245}},testnet:!0}),QU=f({id:137,name:"Polygon",blockTime:2e3,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),JU=f({id:80002,name:"Polygon Amoy",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://rpc-amoy.polygon.technology"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://amoy.polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3127388}},testnet:!0}),eO=f({id:80001,name:"Polygon Mumbai",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{default:{http:["https://80001.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://mumbai.polygonscan.com",apiUrl:"https://api-testnet.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}},testnet:!0}),tO=f({id:1101,name:"Polygon zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://zkevm.polygonscan.com",apiUrl:"https://api-zkevm.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:57746}}}),rO=f({id:2442,name:"Polygon zkEVM Cardona",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.cardona.zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://cardona-zkevm.polygonscan.com",apiUrl:"https://cardona-zkevm.polygonscan.com/api"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:114091}}}),nO=f({id:1442,name:"Polygon zkEVM Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.public.zkevm-test.net"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://testnet-zkevm.polygonscan.com",apiUrl:"https://testnet-zkevm.polygonscan.com/api"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:525686}}}),sO=f({id:8008,name:"Polynomial",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.polynomial.fi"]}},blockExplorers:{default:{name:"Polynomial Scan",url:"https://polynomialscan.io"}},testnet:!1,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}}}),aO=f({id:80008,name:"Polynomia Sepolia",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.sepolia.polynomial.fi"]}},blockExplorers:{default:{name:"Polynomial Scan",url:"https://sepolia.polynomialscan.io"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}}}),oO=f({id:60603,name:"POTOS Mainnet",nativeCurrency:{decimals:18,name:"POTOS Token",symbol:"POT"},rpcUrls:{default:{http:["https://rpc.potos.hk"]}},blockExplorers:{default:{name:"POTOS Mainnet explorer",url:"https://scan.potos.hk"}},testnet:!1}),iO=f({id:60600,name:"POTOS Testnet",nativeCurrency:{decimals:18,name:"POTOS Token",symbol:"POT"},rpcUrls:{default:{http:["https://rpc-testnet.potos.hk"]}},blockExplorers:{default:{name:"POTOS Testnet explorer",url:"https://scan-testnet.potos.hk"}},testnet:!0}),cO=f({id:23023,name:"PremiumBlock Testnet",nativeCurrency:{name:"Premium Block",symbol:"PBLK",decimals:18},rpcUrls:{default:{http:["https://rpc.premiumblock.org"]}},blockExplorers:{default:{name:"PremiumBlocks Explorer",url:"https://scan.premiumblock.org"}},testnet:!0}),lO=f({id:369,name:"PulseChain",nativeCurrency:{name:"Pulse",symbol:"PLS",decimals:18},testnet:!1,blockTime:1e4,rpcUrls:{default:{http:["https://rpc.pulsechain.com"],webSocket:["wss://ws.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://ipfs.scan.pulsechain.com",apiUrl:"https://api.scan.pulsechain.com/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),uO=f({id:943,name:"PulseChain V4",testnet:!0,nativeCurrency:{name:"V4 Pulse",symbol:"v4PLS",decimals:18},blockTime:1e4,rpcUrls:{default:{http:["https://rpc.v4.testnet.pulsechain.com"],webSocket:["wss://ws.v4.testnet.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://scan.v4.testnet.pulsechain.com",apiUrl:"https://scan.v4.testnet.pulsechain.com/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),dO=f({id:490092,name:"Pumpfi Testnet",nativeCurrency:{decimals:18,name:"PMPT",symbol:"PMPT"},rpcUrls:{default:{http:["https://rpc1testnet.pumpfi.me"]}},blockExplorers:{default:{name:"Pumpfi Testnet Scan",url:"https://testnetscan.pumpfi.me"}},testnet:!0}),Uy=11155111,fO=f({...j,name:"Pyrope Testnet",testnet:!0,id:695569,sourceId:Uy,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.pyropechain.com"],webSocket:["wss://rpc.pyropechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://pyrope.blockscout.com"}},contracts:{...j.contracts,l1StandardBridge:{[Uy]:{address:"0xC24932c31D9621aE9e792576152B7ef010cFC2F8"}}}}),pO=f({id:766,name:"QL1",nativeCurrency:{decimals:18,name:"QOM",symbol:"QOM"},rpcUrls:{default:{http:["https://rpc.qom.one"]}},blockExplorers:{default:{name:"Ql1 Explorer",url:"https://scan.qom.one"}},contracts:{multicall3:{address:"0x7A52370716ea730585884F5BDB0f6E60C39b8C64"}},testnet:!1}),hO=f({id:35441,name:"Q Mainnet",nativeCurrency:{decimals:18,name:"Q",symbol:"Q"},rpcUrls:{default:{http:["https://rpc.q.org"]}},blockExplorers:{default:{name:"Q Mainnet Explorer",url:"https://explorer.q.org",apiUrl:"https://explorer.q.org/api"}}}),mO=f({id:35443,name:"Q Testnet",nativeCurrency:{decimals:18,name:"Q",symbol:"Q"},rpcUrls:{default:{http:["https://rpc.qtestnet.org"]}},blockExplorers:{default:{name:"Q Testnet Explorer",url:"https://explorer.qtestnet.org",apiUrl:"https://explorer.qtestnet.org/api"}},testnet:!0}),bO=f({id:9,name:"Quai Network Mainnet",nativeCurrency:{decimals:18,name:"Quai",symbol:"QUAI"},rpcUrls:{default:{http:["https://rpc.quai.network/cyprus1"]}},blockExplorers:{default:{name:"Quaiscan",url:"https://quaiscan.io",apiUrl:"https://quaiscan.io/api"}},testnet:!1}),yO=f({id:15e3,name:"Quai Network Testnet",nativeCurrency:{decimals:18,name:"Quai",symbol:"QUAI"},rpcUrls:{default:{http:["https://orchard.rpc.quai.network/cyprus1"]}},blockExplorers:{default:{name:"Orchard Quaiscan",url:"https://orchard.quaiscan.io",apiUrl:"https://orchard.quaiscan.io/api"}},testnet:!0}),gO=f({id:5318007,name:"Reactive Lasna Testnet",nativeCurrency:{decimals:18,name:"Lasna React",symbol:"lREACT"},rpcUrls:{default:{http:["https://lasna-rpc.rnk.dev"]}},blockExplorers:{default:{name:"Reactscan",url:"https://lasna.reactscan.net"}},testnet:!0}),xO=f({id:111188,name:"re.al",nativeCurrency:{name:"reETH",decimals:18,symbol:"reETH"},rpcUrls:{default:{http:["https://rpc.realforreal.gelato.digital"]}},blockExplorers:{default:{name:"re.al Explorer",url:"https://explorer.re.al",apiUrl:"https://explorer.re.al/api/v2"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:695}}}),wO=f({id:151,name:"Redbelly Network Mainnet",nativeCurrency:{name:"Redbelly Native Coin",symbol:"RBNT",decimals:18},rpcUrls:{default:{http:["https://governors.mainnet.redbelly.network"]}},blockExplorers:{default:{name:"Routescan",url:"https://redbelly.routescan.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/151/etherscan/api"}},testnet:!1}),vO=f({id:153,name:"Redbelly Network Testnet",nativeCurrency:{name:"Redbelly Native Coin",symbol:"RBNT",decimals:18},rpcUrls:{default:{http:["https://governors.testnet.redbelly.network"]}},blockExplorers:{default:{name:"Routescan",url:"https://redbelly.testnet.routescan.io",apiUrl:"https://api.routescan.io/v2/network/testnet/evm/153_2/etherscan/api"}},testnet:!0}),kO=f({id:50342,name:"Reddio",nativeCurrency:{name:"Reddio",symbol:"RED",decimals:18},rpcUrls:{default:{http:["https://mainnet.reddio.com/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://reddio.cloud.blockscout.com",apiUrl:"https://reddio.cloud.blockscout.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:848849}},testnet:!1}),EO=f({id:50341,name:"Reddio Sepolia",nativeCurrency:{name:"Reddio",symbol:"RED",decimals:18},rpcUrls:{default:{http:["https://reddio-dev.reddio.com"]}},blockExplorers:{default:{name:"Reddioscan",url:"https://reddio-devnet.l2scan.co",apiUrl:"https://reddio-devnet.l2scan.co/api"}},testnet:!0}),Al=1,CO=f({...j,name:"Redstone",id:690,sourceId:Al,nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.redstonechain.com"],webSocket:["wss://rpc.redstonechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.redstone.xyz"}},contracts:{...j.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[Al]:{address:"0xC7bCb0e8839a28A1cFadd1CF716de9016CdA51ae",blockCreated:19578329}},l2OutputOracle:{[Al]:{address:"0xa426A052f657AEEefc298b3B5c35a470e4739d69",blockCreated:19578337}},l1StandardBridge:{[Al]:{address:"0xc473ca7E02af24c129c2eEf51F2aDf0411c1Df69",blockCreated:19578331}}}}),TO=f({id:47805,name:"REI Mainnet",nativeCurrency:{decimals:18,name:"REI",symbol:"REI"},rpcUrls:{default:{http:["https://rpc.rei.network"],webSocket:["wss://rpc.rei.network"]}},blockExplorers:{default:{name:"REI Scan",url:"https://scan.rei.network"}},testnet:!1}),SO=f({id:1729,name:"Reya Network",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.reya.network"],webSocket:["wss://ws.reya.network"]}},blockExplorers:{default:{name:"Reya Network Explorer",url:"https://explorer.reya.network"}},testnet:!1}),AO=f({id:11155931,name:"RISE Testnet",nativeCurrency:{name:"RISE Testnet Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.riselabs.xyz"],webSocket:["wss://testnet.riselabs.xyz/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.testnet.riselabs.xyz/",apiUrl:"https://explorer.testnet.riselabs.xyz/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}},testnet:!0}),PO=f({id:753,name:"Rivalz",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rivalz.calderachain.xyz/http"]}},blockExplorers:{default:{name:"Rivalz Caldera Explorer",url:"https://rivalz.calderaexplorer.xyz"}},testnet:!1}),IO=f({id:570,name:"Rollux Mainnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.rollux.com"],webSocket:["wss://rpc.rollux.com/wss"]}},blockExplorers:{default:{name:"RolluxExplorer",url:"https://explorer.rollux.com",apiUrl:"https://explorer.rollux.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:119222}}}),UO=f({id:57e3,name:"Rollux Testnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc-tanenbaum.rollux.com/"],webSocket:["wss://rpc-tanenbaum.rollux.com/wss"]}},blockExplorers:{default:{name:"RolluxTestnetExplorer",url:"https://rollux.tanenbaum.io",apiUrl:"https://rollux.tanenbaum.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1813675}}}),OO=f({id:2020,name:"Ronin",nativeCurrency:{name:"RON",symbol:"RON",decimals:18},rpcUrls:{default:{http:["https://api.roninchain.com/rpc"]}},blockExplorers:{default:{name:"Ronin Explorer",url:"https://app.roninchain.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:26023535}}}),BO=f({id:7668,name:"The Root Network",nativeCurrency:{decimals:18,name:"XRP",symbol:"XRP"},rpcUrls:{default:{http:["https://root.rootnet.live/archive"],webSocket:["wss://root.rootnet.live/archive/ws"]}},blockExplorers:{default:{name:"Rootscan",url:"https://rootscan.io"}},contracts:{multicall3:{address:"0xc9C2E2429AeC354916c476B30d729deDdC94988d",blockCreated:9218338}}}),MO=f({id:7672,name:"The Root Network - Porcini",nativeCurrency:{decimals:18,name:"XRP",symbol:"XRP"},rpcUrls:{default:{http:["https://porcini.rootnet.app/archive"],webSocket:["wss://porcini.rootnet.app/archive/ws"]}},blockExplorers:{default:{name:"Rootscan",url:"https://porcini.rootscan.io"}},contracts:{multicall3:{address:"0xc9C2E2429AeC354916c476B30d729deDdC94988d",blockCreated:10555692}},testnet:!0}),_O=f({id:30,name:"Rootstock Mainnet",network:"rootstock",nativeCurrency:{decimals:18,name:"Rootstock Bitcoin",symbol:"RBTC"},rpcUrls:{default:{http:["https://public-node.rsk.co"]}},blockExplorers:{default:{name:"RSK Explorer",url:"https://explorer.rsk.co"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4249540}}}),DO=f({id:31,name:"Rootstock Testnet",network:"rootstock",nativeCurrency:{decimals:18,name:"Rootstock Bitcoin",symbol:"tRBTC"},rpcUrls:{default:{http:["https://public-node.testnet.rsk.co"]}},blockExplorers:{default:{name:"RSK Explorer",url:"https://explorer.testnet.rootstock.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2771150}},testnet:!0}),Pl=1,FO=f({...j,id:12553,name:"RSS3 VSL Mainnet",nativeCurrency:{name:"RSS3",symbol:"RSS3",decimals:18},rpcUrls:{default:{http:["https://rpc.rss3.io"]}},blockExplorers:{default:{name:"RSS3 VSL Mainnet Scan",url:"https://scan.rss3.io",apiUrl:"https://scan.rss3.io/api"}},contracts:{...j.contracts,l2OutputOracle:{[Pl]:{address:"0xE6f24d2C32B3109B18ed33cF08eFb490b1e09C10"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14193},portal:{[Pl]:{address:"0x6A12432491bbbE8d3babf75F759766774C778Db4",blockCreated:19387057}},l1StandardBridge:{[Pl]:{address:"0x4cbab69108Aa72151EDa5A3c164eA86845f18438"}}},sourceId:Pl}),Il=11155111,NO=f({...j,id:2331,name:"RSS3 VSL Sepolia Testnet",nativeCurrency:{name:"RSS3",symbol:"RSS3",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.rss3.io"]}},blockExplorers:{default:{name:"RSS3 VSL Sepolia Testnet Scan",url:"https://scan.testnet.rss3.io",apiUrl:"https://scan.testnet.rss3.io/api"}},contracts:{...j.contracts,l2OutputOracle:{[Il]:{address:"0xDb5c46C3Eaa6Ed6aE8b2379785DF7dd029C0dC81"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:55697},portal:{[Il]:{address:"0xcBD77E8E1E7F06B25baDe67142cdE82652Da7b57",blockCreated:5345035}},l1StandardBridge:{[Il]:{address:"0xdDD29bb63B0839FB1cE0eE439Ff027738595D07B"}}},testnet:!0,sourceId:Il}),zO=f({id:7225878,name:"Saakuru Mainnet",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.saakuru.network"]}},blockExplorers:{default:{name:"Saakuru Explorer",url:"https://explorer.saakuru.network"}},testnet:!1}),LO=f({id:5464,name:"Saga",network:"saga",nativeCurrency:{decimals:18,name:"gas",symbol:"GAS"},rpcUrls:{default:{http:["https://sagaevm.jsonrpc.sagarpc.io"]}},blockExplorers:{default:{name:"Saga Explorer",url:"https://sagaevm.sagaexplorer.io"}},contracts:{multicall3:{address:"0x864DDc9B50B9A0dF676d826c9B9EDe9F8913a160",blockCreated:467530}}}),RO=f({id:2021,name:"Saigon Testnet",nativeCurrency:{name:"RON",symbol:"RON",decimals:18},rpcUrls:{default:{http:["https://saigon-testnet.roninchain.com/rpc"]}},blockExplorers:{default:{name:"Saigon Explorer",url:"https://saigon-app.roninchain.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:18736871}},testnet:!0}),HO=f({id:1996,name:"Sanko",nativeCurrency:{name:"DMT",symbol:"DMT",decimals:18},rpcUrls:{default:{http:["https://mainnet.sanko.xyz"]}},blockExplorers:{default:{name:"Sanko Explorer",url:"https://explorer.sanko.xyz"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:37}},testnet:!1}),$O=f({id:23294,name:"Oasis Sapphire",network:"sapphire",nativeCurrency:{name:"Sapphire Rose",symbol:"ROSE",decimals:18},rpcUrls:{default:{http:["https://sapphire.oasis.io"],webSocket:["wss://sapphire.oasis.io/ws"]}},blockExplorers:{default:{name:"Oasis Explorer",url:"https://explorer.oasis.io/mainnet/sapphire"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:734531}}}),GO=f({id:23295,name:"Oasis Sapphire Testnet",network:"sapphire-testnet",nativeCurrency:{name:"Sapphire Test Rose",symbol:"TEST",decimals:18},rpcUrls:{default:{http:["https://testnet.sapphire.oasis.dev"],webSocket:["wss://testnet.sapphire.oasis.dev/ws"]}},blockExplorers:{default:{name:"Oasis Explorer",url:"https://explorer.oasis.io/testnet/sapphire"}},testnet:!0}),jO=f({id:3109,name:"SatoshiVM Alpha Mainnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://alpha-rpc-node-http.svmscan.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://svmscan.io",apiUrl:"https://svmscan.io/api"}}}),VO=f({id:3110,name:"SatoshiVM Testnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://test-rpc-node-http.svmscan.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://testnet.svmscan.io",apiUrl:"https://testnet.svmscan.io/api"}},testnet:!0}),WO=f({id:534352,name:"Scroll",blockTime:3e3,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.scroll.io"],webSocket:["wss://wss-rpc.scroll.io/ws"]}},blockExplorers:{default:{name:"Scrollscan",url:"https://scrollscan.com",apiUrl:"https://api.scrollscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14}},testnet:!1}),qO=f({id:534351,name:"Scroll Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.scroll.io"]}},blockExplorers:{default:{name:"Scrollscan",url:"https://sepolia.scrollscan.com",apiUrl:"https://api-sepolia.scrollscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:9473}},testnet:!0}),YO=f({id:1329,name:"Sei Network",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc.sei-apis.com/"],webSocket:["wss://evm-ws.sei-apis.com/"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com",apiUrl:"https://seitrace.com/pacific-1/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}}}),KO=f({id:713715,name:"Sei Devnet",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc-arctic-1.sei-apis.com"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com"}},testnet:!0}),ZO=f({id:5124,name:"Seismic Devnet",nativeCurrency:{name:"Seismic Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://node-2.seismicdev.net/rpc"]}},blockExplorers:{default:{name:"Seismic Devnet Explorer",url:"https://explorer-2.seismicdev.net"}},testnet:!0}),XO=f({id:1328,name:"Sei Testnet",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc-testnet.sei-apis.com"],webSocket:["wss://evm-ws-testnet.sei-apis.com"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:98697651}},testnet:!0}),QO=f({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://11155111.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:8928790}},testnet:!0}),Ul=1,JO=f({...j,id:360,name:"Shape",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.shape.network"]}},blockExplorers:{default:{name:"shapescan",url:"https://shapescan.xyz",apiUrl:"https://shapescan.xyz/api"}},contracts:{...j.contracts,l2OutputOracle:{[Ul]:{address:"0x6Ef8c69CfE4635d866e3E02732068022c06e724D",blockCreated:20369940}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1},portal:{[Ul]:{address:"0xEB06fFa16011B5628BaB98E29776361c83741dd3",blockCreated:20369933}},l1StandardBridge:{[Ul]:{address:"0x62Edd5f4930Ea92dCa3fB81689bDD9b9d076b57B",blockCreated:20369935}}},sourceId:Ul}),eB=f({...j,id:11011,name:"Shape Sepolia Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.shape.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer-sepolia.shape.network/",apiUrl:"https://explorer-sepolia.shape.network/api/v2"}},contracts:{...j.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1}},testnet:!0,sourceId:11155111}),tB=f({id:8118,name:"Shardeum",nativeCurrency:{name:"Shardeum",symbol:"SHM",decimals:18},rpcUrls:{default:{http:["https://api.shardeum.org"]}},blockExplorers:{default:{name:"Shardeum Explorer",url:"https://explorer.shardeum.org"}},testnet:!1}),rB=f({id:8082,name:"Shardeum Sphinx",nativeCurrency:{name:"SHARDEUM",symbol:"SHM",decimals:18},rpcUrls:{default:{http:["https://sphinx.shardeum.org"]}},blockExplorers:{default:{name:"Shardeum Explorer",url:"https://explorer-sphinx.shardeum.org"}},testnet:!0}),nB=f({id:109,name:"Shibarium",network:"shibarium",nativeCurrency:{name:"Bone",symbol:"BONE",decimals:18},rpcUrls:{default:{http:["https://rpc.shibrpc.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://shibariumscan.io"}},contracts:{multicall3:{address:"0x864Bf681ADD6052395188A89101A1B37d3B4C961",blockCreated:265900}}}),sB=f({id:157,name:"Puppynet Shibarium",nativeCurrency:{decimals:18,name:"Bone",symbol:"BONE"},rpcUrls:{default:{http:["https://puppynet.shibrpc.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://puppyscan.shib.io",apiUrl:"https://puppyscan.shib.io/api"}},contracts:{multicall3:{address:"0xA4029b74FBA366c926eDFA7Dd10B21C621170a4c",blockCreated:3035769}},testnet:!0}),aB=f({id:336,name:"Shiden",nativeCurrency:{decimals:18,name:"SDN",symbol:"SDN"},rpcUrls:{default:{http:["https://shiden.public.blastapi.io"],webSocket:["wss://shiden-rpc.dwellir.com"]}},blockExplorers:{default:{name:"Shiden Scan",url:"https://shiden.subscan.io"}},testnet:!1}),oB=f({id:148,name:"Shimmer",network:"shimmer",nativeCurrency:{decimals:18,name:"Shimmer",symbol:"SMR"},rpcUrls:{default:{http:["https://json-rpc.evm.shimmer.network"]}},blockExplorers:{default:{name:"Shimmer Network Explorer",url:"https://explorer.evm.shimmer.network",apiUrl:"https://explorer.evm.shimmer.network/api"}}}),iB=f({id:1073,name:"Shimmer Testnet",network:"shimmer-testnet",nativeCurrency:{decimals:18,name:"Shimmer",symbol:"SMR"},rpcUrls:{default:{http:["https://json-rpc.evm.testnet.shimmer.network"]}},blockExplorers:{default:{name:"Shimmer Network Explorer",url:"https://explorer.evm.testnet.shimmer.network",apiUrl:"https://explorer.evm.testnet.shimmer.network/api"}},testnet:!0}),cB=f({id:97453,name:"Sidra Chain",nativeCurrency:{decimals:18,name:"Sidra Digital Asset",symbol:"SDA"},rpcUrls:{default:{http:["https://node.sidrachain.com"]}},blockExplorers:{default:{name:"Sidra Chain Explorer",url:"https://ledger.sidrachain.com"}}}),lB=f({id:380929,name:"Silent Data Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.silentdata.com"]}},blockExplorers:{default:{name:"Silent Data Mainnet Explorer",url:"https://explorer-mainnet.rollup.silentdata.com"}},testnet:!1}),uB=f({id:2355,name:"Silicon zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.silicon.network","https://silicon-mainnet.nodeinfra.com"]}},blockExplorers:{default:{name:"SiliconScope",url:"https://scope.silicon.network"}}}),dB=f({id:1722641160,name:"Silicon Sepolia zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-sepolia.silicon.network","https://silicon-testnet.nodeinfra.com"]}},blockExplorers:{default:{name:"SiliconSepoliaScope",url:"https://scope-sepolia.silicon.network"}},testnet:!0}),fB=f({id:98,name:"Six Protocol",nativeCurrency:{decimals:18,name:"SIX",symbol:"SIX"},rpcUrls:{default:{http:["https://sixnet-rpc-evm.sixprotocol.net"]}},blockExplorers:{default:{name:"Six Protocol Scan",url:"https://sixscan.io/sixnet"}},testnet:!1}),pB=f({id:391845894,name:"SKALE | Block Brawlers",nativeCurrency:{name:"BRAWL",symbol:"BRAWL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/frayed-decent-antares"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/frayed-decent-antares"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://frayed-decent-antares.explorer.mainnet.skalenodes.com"}},contracts:{}}),hB=f({id:1564830818,name:"SKALE Calypso Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/honorable-steel-rasalhague"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3107626}}}),mB=f({id:974399131,name:"SKALE Calypso Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/giant-half-dual-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/giant-half-dual-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://giant-half-dual-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:103220}},testnet:!0}),bB=f({id:1026062157,name:"SKALE | CryptoBlades",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/affectionate-immediate-pollux"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/affectionate-immediate-pollux"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://affectionate-immediate-pollux.explorer.mainnet.skalenodes.com"}},contracts:{}}),yB=f({id:1032942172,name:"SKALE | Crypto Colosseum",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/haunting-devoted-deneb"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/haunting-devoted-deneb"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://haunting-devoted-deneb.explorer.mainnet.skalenodes.com"}},contracts:{}}),gB=f({id:2046399126,name:"SKALE Europa Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/elated-tan-skat"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/elated-tan-skat"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://elated-tan-skat.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3113495}}}),xB=f({id:1444673419,name:"SKALE Europa Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/juicy-low-small-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/juicy-low-small-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://juicy-low-small-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:110858}},testnet:!0}),wB=f({id:2139927552,name:"Exorde Network",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/light-vast-diphda"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/light-vast-diphda"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://light-vast-diphda.explorer.mainnet.skalenodes.com"}},contracts:{}}),vB=f({id:1273227453,name:"SKALE | Human Protocol",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/wan-red-ain"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/wan-red-ain"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://wan-red-ain.explorer.mainnet.skalenodes.com"}},contracts:{}}),kB=f({id:1482601649,name:"SKALE Nebula Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/green-giddy-denebola"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/green-giddy-denebola"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://green-giddy-denebola.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2372986}}}),EB=f({id:37084624,name:"SKALE Nebula Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/lanky-ill-funny-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/lanky-ill-funny-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://lanky-ill-funny-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:105141}},testnet:!0}),CB=f({id:278611351,name:"SKALE | Razor Network",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/turbulent-unique-scheat"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/turbulent-unique-scheat"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://turbulent-unique-scheat.explorer.mainnet.skalenodes.com"}},contracts:{}}),TB=f({id:1187947933,name:"SKALE Base",nativeCurrency:{name:"Credits",symbol:"CREDIT",decimals:18},rpcUrls:{default:{http:["https://skale-base.skalenodes.com/v1/base"],webSocket:["wss://skale-base.skalenodes.com/v1/ws/base"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://skale-base-explorer.skalenodes.com/"}},testnet:!0}),SB=f({id:324705682,name:"SKALE Base Sepolia Testnet",nativeCurrency:{name:"Credits",symbol:"CREDIT",decimals:18},rpcUrls:{default:{http:["https://base-sepolia-testnet.skalenodes.com/v1/base-testnet"],webSocket:["wss://base-sepolia-testnet.skalenodes.com/v1/ws/base-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://base-sepolia-testnet-explorer.skalenodes.com/"}},testnet:!0}),AB=f({id:1350216234,name:"SKALE Titan Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/parallel-stormy-spica"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/parallel-stormy-spica"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://parallel-stormy-spica.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2076458}}}),PB=f({id:1020352220,name:"SKALE Titan Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/aware-fake-trim-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/aware-fake-trim-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://aware-fake-trim-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:104072}},testnet:!0}),IB=f({id:984123,name:"Forma Sketchpad",network:"sketchpad",nativeCurrency:{symbol:"TIA",name:"TIA",decimals:18},rpcUrls:{default:{http:["https://rpc.sketchpad-1.forma.art"],webSocket:["wss://ws.sketchpad-1.forma.art"]}},blockExplorers:{default:{name:"Sketchpad Explorer",url:"https://explorer.sketchpad-1.forma.art"}},testnet:!0}),yi=1,UB=f({...j,id:2192,network:"snaxchain-mainnet",name:"SnaxChain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.snaxchain.io"]}},blockExplorers:{default:{name:"Snax Explorer",url:"https://explorer.snaxchain.io",apiUrl:"https://explorer.snaxchain.io/api"}},contracts:{...j.contracts,disputeGameFactory:{[yi]:{address:"0x472562Fcf26D6b2793f8E0b0fB660ba0E5e08A46"}},l2OutputOracle:{[yi]:{address:"0x2172e492Fc807F5d5645D0E3543f139ECF539294"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[yi]:{address:"0x79f446D024d74D0Bb6E699C131c703463c5D65E9"}},l1StandardBridge:{[yi]:{address:"0x6534Bdb6b5c060d3e6aa833433333135eFE8E0aA"}}},sourceId:yi}),gi=11155111,OB=f({...j,id:13001,network:"snaxchain-testnet",name:"SnaxChain Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.snaxchain.io"]}},blockExplorers:{default:{name:"Snax Explorer",url:"https://testnet-explorer.snaxchain.io",apiUrl:"https://testnet-explorer.snaxchain.io/api"}},contracts:{...j.contracts,disputeGameFactory:{[gi]:{address:"0x206a75d89d45F146C54020F132FF93bEDD09f55E"}},l2OutputOracle:{[gi]:{address:"0x60e3A368a4cdCEf85ffB964e372726F56A46221e"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[gi]:{address:"0xb5afdd0E8dDF081Ef90e8A3e0c7b5798e66E954E"}},l1StandardBridge:{[gi]:{address:"0xbd37E1a59D4C00C9A46F75018dffd84061bC5f74"}}},testnet:!0,sourceId:gi}),BB=f({id:5031,name:"Somnia",nativeCurrency:{name:"Somnia",symbol:"SOMI",decimals:18},rpcUrls:{default:{http:["https://api.infra.mainnet.somnia.network"]}},blockExplorers:{default:{name:"Somnia Explorer",url:"https://explorer.somnia.network",apiUrl:"https://explorer.somnia.network/api"}},testnet:!1}),MB=f({id:50312,name:"Somnia Testnet",nativeCurrency:{name:"STT",symbol:"STT",decimals:18},rpcUrls:{default:{http:["https://dream-rpc.somnia.network"]}},blockExplorers:{default:{name:"Somnia Testnet Explorer",url:"https://shannon-explorer.somnia.network/",apiUrl:"https://shannon-explorer.somnia.network/api"}},contracts:{multicall3:{address:"0x841b8199E6d3Db3C6f264f6C2bd8848b3cA64223",blockCreated:71314235}},testnet:!0}),xi=1,_B=f({...j,id:1868,name:"Soneium Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.soneium.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://soneium.blockscout.com",apiUrl:"https://soneium.blockscout.com/api"}},contracts:{...j.contracts,disputeGameFactory:{[xi]:{address:"0x512a3d2c7a43bd9261d2b8e8c9c70d4bd4d503c0"}},l2OutputOracle:{[xi]:{address:"0x0000000000000000000000000000000000000000"}},portal:{[xi]:{address:"0x88e529a6ccd302c948689cd5156c83d4614fae92",blockCreated:7061266}},l1StandardBridge:{[xi]:{address:"0xeb9bf100225c214efc3e7c651ebbadcf85177607",blockCreated:7061266}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}},sourceId:xi}),wi=11155111,DB=f({...j,id:1946,name:"Soneium Minato Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.minato.soneium.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://soneium-minato.blockscout.com",apiUrl:"https://soneium-minato.blockscout.com/api"}},contracts:{...j.contracts,disputeGameFactory:{[wi]:{address:"0xB3Ad2c38E6e0640d7ce6aA952AB3A60E81bf7a01"}},l2OutputOracle:{[wi]:{address:"0x710e5286C746eC38beeB7538d0146f60D27be343"}},portal:{[wi]:{address:"0x65ea1489741A5D72fFdD8e6485B216bBdcC15Af3",blockCreated:6466136}},l1StandardBridge:{[wi]:{address:"0x5f5a404A5edabcDD80DB05E8e54A78c9EBF000C2",blockCreated:6466136}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}},testnet:!0,sourceId:wi}),FB=f({id:19,name:"Songbird Canary-Network",nativeCurrency:{decimals:18,name:"Songbird",symbol:"SGB"},rpcUrls:{default:{http:["https://songbird-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Songbird Explorer",url:"https://songbird-explorer.flare.network",apiUrl:"https://songbird-explorer.flare.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13382504}}}),NB=f({id:16,name:"Songbird Testnet Coston",nativeCurrency:{decimals:18,name:"Coston Flare",symbol:"CFLR"},rpcUrls:{default:{http:["https://coston-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Coston Explorer",url:"https://coston-explorer.flare.network",apiUrl:"https://coston-explorer.flare.network/api"}},testnet:!0}),zB=f({id:146,name:"Sonic",blockTime:630,nativeCurrency:{decimals:18,name:"Sonic",symbol:"S"},rpcUrls:{default:{http:["https://rpc.soniclabs.com"]}},blockExplorers:{default:{name:"Sonic Explorer",url:"https://sonicscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:60}},testnet:!1}),LB=f({id:57054,name:"Sonic Blaze Testnet",nativeCurrency:{decimals:18,name:"Sonic",symbol:"S"},rpcUrls:{default:{http:["https://rpc.blaze.soniclabs.com"]}},blockExplorers:{default:{name:"Sonic Blaze Testnet Explorer",url:"https://testnet.sonicscan.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1100}},testnet:!0}),RB=f({id:64165,name:"Sonic Testnet",nativeCurrency:{decimals:18,name:"Sonic",symbol:"S"},rpcUrls:{default:{http:["https://rpc.testnet.soniclabs.com"]}},blockExplorers:{default:{name:"Sonic Testnet Explorer",url:"https://testnet.soniclabs.com/"}},testnet:!0}),HB=f({...ar,blockTime:200,id:50104,name:"Sophon",nativeCurrency:{decimals:18,name:"Sophon",symbol:"SOPH"},rpcUrls:{default:{http:["https://rpc.sophon.xyz"],webSocket:["wss://rpc.sophon.xyz/ws"]}},blockExplorers:{default:{name:"Sophon Block Explorer",url:"https://explorer.sophon.xyz"}},contracts:{multicall3:{address:"0x5f4867441d2416cA88B1b3fd38f21811680CD2C8",blockCreated:116}},testnet:!1}),$B=f({...ar,blockTime:200,id:531050104,name:"Sophon Testnet",nativeCurrency:{decimals:18,name:"Sophon",symbol:"SOPH"},rpcUrls:{default:{http:["https://rpc.testnet.sophon.xyz"],webSocket:["wss://rpc.testnet.sophon.xyz/ws"]}},blockExplorers:{default:{name:"Sophon Block Explorer",url:"https://explorer.testnet.sophon.xyz"}},contracts:{multicall3:{address:"0x83c04d112adedA2C6D9037bb6ecb42E7f0b108Af",blockCreated:15642}},testnet:!0}),GB=f({id:100021,name:"Sova",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.sova.io"]}},blockExplorers:{default:{name:"Sova Block Explorer",url:"hhttps://explorer.sova.io"}},testnet:!1}),jB=f({id:120893,name:"Sova Network Sepolia",nativeCurrency:{decimals:18,name:"Sepolia Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.testnet.sova.io"]}},blockExplorers:{default:{name:"Sova Sepolia Explorer",url:"https://explorer.testnet.sova.io"}},testnet:!0}),VB=f({id:88882,name:"Chiliz Spicy Testnet",network:"chiliz-spicy-Testnet",nativeCurrency:{decimals:18,name:"CHZ",symbol:"CHZ"},rpcUrls:{default:{http:["https://spicy-rpc.chiliz.com","https://chiliz-spicy-rpc.publicnode.com"],webSocket:["wss://spicy-rpc-ws.chiliz.com","wss://chiliz-spicy-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Chiliz Explorer",url:"http://spicy-explorer.chiliz.com",apiUrl:"http://spicy-explorer.chiliz.com/api"}},testnet:!0}),WB=f({id:2201,name:"Stable Testnet",nativeCurrency:{decimals:18,name:"gUSDT",symbol:"gUSDT"},rpcUrls:{default:{http:["https://rpc.testnet.stable.xyz"],webSocket:["wss://rpc.testnet.stable.xyz"]}},blockExplorers:{default:{name:"Stablescan",url:"https://testnet.stablescan.xyz",apiUrl:"https://testnet.stablescan.xyz/api"}},testnet:!0}),Oy=f({...Zf,id:1660990954,name:"Status Network Sepolia",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://public.sepolia.rpc.status.network"],webSocket:["wss://public.sepolia.rpc.status.network/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepoliascan.status.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1578364}},testnet:!0}),qB=f({id:1234,name:"Step Network",nativeCurrency:{name:"FITFI",symbol:"FITFI",decimals:18},rpcUrls:{default:{http:["https://rpc.step.network"]}},blockExplorers:{default:{name:"Step Scan",url:"https://stepscan.io"}},testnet:!1}),YB=f({id:1514,name:"Story",nativeCurrency:{decimals:18,name:"IP Token",symbol:"IP"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:340998},ensRegistry:{address:"0x5dc881dda4e4a8d312be3544ad13118d1a04cb17",blockCreated:648924},ensUniversalResolver:{address:"0xddfb18888a9466688235887dec2a10c4f5effee9",blockCreated:649114}},rpcUrls:{default:{http:["https://mainnet.storyrpc.io"]}},blockExplorers:{default:{name:"Story explorer",url:"https://storyscan.io",apiUrl:"https://storyscan.io/api/v2"}},ensTlds:[".ip"],testnet:!1}),KB=f({id:1315,name:"Story Aeneid",network:"story-aeneid",nativeCurrency:{decimals:18,name:"IP",symbol:"IP"},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1792},ensRegistry:{address:"0x5dC881dDA4e4a8d312be3544AD13118D1a04Cb17",blockCreated:1322033},ensUniversalResolver:{address:"0x6D3B3F99177FB2A5de7F9E928a9BD807bF7b5BAD",blockCreated:1322097}},rpcUrls:{default:{http:["https://aeneid.storyrpc.io"]}},blockExplorers:{default:{name:"Story Aeneid Explorer",url:"https://aeneid.storyscan.io",apiUrl:"https://aeneid.storyscan.io/api/v2"}},ensTlds:[".ip"],testnet:!0}),ZB=f({id:1516,name:"Story Odyssey",nativeCurrency:{decimals:18,name:"IP",symbol:"IP"},rpcUrls:{default:{http:["https://rpc.odyssey.storyrpc.io"]}},blockExplorers:{default:{name:"Story Odyssey Explorer",url:"https://odyssey.storyscan.xyz"}},testnet:!0}),XB=f({id:1513,name:"Story Testnet",nativeCurrency:{decimals:18,name:"IP",symbol:"IP"},rpcUrls:{default:{http:["https://testnet.storyrpc.io"]}},blockExplorers:{default:{name:"Story Testnet Explorer",url:"https://testnet.storyscan.xyz"}},testnet:!0}),QB=f({id:105105,name:"Stratis Mainnet",network:"stratis",nativeCurrency:{name:"Stratis",symbol:"STRAX",decimals:18},rpcUrls:{default:{http:["https://rpc.stratisevm.com"]}},blockExplorers:{default:{name:"Stratis Explorer",url:"https://explorer.stratisevm.com"}}}),JB=f({id:8866,name:"SuperLumio",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.lumio.io"]}},blockExplorers:{default:{name:"Lumio explorer",url:"https://explorer.lumio.io"}},testnet:!1}),eM=f({id:55244,name:"Superposition",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.superposition.so"]}},blockExplorers:{default:{name:"Superposition Explorer",url:"https://explorer.superposition.so"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:39}},testnet:!1}),vi=1,tM=f({...j,id:5330,name:"Superseed",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.superseed.xyz"]}},blockExplorers:{default:{name:"Superseed Explorer",url:"https://explorer.superseed.xyz",apiUrl:"https://explorer.superseed.xyz/api/v2"}},contracts:{...j.contracts,disputeGameFactory:{[vi]:{address:"0x8b097CF1f9BbD9cbFD0DD561858a1FCbC8857Be0",blockCreated:20737481}},l2OutputOracle:{[vi]:{address:"0x693A0F8854F458D282DE3C5b69E8eE5EEE8aA949",blockCreated:20737481}},portal:{[vi]:{address:"0x2c2150aa5c75A24fB93d4fD2F2a895D618054f07",blockCreated:20737481}},l1StandardBridge:{[vi]:{address:"0x8b0576E39F1233679109F9b40cFcC2a7E0901Ede",blockCreated:20737481}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},sourceId:vi}),Xf=11155111,rM=f({...j,id:53302,name:"Superseed Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.superseed.xyz"]}},blockExplorers:{default:{name:"Superseed Sepolia Explorer",url:"https://sepolia-explorer.superseed.xyz",apiUrl:"https://sepolia-explorer.superseed.xyz/api/v2"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"},portal:{[Xf]:{address:"0x7A0db8C51432d2C3eb4e8f360a2EeB26FF2809fB",blockCreated:5523438}},l1StandardBridge:{[Xf]:{address:"0x2B227A603fAAdB3De0ED050b63ADD232B5f2c28C",blockCreated:5523442}}},testnet:!0,sourceId:Xf}),nM=f({id:763375,name:"Surge Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://l2-rpc.hoodi.surge.wtf"],webSocket:["wss://l2-ws.hoodi.surge.wtf"]}},blockExplorers:{default:{name:"Surge Testnet Blockscout",url:"https://explorer.hoodi.surge.wtf"}},testnet:!0}),sM=f({id:254,name:"Swan Chain Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.swanchain.org"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://swanscan.io"}},testnet:!1}),aM=f({id:20241133,name:"Swan Proxima Testnet",nativeCurrency:{name:"Swan Ether",symbol:"sETH",decimals:18},rpcUrls:{default:{http:["https://rpc-proxima.swanchain.io"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://proxima-explorer.swanchain.io"}},testnet:!0}),oM=f({id:2024,name:"Swan Saturn Testnet",nativeCurrency:{name:"Swan Ether",symbol:"sETH",decimals:18},rpcUrls:{default:{http:["https://saturn-rpc.swanchain.io"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://saturn-explorer.swanchain.io"}},testnet:!0}),iM=f({...j,id:1923,name:"Swellchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://swell-mainnet.alt.technology"]}},blockExplorers:{default:{name:"Swell Explorer",url:"https://explorer.swellnetwork.io",apiUrl:"https://explorer.swellnetwork.io/api"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}}}),cM=f({...j,id:1924,name:"Swellchain Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://swell-testnet.alt.technology"]}},blockExplorers:{default:{name:"Swellchain Testnet Explorer",url:"https://swell-testnet-explorer.alt.technology",apiUrl:"https://swell-testnet-explorer.alt.technology/api"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}}}),lM=f({id:94,name:"SwissDLT Mainnet",nativeCurrency:{decimals:18,name:"BCTS",symbol:"BCTS"},rpcUrls:{default:{http:["https://rpc.swissdlt.ch"]}},blockExplorers:{default:{name:"SwissDLT Explorer",url:"https://explorer.swissdlt.ch"}},testnet:!1}),uM=f({id:57,name:"Syscoin Mainnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.syscoin.org"],webSocket:["wss://rpc.syscoin.org/wss"]}},blockExplorers:{default:{name:"SyscoinExplorer",url:"https://explorer.syscoin.org",apiUrl:"https://explorer.syscoin.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:287139}}}),dM=f({id:5700,name:"Syscoin Tanenbaum Testnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.tanenbaum.io"],webSocket:["wss://rpc.tanenbaum.io/wss"]}},blockExplorers:{default:{name:"SyscoinTestnetExplorer",url:"https://tanenbaum.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:271288}}}),fM=f({id:239,name:"TAC",nativeCurrency:{name:"TAC",symbol:"TAC",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/tac"]}},blockExplorers:{default:{name:"Blockscout",url:"https://tac.blockscout.com",apiUrl:"https://tac.blockscout.com/api"},native:{name:"TAC Explorer",url:"https://explorer.tac.build",apiUrl:"https://explorer.tac.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}}}),pM=f({id:2391,name:"TAC SPB Testnet",nativeCurrency:{name:"TAC",symbol:"TAC",decimals:18},rpcUrls:{default:{http:["https://spb.rpc.tac.build"]}},blockExplorers:{default:{name:"TAC",url:"https://spb.explorer.tac.build",apiUrl:"https://spb.explorer.tac.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:471429}},testnet:!0}),hM=f({id:167e3,name:"Taiko Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.mainnet.taiko.xyz"],webSocket:["wss://ws.mainnet.taiko.xyz"]}},blockExplorers:{default:{name:"Etherscan",url:"https://taikoscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:11269}}}),mM=f({id:167009,name:"Taiko Hekla L2",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hekla.taiko.xyz"]}},blockExplorers:{default:{name:"Taikoscan",url:"https://hekla.taikoscan.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:59757}},testnet:!0}),bM=f({id:167013,name:"Taiko Hoodi",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hoodi.taiko.xyz"],webSocket:["wss://ws.hoodi.taiko.xyz"]}},blockExplorers:{default:{name:"Etherscan",url:"https://hoodi.taikoscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:581116}},testnet:!0}),yM=f({id:167007,name:"Taiko Jolnir (Alpha-5 Testnet)",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.jolnir.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.jolnir.taiko.xyz"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:732706}},testnet:!0}),gM=f({id:167008,name:"Taiko Katla (Alpha-6 Testnet)",network:"tko-katla",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.katla.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.katla.taiko.xyz"}}}),xM=f({id:167005,name:"Taiko (Alpha-3 Testnet)",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.test.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.test.taiko.xyz"}}}),wM=f({id:841,name:"Taraxa Mainnet",nativeCurrency:{name:"Tara",symbol:"TARA",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.taraxa.io"]}},blockExplorers:{default:{name:"Taraxa Explorer",url:"https://explorer.mainnet.taraxa.io"}}}),vM=f({id:842,name:"Taraxa Testnet",nativeCurrency:{name:"Tara",symbol:"TARA",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.taraxa.io"]}},blockExplorers:{default:{name:"Taraxa Explorer",url:"https://explorer.testnet.taraxa.io"}},testnet:!0}),kM=f({id:10218,name:"Tea Sepolia",nativeCurrency:{name:"Sepolia Tea",symbol:"TEA",decimals:18},rpcUrls:{default:{http:["https://tea-sepolia.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Tea Sepolia Explorer",url:"https://sepolia.tea.xyz"}},testnet:!0}),EM=f({id:2017,name:"Telcoin Adiri Testnet",nativeCurrency:{name:"Telcoin",symbol:"TEL",decimals:18},rpcUrls:{default:{http:["https://rpc.telcoin.network"]}},blockExplorers:{default:{name:"telscan",url:"https://telscan.io"}},testnet:!0}),CM=f({id:40,name:"Telos",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://rpc.telos.net"]}},blockExplorers:{default:{name:"Teloscan",url:"https://www.teloscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:246530709}}}),TM=f({id:41,name:"Telos",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://rpc.testnet.telos.net"]}},blockExplorers:{default:{name:"Teloscan (testnet)",url:"https://testnet.teloscan.io/"}},testnet:!0});/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const By=_a(BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff")),SM=By.create(BigInt("-3")),AM=BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),PM=Jc({a:SM,b:AM,Fp:By,n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"),h:BigInt(1),lowS:!1},Td),My=_a(BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff")),IM=My.create(BigInt("-3")),UM=BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef");Jc({a:IM,b:UM,Fp:My,n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f"),h:BigInt(1),lowS:!1},d8);const _y=_a(BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")),OM=_y.create(BigInt("-3")),BM=BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00");Jc({a:OM,b:BM,Fp:_y,n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650"),h:BigInt(1),lowS:!1,allowedPrivateKeyLengths:[130,131,132]},u8);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const MM=PM;function Dy(e){const{hash:t,payload:r,publicKey:n,signature:s}=e;return MM.verify(s,r instanceof Uint8Array?r:Zn(r),pf(n).substring(2),...t?[{prehash:!0,lowS:!0}]:[])}const _M=new TextEncoder;Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[t,e.charCodeAt(0)]);const Ol={...Object.fromEntries(Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[e.charCodeAt(0),t])),61:0,45:62,95:63};function DM(e){const t=e.replace(/=+$/,""),r=t.length,n=new Uint8Array(r+3);_M.encodeInto(t+"===",n);for(let a=0,o=0;a<t.length;a+=4,o+=3){const i=(Ol[n[a]]<<18)+(Ol[n[a+1]]<<12)+(Ol[n[a+2]]<<6)+Ol[n[a+3]];n[o]=i>>16,n[o+1]=i>>8&255,n[o+2]=i&255}const s=(r>>2)*3+(r%4&&r%4-1);return new Uint8Array(n.buffer,0,s)}Uint8Array.from([105,171,180,181,160,222,75,198,42,42,32,31,141,37,186,233]);function FM(e){const{challenge:t,hash:r=!0,metadata:n,publicKey:s,signature:a}=e,{authenticatorData:o,challengeIndex:i,clientDataJSON:c,typeIndex:l,userVerificationRequired:u}=n,d=Zn(o);if(d.length<37)return!1;const p=d[32];if((p&1)!==1||u&&(p&4)!==4||(p&8)!==8&&(p&16)===16)return!1;if(l!==void 0){const w='"type":"webauthn.get"';if(w!==c.slice(Number(l),w.length+1))return!1}const h=i!==void 0?c.slice(Number(i)).match(/^"challenge":"(.*?)"/):c.match(/"challenge":"(.*?)"/);if(!h)return!1;const[y,g]=h;if(Et(DM(g))!==t)return!1;const k=Bk(C1(c),{as:"Bytes"}),v=_8(d,k);return Dy({hash:r,payload:v,publicKey:s,signature:a})}const Qf="0x01",Jf="0x02",Fy="0x03",Ns="0x7777777777777777777777777777777777777777777777777777777777777777";function La(e){const t=e.endsWith(Ns.slice(2))?Pe(e,0,-ft(Ns)):e;if(ft(t)===65){const o=_f(t);return el(o),{signature:o,type:"secp256k1"}}const n=Pe(t,0,1),s=Pe(t,1),a=ft(s);if(n===Qf){if(a!==129)throw new Ci({reason:`Invalid P256 signature envelope size: expected 129 bytes, got ${a} bytes`,serialized:t});return{publicKey:{prefix:4,x:pt(Pe(s,64,96)),y:pt(Pe(s,96,128))},prehash:ei(Pe(s,128,129))!==0,signature:{r:pt(Pe(s,0,32)),s:pt(Pe(s,32,64))},type:"p256"}}if(n===Jf){if(a<128)throw new Ci({reason:`Invalid WebAuthn signature envelope size: expected at least 128 bytes, got ${a} bytes`,serialized:t});const o=a-128,i=Pe(s,0,o);let c,l;for(let u=37;u<o;u++){const d=I1(Pe(i,u));if(d.startsWith("{")&&d.endsWith("}"))try{JSON.parse(d),c=Pe(i,0,u),l=d;break}catch{}}if(!c||!l)throw new Ci({reason:"Unable to parse WebAuthn metadata: could not extract valid authenticatorData and clientDataJSON",serialized:t});return{publicKey:{prefix:4,x:pt(Pe(s,o+64,o+96)),y:pt(Pe(s,o+96,o+128))},metadata:{authenticatorData:c,clientDataJSON:l},signature:{r:pt(Pe(s,o,o+32)),s:pt(Pe(s,o+32,o+64))},type:"webAuthn"}}if(n===Fy){const o=Pe(s,0,20),i=La(Pe(s,20));return{userAddress:o,inner:i,type:"keychain"}}throw new Ci({reason:`Unknown signature type identifier: ${n}. Expected ${Qf} (P256) or ${Jf} (WebAuthn)`,serialized:t})}function ki(e){if(typeof e=="string")return La(e);if(typeof e=="object"&&e!==null&&"r"in e&&"s"in e&&"yParity"in e)return{signature:e,type:"secp256k1"};const t=ep(e);return{...e,...t==="p256"?{prehash:e.prehash}:{},type:t}}function Bl(e){if(e.type==="secp256k1")return{signature:Df(e),type:"secp256k1"};if(e.type==="p256")return{prehash:e.preHash,publicKey:{prefix:4,x:pt(e.pubKeyX),y:pt(e.pubKeyY)},signature:{r:pt(e.r),s:pt(e.s)},type:"p256"};if(e.type==="webAuthn"){const t=e.webauthnData,r=ft(t);let n,s;for(let a=37;a<r;a++){const o=I1(Pe(t,a));if(o.startsWith("{")&&o.endsWith("}"))try{JSON.parse(o),n=Pe(t,0,a),s=o;break}catch{}}if(!n||!s)throw new Ci({reason:"Unable to parse WebAuthn metadata: could not extract valid authenticatorData and clientDataJSON",serialized:t});return{metadata:{authenticatorData:n,clientDataJSON:s},publicKey:{prefix:4,x:pt(e.pubKeyX),y:pt(e.pubKeyY)},signature:{r:pt(e.r),s:pt(e.s)},type:"webAuthn"}}if(e.type==="keychain"||"userAddress"in e&&"signature"in e)return{type:"keychain",userAddress:e.userAddress,inner:Bl(e.signature)};throw new Ei({envelope:e})}function ep(e){if(typeof e!="object"||e===null)throw new Ei({envelope:e});if("type"in e&&e.type)return e.type;if("signature"in e&&!("publicKey"in e)&&typeof e.signature=="object"&&e.signature!==null&&"r"in e.signature&&"s"in e.signature&&"yParity"in e.signature||"r"in e&&"s"in e&&"yParity"in e)return"secp256k1";if("signature"in e&&"prehash"in e&&"publicKey"in e&&typeof e.prehash=="boolean")return"p256";if("signature"in e&&"metadata"in e&&"publicKey"in e)return"webAuthn";if("userAddress"in e&&"inner"in e)return"keychain";throw new Ei({envelope:e})}function Ml(e,t={}){const r=ep(e);if(r==="secp256k1")return lt(KE(e.signature),t.magic?Ns:"0x");if(r==="p256"){const n=e;return lt(Qf,X(n.signature.r,{size:32}),X(n.signature.s,{size:32}),X(n.publicKey.x,{size:32}),X(n.publicKey.y,{size:32}),X(n.prehash?1:0,{size:1}),t.magic?Ns:"0x")}if(r==="webAuthn"){const n=e,s=lt(n.metadata.authenticatorData,Jo(n.metadata.clientDataJSON));return lt(Jf,s,X(n.signature.r,{size:32}),X(n.signature.s,{size:32}),X(n.publicKey.x,{size:32}),X(n.publicKey.y,{size:32}),t.magic?Ns:"0x")}if(r==="keychain"){const n=e;return lt(Fy,n.userAddress,Ml(n.inner),t.magic?Ns:"0x")}throw new Ei({envelope:e})}function tp(e){const t=ep(e);if(t==="secp256k1")return{...ny(e.signature),type:"secp256k1"};if(t==="p256"){const r=e;return{preHash:r.prehash,pubKeyX:X(r.publicKey.x,{size:32}),pubKeyY:X(r.publicKey.y,{size:32}),r:X(r.signature.r,{size:32}),s:X(r.signature.s,{size:32}),type:"p256"}}if(t==="webAuthn"){const r=e,n=lt(r.metadata.authenticatorData,Jo(r.metadata.clientDataJSON));return{pubKeyX:X(r.publicKey.x,{size:32}),pubKeyY:X(r.publicKey.y,{size:32}),r:X(r.signature.r,{size:32}),s:X(r.signature.s,{size:32}),type:"webAuthn",webauthnData:n}}if(t==="keychain"){const r=e;return{type:"keychain",userAddress:r.userAddress,signature:tp(r.inner)}}throw new Ei({envelope:e})}function NM(e,t){const{payload:r}=t,n=(()=>{if(t.address)return t.address;if(t.publicKey)return Xc(t.publicKey)})();if(!n)return!1;const s=ki(e);if(s.type==="secp256k1")return n?oC({address:n,payload:r,signature:s.signature}):!1;if(s.type==="p256"){const a=Xc(s.publicKey);return mf(a,n)?Dy({hash:s.prehash,publicKey:s.publicKey,payload:r,signature:s.signature}):!1}if(s.type==="webAuthn"){const a=Xc(s.publicKey);return mf(a,n)?FM({challenge:zc(r),metadata:s.metadata,publicKey:s.publicKey,signature:s.signature}):!1}throw new zM(`Unable to verify signature envelope of type "${s.type}".`)}class Ei extends ae{constructor({envelope:t}){super(`Unable to coerce value (\`${Qo(t)}\`) to a valid signature envelope.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.CoercionError"})}}let Ci=class extends ae{constructor({reason:t,serialized:r}){super(`Unable to deserialize signature envelope: ${t}`,{metaMessages:[`Serialized: ${r}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.InvalidSerializedError"})}};class zM extends ae{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.VerificationError"})}}function LM(e,t={}){return typeof e.chainId=="string"?Ny(e):t.signature?{...e,signature:t.signature}:e}function Ny(e){const{address:t,chainId:r,nonce:n}=e,s=Bl(e.signature);return{address:t,chainId:Number(r),nonce:BigInt(n),signature:s}}function RM(e){return e.map(t=>Ny(t))}function HM(e){const[t,r,n,s]=e,a={address:r,chainId:t==="0x"?0:Number(t),nonce:n==="0x"?0n:BigInt(n)};return s&&(a.signature=La(s)),LM(a)}function $M(e){const t=[];for(const r of e)t.push(HM(r));return t}function GM(e){const{address:t,chainId:r,nonce:n,signature:s}=e;return{address:t,chainId:X(r),nonce:X(n),signature:tp(s)}}function jM(e){return e.map(t=>GM(t))}function VM(e){const{address:t,chainId:r,nonce:n}=e,s=e.signature?Ml(e.signature):void 0;return[r?X(r):"0x",t,n?X(n):"0x",...s?[s]:[]]}function WM(e){if(!e||e.length===0)return[];const t=[];for(const r of e)t.push(VM(r));return t}function qM(e,t={}){return typeof e.expiry=="string"?zy(e):t.signature?{...e,signature:ki(t.signature)}:e}function zy(e){const{chainId:t="0x0",keyId:r,expiry:n=0,limits:s,keyType:a}=e,o=Bl(e.signature);return{address:r,chainId:t==="0x"?0n:pt(t),expiry:Number(n),limits:s==null?void 0:s.map(i=>({token:i.token,limit:BigInt(i.limit)})),signature:o,type:a}}function YM(e){const[t,r]=e,[n,s,a,o,i]=t,c=(()=>{switch(s){case"0x":case"0x00":return"secp256k1";case"0x01":return"p256";case"0x02":return"webAuthn";default:throw new Error(`Invalid key type: ${s}`)}})(),l={address:a,expiry:typeof o<"u"?ei(o):void 0,type:c,...n!=="0x"?{chainId:pt(n)}:{},...typeof o<"u"?{expiry:ei(o)}:{},...typeof i<"u"?{limits:i.map(([u,d])=>({token:u,limit:BigInt(d)}))}:{}};return r&&(l.signature=La(r)),qM(l)}function KM(e){const{address:t,chainId:r=0n,expiry:n,limits:s,type:a,signature:o}=e;return{chainId:r===0n?"0x":X(r),expiry:typeof n=="number"?X(n):null,limits:s==null?void 0:s.map(({token:i,limit:c})=>({token:i,limit:X(c)})),keyId:t,signature:tp(o),keyType:a}}function ZM(e){const{address:t,chainId:r=0n,expiry:n,limits:s}=e,a=e.signature?Ml(e.signature):void 0,o=(()=>{switch(e.type){case"secp256k1":return"0x";case"p256":return"0x01";case"webAuthn":return"0x02";default:throw new Error(`Invalid key type: ${e.type}`)}})();return[[r===0n?"0x":X(r),o,t,typeof n=="number"?X(n):void 0,(s==null?void 0:s.map(c=>[c.token,X(c.limit)]))??void 0].filter(Boolean),...a?[a]:[]]}const XM="0x20c0";function Ly(e){if(typeof e=="string")return Ur(e),e;const t=X(e,{size:18});return lt(XM,t)}const Ry={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"},Hy={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function QM(e,t={}){if(!e)return null;const r=ry(e),n={...e,...r};return n.blockNumber=e.blockNumber?BigInt(e.blockNumber):null,n.data=e.input,n.gas=BigInt(e.gas??0n),n.nonce=BigInt(e.nonce??0n),n.transactionIndex=e.transactionIndex?Number(e.transactionIndex):null,n.value=BigInt(e.value??0n),e.authorizationList&&(n.authorizationList=rC(e.authorizationList)),e.chainId&&(n.chainId=Number(e.chainId)),e.gasPrice&&(n.gasPrice=BigInt(e.gasPrice)),e.maxFeePerBlobGas&&(n.maxFeePerBlobGas=BigInt(e.maxFeePerBlobGas)),e.maxFeePerGas&&(n.maxFeePerGas=BigInt(e.maxFeePerGas)),e.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=BigInt(e.maxPriorityFeePerGas)),e.type&&(n.type=Hy[e.type]??e.type),r&&(n.v=Nf(r.yParity)),n}const $y={...Ry,tempo:"0x76"},JM={...Hy,"0x76":"tempo"};function e_(e,t={}){if(!e)return null;const r=QM(e);return r.type=JM[e.type],e.aaAuthorizationList&&(r.authorizationList=RM(e.aaAuthorizationList),delete r.aaAuthorizationList),e.calls&&(r.calls=e.calls.map(n=>({to:n.to,value:n.value&&n.value!=="0x"?BigInt(n.value):void 0,data:n.input||n.data||"0x"}))),e.feeToken&&(r.feeToken=e.feeToken),e.nonceKey&&(r.nonceKey=BigInt(e.nonceKey)),e.signature&&(r.signature=Bl(e.signature)),e.validAfter&&(r.validAfter=Number(e.validAfter)),e.validBefore&&(r.validBefore=Number(e.validBefore)),e.keyAuthorization&&(r.keyAuthorization=zy(e.keyAuthorization)),e.feePayerSignature&&(r.feePayerSignature=Df(e.feePayerSignature),r.feePayerSignature.v=Nf(r.feePayerSignature.yParity)),r}function t_(e){const t={};return typeof e.accessList<"u"&&(t.accessList=e.accessList),typeof e.authorizationList<"u"&&(t.authorizationList=sC(e.authorizationList)),typeof e.blobVersionedHashes<"u"&&(t.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(t.blobs=e.blobs),typeof e.chainId<"u"&&(t.chainId=X(e.chainId)),typeof e.data<"u"?(t.data=e.data,t.input=e.data):typeof e.input<"u"&&(t.data=e.input,t.input=e.input),typeof e.from<"u"&&(t.from=e.from),typeof e.gas<"u"&&(t.gas=X(e.gas)),typeof e.gasPrice<"u"&&(t.gasPrice=X(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(t.maxFeePerBlobGas=X(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(t.maxFeePerGas=X(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=X(e.maxPriorityFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=X(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(t.nonce=X(e.nonce)),typeof e.to<"u"&&(t.to=e.to),typeof e.type<"u"&&(t.type=Ry[e.type]||e.type),typeof e.value<"u"&&(t.value=X(e.value)),t}function r_(e){const t=t_({...e,authorizationList:void 0});e.authorizationList&&(t.authorizationList=jM(e.authorizationList)),e.calls&&(t.calls=e.calls.map(n=>({to:n.to,value:n.value?X(n.value):"0x",data:n.data??"0x"}))),typeof e.feeToken<"u"&&(t.feeToken=Ly(e.feeToken)),e.keyAuthorization&&(t.keyAuthorization=KM(e.keyAuthorization)),typeof e.validBefore<"u"&&(t.validBefore=X(e.validBefore)),typeof e.validAfter<"u"&&(t.validAfter=X(e.validAfter));const r=(()=>{if(e.nonceKey==="random")return P1(6);if(typeof e.nonceKey=="bigint")return X(e.nonceKey)})();return r&&(t.nonceKey=r),(typeof e.calls<"u"||typeof e.feeToken<"u"||typeof e.keyAuthorization<"u"||typeof e.nonceKey<"u"||typeof e.validBefore<"u"||typeof e.validAfter<"u"||e.type==="tempo")&&(t.type=$y.tempo,delete t.data,delete t.input,delete t.to,delete t.value),t}function n_(e){const t=[];for(let r=0;r<e.length;r++){const[n,s]=e[r];n&&Ur(n,{strict:!1}),t.push({address:n,storageKeys:s.map(a=>Mk(a)?a:$d(a))})}return t}function s_(e){if(!e||e.length===0)return[];const t=[];for(const{address:r,storageKeys:n}of e){for(let s=0;s<n.length;s++)if(ft(n[s])!==32)throw new a_({storageKey:n[s]});r&&Ur(r,{strict:!1}),t.push([r,n])}return t}class a_ extends ae{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${ft(t)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccessList.InvalidStorageKeySizeError"})}}const Gy={wei:0,gwei:9,szabo:12,finney:15,ether:18};function o_(e,t=0){let r=e.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[s,a]=[r.slice(0,r.length-t),r.slice(r.length-t)];return a=a.replace(/(0+)$/,""),`${n?"-":""}${s||"0"}${a?`.${a}`:""}`}function rp(e,t="wei"){return o_(e,Gy.gwei-Gy[t])}class i_ extends ae{constructor({feeCap:t}={}){super(`The fee cap (\`maxFeePerGas\`/\`maxPriorityFeePerGas\`${t?` = ${rp(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.FeeCapTooHighError"})}}class c_ extends ae{constructor({chainId:t}){super(typeof t<"u"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.InvalidChainIdError"})}}class l_ extends ae{constructor({attributes:t,serialized:r,type:n}){const s=Object.entries(t).map(([a,o])=>typeof o>"u"?a:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${n}" was provided.`,{metaMessages:[`Serialized Transaction: "${r}"`,s.length>0?`Missing Attributes: ${s.join(", ")}`:""].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.InvalidSerializedError"})}}class u_ extends ae{constructor({maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${rp(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${rp(r)} gwei`:""}).`].join(`
|
|
46
|
-
`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.TipAboveFeeCapError"})}}const d_="0x78",f_="0x76",jy="tempo";function np(e){const{calls:t,chainId:r,maxFeePerGas:n,maxPriorityFeePerGas:s,validBefore:a,validAfter:o}=e;if(!t||t.length===0)throw new g_;if(typeof a=="number"&&typeof o=="number"&&a<=o)throw new x_({validBefore:a,validAfter:o});if(t)for(const i of t)i.to&&Ur(i.to,{strict:!1});if(r<=0)throw new c_({chainId:r});if(n&&BigInt(n)>2n**256n-1n)throw new i_({feeCap:n});if(s&&n&&s>n)throw new u_({maxFeePerGas:n,maxPriorityFeePerGas:s})}function p_(e){const t=bE(Pe(e,1)),[r,n,s,a,o,i,c,l,u,d,p,h,y,g,k]=t,v=Array.isArray(g)?g:void 0,w=v?k:g;if(!(t.length===13||t.length===14||t.length===15))throw new l_({attributes:{authorizationList:y,chainId:r,maxPriorityFeePerGas:n,maxFeePerGas:s,gas:a,calls:o,accessList:i,keyAuthorization:v,nonceKey:c,nonce:l,validBefore:u,validAfter:d,feeToken:p,feePayerSignatureOrSender:h,...t.length>12?{signature:w}:{}},serialized:e,type:jy});let S={chainId:Number(r),type:jy};if(Pr(a)&&a!=="0x"&&(S.gas=BigInt(a)),Pr(l)&&(S.nonce=l==="0x"?0n:BigInt(l)),Pr(s)&&s!=="0x"&&(S.maxFeePerGas=BigInt(s)),Pr(n)&&n!=="0x"&&(S.maxPriorityFeePerGas=BigInt(n)),Pr(c)&&(S.nonceKey=c==="0x"?0n:BigInt(c)),Pr(u)&&u!=="0x"&&(S.validBefore=Number(u)),Pr(d)&&d!=="0x"&&(S.validAfter=Number(d)),Pr(p)&&p!=="0x"&&(S.feeToken=p),o&&o!=="0x"){const _=o;S.calls=_.map(z=>{const[T,m,b]=z,x={};return T&&T!=="0x"&&(x.to=T),m&&m!=="0x"&&(x.value=BigInt(m)),b&&b!=="0x"&&(x.data=b),x})}(i==null?void 0:i.length)!==0&&i!=="0x"&&(S.accessList=n_(i)),(y==null?void 0:y.length)!==0&&y!=="0x"&&(S.authorizationList=$M(y)),h!=="0x"&&h!==void 0&&(h==="0x00"||Qc(h)?S.feePayerSignature=null:S.feePayerSignature=YE(h)),v&&(S.keyAuthorization=YM(v));const C=w?La(w):void 0;return C&&(S={...S,signature:C}),np(S),S}function h_(e,t={}){const{feePayerSignature:r,signature:n}=t,s=typeof e=="string"?p_(e):e;return np(s),{...s,...n?{signature:ki(n)}:{},...r?{feePayerSignature:tl(r)}:{},type:"tempo"}}function Ti(e,t={}){const{accessList:r,authorizationList:n,calls:s,chainId:a,feeToken:o,gas:i,keyAuthorization:c,nonce:l,nonceKey:u,maxFeePerGas:d,maxPriorityFeePerGas:p,validBefore:h,validAfter:y}=e;np(e);const g=s_(r),k=t.signature||e.signature,v=WM(n),w=s.map(_=>[_.to??"0x",_.value?X(_.value):"0x",_.data??"0x"]),S=(()=>{if(t.sender)return t.sender;const _=typeof t.feePayerSignature<"u"?t.feePayerSignature:e.feePayerSignature;return _===null?"0x00":_?ZE(_):"0x"})(),C=[X(a),p?X(p):"0x",d?X(d):"0x",i?X(i):"0x",w,g,u?X(u):"0x",l?X(l):"0x",typeof h=="number"?X(h):"0x",typeof y=="number"?X(y):"0x",typeof o=="bigint"||typeof o=="string"?Ly(o):"0x",S,v,...c?[ZM(c)]:[],...k?[Ml(ki(k))]:[]];return lt(t.format==="feePayer"?d_:f_,wE(C))}function m_(e){return b_(e,{presign:!0})}function b_(e,t={}){const r=Ti({...e,...t.presign?{signature:void 0}:{}});return ii(r)}function y_(e,t){const{sender:r}=t,n=Ti({...e,signature:void 0},{sender:r,format:"feePayer"});return ii(n)}class g_ extends ae{constructor(){super("Calls list cannot be empty."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TxEnvelopeTempo.CallsEmptyError"})}}class x_ extends ae{constructor({validBefore:t,validAfter:r}){super(`validBefore (${t}) must be greater than validAfter (${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TxEnvelopeTempo.InvalidValidityWindowError"})}}function Vy(e){const t=e.account;return t!=null&&t.keyType&&t.keyType!=="secp256k1"||typeof e.calls<"u"||typeof e.feePayer<"u"||typeof e.feeToken<"u"||typeof e.keyAuthorization<"u"||typeof e.nonceKey<"u"||typeof e.signature<"u"||typeof e.validBefore<"u"||typeof e.validAfter<"u"?"tempo":e.type?e.type:Ad(e)}function sp(e){try{return Vy(e)==="tempo"}catch{return!1}}async function w_(e,t){if(!sp(e)){if(t&&"type"in t&&t.type!=="secp256k1")throw new Error("Unsupported signature type. Expected `secp256k1` but got `"+t.type+"`.");if(t&&"type"in t){const{r:n,s,yParity:a}=t==null?void 0:t.signature;return Kc(e,{r:X(n,{size:32}),s:X(s,{size:32}),yParity:a})}return Kc(e,t)}if(Vy(e)==="tempo")return v_(e,t);throw new Error("Unsupported transaction type")}async function v_(e,t){var l;const r=(()=>{if(e.signature)return e.signature;if(t&&"type"in t)return t;if(t)return ki({r:BigInt(t.r),s:BigInt(t.s),yParity:Number(t.yParity)})})(),{chainId:n,feePayer:s,feePayerSignature:a,nonce:o,...i}=e,c={...i,calls:(l=i.calls)!=null&&l.length?i.calls:[{to:i.to||(!i.data||i.data==="0x"?"0x0000000000000000000000000000000000000000":void 0),value:i.value,data:i.data}],chainId:Number(n),feePayerSignature:a?{r:BigInt(a.r),s:BigInt(a.s),yParity:Number(a.yParity)}:s?null:void 0,type:"tempo",...o?{nonce:BigInt(o)}:{}};if(s===!0&&delete c.feeToken,r&&typeof e.feePayer=="object"){const u=h_(c,{signature:r}),d=(()=>{if(e.from)return e.from;if(r.type==="secp256k1")return ay({payload:m_(u),signature:r.signature});throw new Error("Unable to extract sender from transaction or signature.")})(),p=y_(u,{sender:d}),h=await e.feePayer.sign({hash:p});return Ti(u,{feePayerSignature:tl(h)})}if(s===!0){const u=Ti(c,{feePayerSignature:null,signature:r});return e.from&&r?lt(u,e.from,"0xfeefeefeefee"):u}return Ti({...c,...s?{feeToken:void 0}:{}},{feePayerSignature:void 0,signature:r})}function k_(e){if(!sp(e))return Is(e);const{feePayerSignature:t,gasPrice:r,nonce:n,...s}=e_(e);return{...s,accessList:s.accessList,feePayerSignature:t?{r:X(t.r,{size:32}),s:X(t.s,{size:32}),v:BigInt(t.v??27),yParity:t.yParity}:void 0,nonce:Number(n),typeHex:$y[s.type],type:s.type}}function E_(e){return Vc(e)}function C_(e,t){const r=e,n=r.account?Ke(r.account):void 0;if(!sp(r))return Sr(e);t&&(r.calls=r.calls??[{to:e.to||(!e.data||e.data==="0x"?"0x0000000000000000000000000000000000000000":void 0),value:e.value,data:e.data}]),r.feePayer===!0&&delete r.feeToken;const s=r_({...r,type:"tempo"});t==="estimateGas"&&(s.maxFeePerGas=void 0,s.maxPriorityFeePerGas=void 0),s.to=void 0,s.data=void 0,s.value=void 0;const[a,o]=(()=>{const c=n&&"keyType"in n?n.keyType:n==null?void 0:n.source;return c?c==="webAuthn"?["webAuthn",`0x${"ff".repeat(1400)}`]:["p256","secp256k1"].includes(c)?[c,void 0]:[void 0,void 0]:[void 0,void 0]})(),i=n&&"accessKeyAddress"in n?n.accessKeyAddress:void 0;return{...s,...o?{keyData:o}:{},...i?{keyId:i}:{},...a?{keyType:a}:{},...r.feePayer?{feePayer:typeof r.feePayer=="object"?Ke(r.feePayer):r.feePayer}:{}}}const T_=S_();function S_(){return new Map}function A_(e){return`${e.address.toLowerCase()}-${e.chainId}`}function Wy(e,t){const r=A_(t);let n=e.get(r);return n||(n={counter:0,resetScheduled:!1},e.set(r,n)),n}function P_(e,t){const r=Wy(e,t);r.counter=0,r.resetScheduled=!1}function I_(e,t){const r=Wy(e,t);r.resetScheduled||(r.resetScheduled=!0,queueMicrotask(()=>P_(e,t)));const n=r.counter;return r.counter++,n===0?0n:pt(P1(6))}const ap={blockTime:1e3,extendSchema:bk(),formatters:{transaction:Pc({exclude:["aaAuthorizationList"],format:k_}),transactionReceipt:tf({format:E_}),transactionRequest:md({format:C_})},prepareTransactionRequest:[async(e,{phase:t})=>{var n;const r=e;return t==="afterFillParameters"?(typeof r.nonceKey=="bigint"&&r.nonceKey>0n&&(r.gas=(r.gas??0n)+40000n),r):(r.nonceKey=(()=>{var o;if(typeof r.nonceKey<"u"&&r.nonceKey!=="random")return r.nonceKey;const s=((o=r.account)==null?void 0:o.address)??r.from;if(!s||!r.chain)return;const a=I_(T_,{address:s,chainId:r.chain.id});if(a!==0n)return a})(),r.nonce=(()=>{if(typeof r.nonce=="number")return r.nonce;if(r.nonceKey)return 0})(),!r.feeToken&&((n=r.chain)!=null&&n.feeToken)&&(r.feeToken=r.chain.feeToken),r)},{runAt:["beforeFillTransaction","afterFillParameters"]}],serializers:{transaction:((e,t)=>w_(e,t))},async verifyHash(e,t){const{address:r,hash:n,signature:s}=t;if(typeof s=="string"&&s.endsWith(Ns.slice(2))){const a=La(s);if(a.type!=="keychain"){const o=await Yc(e,{address:r,blockNumber:t.blockNumber,blockTag:t.blockTag});if(!o||o==="0xef01007702c00000000000000000000000000000000000")return NM(a,{address:r,payload:n})}}return await ne(e,ui,"verifyHash")({...t,chain:null})}},U_=f({...ap,id:42429,name:"Tempo Devnet",nativeCurrency:{name:"USD",symbol:"USD",decimals:6},rpcUrls:{default:{http:["https://rpc.devnet.tempoxyz.dev"],webSocket:["wss://rpc.devnet.tempoxyz.dev"]}}}),O_=f({...ap,id:1337,name:"Tempo",nativeCurrency:{name:"USD",symbol:"USD",decimals:6},rpcUrls:{default:{http:["http://localhost:8545"]}}}),B_=f({...ap,id:42429,blockExplorers:{default:{name:"Tempo Explorer",url:"https://explore.tempo.xyz"}},name:"Tempo Testnet",nativeCurrency:{name:"USD",symbol:"USD",decimals:6},rpcUrls:{default:{http:["https://rpc.testnet.tempo.xyz"],webSocket:["wss://rpc.testnet.tempo.xyz"]}}}),M_=f({id:1559,name:"Tenet",network:"tenet-mainnet",nativeCurrency:{name:"TENET",symbol:"TENET",decimals:18},rpcUrls:{default:{http:["https://rpc.tenet.org"]}},blockExplorers:{default:{name:"TenetScan Mainnet",url:"https://tenetscan.io",apiUrl:"https://tenetscan.io/api"}},testnet:!1}),__=f({id:752025,name:"Ternoa",nativeCurrency:{name:"Capsule Coin",symbol:"CAPS",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.zkevm.ternoa.network"]}},blockExplorers:{default:{name:"Ternoa Explorer",url:"https://explorer-mainnet.zkevm.ternoa.network"}},testnet:!1}),D_=f({id:7,name:"ThaiChain",nativeCurrency:{name:"TCH",symbol:"TCH",decimals:18},rpcUrls:{default:{http:["https://rpc.thaichain.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp.thaichain.org",apiUrl:"https://exp.thaichain.org/api"}},contracts:{multicall3:{address:"0x0DaD6130e832c21719C5CE3bae93454E16A84826",blockCreated:4806386}},testnet:!1}),F_=f({id:8428,name:"THAT Mainnet",nativeCurrency:{name:"THAT",symbol:"THAT",decimals:18},rpcUrls:{default:{http:["https://api.thatchain.io/mainnet"]}},blockExplorers:{default:{name:"Blockscout",url:"https://that.blockscout.com"}},testnet:!1}),N_=f({id:361,name:"Theta Mainnet",nativeCurrency:{name:"TFUEL",symbol:"TFUEL",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-api.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"Theta Explorer",url:"https://explorer.thetatoken.org"}},testnet:!1}),z_=f({id:365,name:"Theta Testnet",nativeCurrency:{name:"TFUEL",symbol:"TFUEL",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-api-testnet.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"Theta Explorer",url:"https://testnet-explorer.thetatoken.org"}},testnet:!0}),L_=f({id:108,name:"ThunderCore Mainnet",nativeCurrency:{name:"TT",symbol:"TT",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.thundercore.com"]}},blockExplorers:{default:{name:"ThunderCore Explorer",url:"https://explorer-mainnet.thundercore.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!1}),R_=f({id:997,name:"5ireChain Thunder Testnet",nativeCurrency:{name:"5ire Token",symbol:"5IRE",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.5ire.network"]}},blockExplorers:{default:{name:"5ireChain Thunder Explorer",url:"https://testnet.5irescan.io/"}},testnet:!0}),H_=f({id:62092,name:"TikTrix Testnet",nativeCurrency:{name:"tTTX",symbol:"tTTX",decimals:18},rpcUrls:{default:{http:["https://tiktrix-rpc.xyz"]}},blockExplorers:{default:{name:"TikTrix Testnet Explorer",url:"https://tiktrix.xyz"}},testnet:!0}),$_=f({id:6969,name:"Tomb Mainnet",nativeCurrency:{name:"TOMB",symbol:"TOMB",decimals:18},rpcUrls:{default:{http:["https://rpc.tombchain.com"]}},blockExplorers:{default:{name:"Tomb Explorer",url:"https://tombscout.com"}},testnet:!1}),G_=f({...ar,id:61166,name:"Treasure",nativeCurrency:{decimals:18,name:"MAGIC",symbol:"MAGIC"},rpcUrls:{default:{http:["https://rpc.treasure.lol"],webSocket:["wss://rpc.treasure.lol/ws"]}},blockExplorers:{default:{name:"Treasure Block Explorer",url:"https://treasurescan.io"}},contracts:{multicall3:{address:"0x2e29fe39496a56856D8698bD43e1dF4D0CE6266a",blockCreated:101}},testnet:!1}),j_=f({...ar,id:978658,name:"Treasure Topaz Testnet",nativeCurrency:{decimals:18,name:"MAGIC",symbol:"MAGIC"},rpcUrls:{default:{http:["https://rpc.topaz.treasure.lol"],webSocket:["wss://rpc.topaz.treasure.lol/ws"]}},blockExplorers:{default:{name:"Treasure Topaz Block Explorer",url:"https://topaz.treasurescan.io"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963",blockCreated:108112}},testnet:!0}),V_=f({id:728126428,name:"Tron",nativeCurrency:{name:"TRON",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://api.trongrid.io/jsonrpc"]}},blockExplorers:{default:{name:"Tronscan",url:"https://tronscan.org",apiUrl:"https://apilist.tronscanapi.com/api"}}}),W_=f({id:3448148188,name:"Tron Nile",nativeCurrency:{name:"TRON",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://nile.trongrid.io/jsonrpc"]}},blockExplorers:{default:{name:"Tronscan",url:"https://nile.tronscan.org"}},testnet:!0}),q_=f({id:2494104990,name:"Tron Shasta",nativeCurrency:{name:"TRON",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://api.shasta.trongrid.io/jsonrpc"]}},blockExplorers:{default:{name:"Tronscan",url:"https://shasta.tronscan.org"}},testnet:!0}),Y_=f({id:8,name:"Ubiq Mainnet",nativeCurrency:{name:"UBQ",symbol:"UBQ",decimals:18},rpcUrls:{default:{http:["https://pyrus2.ubiqscan.io"]}},blockExplorers:{default:{name:"Ubiq Scan",url:"https://ubiqscan.io"}},testnet:!1}),K_=f({id:19991,name:"Ultra EVM",nativeCurrency:{decimals:18,name:"Ultra Token",symbol:"UOS"},rpcUrls:{default:{http:["https://evm.ultra.eosusa.io"]}},blockExplorers:{default:{name:"Ultra EVM Explorer",url:"https://evmexplorer.ultra.io"}}}),Z_=f({id:18881,name:"Ultra EVM Testnet",nativeCurrency:{decimals:18,name:"Ultra Token",symbol:"UOS"},rpcUrls:{default:{http:["https://evm.test.ultra.eosusa.io"]}},blockExplorers:{default:{name:"Ultra EVM Testnet Explorer",url:"https://evmexplorer.testnet.ultra.io"}},testnet:!0}),X_=f({id:1231,name:"Ultron Mainnet",nativeCurrency:{name:"ULX",symbol:"ULX",decimals:18},rpcUrls:{default:{http:["https://ultron-rpc.net"]}},blockExplorers:{default:{name:"Ultron Scan",url:"https://ulxscan.com"}},testnet:!1}),Q_=f({id:1230,name:"Ultron Testnet",nativeCurrency:{name:"ULX",symbol:"ULX",decimals:18},rpcUrls:{default:{http:["https://ultron-dev.io"]}},blockExplorers:{default:{name:"Ultron Scan",url:"https://explorer.ultron-dev.io"}},testnet:!0}),_l=1,J_=f({...j,id:130,name:"Unichain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://mainnet.unichain.org/"]}},blockExplorers:{default:{name:"Uniscan",url:"https://uniscan.xyz",apiUrl:"https://api.uniscan.xyz/api"}},contracts:{...j.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[_l]:{address:"0x2F12d621a16e2d3285929C9996f478508951dFe4"}},portal:{[_l]:{address:"0x0bd48f6B86a26D3a217d0Fa6FfE2B491B956A7a2"}},l1StandardBridge:{[_l]:{address:"0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA"}}},sourceId:_l}),Dl=11155111,eD=f({...j,id:1301,name:"Unichain Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://sepolia.unichain.org"]}},blockExplorers:{default:{name:"Uniscan",url:"https://sepolia.uniscan.xyz",apiUrl:"https://api-sepolia.uniscan.xyz/api"}},contracts:{...j.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},portal:{[Dl]:{address:"0x0d83dab629f0e0F9d36c0Cbc89B69a489f0751bD"}},l1StandardBridge:{[Dl]:{address:"0xea58fcA6849d79EAd1f26608855c2D6407d54Ce2"}},disputeGameFactory:{[Dl]:{address:"0xeff73e5aa3B9AEC32c659Aa3E00444d20a84394b"}}},testnet:!0,sourceId:Dl}),tD=f({id:8880,name:"Unique Mainnet",nativeCurrency:{decimals:18,name:"UNQ",symbol:"UNQ"},rpcUrls:{default:{http:["https://rpc.unique.network"]}},blockExplorers:{default:{name:"Unique Subscan",url:"https://unique.subscan.io/"}}}),rD=f({id:8882,name:"Opal Testnet",nativeCurrency:{decimals:18,name:"OPL",symbol:"OPL"},rpcUrls:{default:{http:["https://rpc-opal.unique.network"]}},blockExplorers:{default:{name:"Opal Subscan",url:"https://opal.subscan.io/"}},testnet:!0}),nD=f({id:8881,name:"Quartz Mainnet",nativeCurrency:{decimals:18,name:"QTZ",symbol:"QTZ"},rpcUrls:{default:{http:["https://rpc-quartz.unique.network"]}},blockExplorers:{default:{name:"Quartz Subscan",url:"https://quartz.subscan.io/"}}}),sD=f({id:18233,name:"Unreal",nativeCurrency:{name:"reETH",decimals:18,symbol:"reETH"},rpcUrls:{default:{http:["https://rpc.unreal-orbit.gelato.digital"]}},blockExplorers:{default:{name:"Unreal Explorer",url:"https://unreal.blockscout.com",apiUrl:"https://unreal.blockscout.com/api/v2"}},testnet:!0,contracts:{multicall3:{address:"0x8b6B0e60D8CD84898Ea8b981065A12F876eA5677",blockCreated:1745}}}),aD=f({id:1480,name:"Vana",blockTime:6e3,nativeCurrency:{decimals:18,name:"Vana",symbol:"VANA"},rpcUrls:{default:{http:["https://rpc.vana.org/"]}},blockExplorers:{default:{name:"Vana Block Explorer",url:"https://vanascan.io",apiUrl:"https://vanascan.io/api"}},contracts:{multicall3:{address:"0xD8d2dFca27E8797fd779F8547166A2d3B29d360E",blockCreated:716763}}}),oD=f({id:14800,name:"Vana Moksha Testnet",blockTime:6e3,nativeCurrency:{decimals:18,name:"Vana",symbol:"VANA"},rpcUrls:{default:{http:["https://rpc.moksha.vana.org"]}},blockExplorers:{default:{name:"Vana Moksha Testnet",url:"https://moksha.vanascan.io",apiUrl:"https://moksha.vanascan.io/api"}},contracts:{multicall3:{address:"0xD8d2dFca27E8797fd779F8547166A2d3B29d360E",blockCreated:732283}},testnet:!0}),iD=f({id:2040,name:"Vanar Mainnet",nativeCurrency:{name:"VANRY",symbol:"VANRY",decimals:18},rpcUrls:{default:{http:["https://rpc.vanarchain.com"]}},blockExplorers:{default:{name:"Vanar Mainnet Explorer",url:"https://explorer.vanarchain.com/"}},testnet:!1}),cD=f({id:100009,name:"Vechain",nativeCurrency:{name:"VeChain",symbol:"VET",decimals:18},rpcUrls:{default:{http:["https://mainnet.vechain.org"]}},blockExplorers:{default:{name:"Vechain Explorer",url:"https://explore.vechain.org"},vechainStats:{name:"Vechain Stats",url:"https://vechainstats.com"}}}),lD=f({id:106,name:"Velas EVM Mainnet",nativeCurrency:{name:"VLX",symbol:"VLX",decimals:18},rpcUrls:{default:{http:["https://evmexplorer.velas.com/rpc"]}},blockExplorers:{default:{name:"Velas Explorer",url:"https://evmexplorer.velas.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:55883577}},testnet:!1}),uD=f({id:88,name:"Viction",nativeCurrency:{name:"Viction",symbol:"VIC",decimals:18},rpcUrls:{default:{http:["https://rpc.viction.xyz"]}},blockExplorers:{default:{name:"VIC Scan",url:"https://vicscan.xyz"}},testnet:!1}),dD=f({id:89,name:"Viction Testnet",nativeCurrency:{name:"Viction",symbol:"VIC",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.viction.xyz"]}},blockExplorers:{default:{name:"VIC Scan",url:"https://testnet.vicscan.xyz"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:12170179}},testnet:!0}),fD=f({id:888888,name:"Vision",nativeCurrency:{name:"VISION",symbol:"VS",decimals:18},rpcUrls:{default:{http:["https://infragrid.v.network/ethereum/compatible"]}},blockExplorers:{default:{name:"Vision Scan",url:"https://visionscan.org"}},testnet:!1}),pD=f({id:666666,name:"Vision Testnet",nativeCurrency:{name:"VISION",symbol:"VS",decimals:18},rpcUrls:{default:{http:["https://vpioneer.infragrid.v.network/ethereum/compatible"]}},blockExplorers:{default:{name:"Vision Scan",url:"https://visionscan.org/?chain=vpioneer"}},testnet:!0}),hD=f({id:888,name:"Wanchain",nativeCurrency:{name:"WANCHAIN",symbol:"WAN",decimals:18},rpcUrls:{default:{http:["https://gwan-ssl.wandevs.org:56891","https://gwan2-ssl.wandevs.org"]}},blockExplorers:{default:{name:"WanScan",url:"https://wanscan.org"}},contracts:{multicall3:{address:"0xcDF6A1566e78EB4594c86Fe73Fcdc82429e97fbB",blockCreated:25312390}}}),mD=f({id:999,name:"Wanchain Testnet",nativeCurrency:{name:"WANCHAIN",symbol:"WANt",decimals:18},rpcUrls:{default:{http:["https://gwan-ssl.wandevs.org:46891"]}},blockExplorers:{default:{name:"WanScanTest",url:"https://wanscan.org"}},contracts:{multicall3:{address:"0x11c89bF4496c39FB80535Ffb4c92715839CC5324",blockCreated:24743448}},testnet:!0}),bD=f({id:9496,name:"WeaveVM Alphanet",nativeCurrency:{name:"Testnet WeaveVM",symbol:"tWVM",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.wvm.dev"]}},blockExplorers:{default:{name:"WeaveVM Alphanet Explorer",url:"https://explorer.wvm.dev"}},testnet:!0}),yD=f({id:1111,name:"WEMIX",network:"wemix-mainnet",nativeCurrency:{name:"WEMIX",symbol:"WEMIX",decimals:18},rpcUrls:{default:{http:["https://api.wemix.com"]}},blockExplorers:{default:{name:"wemixExplorer",url:"https://explorer.wemix.com"}}}),gD=f({id:1112,name:"WEMIX Testnet",network:"wemix-testnet",nativeCurrency:{name:"WEMIX",symbol:"tWEMIX",decimals:18},rpcUrls:{default:{http:["https://api.test.wemix.com"]}},blockExplorers:{default:{name:"wemixExplorer",url:"https://testnet.wemixscan.com",apiUrl:"https://testnet.wemixscan.com/api"}},testnet:!0}),xD=f({id:420420421,name:"Westend Asset Hub",nativeCurrency:{decimals:18,name:"Westies",symbol:"WND"},rpcUrls:{default:{http:["https://westend-asset-hub-eth-rpc.polkadot.io"]}},blockExplorers:{default:{name:"subscan",url:"https://westend-asset-hub-eth-explorer.parity.io"}},testnet:!0}),wD=f({testnet:!1,name:"Whitechain",blockExplorers:{default:{name:"Whitechain Explorer",url:"https://explorer.whitechain.io"}},id:1875,rpcUrls:{default:{http:["https://rpc.whitechain.io"]}},nativeCurrency:{decimals:18,name:"WhiteBIT Coin",symbol:"WBT"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:25212237}}}),vD=f({testnet:!0,name:"Whitechain Testnet",blockExplorers:{default:{name:"Whitechain Explorer",url:"https://testnet.whitechain.io"}},id:2625,rpcUrls:{default:{http:["https://rpc-testnet.whitechain.io"]}},nativeCurrency:{decimals:18,name:"WhiteBIT Coin",symbol:"WBT"}}),kD=f({id:42070,name:"WMC Testnet",nativeCurrency:{name:"WMTx",symbol:"WMTx",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet-base.worldmobile.net"]}},blockExplorers:{default:{name:"WMC Explorer",url:"https://explorer2-base-testnet.worldmobile.net"}},testnet:!0}),Si=1,ED=f({...j,id:480,name:"World Chain",network:"worldchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://worldchain-mainnet.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Worldscan",url:"https://worldscan.org",apiUrl:"https://api.worldscan.org/api"},blockscout:{name:"Blockscout",url:"https://worldchain-mainnet.explorer.alchemy.com",apiUrl:"https://worldchain-mainnet.explorer.alchemy.com/api"}},contracts:{...j.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[Si]:{address:"0x069c4c579671f8c120b1327a73217D01Ea2EC5ea"}},l2OutputOracle:{[Si]:{address:"0x19A6d1E9034596196295CF148509796978343c5D"}},portal:{[Si]:{address:"0xd5ec14a83B7d95BE1E2Ac12523e2dEE12Cbeea6C"}},l1StandardBridge:{[Si]:{address:"0x470458C91978D2d929704489Ad730DC3E3001113"}}},testnet:!1,sourceId:Si}),Ai=11155111,CD=f({...j,id:4801,name:"World Chain Sepolia",network:"worldchain-sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://worldchain-sepolia.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Worldscan Sepolia",url:"https://sepolia.worldscan.org",apiUrl:"https://api-sepolia.worldscan.org/api"},blockscout:{name:"Blockscout",url:"https://worldchain-sepolia.explorer.alchemy.com",apiUrl:"https://worldchain-sepolia.explorer.alchemy.com/api"}},contracts:{...j.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[Ai]:{address:"0x8Ec1111f67Dad6b6A93B3F42DfBC92D81c98449A"}},l2OutputOracle:{[Ai]:{address:"0xc8886f8BAb6Eaeb215aDB5f1c686BF699248300e"}},portal:{[Ai]:{address:"0xFf6EBa109271fe6d4237EeeD4bAb1dD9A77dD1A4"}},l1StandardBridge:{[Ai]:{address:"0xd7DF54b3989855eb66497301a4aAEc33Dbb3F8DE"}}},testnet:!0,sourceId:Ai}),TD=f({id:103,name:"WorldLand Mainnet",nativeCurrency:{decimals:18,name:"WLC",symbol:"WLC"},rpcUrls:{default:{http:["https://seoul.worldland.foundation"]}},blockExplorers:{default:{name:"WorldLand Scan",url:"https://scan.worldland.foundation"}},testnet:!1}),SD=f({id:660279,name:"Xai Mainnet",nativeCurrency:{name:"Xai",symbol:"XAI",decimals:18},rpcUrls:{default:{http:["https://xai-chain.net/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.xai-chain.net"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:222549}},testnet:!1}),AD=f({id:37714555429,name:"Xai Testnet",nativeCurrency:{name:"sXai",symbol:"sXAI",decimals:18},rpcUrls:{default:{http:["https://testnet-v2.xai-chain.net/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer-v2.xai-chain.net"}},testnet:!0}),PD=f({id:50,name:"XDC Network",nativeCurrency:{decimals:18,name:"XDC",symbol:"XDC"},rpcUrls:{default:{http:["https://rpc.xdcrpc.com"]}},blockExplorers:{default:{name:"XDCScan",url:"https://xdcscan.com"}},contracts:{multicall3:{address:"0x0B1795ccA8E4eC4df02346a082df54D437F8D9aF",blockCreated:75884020}}}),ID=f({id:51,name:"Apothem Network",nativeCurrency:{decimals:18,name:"TXDC",symbol:"TXDC"},rpcUrls:{default:{http:["https://erpc.apothem.network"]}},blockExplorers:{default:{name:"XDCScan",url:"https://testnet.xdcscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:59765389}}}),UD=f({id:196,name:"X Layer Mainnet",nativeCurrency:{decimals:18,name:"OKB",symbol:"OKB"},rpcUrls:{default:{http:["https://rpc.xlayer.tech"]}},blockExplorers:{default:{name:"OKLink",url:"https://www.oklink.com/xlayer",apiUrl:"https://www.oklink.com/api/v5/explorer/xlayer/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:47416}}}),qy=f({id:195,name:"X1 Testnet",nativeCurrency:{decimals:18,name:"OKB",symbol:"OKB"},rpcUrls:{default:{http:["https://xlayertestrpc.okx.com"]}},blockExplorers:{default:{name:"OKLink",url:"https://www.oklink.com/xlayer-test"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:624344}},testnet:!0}),OD=f({id:3721,name:"Xone Chain Mainnet",nativeCurrency:{decimals:18,name:"XOC",symbol:"XOC"},rpcUrls:{default:{http:["https://rpc.xone.org"]}},blockExplorers:{default:{name:"Xone Mainnet Explorer",url:"https://xonescan.com",apiUrl:"http://api.xonescan.com/api"}},testnet:!1}),BD=f({id:33772211,name:"Xone Chain Testnet",nativeCurrency:{decimals:18,name:"XOC",symbol:"XOC"},rpcUrls:{default:{http:["https://rpc-testnet.xone.org","https://rpc-testnet.xone.plus","https://rpc-testnet.knight.center"]}},blockExplorers:{default:{name:"Xone Testnet Explorer",url:"https://testnet.xonescan.com",apiUrl:"http://api.testnet.xonescan.com/api"}},testnet:!0}),MD=f({id:20250217,name:"Xphere Mainnet",nativeCurrency:{decimals:18,name:"XP",symbol:"XP"},rpcUrls:{default:{http:["https://en-bkk.x-phere.com"]}},blockExplorers:{default:{name:"Xphere Tamsa Explorer",url:"https://xp.tamsa.io"}},testnet:!1}),_D=f({id:1998991,name:"Xphere Testnet",nativeCurrency:{decimals:18,name:"XPT",symbol:"XPT"},rpcUrls:{default:{http:["http://testnet.x-phere.com"]}},blockExplorers:{default:{name:"Xphere Tamsa Explorer",url:"https://xpt.tamsa.io"}},testnet:!0}),DD=f({id:273,name:"XR One",nativeCurrency:{decimals:18,name:"XR1",symbol:"XR1"},rpcUrls:{default:{http:["https://xr1.calderachain.xyz/http"],webSocket:["wss://xr1.calderachain.xyz/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://xr1.calderaexplorer.xyz"}},testnet:!1}),FD=f({id:144e4,name:"XRPL EVM",nativeCurrency:{name:"XRP",symbol:"XRP",decimals:18},rpcUrls:{default:{http:["https://rpc.xrplevm.org"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.xrplevm.org",apiUrl:"https://explorer.xrplevm.org/api/v2"}},testnet:!1}),ND=f({id:1440002,name:"XRPL EVM Devnet",nativeCurrency:{name:"XRP",symbol:"XRP",decimals:18},rpcUrls:{default:{http:["https://rpc.xrplevm.org/"]},public:{http:["https://rpc.xrplevm.org/"]}},blockExplorers:{default:{name:"XRPLEVM Devnet Explorer",url:"https://explorer.xrplevm.org/"}},contracts:{multicall3:{address:"0x82Cc144D7d0AD4B1c27cb41420e82b82Ad6e9B31",blockCreated:15237286}},testnet:!0}),zD=f({id:1449e3,name:"XRPL EVM Testnet",nativeCurrency:{name:"XRP",symbol:"XRP",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.xrplevm.org"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.testnet.xrplevm.org",apiUrl:"https://explorer.testnet.xrplevm.org/api/v2"}},contracts:{multicall3:{address:"0x82Cc144D7d0AD4B1c27cb41420e82b82Ad6e9B31",blockCreated:492302}},testnet:!0}),LD=f({id:2730,name:"XR Sepolia",nativeCurrency:{decimals:18,name:"tXR",symbol:"tXR"},rpcUrls:{default:{http:["https://xr-sepolia-testnet.rpc.caldera.xyz/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://xr-sepolia-testnet.explorer.caldera.xyz"}},testnet:!0}),RD=f({id:50005,name:"Yooldo Verse",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.yooldo-verse.xyz"]}},blockExplorers:{default:{name:"Yooldo Verse Explorer",url:"https://explorer.yooldo-verse.xyz"}}}),HD=f({id:50006,name:"Yooldo Verse Testnet",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.yooldo-verse.xyz"]}},blockExplorers:{default:{name:"Yooldo Verse Testnet Explorer",url:"https://explorer.testnet.yooldo-verse.xyz"}},testnet:!0}),$D=f({id:8408,name:"ZenChain Testnet",nativeCurrency:{decimals:18,name:"ZTC",symbol:"ZTC"},rpcUrls:{default:{http:["https://zenchain-testnet.api.onfinality.io/public"],webSocket:["wss://zenchain-testnet.api.onfinality.io/public-ws"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:230019}},blockExplorers:{default:{name:"Zentrace",url:"https://zentrace.io"}},testnet:!0}),GD=f({id:383414847825,name:"Zeniq Mainnet",nativeCurrency:{name:"ZENIQ",symbol:"ZENIQ",decimals:18},rpcUrls:{default:{http:["https://api.zeniq.network"]}},blockExplorers:{default:{name:"Zeniq Explorer",url:"https://zeniqscan.com"}},testnet:!1}),jD=f({id:543210,name:"Zero Network",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.zerion.io/v1/zero"]}},blockExplorers:{default:{name:"Zero Network Explorer",url:"https://explorer.zero.network"}},testnet:!1}),VD=f({id:7e3,name:"ZetaChain",nativeCurrency:{decimals:18,name:"Zeta",symbol:"ZETA"},rpcUrls:{default:{http:["https://zetachain-evm.blockpi.network/v1/rpc/public"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1632781}},blockExplorers:{default:{name:"ZetaScan",url:"https://zetascan.com"}},testnet:!1}),WD=f({id:7001,name:"ZetaChain Athens Testnet",nativeCurrency:{decimals:18,name:"Zeta",symbol:"aZETA"},rpcUrls:{default:{http:["https://zetachain-athens-evm.blockpi.network/v1/rpc/public"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2715217}},blockExplorers:{default:{name:"ZetaScan",url:"https://testnet.zetascan.com"}},testnet:!0}),qD=f({id:1337803,name:"Zhejiang",nativeCurrency:{name:"Zhejiang Ether",symbol:"ZhejETH",decimals:18},rpcUrls:{default:{http:["https://rpc.zhejiang.ethpandaops.io"]}},blockExplorers:{default:{name:"Beaconchain",url:"https://zhejiang.beaconcha.in"}},testnet:!0}),YD=f({id:32769,name:"Zilliqa",network:"zilliqa",nativeCurrency:{name:"Zilliqa",symbol:"ZIL",decimals:18},rpcUrls:{default:{http:["https://api.zilliqa.com"]}},blockExplorers:{default:{name:"Ethernal",url:"https://evmx.zilliqa.com"}},testnet:!1}),KD=f({id:33101,name:"Zilliqa Testnet",network:"zilliqa-testnet",nativeCurrency:{name:"Zilliqa",symbol:"ZIL",decimals:18},rpcUrls:{default:{http:["https://dev-api.zilliqa.com"]}},blockExplorers:{default:{name:"Ethernal",url:"https://evmx.testnet.zilliqa.com"}},testnet:!0}),op=1,ZD=f({...j,id:48900,name:"Zircuit Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.zircuit.com","https://zircuit1-mainnet.liquify.com","https://zircuit1-mainnet.p2pify.com","https://zircuit-mainnet.drpc.org"]}},blockExplorers:{default:{name:"Zircuit Explorer",url:"https://explorer.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"},l2OutputOracle:{[op]:{address:"0x92Ef6Af472b39F1b363da45E35530c24619245A4"}},portal:{[op]:{address:"0x17bfAfA932d2e23Bd9B909Fd5B4D2e2a27043fb1"}},l1StandardBridge:{[op]:{address:"0x386B76D9cA5F5Fb150B6BFB35CF5379B22B26dd8"}}},testnet:!1}),ip=11155111,XD=f({...j,id:48898,name:"Zircuit Garfield Testnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://garfield-testnet.zircuit.com/"]}},blockExplorers:{default:{name:"Zircuit Garfield Testnet Explorer",url:"https://explorer.garfield-testnet.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"},l2OutputOracle:{[ip]:{address:"0xd69D3AC5CA686cCF94b258291772bc520FEAf211"}},portal:{[ip]:{address:"0x4E21A71Ac3F7607Da5c06153A17B1DD20E702c21"}},l1StandardBridge:{[ip]:{address:"0x87a7E2bCA9E35BA49282E832a28A6023904460D8"}}},testnet:!0}),cp=11155111,QD=f({...j,id:48899,name:"Zircuit Testnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.zircuit.com","https://zircuit1-testnet.p2pify.com","https://zircuit1-testnet.liquify.com"]}},blockExplorers:{default:{name:"Zircuit Testnet Explorer",url:"https://explorer.testnet.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:6040287},l2OutputOracle:{[cp]:{address:"0x740C2dac453aEf7140809F80b72bf0e647af8148"}},portal:{[cp]:{address:"0x787f1C8c5924178689E0560a43D848bF8E54b23e"}},l1StandardBridge:{[cp]:{address:"0x0545c5fe980098C16fcD0eCB5E79753afa6d9af9"}}},testnet:!0}),JD=f({id:42766,name:"ZKFair Mainnet",network:"zkfair-mainnet",nativeCurrency:{decimals:18,name:"USD Coin",symbol:"USDC"},rpcUrls:{default:{http:["https://rpc.zkfair.io"]}},blockExplorers:{default:{name:"zkFair Explorer",url:"https://scan.zkfair.io",apiUrl:"https://scan.zkfair.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6090959}},testnet:!1}),eF=f({id:43851,name:"ZKFair Testnet",network:"zkfair-testnet",nativeCurrency:{decimals:18,name:"USD Coin",symbol:"USDC"},rpcUrls:{default:{http:["https://testnet-rpc.zkfair.io"]}},blockExplorers:{default:{name:"zkFair Explorer",url:"https://testnet-scan.zkfair.io"}},testnet:!0}),tF=f({id:810180,name:"zkLink Nova",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zklink.io"]}},blockExplorers:{default:{name:"zkLink Nova Block Explorer",url:"https://explorer.zklink.io"}}}),rF=f({id:810181,name:"zkLink Nova Sepolia Testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zklink.io"]}},blockExplorers:{default:{name:"zkLink Nova Block Explorer",url:"https://sepolia.explorer.zklink.io"}}}),Yy=f({...ar,blockTime:200,id:324,name:"ZKsync Era",network:"zksync-era",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.era.zksync.io"],webSocket:["wss://mainnet.era.zksync.io/ws"]}},blockExplorers:{default:{name:"Etherscan",url:"https://era.zksync.network/",apiUrl:"https://api-era.zksync.network/api"},native:{name:"ZKsync Explorer",url:"https://explorer.zksync.io/",apiUrl:"https://block-explorer-api.mainnet.zksync.io/api"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:45659388}}}),Ky=f({...ar,id:260,name:"ZKsync InMemory Node",network:"zksync-in-memory-node",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:8011"]}},testnet:!0}),nF=f({...ar,id:272,name:"ZKsync CLI Local Custom Hyperchain",nativeCurrency:{name:"BAT",symbol:"BAT",decimals:18},rpcUrls:{default:{http:["http://localhost:15200"],webSocket:["ws://localhost:15201"]}},blockExplorers:{default:{name:"ZKsync explorer",url:"http://localhost:15005/",apiUrl:"http://localhost:15005/api"}},testnet:!0}),sF=f({...ar,id:270,name:"ZKsync CLI Local Hyperchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:15100"],webSocket:["ws://localhost:15101"]}},blockExplorers:{default:{name:"ZKsync explorer",url:"http://localhost:15005/",apiUrl:"http://localhost:15005/api"}},testnet:!0}),aF=f({id:9,name:"ZKsync CLI Local Hyperchain L1",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:15045"]}},blockExplorers:{default:{name:"Blockscout",url:"http://localhost:15001/",apiUrl:"http://localhost:15001/api/v2"}},testnet:!0}),Zy=f({...ar,id:270,name:"ZKsync CLI Local Node",network:"zksync-cli-local-node",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:3050"]}},testnet:!0}),Xy=f({...ar,blockTime:200,id:300,name:"ZKsync Sepolia Testnet",network:"zksync-sepolia-testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.era.zksync.dev"],webSocket:["wss://sepolia.era.zksync.dev/ws"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia-era.zksync.network/",apiUrl:"https://api-sepolia-era.zksync.network/api"},native:{name:"ZKsync Explorer",url:"https://sepolia.explorer.zksync.io/",blockExplorerApi:"https://block-explorer-api.sepolia.zksync.dev/api"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:3855712}},testnet:!0}),Fl=1,oF=f({...j,id:7777777,name:"Zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy",apiUrl:"https://explorer.zora.energy/api"}},contracts:{...j.contracts,l2OutputOracle:{[Fl]:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:5882},portal:{[Fl]:{address:"0x1a0ad011913A150f69f6A19DF447A0CfD9551054"}},l1StandardBridge:{[Fl]:{address:"0x3e2Ea9B92B7E48A52296fD261dc26fd995284631"}}},sourceId:Fl}),Nl=11155111,iF=f({...j,id:999999999,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/",apiUrl:"https://sepolia.explorer.zora.energy/api"}},contracts:{...j.contracts,l2OutputOracle:{[Nl]:{address:"0x2615B481Bd3E5A1C0C7Ca3Da1bdc663E8615Ade9"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83160},portal:{[Nl]:{address:"0xeffE2C6cA9Ab797D418f0D91eA60807713f3536f"}},l1StandardBridge:{[Nl]:{address:"0x5376f1D543dcbB5BD416c56C189e4cB7399fCcCB"}}},sourceId:Nl,testnet:!0}),Qy=5,cF=f({...j,id:999,name:"Zora Goerli Testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy",apiUrl:"https://testnet.explorer.zora.energy/api"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:189123},portal:{[Qy]:{address:"0xDb9F51790365e7dc196e7D072728df39Be958ACe"}}},sourceId:Qy,testnet:!0}),lF=Object.freeze(Object.defineProperty({__proto__:null,abey:v7,abstract:B7,abstractTestnet:M7,acala:_7,acria:D7,adf:F7,agungTestnet:N7,aioz:z7,alephZero:L7,alephZeroTestnet:R7,alienx:H7,alienxHalTestnet:$7,ancient8:q7,ancient8Sepolia:Y7,anvil:K7,apeChain:Z7,apexTestnet:X7,apollo:Q7,arbitrum:J7,arbitrumGoerli:eT,arbitrumNova:tT,arbitrumSepolia:rT,arcTestnet:nT,arenaz:sT,areonNetwork:aT,areonNetworkTestnet:oT,areum:iT,artelaTestnet:cT,arthera:lT,artheraTestnet:uT,assetChain:dT,assetChainTestnet:fT,astar:pT,astarZkEVM:hT,astarZkyoto:mT,atletaOlympia:bT,aurora:yT,auroraTestnet:gT,auroria:xT,autheoTestnet:wT,avalanche:vT,avalancheFuji:kT,b3:ET,b3Sepolia:CT,bahamut:TT,base:Ey,baseGoerli:PT,basePreconf:ST,baseSepolia:Cy,baseSepoliaPreconf:IT,basecampTestnet:AT,beam:UT,beamTestnet:OT,bearNetworkChainMainnet:BT,bearNetworkChainTestnet:MT,berachain:_T,berachainBepolia:DT,berachainTestnet:FT,berachainTestnetbArtio:NT,bevmMainnet:zT,bifrost:LT,birdlayer:RT,bitTorrent:qT,bitTorrentTestnet:YT,bitgert:HT,bitkub:$T,bitkubTestnet:GT,bitlayer:jT,bitlayerTestnet:VT,bitrock:WT,blast:KT,blastSepolia:ZT,bob:XT,bobSepolia:e9,boba:QT,bobaSepolia:JT,boolBetaMainnet:t9,botanix:r9,botanixTestnet:n9,bounceBit:s9,bounceBitTestnet:a9,bronos:o9,bronosTestnet:i9,bsc:c9,bscGreenfield:l9,bscTestnet:u9,bsquared:d9,bsquaredTestnet:f9,btr:p9,btrTestnet:h9,bxn:m9,bxnTestnet:b9,cannon:y9,canto:g9,celo:I9,celoAlfajores:U9,celoSepolia:O9,chang:B9,chiliz:M9,chips:_9,citreaTestnet:D9,classic:F9,coinbit:N9,coinex:z9,confluxESpace:L9,confluxESpaceTestnet:R9,coreDao:H9,coreTestnet1:$9,coreTestnet2:G9,corn:j9,cornTestnet:V9,crab:W9,creatorTestnet:q9,creditCoin3Devnet:Y9,creditCoin3Mainnet:K9,creditCoin3Testnet:Z9,cronos:X9,cronosTestnet:Q9,cronoszkEVM:J9,cronoszkEVMTestnet:eS,crossbell:tS,crossfi:rS,curtis:nS,cyber:sS,cyberTestnet:aS,dailyNetwork:oS,dailyNetworkTestnet:iS,darwinia:cS,datahavenTestnet:lS,dbkchain:uS,dchain:dS,dchainTestnet:fS,defichainEvm:pS,defichainEvmTestnet:hS,degen:mS,dfk:bS,diode:yS,disChain:gS,dodochainTestnet:xS,dogechain:wS,domaTestnet:vS,donatuz:kS,dosChain:ES,dosChainTestnet:CS,dreyerxMainnet:TS,dreyerxTestnet:SS,dustboyIoT:AS,dymension:PS,edexa:IS,edexaTestnet:US,edgeless:OS,edgelessTestnet:BS,edgeware:MS,edgewareTestnet:_S,eduChain:DS,eduChainTestnet:FS,ekta:NS,ektaTestnet:zS,elastos:LS,elastosTestnet:RS,electroneum:HS,electroneumTestnet:$S,elysiumTestnet:GS,energy:jS,eni:VS,eniTestnet:WS,enuls:qS,eon:YS,eos:KS,eosTestnet:ZS,eteria:XS,etherlink:QS,etherlinkShadownetTestnet:JS,etherlinkTestnet:e4,ethernity:t4,etp:r4,evmos:n4,evmosTestnet:s4,excelonMainnet:a4,expanse:o4,exsat:i4,exsatTestnet:c4,fantom:l4,fantomSonicTestnet:u4,fantomTestnet:d4,fibo:f4,filecoin:p4,filecoinCalibration:h4,filecoinHyperspace:m4,fireChain:w7,flame:b4,flare:y4,flareTestnet:g4,flowMainnet:x4,flowPreviewnet:w4,flowTestnet:v4,fluence:k4,fluenceStage:E4,fluenceTestnet:C4,fluentTestnet:T4,form:S4,formTestnet:P4,forma:A4,formicarium:SI,forta:I4,foundry:U4,fraxtal:O4,fraxtalTestnet:B4,funkiMainnet:M4,funkiSepolia:_4,fuse:D4,fuseSparknet:F4,fusion:N4,fusionTestnet:z4,garnet:L4,gatechain:R4,geist:H4,genesys:$4,giwaSepolia:Ay,giwaSepoliaPreconf:G4,glideL1Protocol:j4,glideL2Protocol:V4,gnosis:W4,gnosisChiado:q4,goChain:Z4,goat:Y4,gobi:K4,godwoken:X4,goerli:Q4,graphite:J4,graphiteTestnet:eA,gravity:tA,gunz:rA,guruNetwork:nA,guruTestnet:sA,ham:aA,happychainTestnet:oA,haqqMainnet:iA,haqqTestedge2:cA,hardhat:lA,harmonyOne:uA,hashkey:dA,hashkeyTestnet:fA,haustTestnet:pA,hedera:hA,hederaPreviewnet:mA,hederaTestnet:bA,hela:yA,heliosTestnet:gA,hemi:xA,hemiSepolia:wA,henesys:vA,holesky:kA,hoodi:EA,hpb:CA,hpp:TA,hppSepolia:SA,huddle01Mainnet:AA,huddle01Testnet:PA,humanity:IA,humanityTestnet:UA,humanode:OA,humanodeTestnet5:BA,hychain:MA,hychainTestnet:_A,hyperEvm:Py,hyperliquid:Py,hyperliquidEvmTestnet:DA,iSunCoin:XA,icbNetwork:FA,idchain:NA,immutableZkEvm:zA,immutableZkEvmTestnet:LA,inEVM:RA,initVerse:HA,initVerseGenesis:$A,injective:GA,injectiveTestnet:jA,ink:VA,inkSepolia:WA,iota:qA,iotaTestnet:YA,iotex:KA,iotexTestnet:ZA,jasmyChain:QA,jasmyChainTestnet:JA,jbc:eP,jbcTestnet:tP,jocMainnet:rP,jocTestnet:nP,jovay:sP,jovaySepolia:aP,juneo:oP,juneoBCH1Chain:iP,juneoDAI1Chain:cP,juneoDOGE1Chain:lP,juneoEUR1Chain:uP,juneoGLD1Chain:dP,juneoLINK1Chain:fP,juneoLTC1Chain:pP,juneoSGD1Chain:mP,juneoSocotraTestnet:bP,juneoUSD1Chain:yP,juneoUSDT1Chain:gP,juneomBTC1Chain:hP,kaia:xP,kairos:wP,kakarotSepolia:vP,kakarotStarknetSepolia:kP,kardiaChain:EP,karura:CP,katana:TP,kava:SP,kavaTestnet:AP,kcc:PP,kiiTestnetOro:IP,kinto:UP,klaytn:OP,klaytnBaobab:BP,koi:MP,kroma:_P,kromaSepolia:DP,l3x:FP,l3xTestnet:NP,lavita:zP,lens:LP,lensTestnet:RP,lestnet:HP,lightlinkPegasus:$P,lightlinkPhoenix:GP,linea:VP,lineaGoerli:WP,lineaSepolia:qP,lineaTestnet:YP,lisk:KP,liskSepolia:ZP,loadAlphanet:XP,localhost:QP,loop:JP,lukso:eI,luksoTestnet:tI,lumiaMainnet:rI,lumiaTestnet:nI,lumoz:sI,lumozTestnet:aI,lycan:oI,lyra:iI,mainnet:cI,mandala:lI,manta:uI,mantaSepoliaTestnet:dI,mantaTestnet:fI,mantle:pI,mantleSepoliaTestnet:hI,mantleTestnet:mI,mantraDuKongEVMTestnet:bI,mantraEVM:yI,mapProtocol:gI,matchain:xI,matchainTestnet:wI,mchVerse:vI,megaethTestnet:kI,mekong:EI,meld:CI,memecore:TI,merlin:AI,merlinErigonTestnet:PI,metachain:II,metachainIstanbul:UI,metadium:OI,metalL2:BI,meter:MI,meterTestnet:_I,metis:DI,metisGoerli:FI,metisSepolia:NI,mev:zI,mevTestnet:LI,mint:RI,mintSepoliaTestnet:HI,mitosisTestnet:$I,mode:GI,modeTestnet:jI,monad:VI,monadTestnet:WI,moonbaseAlpha:qI,moonbeam:YI,moonbeamDev:KI,moonriver:ZI,morph:XI,morphHolesky:QI,morphSepolia:JI,nahmii:eU,nautilus:tU,near:rU,nearTestnet:nU,neonDevnet:sU,neonMainnet:aU,neoxMainnet:oU,neoxT4:iU,newton:cU,nexi:lU,nexilix:uU,nibiru:dU,nitrographTestnet:fU,nomina:pU,oasisTestnet:hU,oasys:mU,odysseyTestnet:bU,okc:yU,omax:gU,omni:xU,omniOmega:wU,oneWorld:vU,oortMainnetDev:kU,opBNB:EU,opBNBTestnet:CU,openledger:TU,optimism:SU,optimismGoerli:AU,optimismSepolia:PU,optopia:IU,optopiaTestnet:UU,orderly:OU,orderlySepolia:BU,otimDevnet:MU,palm:_U,palmTestnet:DU,peaq:FU,pgn:NU,pgnTestnet:zU,phoenix:LU,planq:RU,plasma:HU,plasmaDevnet:$U,plasmaTestnet:GU,playfiAlbireo:jU,plinga:VU,plume:WU,plumeDevnet:qU,plumeMainnet:YU,plumeSepolia:KU,plumeTestnet:ZU,polterTestnet:XU,polygon:QU,polygonAmoy:JU,polygonMumbai:eO,polygonZkEvm:tO,polygonZkEvmCardona:rO,polygonZkEvmTestnet:nO,polynomial:sO,polynomialSepolia:aO,potos:oO,potosTestnet:iO,premiumBlockTestnet:cO,pulsechain:lO,pulsechainV4:uO,pumpfiTestnet:dO,pyrope:fO,qMainnet:hO,qTestnet:mO,ql1:pO,quai:bO,quaiTestnet:yO,reactiveTestnet:gO,real:xO,redbellyMainnet:wO,redbellyTestnet:vO,reddio:kO,reddioSepolia:EO,redstone:CO,rei:TO,reyaNetwork:SO,riseTestnet:AO,rivalz:PO,rollux:IO,rolluxTestnet:UO,ronin:OO,root:BO,rootPorcini:MO,rootstock:_O,rootstockTestnet:DO,rss3:FO,rss3Sepolia:NO,saakuru:zO,saga:LO,saigon:RO,sanko:HO,sapphire:$O,sapphireTestnet:GO,satoshiVM:jO,satoshiVMTestnet:VO,scroll:WO,scrollSepolia:qO,sei:YO,seiDevnet:KO,seiTestnet:XO,seismicDevnet:ZO,sepolia:QO,shape:JO,shapeSepolia:eB,shardeum:tB,shardeumSphinx:rB,shibarium:nB,shibariumTestnet:sB,shiden:aB,shimmer:oB,shimmerTestnet:iB,sidraChain:cB,silentData:lB,silicon:uB,siliconSepolia:dB,sixProtocol:fB,skaleBase:TB,skaleBaseSepoliaTestnet:SB,skaleBlockBrawlers:pB,skaleCalypso:hB,skaleCalypsoTestnet:mB,skaleCryptoBlades:bB,skaleCryptoColosseum:yB,skaleEuropa:gB,skaleEuropaTestnet:xB,skaleExorde:wB,skaleHumanProtocol:vB,skaleNebula:kB,skaleNebulaTestnet:EB,skaleRazor:CB,skaleTitan:AB,skaleTitanTestnet:PB,sketchpad:IB,snax:UB,snaxTestnet:OB,somnia:BB,somniaTestnet:MB,soneium:_B,soneiumMinato:DB,songbird:FB,songbirdTestnet:NB,sonic:zB,sonicBlazeTestnet:LB,sonicTestnet:RB,sophon:HB,sophonTestnet:$B,sova:GB,sovaSepolia:jB,spicy:VB,stableTestnet:WB,statusNetworkSepolia:Oy,statusSepolia:Oy,step:qB,story:YB,storyAeneid:KB,storyOdyssey:ZB,storyTestnet:XB,stratis:QB,superlumio:JB,superposition:eM,superseed:tM,superseedSepolia:rM,surgeTestnet:nM,swan:sM,swanProximaTestnet:aM,swanSaturnTestnet:oM,swellchain:iM,swellchainTestnet:cM,swissdlt:lM,syscoin:uM,syscoinTestnet:dM,tac:fM,tacSPB:pM,taiko:hM,taikoHekla:mM,taikoHoodi:bM,taikoJolnir:yM,taikoKatla:gM,taikoTestnetSepolia:xM,taraxa:wM,taraxaTestnet:vM,teaSepolia:kM,telcoinTestnet:EM,telos:CM,telosTestnet:TM,tempoDevnet:U_,tempoLocalnet:O_,tempoTestnet:B_,tenet:M_,ternoa:__,thaiChain:D_,that:F_,theta:N_,thetaTestnet:z_,thunderCore:L_,thunderTestnet:R_,tiktrixTestnet:H_,tomb:$_,treasure:G_,treasureTopaz:j_,tron:V_,tronNile:W_,tronShasta:q_,ubiq:Y_,ultra:K_,ultraTestnet:Z_,ultron:X_,ultronTestnet:Q_,unichain:J_,unichainSepolia:eD,unique:tD,uniqueOpal:rD,uniqueQuartz:nD,unreal:sD,vana:aD,vanaMoksha:oD,vanar:iD,vechain:cD,velas:lD,viction:uD,victionTestnet:dD,vision:fD,visionTestnet:pD,wanchain:hD,wanchainTestnet:mD,weaveVMAlphanet:bD,wemix:yD,wemixTestnet:gD,westendAssetHub:xD,whitechain:wD,whitechainTestnet:vD,wmcTestnet:kD,worldLand:TD,worldchain:ED,worldchainSepolia:CD,x1Testnet:qy,xLayer:UD,xLayerTestnet:qy,xai:SD,xaiTestnet:AD,xdc:PD,xdcTestnet:ID,xoneMainnet:OD,xoneTestnet:BD,xphereMainnet:MD,xphereTestnet:_D,xrOne:DD,xrSepolia:LD,xrplevm:FD,xrplevmDevnet:ND,xrplevmTestnet:zD,yooldoVerse:RD,yooldoVerseTestnet:HD,zenchainTestnet:$D,zeniq:GD,zeroG:b7,zeroGGalileoTestnet:y7,zeroGMainnet:g7,zeroGTestnet:x7,zeroNetwork:jD,zetachain:VD,zetachainAthensTestnet:WD,zhejiang:qD,zilliqa:YD,zilliqaTestnet:KD,zircuit:ZD,zircuitGarfieldTestnet:XD,zircuitTestnet:QD,zkFair:JD,zkFairTestnet:eF,zkLinkNova:tF,zkLinkNovaSepoliaTestnet:rF,zkSync:Yy,zkSyncInMemoryNode:Ky,zkSyncLocalNode:Zy,zkSyncSepoliaTestnet:Xy,zksync:Yy,zksyncInMemoryNode:Ky,zksyncLocalCustomHyperchain:nF,zksyncLocalHyperchain:sF,zksyncLocalHyperchainL1:aF,zksyncLocalNode:Zy,zksyncSepoliaTestnet:Xy,zora:oF,zoraSepolia:iF,zoraTestnet:cF},Symbol.toStringTag,{value:"Module"})),Jy=f({id:747474,name:"Katana",network:"katana",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.katana.network"]}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),eg=f({id:143,name:"Monad",blockTime:400,nativeCurrency:{name:"Monad",symbol:"MON",decimals:18},rpcUrls:{default:{http:["https://rpc.monad.xyz","https://rpc1.monad.xyz"],webSocket:["wss://rpc.monad.xyz","wss://rpc1.monad.xyz"]}},blockExplorers:{default:{name:"MonadVision",url:"https://monadvision.com"},monadscan:{name:"Monadscan",url:"https://monadscan.com",apiUrl:"https://api.monadscan.com/api"}},testnet:!1,contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:9248132}}}),uF={...lF,[Jy.name]:Jy,[eg.name]:eg},dF=(e,t)=>{const r=Object.values(uF).find(o=>o.id===e);if(!r)return{walletClient:void 0,publicClient:void 0};const n=t?f7(t):void 0,s=n?d7({chain:r,transport:n}):void 0,a=qC({chain:r,transport:n||h7()});return{walletClient:s,publicClient:a}},fF=F.createContext(null),lp={didCatch:!1,error:null};class pF extends F.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=lp}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var r,n,s=arguments.length,a=new Array(s),o=0;o<s;o++)a[o]=arguments[o];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:a,reason:"imperative-api"}),this.setState(lp)}}componentDidCatch(t,r){var n,s;(n=(s=this.props).onError)===null||n===void 0||n.call(s,t,r)}componentDidUpdate(t,r){const{didCatch:n}=this.state,{resetKeys:s}=this.props;if(n&&r.error!==null&&hF(t.resetKeys,s)){var a,o;(a=(o=this.props).onReset)===null||a===void 0||a.call(o,{next:s,prev:t.resetKeys,reason:"keys"}),this.setState(lp)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:s}=this.props,{didCatch:a,error:o}=this.state;let i=t;if(a){const c={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")i=r(c);else if(n)i=F.createElement(n,c);else if(s!==void 0)i=s;else throw o}return F.createElement(fF.Provider,{value:{didCatch:a,error:o,resetErrorBoundary:this.resetErrorBoundary}},i)}}function hF(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((r,n)=>!Object.is(r,t[n]))}var mF=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,up=Math.ceil,pr=Math.floor,qt="[BigNumber Error] ",tg=qt+"Number primitive has more than 15 significant digits: ",Or=1e14,xe=14,dp=9007199254740991,fp=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Xn=1e7,Tt=1e9;function rg(e){var t,r,n,s=w.prototype={constructor:w,toString:null,valueOf:null},a=new w(1),o=20,i=4,c=-7,l=21,u=-1e7,d=1e7,p=!1,h=1,y=0,g={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},k="0123456789abcdefghijklmnopqrstuvwxyz",v=!0;function w(m,b){var x,A,I,U,D,E,P,M,B=this;if(!(B instanceof w))return new w(m,b);if(b==null){if(m&&m._isBigNumber===!0){B.s=m.s,!m.c||m.e>d?B.c=B.e=null:m.e<u?B.c=[B.e=0]:(B.e=m.e,B.c=m.c.slice());return}if((E=typeof m=="number")&&m*0==0){if(B.s=1/m<0?(m=-m,-1):1,m===~~m){for(U=0,D=m;D>=10;D/=10,U++);U>d?B.c=B.e=null:(B.e=U,B.c=[m]);return}M=String(m)}else{if(!mF.test(M=String(m)))return n(B,M,E);B.s=M.charCodeAt(0)==45?(M=M.slice(1),-1):1}(U=M.indexOf("."))>-1&&(M=M.replace(".","")),(D=M.search(/e/i))>0?(U<0&&(U=D),U+=+M.slice(D+1),M=M.substring(0,D)):U<0&&(U=M.length)}else{if(ct(b,2,k.length,"Base"),b==10&&v)return B=new w(m),z(B,o+B.e+1,i);if(M=String(m),E=typeof m=="number"){if(m*0!=0)return n(B,M,E,b);if(B.s=1/m<0?(M=M.slice(1),-1):1,w.DEBUG&&M.replace(/^0\.0*|\./,"").length>15)throw Error(tg+m)}else B.s=M.charCodeAt(0)===45?(M=M.slice(1),-1):1;for(x=k.slice(0,b),U=D=0,P=M.length;D<P;D++)if(x.indexOf(A=M.charAt(D))<0){if(A=="."){if(D>U){U=P;continue}}else if(!I&&(M==M.toUpperCase()&&(M=M.toLowerCase())||M==M.toLowerCase()&&(M=M.toUpperCase()))){I=!0,D=-1,U=0;continue}return n(B,String(m),E,b)}E=!1,M=r(M,b,10,B.s),(U=M.indexOf("."))>-1?M=M.replace(".",""):U=M.length}for(D=0;M.charCodeAt(D)===48;D++);for(P=M.length;M.charCodeAt(--P)===48;);if(M=M.slice(D,++P)){if(P-=D,E&&w.DEBUG&&P>15&&(m>dp||m!==pr(m)))throw Error(tg+B.s*m);if((U=U-D-1)>d)B.c=B.e=null;else if(U<u)B.c=[B.e=0];else{if(B.e=U,B.c=[],D=(U+1)%xe,U<0&&(D+=xe),D<P){for(D&&B.c.push(+M.slice(0,D)),P-=xe;D<P;)B.c.push(+M.slice(D,D+=xe));D=xe-(M=M.slice(D)).length}else D-=P;for(;D--;M+="0");B.c.push(+M)}}else B.c=[B.e=0]}w.clone=rg,w.ROUND_UP=0,w.ROUND_DOWN=1,w.ROUND_CEIL=2,w.ROUND_FLOOR=3,w.ROUND_HALF_UP=4,w.ROUND_HALF_DOWN=5,w.ROUND_HALF_EVEN=6,w.ROUND_HALF_CEIL=7,w.ROUND_HALF_FLOOR=8,w.EUCLID=9,w.config=w.set=function(m){var b,x;if(m!=null)if(typeof m=="object"){if(m.hasOwnProperty(b="DECIMAL_PLACES")&&(x=m[b],ct(x,0,Tt,b),o=x),m.hasOwnProperty(b="ROUNDING_MODE")&&(x=m[b],ct(x,0,8,b),i=x),m.hasOwnProperty(b="EXPONENTIAL_AT")&&(x=m[b],x&&x.pop?(ct(x[0],-Tt,0,b),ct(x[1],0,Tt,b),c=x[0],l=x[1]):(ct(x,-Tt,Tt,b),c=-(l=x<0?-x:x))),m.hasOwnProperty(b="RANGE"))if(x=m[b],x&&x.pop)ct(x[0],-Tt,-1,b),ct(x[1],1,Tt,b),u=x[0],d=x[1];else if(ct(x,-Tt,Tt,b),x)u=-(d=x<0?-x:x);else throw Error(qt+b+" cannot be zero: "+x);if(m.hasOwnProperty(b="CRYPTO"))if(x=m[b],x===!!x)if(x)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))p=x;else throw p=!x,Error(qt+"crypto unavailable");else p=x;else throw Error(qt+b+" not true or false: "+x);if(m.hasOwnProperty(b="MODULO_MODE")&&(x=m[b],ct(x,0,9,b),h=x),m.hasOwnProperty(b="POW_PRECISION")&&(x=m[b],ct(x,0,Tt,b),y=x),m.hasOwnProperty(b="FORMAT"))if(x=m[b],typeof x=="object")g=x;else throw Error(qt+b+" not an object: "+x);if(m.hasOwnProperty(b="ALPHABET"))if(x=m[b],typeof x=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(x))v=x.slice(0,10)=="0123456789",k=x;else throw Error(qt+b+" invalid: "+x)}else throw Error(qt+"Object expected: "+m);return{DECIMAL_PLACES:o,ROUNDING_MODE:i,EXPONENTIAL_AT:[c,l],RANGE:[u,d],CRYPTO:p,MODULO_MODE:h,POW_PRECISION:y,FORMAT:g,ALPHABET:k}},w.isBigNumber=function(m){if(!m||m._isBigNumber!==!0)return!1;if(!w.DEBUG)return!0;var b,x,A=m.c,I=m.e,U=m.s;e:if({}.toString.call(A)=="[object Array]"){if((U===1||U===-1)&&I>=-Tt&&I<=Tt&&I===pr(I)){if(A[0]===0){if(I===0&&A.length===1)return!0;break e}if(b=(I+1)%xe,b<1&&(b+=xe),String(A[0]).length==b){for(b=0;b<A.length;b++)if(x=A[b],x<0||x>=Or||x!==pr(x))break e;if(x!==0)return!0}}}else if(A===null&&I===null&&(U===null||U===1||U===-1))return!0;throw Error(qt+"Invalid BigNumber: "+m)},w.maximum=w.max=function(){return C(arguments,-1)},w.minimum=w.min=function(){return C(arguments,1)},w.random=(function(){var m=9007199254740992,b=Math.random()*m&2097151?function(){return pr(Math.random()*m)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(x){var A,I,U,D,E,P=0,M=[],B=new w(a);if(x==null?x=o:ct(x,0,Tt),D=up(x/xe),p)if(crypto.getRandomValues){for(A=crypto.getRandomValues(new Uint32Array(D*=2));P<D;)E=A[P]*131072+(A[P+1]>>>11),E>=9e15?(I=crypto.getRandomValues(new Uint32Array(2)),A[P]=I[0],A[P+1]=I[1]):(M.push(E%1e14),P+=2);P=D/2}else if(crypto.randomBytes){for(A=crypto.randomBytes(D*=7);P<D;)E=(A[P]&31)*281474976710656+A[P+1]*1099511627776+A[P+2]*4294967296+A[P+3]*16777216+(A[P+4]<<16)+(A[P+5]<<8)+A[P+6],E>=9e15?crypto.randomBytes(7).copy(A,P):(M.push(E%1e14),P+=7);P=D/7}else throw p=!1,Error(qt+"crypto unavailable");if(!p)for(;P<D;)E=b(),E<9e15&&(M[P++]=E%1e14);for(D=M[--P],x%=xe,D&&x&&(E=fp[xe-x],M[P]=pr(D/E)*E);M[P]===0;M.pop(),P--);if(P<0)M=[U=0];else{for(U=-1;M[0]===0;M.splice(0,1),U-=xe);for(P=1,E=M[0];E>=10;E/=10,P++);P<xe&&(U-=xe-P)}return B.e=U,B.c=M,B}})(),w.sum=function(){for(var m=1,b=arguments,x=new w(b[0]);m<b.length;)x=x.plus(b[m++]);return x},r=(function(){var m="0123456789";function b(x,A,I,U){for(var D,E=[0],P,M=0,B=x.length;M<B;){for(P=E.length;P--;E[P]*=A);for(E[0]+=U.indexOf(x.charAt(M++)),D=0;D<E.length;D++)E[D]>I-1&&(E[D+1]==null&&(E[D+1]=0),E[D+1]+=E[D]/I|0,E[D]%=I)}return E.reverse()}return function(x,A,I,U,D){var E,P,M,B,L,H,G,J,pe=x.indexOf("."),be=o,ie=i;for(pe>=0&&(B=y,y=0,x=x.replace(".",""),J=new w(A),H=J.pow(x.length-pe),y=B,J.c=b(vn(mr(H.c),H.e,"0"),10,I,m),J.e=J.c.length),G=b(x,A,I,D?(E=k,m):(E=m,k)),M=B=G.length;G[--B]==0;G.pop());if(!G[0])return E.charAt(0);if(pe<0?--M:(H.c=G,H.e=M,H.s=U,H=t(H,J,be,ie,I),G=H.c,L=H.r,M=H.e),P=M+be+1,pe=G[P],B=I/2,L=L||P<0||G[P+1]!=null,L=ie<4?(pe!=null||L)&&(ie==0||ie==(H.s<0?3:2)):pe>B||pe==B&&(ie==4||L||ie==6&&G[P-1]&1||ie==(H.s<0?8:7)),P<1||!G[0])x=L?vn(E.charAt(1),-be,E.charAt(0)):E.charAt(0);else{if(G.length=P,L)for(--I;++G[--P]>I;)G[P]=0,P||(++M,G=[1].concat(G));for(B=G.length;!G[--B];);for(pe=0,x="";pe<=B;x+=E.charAt(G[pe++]));x=vn(x,M,E.charAt(0))}return x}})(),t=(function(){function m(A,I,U){var D,E,P,M,B=0,L=A.length,H=I%Xn,G=I/Xn|0;for(A=A.slice();L--;)P=A[L]%Xn,M=A[L]/Xn|0,D=G*P+M*H,E=H*P+D%Xn*Xn+B,B=(E/U|0)+(D/Xn|0)+G*M,A[L]=E%U;return B&&(A=[B].concat(A)),A}function b(A,I,U,D){var E,P;if(U!=D)P=U>D?1:-1;else for(E=P=0;E<U;E++)if(A[E]!=I[E]){P=A[E]>I[E]?1:-1;break}return P}function x(A,I,U,D){for(var E=0;U--;)A[U]-=E,E=A[U]<I[U]?1:0,A[U]=E*D+A[U]-I[U];for(;!A[0]&&A.length>1;A.splice(0,1));}return function(A,I,U,D,E){var P,M,B,L,H,G,J,pe,be,ie,fe,Ue,Q,ve,_e,$e,ot,Se=A.s==I.s?1:-1,ke=A.c,ye=I.c;if(!ke||!ke[0]||!ye||!ye[0])return new w(!A.s||!I.s||(ke?ye&&ke[0]==ye[0]:!ye)?NaN:ke&&ke[0]==0||!ye?Se*0:Se/0);for(pe=new w(Se),be=pe.c=[],M=A.e-I.e,Se=U+M+1,E||(E=Or,M=hr(A.e/xe)-hr(I.e/xe),Se=Se/xe|0),B=0;ye[B]==(ke[B]||0);B++);if(ye[B]>(ke[B]||0)&&M--,Se<0)be.push(1),L=!0;else{for(ve=ke.length,$e=ye.length,B=0,Se+=2,H=pr(E/(ye[0]+1)),H>1&&(ye=m(ye,H,E),ke=m(ke,H,E),$e=ye.length,ve=ke.length),Q=$e,ie=ke.slice(0,$e),fe=ie.length;fe<$e;ie[fe++]=0);ot=ye.slice(),ot=[0].concat(ot),_e=ye[0],ye[1]>=E/2&&_e++;do{if(H=0,P=b(ye,ie,$e,fe),P<0){if(Ue=ie[0],$e!=fe&&(Ue=Ue*E+(ie[1]||0)),H=pr(Ue/_e),H>1)for(H>=E&&(H=E-1),G=m(ye,H,E),J=G.length,fe=ie.length;b(G,ie,J,fe)==1;)H--,x(G,$e<J?ot:ye,J,E),J=G.length,P=1;else H==0&&(P=H=1),G=ye.slice(),J=G.length;if(J<fe&&(G=[0].concat(G)),x(ie,G,fe,E),fe=ie.length,P==-1)for(;b(ye,ie,$e,fe)<1;)H++,x(ie,$e<fe?ot:ye,fe,E),fe=ie.length}else P===0&&(H++,ie=[0]);be[B++]=H,ie[0]?ie[fe++]=ke[Q]||0:(ie=[ke[Q]],fe=1)}while((Q++<ve||ie[0]!=null)&&Se--);L=ie[0]!=null,be[0]||be.splice(0,1)}if(E==Or){for(B=1,Se=be[0];Se>=10;Se/=10,B++);z(pe,U+(pe.e=B+M*xe-1)+1,D,L)}else pe.e=M,pe.r=+L;return pe}})();function S(m,b,x,A){var I,U,D,E,P;if(x==null?x=i:ct(x,0,8),!m.c)return m.toString();if(I=m.c[0],D=m.e,b==null)P=mr(m.c),P=A==1||A==2&&(D<=c||D>=l)?Ll(P,D):vn(P,D,"0");else if(m=z(new w(m),b,x),U=m.e,P=mr(m.c),E=P.length,A==1||A==2&&(b<=U||U<=c)){for(;E<b;P+="0",E++);P=Ll(P,U)}else if(b-=D+(A===2&&U>D),P=vn(P,U,"0"),U+1>E){if(--b>0)for(P+=".";b--;P+="0");}else if(b+=U-E,b>0)for(U+1==E&&(P+=".");b--;P+="0");return m.s<0&&I?"-"+P:P}function C(m,b){for(var x,A,I=1,U=new w(m[0]);I<m.length;I++)A=new w(m[I]),(!A.s||(x=zs(U,A))===b||x===0&&U.s===b)&&(U=A);return U}function _(m,b,x){for(var A=1,I=b.length;!b[--I];b.pop());for(I=b[0];I>=10;I/=10,A++);return(x=A+x*xe-1)>d?m.c=m.e=null:x<u?m.c=[m.e=0]:(m.e=x,m.c=b),m}n=(function(){var m=/^(-?)0([xbo])(?=\w[\w.]*$)/i,b=/^([^.]+)\.$/,x=/^\.([^.]+)$/,A=/^-?(Infinity|NaN)$/,I=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(U,D,E,P){var M,B=E?D:D.replace(I,"");if(A.test(B))U.s=isNaN(B)?null:B<0?-1:1;else{if(!E&&(B=B.replace(m,function(L,H,G){return M=(G=G.toLowerCase())=="x"?16:G=="b"?2:8,!P||P==M?H:L}),P&&(M=P,B=B.replace(b,"$1").replace(x,"0.$1")),D!=B))return new w(B,M);if(w.DEBUG)throw Error(qt+"Not a"+(P?" base "+P:"")+" number: "+D);U.s=null}U.c=U.e=null}})();function z(m,b,x,A){var I,U,D,E,P,M,B,L=m.c,H=fp;if(L){e:{for(I=1,E=L[0];E>=10;E/=10,I++);if(U=b-I,U<0)U+=xe,D=b,P=L[M=0],B=pr(P/H[I-D-1]%10);else if(M=up((U+1)/xe),M>=L.length)if(A){for(;L.length<=M;L.push(0));P=B=0,I=1,U%=xe,D=U-xe+1}else break e;else{for(P=E=L[M],I=1;E>=10;E/=10,I++);U%=xe,D=U-xe+I,B=D<0?0:pr(P/H[I-D-1]%10)}if(A=A||b<0||L[M+1]!=null||(D<0?P:P%H[I-D-1]),A=x<4?(B||A)&&(x==0||x==(m.s<0?3:2)):B>5||B==5&&(x==4||A||x==6&&(U>0?D>0?P/H[I-D]:0:L[M-1])%10&1||x==(m.s<0?8:7)),b<1||!L[0])return L.length=0,A?(b-=m.e+1,L[0]=H[(xe-b%xe)%xe],m.e=-b||0):L[0]=m.e=0,m;if(U==0?(L.length=M,E=1,M--):(L.length=M+1,E=H[xe-U],L[M]=D>0?pr(P/H[I-D]%H[D])*E:0),A)for(;;)if(M==0){for(U=1,D=L[0];D>=10;D/=10,U++);for(D=L[0]+=E,E=1;D>=10;D/=10,E++);U!=E&&(m.e++,L[0]==Or&&(L[0]=1));break}else{if(L[M]+=E,L[M]!=Or)break;L[M--]=0,E=1}for(U=L.length;L[--U]===0;L.pop());}m.e>d?m.c=m.e=null:m.e<u&&(m.c=[m.e=0])}return m}function T(m){var b,x=m.e;return x===null?m.toString():(b=mr(m.c),b=x<=c||x>=l?Ll(b,x):vn(b,x,"0"),m.s<0?"-"+b:b)}return s.absoluteValue=s.abs=function(){var m=new w(this);return m.s<0&&(m.s=1),m},s.comparedTo=function(m,b){return zs(this,new w(m,b))},s.decimalPlaces=s.dp=function(m,b){var x,A,I,U=this;if(m!=null)return ct(m,0,Tt),b==null?b=i:ct(b,0,8),z(new w(U),m+U.e+1,b);if(!(x=U.c))return null;if(A=((I=x.length-1)-hr(this.e/xe))*xe,I=x[I])for(;I%10==0;I/=10,A--);return A<0&&(A=0),A},s.dividedBy=s.div=function(m,b){return t(this,new w(m,b),o,i)},s.dividedToIntegerBy=s.idiv=function(m,b){return t(this,new w(m,b),0,1)},s.exponentiatedBy=s.pow=function(m,b){var x,A,I,U,D,E,P,M,B,L=this;if(m=new w(m),m.c&&!m.isInteger())throw Error(qt+"Exponent not an integer: "+T(m));if(b!=null&&(b=new w(b)),E=m.e>14,!L.c||!L.c[0]||L.c[0]==1&&!L.e&&L.c.length==1||!m.c||!m.c[0])return B=new w(Math.pow(+T(L),E?m.s*(2-zl(m)):+T(m))),b?B.mod(b):B;if(P=m.s<0,b){if(b.c?!b.c[0]:!b.s)return new w(NaN);A=!P&&L.isInteger()&&b.isInteger(),A&&(L=L.mod(b))}else{if(m.e>9&&(L.e>0||L.e<-1||(L.e==0?L.c[0]>1||E&&L.c[1]>=24e7:L.c[0]<8e13||E&&L.c[0]<=9999975e7)))return U=L.s<0&&zl(m)?-0:0,L.e>-1&&(U=1/U),new w(P?1/U:U);y&&(U=up(y/xe+2))}for(E?(x=new w(.5),P&&(m.s=1),M=zl(m)):(I=Math.abs(+T(m)),M=I%2),B=new w(a);;){if(M){if(B=B.times(L),!B.c)break;U?B.c.length>U&&(B.c.length=U):A&&(B=B.mod(b))}if(I){if(I=pr(I/2),I===0)break;M=I%2}else if(m=m.times(x),z(m,m.e+1,1),m.e>14)M=zl(m);else{if(I=+T(m),I===0)break;M=I%2}L=L.times(L),U?L.c&&L.c.length>U&&(L.c.length=U):A&&(L=L.mod(b))}return A?B:(P&&(B=a.div(B)),b?B.mod(b):U?z(B,y,i,D):B)},s.integerValue=function(m){var b=new w(this);return m==null?m=i:ct(m,0,8),z(b,b.e+1,m)},s.isEqualTo=s.eq=function(m,b){return zs(this,new w(m,b))===0},s.isFinite=function(){return!!this.c},s.isGreaterThan=s.gt=function(m,b){return zs(this,new w(m,b))>0},s.isGreaterThanOrEqualTo=s.gte=function(m,b){return(b=zs(this,new w(m,b)))===1||b===0},s.isInteger=function(){return!!this.c&&hr(this.e/xe)>this.c.length-2},s.isLessThan=s.lt=function(m,b){return zs(this,new w(m,b))<0},s.isLessThanOrEqualTo=s.lte=function(m,b){return(b=zs(this,new w(m,b)))===-1||b===0},s.isNaN=function(){return!this.s},s.isNegative=function(){return this.s<0},s.isPositive=function(){return this.s>0},s.isZero=function(){return!!this.c&&this.c[0]==0},s.minus=function(m,b){var x,A,I,U,D=this,E=D.s;if(m=new w(m,b),b=m.s,!E||!b)return new w(NaN);if(E!=b)return m.s=-b,D.plus(m);var P=D.e/xe,M=m.e/xe,B=D.c,L=m.c;if(!P||!M){if(!B||!L)return B?(m.s=-b,m):new w(L?D:NaN);if(!B[0]||!L[0])return L[0]?(m.s=-b,m):new w(B[0]?D:i==3?-0:0)}if(P=hr(P),M=hr(M),B=B.slice(),E=P-M){for((U=E<0)?(E=-E,I=B):(M=P,I=L),I.reverse(),b=E;b--;I.push(0));I.reverse()}else for(A=(U=(E=B.length)<(b=L.length))?E:b,E=b=0;b<A;b++)if(B[b]!=L[b]){U=B[b]<L[b];break}if(U&&(I=B,B=L,L=I,m.s=-m.s),b=(A=L.length)-(x=B.length),b>0)for(;b--;B[x++]=0);for(b=Or-1;A>E;){if(B[--A]<L[A]){for(x=A;x&&!B[--x];B[x]=b);--B[x],B[A]+=Or}B[A]-=L[A]}for(;B[0]==0;B.splice(0,1),--M);return B[0]?_(m,B,M):(m.s=i==3?-1:1,m.c=[m.e=0],m)},s.modulo=s.mod=function(m,b){var x,A,I=this;return m=new w(m,b),!I.c||!m.s||m.c&&!m.c[0]?new w(NaN):!m.c||I.c&&!I.c[0]?new w(I):(h==9?(A=m.s,m.s=1,x=t(I,m,0,3),m.s=A,x.s*=A):x=t(I,m,0,h),m=I.minus(x.times(m)),!m.c[0]&&h==1&&(m.s=I.s),m)},s.multipliedBy=s.times=function(m,b){var x,A,I,U,D,E,P,M,B,L,H,G,J,pe,be,ie=this,fe=ie.c,Ue=(m=new w(m,b)).c;if(!fe||!Ue||!fe[0]||!Ue[0])return!ie.s||!m.s||fe&&!fe[0]&&!Ue||Ue&&!Ue[0]&&!fe?m.c=m.e=m.s=null:(m.s*=ie.s,!fe||!Ue?m.c=m.e=null:(m.c=[0],m.e=0)),m;for(A=hr(ie.e/xe)+hr(m.e/xe),m.s*=ie.s,P=fe.length,L=Ue.length,P<L&&(J=fe,fe=Ue,Ue=J,I=P,P=L,L=I),I=P+L,J=[];I--;J.push(0));for(pe=Or,be=Xn,I=L;--I>=0;){for(x=0,H=Ue[I]%be,G=Ue[I]/be|0,D=P,U=I+D;U>I;)M=fe[--D]%be,B=fe[D]/be|0,E=G*M+B*H,M=H*M+E%be*be+J[U]+x,x=(M/pe|0)+(E/be|0)+G*B,J[U--]=M%pe;J[U]=x}return x?++A:J.splice(0,1),_(m,J,A)},s.negated=function(){var m=new w(this);return m.s=-m.s||null,m},s.plus=function(m,b){var x,A=this,I=A.s;if(m=new w(m,b),b=m.s,!I||!b)return new w(NaN);if(I!=b)return m.s=-b,A.minus(m);var U=A.e/xe,D=m.e/xe,E=A.c,P=m.c;if(!U||!D){if(!E||!P)return new w(I/0);if(!E[0]||!P[0])return P[0]?m:new w(E[0]?A:I*0)}if(U=hr(U),D=hr(D),E=E.slice(),I=U-D){for(I>0?(D=U,x=P):(I=-I,x=E),x.reverse();I--;x.push(0));x.reverse()}for(I=E.length,b=P.length,I-b<0&&(x=P,P=E,E=x,b=I),I=0;b;)I=(E[--b]=E[b]+P[b]+I)/Or|0,E[b]=Or===E[b]?0:E[b]%Or;return I&&(E=[I].concat(E),++D),_(m,E,D)},s.precision=s.sd=function(m,b){var x,A,I,U=this;if(m!=null&&m!==!!m)return ct(m,1,Tt),b==null?b=i:ct(b,0,8),z(new w(U),m,b);if(!(x=U.c))return null;if(I=x.length-1,A=I*xe+1,I=x[I]){for(;I%10==0;I/=10,A--);for(I=x[0];I>=10;I/=10,A++);}return m&&U.e+1>A&&(A=U.e+1),A},s.shiftedBy=function(m){return ct(m,-dp,dp),this.times("1e"+m)},s.squareRoot=s.sqrt=function(){var m,b,x,A,I,U=this,D=U.c,E=U.s,P=U.e,M=o+4,B=new w("0.5");if(E!==1||!D||!D[0])return new w(!E||E<0&&(!D||D[0])?NaN:D?U:1/0);if(E=Math.sqrt(+T(U)),E==0||E==1/0?(b=mr(D),(b.length+P)%2==0&&(b+="0"),E=Math.sqrt(+b),P=hr((P+1)/2)-(P<0||P%2),E==1/0?b="5e"+P:(b=E.toExponential(),b=b.slice(0,b.indexOf("e")+1)+P),x=new w(b)):x=new w(E+""),x.c[0]){for(P=x.e,E=P+M,E<3&&(E=0);;)if(I=x,x=B.times(I.plus(t(U,I,M,1))),mr(I.c).slice(0,E)===(b=mr(x.c)).slice(0,E))if(x.e<P&&--E,b=b.slice(E-3,E+1),b=="9999"||!A&&b=="4999"){if(!A&&(z(I,I.e+o+2,0),I.times(I).eq(U))){x=I;break}M+=4,E+=4,A=1}else{(!+b||!+b.slice(1)&&b.charAt(0)=="5")&&(z(x,x.e+o+2,1),m=!x.times(x).eq(U));break}}return z(x,x.e+o+1,i,m)},s.toExponential=function(m,b){return m!=null&&(ct(m,0,Tt),m++),S(this,m,b,1)},s.toFixed=function(m,b){return m!=null&&(ct(m,0,Tt),m=m+this.e+1),S(this,m,b)},s.toFormat=function(m,b,x){var A,I=this;if(x==null)m!=null&&b&&typeof b=="object"?(x=b,b=null):m&&typeof m=="object"?(x=m,m=b=null):x=g;else if(typeof x!="object")throw Error(qt+"Argument not an object: "+x);if(A=I.toFixed(m,b),I.c){var U,D=A.split("."),E=+x.groupSize,P=+x.secondaryGroupSize,M=x.groupSeparator||"",B=D[0],L=D[1],H=I.s<0,G=H?B.slice(1):B,J=G.length;if(P&&(U=E,E=P,P=U,J-=U),E>0&&J>0){for(U=J%E||E,B=G.substr(0,U);U<J;U+=E)B+=M+G.substr(U,E);P>0&&(B+=M+G.slice(U)),H&&(B="-"+B)}A=L?B+(x.decimalSeparator||"")+((P=+x.fractionGroupSize)?L.replace(new RegExp("\\d{"+P+"}\\B","g"),"$&"+(x.fractionGroupSeparator||"")):L):B}return(x.prefix||"")+A+(x.suffix||"")},s.toFraction=function(m){var b,x,A,I,U,D,E,P,M,B,L,H,G=this,J=G.c;if(m!=null&&(E=new w(m),!E.isInteger()&&(E.c||E.s!==1)||E.lt(a)))throw Error(qt+"Argument "+(E.isInteger()?"out of range: ":"not an integer: ")+T(E));if(!J)return new w(G);for(b=new w(a),M=x=new w(a),A=P=new w(a),H=mr(J),U=b.e=H.length-G.e-1,b.c[0]=fp[(D=U%xe)<0?xe+D:D],m=!m||E.comparedTo(b)>0?U>0?b:M:E,D=d,d=1/0,E=new w(H),P.c[0]=0;B=t(E,b,0,1),I=x.plus(B.times(A)),I.comparedTo(m)!=1;)x=A,A=I,M=P.plus(B.times(I=M)),P=I,b=E.minus(B.times(I=b)),E=I;return I=t(m.minus(x),A,0,1),P=P.plus(I.times(M)),x=x.plus(I.times(A)),P.s=M.s=G.s,U=U*2,L=t(M,A,U,i).minus(G).abs().comparedTo(t(P,x,U,i).minus(G).abs())<1?[M,A]:[P,x],d=D,L},s.toNumber=function(){return+T(this)},s.toPrecision=function(m,b){return m!=null&&ct(m,1,Tt),S(this,m,b,2)},s.toString=function(m){var b,x=this,A=x.s,I=x.e;return I===null?A?(b="Infinity",A<0&&(b="-"+b)):b="NaN":(m==null?b=I<=c||I>=l?Ll(mr(x.c),I):vn(mr(x.c),I,"0"):m===10&&v?(x=z(new w(x),o+I+1,i),b=vn(mr(x.c),x.e,"0")):(ct(m,2,k.length,"Base"),b=r(vn(mr(x.c),I,"0"),10,m,A,!0)),A<0&&x.c[0]&&(b="-"+b)),b},s.valueOf=s.toJSON=function(){return T(this)},s._isBigNumber=!0,s[Symbol.toStringTag]="BigNumber",s[Symbol.for("nodejs.util.inspect.custom")]=s.valueOf,e!=null&&w.set(e),w}function hr(e){var t=e|0;return e>0||e===t?t:t-1}function mr(e){for(var t,r,n=1,s=e.length,a=e[0]+"";n<s;){for(t=e[n++]+"",r=xe-t.length;r--;t="0"+t);a+=t}for(s=a.length;a.charCodeAt(--s)===48;);return a.slice(0,s+1||1)}function zs(e,t){var r,n,s=e.c,a=t.c,o=e.s,i=t.s,c=e.e,l=t.e;if(!o||!i)return null;if(r=s&&!s[0],n=a&&!a[0],r||n)return r?n?0:-i:o;if(o!=i)return o;if(r=o<0,n=c==l,!s||!a)return n?0:!s^r?1:-1;if(!n)return c>l^r?1:-1;for(i=(c=s.length)<(l=a.length)?c:l,o=0;o<i;o++)if(s[o]!=a[o])return s[o]>a[o]^r?1:-1;return c==l?0:c>l^r?1:-1}function ct(e,t,r,n){if(e<t||e>r||e!==pr(e))throw Error(qt+(n||"Argument")+(typeof e=="number"?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function zl(e){var t=e.c.length-1;return hr(e.e/xe)==t&&e.c[t]%2!=0}function Ll(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function vn(e,t,r){var n,s;if(t<0){for(s=r+".";++t;s+=r);e=s+e}else if(n=e.length,++t>n){for(s=r,t-=n;--t;s+=r);e+=s}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var ue=rg(),Ot=(e=>(e[e.EMPTY_LIMIT_PRICE=0]="EMPTY_LIMIT_PRICE",e[e.MAX_CHUNKS=1]="MAX_CHUNKS",e[e.MIN_CHUNKS=2]="MIN_CHUNKS",e[e.MIN_TRADE_SIZE=3]="MIN_TRADE_SIZE",e[e.MAX_FILL_DELAY=4]="MAX_FILL_DELAY",e[e.MIN_FILL_DELAY=5]="MIN_FILL_DELAY",e[e.MAX_ORDER_DURATION=6]="MAX_ORDER_DURATION",e[e.MIN_ORDER_DURATION=7]="MIN_ORDER_DURATION",e[e.MISSING_LIMIT_PRICE=8]="MISSING_LIMIT_PRICE",e[e.STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE=9]="STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE",e[e.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE=10]="TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE",e[e.TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE=11]="TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE",e[e.EMPTY_TRIGGER_PRICE=12]="EMPTY_TRIGGER_PRICE",e[e.INSUFFICIENT_BALANCE=13]="INSUFFICIENT_BALANCE",e[e.MAX_ORDER_SIZE=14]="MAX_ORDER_SIZE",e))(Ot||{}),Ls=(e=>(e.WRAP="wrap",e.APPROVE="approve",e.CREATE="create",e))(Ls||{});const bF=e=>e.replace(/,/g,""),yF=async e=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.warn("Copy failed",t),!1}},ng=e=>{if(!e)return"";const t=Math.floor(e/1e3),r=Math.floor(t/(1440*60)),n=Math.floor(t%(1440*60)/3600),s=Math.floor(t%3600/60),a=t%60,o=[];return r&&o.push(`${r} days `),n&&o.push(`${n} hours `),s&&o.push(`${s} minutes`),a&&o.push(`${a} seconds`),o.join(" ")},pp=(e,t)=>e?`${e.substring(0,(t==null?void 0:t.start)||6)}...${e.substring(e.length-((t==null?void 0:t.end)||5))}`:"",gF=e=>{const t="An error occurred.";if(!e||!e.message)return t;try{return e.message.toLowerCase().indexOf("rejected")?"Transaction Rejected":t}catch{return t}};function Pi(e,t=6,r=8){if(!e)return"";const n=e.startsWith("-")?"-":"",s=n?e.slice(1):e,[a,o=""]=s.split(".");if(!o||Number(o)===0)return n+a;if(a!=="0"){const p=o.slice(0,t).replace(/0+$/,""),h=p?"."+p:"";return n+a+h}const i=o.search(/[^0]/);if(i===-1||i+1>r)return"0";const c=o.slice(0,i),u=o.slice(i).slice(0,t).replace(/0+$/,"");return u?n+"0."+c+u:"0"}const hp=e=>{var t,r,n,s;if(e!=null&&e.message)return((r=(t=e.message)==null?void 0:t.toLowerCase())==null?void 0:r.includes("rejected"))||((s=(n=e.message)==null?void 0:n.toLowerCase())==null?void 0:s.includes("denied"))},xF=e=>{switch(e){case R.networks.base.id:return 1e-4;default:return .01}},sg=(e,t,r)=>{if(!ue(e.srcAmountFilled||0).gt(0)||!ue(e.dstAmountFilled||0).gt(0))return"";const n=R.amountUi(t,e.srcAmountFilled),s=R.amountUi(r,e.dstAmountFilled);return ue(s).div(n).toFixed()},ag=(e,t,r)=>{if(e.type===R.OrderType.TWAP_MARKET)return"";const n=R.amountUi(t,e.srcAmountPerTrade),s=R.amountUi(r,e.dstMinAmountPerTrade);return ue(s).div(n).toFixed()},og=(e,t)=>{const r=R.getNetwork(t);return r&&R.isNativeAddress(e.address)?r.wToken:e};function ig(e){return e?e/864e5:0}function mp(e){return e?e/6e4:0}const wF=(e,t)=>e?R.OrderType.TWAP_MARKET:t===1?R.OrderType.LIMIT:R.OrderType.TWAP_LIMIT,bp=(e,t,r)=>{const n=R.getNetwork(r);return R.isNativeAddress((e==null?void 0:e.address)||"")&&R.eqIgnoreCase((t==null?void 0:t.address)||"",(n==null?void 0:n.wToken.address)||"")},yp=(e,t,r)=>{const n=R.getNetwork(r);return R.eqIgnoreCase((e==null?void 0:e.address)||"",(n==null?void 0:n.wToken.address)||"")&&R.isNativeAddress((t==null?void 0:t.address)||"")},Ii=(e,t)=>{if(!t)return"";const r=R.getNetwork(t);return`${r==null?void 0:r.explorer}/tx/${e}`},vF=()=>O.jsx("div",{className:"twap-error-fallback",children:O.jsx("p",{style:{fontSize:20,fontWeight:600,textAlign:"center",width:"100%",marginTop:40},children:"Something went wrong"})});function kF({children:e}){return O.jsx(pF,{FallbackComponent:vF,children:O.jsx(O.Fragment,{children:e})})}const gp=F.createContext({}),EF=new Y2({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),CF=e=>{var n,s,a;const t=K(o=>o.updateState),r=K(o=>o.state.isMarketOrder);return F.useEffect(()=>{setInterval(()=>{t({currentTime:Date.now()})},6e4)},[t]),F.useEffect(()=>{var o,i,c,l,u,d,p,h,y,g,k,v;t({isMarketOrder:e.module!==R.Module.LIMIT?!1:(i=(o=e.overrides)==null?void 0:o.state)==null?void 0:i.isMarketOrder,typedChunks:(l=(c=e.overrides)==null?void 0:c.state)==null?void 0:l.chunks,typedFillDelay:(d=(u=e.overrides)==null?void 0:u.state)==null?void 0:d.fillDelay,typedDuration:(h=(p=e.overrides)==null?void 0:p.state)==null?void 0:h.duration,typedLimitPrice:(g=(y=e.overrides)==null?void 0:y.state)==null?void 0:g.limitPrice,typedTriggerPrice:(v=(k=e.overrides)==null?void 0:k.state)==null?void 0:v.triggerPrice,triggerPricePercent:void 0,limitPricePercent:void 0})},[(n=e.overrides)==null?void 0:n.state,e.module]),F.useEffect(()=>{var o,i,c,l;t({typedLimitPrice:(i=(o=e.overrides)==null?void 0:o.state)==null?void 0:i.limitPrice,typedTriggerPrice:(l=(c=e.overrides)==null?void 0:c.state)==null?void 0:l.triggerPrice,triggerPricePercent:void 0,limitPricePercent:void 0})},[(s=e.srcToken)==null?void 0:s.address,(a=e.dstToken)==null?void 0:a.address]),F.useEffect(()=>{e.module===R.Module.LIMIT&&t({isMarketOrder:!1})},[e.module]),F.useEffect(()=>{r&&t({isInvertedTrade:!1})},[r]),null},TF=({marketReferencePrice:e,srcToken:t,dstToken:r,chainId:n})=>{const s=K(a=>a.state.typedSrcAmount);return F.useMemo(()=>{if(bp(t,r,n)||yp(t,r,n))return{isLoading:!1,noLiquidity:!1,value:R.amountBN((t==null?void 0:t.decimals)||18,s||"0")};if(ue(e.value||0).isZero()||ue(s||0).isZero())return e;const a=ue(e.value||0).dividedBy(s||0).toFixed();return{...e,value:a}},[e,s,t,r,n])},SF=e=>{const t=R.getQueryParam(R.QUERY_PARAMS.MIN_CHUNK_SIZE_USD);return t?parseInt(t):e},AF=e=>{const t=K(i=>i.state.acceptedMarketPrice),{walletClient:r,publicClient:n}=F.useMemo(()=>dF(e.chainId,e.provider),[e.chainId,e.provider]),s=F.useMemo(()=>R.getConfig(e.chainId,e.partner),[e.chainId,e.partner]),a=TF(e),o=F.useMemo(()=>SF(e.minChunkSizeUsd),[e.minChunkSizeUsd]);return F.useEffect(()=>{R.analytics.onLoad(),s&&e.chainId&&R.analytics.init(s,o,e.chainId)},[s,e.chainId,o]),O.jsxs(gp.Provider,{value:{...e,minChunkSizeUsd:o,account:e.account,walletClient:r,publicClient:n,marketPrice:t||a.value,marketPriceLoading:!t&&a.isLoading,noLiquidity:!t&&a.noLiquidity,config:s,slippage:e.priceProtection},children:[O.jsx(CF,{...e}),O.jsx(kF,{children:e.children})]})},PF=e=>O.jsx(K2,{client:EF,children:O.jsx(AF,{...e})}),oe=()=>{if(!gp)throw new Error("useTwapContext must be used within a WidgetProvider");return F.useContext(gp)};//! moment.js
|
|
38
|
+
`),{cause:t,name:"TipAboveFeeCapError"})}};Object.defineProperty(Ca,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class Vo extends ${constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function Tc(e,t){const r=(e.details||"").toLowerCase(),n=e instanceof $?e.walk(s=>(s==null?void 0:s.code)===Ea.code):e;return n instanceof $?new Ea({cause:e,message:n.details}):Ea.nodeMessage.test(r)?new Ea({cause:e,message:e.details}):Gn.nodeMessage.test(r)?new Gn({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):id.nodeMessage.test(r)?new id({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):cd.nodeMessage.test(r)?new cd({cause:e,nonce:t==null?void 0:t.nonce}):ld.nodeMessage.test(r)?new ld({cause:e,nonce:t==null?void 0:t.nonce}):ud.nodeMessage.test(r)?new ud({cause:e,nonce:t==null?void 0:t.nonce}):dd.nodeMessage.test(r)?new dd({cause:e}):fd.nodeMessage.test(r)?new fd({cause:e,gas:t==null?void 0:t.gas}):pd.nodeMessage.test(r)?new pd({cause:e,gas:t==null?void 0:t.gas}):hd.nodeMessage.test(r)?new hd({cause:e}):Ca.nodeMessage.test(r)?new Ca({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new Vo({cause:e})}function Bv(e,{docsPath:t,...r}){const n=(()=>{const s=Tc(e,r);return s instanceof Vo?e:s})();return new Ov(n,{docsPath:t,...r})}function As(e,{format:t}){if(!t)return{};const r={};function n(a){const o=Object.keys(a);for(const i of o)i in e&&(r[i]=e[i]),a[i]&&typeof a[i]=="object"&&!Array.isArray(a[i])&&n(a[i])}const s=t(e||{});return n(s),r}function Sc(e,t){return({exclude:r,format:n})=>({exclude:r,format:(s,a)=>{const o=t(s,a);if(r)for(const i of r)delete o[i];return{...o,...n(s,a)}},type:e})}const Mv={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Sr(e,t){const r={};return typeof e.authorizationList<"u"&&(r.authorizationList=_v(e.authorizationList)),typeof e.accessList<"u"&&(r.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(r.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?r.blobs=e.blobs.map(n=>bt(n)):r.blobs=e.blobs),typeof e.data<"u"&&(r.data=e.data),e.account&&(r.from=e.account.address),typeof e.from<"u"&&(r.from=e.from),typeof e.gas<"u"&&(r.gas=W(e.gas)),typeof e.gasPrice<"u"&&(r.gasPrice=W(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(r.maxFeePerBlobGas=W(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(r.maxFeePerGas=W(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(r.maxPriorityFeePerGas=W(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(r.nonce=W(e.nonce)),typeof e.to<"u"&&(r.to=e.to),typeof e.type<"u"&&(r.type=Mv[e.type]),typeof e.value<"u"&&(r.value=W(e.value)),r}const md=Sc("transactionRequest",Sr);function _v(e){return e.map(t=>({address:t.address,r:t.r?W(BigInt(t.r)):t.r,s:t.s?W(BigInt(t.s)):t.s,chainId:W(t.chainId),nonce:W(t.nonce),...typeof t.yParity<"u"?{yParity:W(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:W(t.v)}:{}}))}function Lm(e){if(!(!e||e.length===0))return e.reduce((t,{slot:r,value:n})=>{if(r.length!==66)throw new Yh({size:r.length,targetSize:66,type:"hex"});if(n.length!==66)throw new Yh({size:n.length,targetSize:66,type:"hex"});return t[r]=n,t},{})}function Uv(e){const{balance:t,nonce:r,state:n,stateDiff:s,code:a}=e,o={};if(a!==void 0&&(o.code=a),t!==void 0&&(o.balance=W(t)),r!==void 0&&(o.nonce=W(r)),n!==void 0&&(o.state=Lm(n)),s!==void 0){if(o.state)throw new fv;o.stateDiff=Lm(s)}return o}function bd(e){if(!e)return;const t={};for(const{address:r,...n}of e){if(!rt(r,{strict:!1}))throw new xt({address:r});if(t[r])throw new dv({address:r});t[r]=Uv(n)}return t}const Dv=2n**16n-1n,Ps=2n**256n-1n;function jr(e){const{account:t,maxFeePerGas:r,maxPriorityFeePerGas:n,to:s}=e,a=t?Ke(t):void 0;if(a&&!rt(a.address))throw new xt({address:a.address});if(s&&!rt(s))throw new xt({address:s});if(r&&r>Ps)throw new Gn({maxFeePerGas:r});if(n&&r&&n>r)throw new Ca({maxFeePerGas:r,maxPriorityFeePerGas:n})}class Rm extends ${constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class yd extends ${constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class Fv extends ${constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Gt(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class Hm extends ${constructor({blockHash:t,blockNumber:r}){let n="Block";t&&(n=`Block at hash "${t}"`),r&&(n=`Block at number "${r}"`),super(`${n} could not be found.`,{name:"BlockNotFoundError"})}}const $m={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Is(e,t){const r={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?Jt(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?Jt(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?$m[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&&(r.authorizationList=Nv(e.authorizationList)),r.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof r.v=="bigint"){if(r.v===0n||r.v===27n)return 0;if(r.v===1n||r.v===28n)return 1;if(r.v>=35n)return r.v%2n===0n?1:0}})(),r.type==="legacy"&&(delete r.accessList,delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas,delete r.yParity),r.type==="eip2930"&&(delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas),r.type==="eip1559"&&delete r.maxFeePerBlobGas,r}const Ac=Sc("transaction",Is);function Nv(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function gd(e,t){const r=(e.transactions??[]).map(n=>typeof n=="string"?n:Is(n));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:r,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const xd=Sc("block",gd);async function Ar(e,{blockHash:t,blockNumber:r,blockTag:n=e.experimental_blockTag??"latest",includeTransactions:s}={}){var l,u,d;const a=s??!1,o=r!==void 0?W(r):void 0;let i=null;if(t?i=await e.request({method:"eth_getBlockByHash",params:[t,a]},{dedupe:!0}):i=await e.request({method:"eth_getBlockByNumber",params:[o||n,a]},{dedupe:!!o}),!i)throw new Hm({blockHash:t,blockNumber:r});return(((d=(u=(l=e.chain)==null?void 0:l.formatters)==null?void 0:u.block)==null?void 0:d.format)||gd)(i,"getBlock")}async function wd(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function zv(e,t){return Gm(e,t)}async function Gm(e,t){var a,o;const{block:r,chain:n=e.chain,request:s}=t||{};try{const i=((a=n==null?void 0:n.fees)==null?void 0:a.maxPriorityFeePerGas)??((o=n==null?void 0:n.fees)==null?void 0:o.defaultPriorityFee);if(typeof i=="function"){const l=r||await ne(e,Ar,"getBlock")({}),u=await i({block:l,client:e,request:s});if(u===null)throw new Error;return u}if(typeof i<"u")return i;const c=await e.request({method:"eth_maxPriorityFeePerGas"});return Ne(c)}catch{const[i,c]=await Promise.all([r?Promise.resolve(r):ne(e,Ar,"getBlock")({}),ne(e,wd,"getGasPrice")({})]);if(typeof i.baseFeePerGas!="bigint")throw new yd;const l=c-i.baseFeePerGas;return l<0n?0n:l}}async function Lv(e,t){return vd(e,t)}async function vd(e,t){var p,h;const{block:r,chain:n=e.chain,request:s,type:a="eip1559"}=t||{},o=await(async()=>{var y,g;return typeof((y=n==null?void 0:n.fees)==null?void 0:y.baseFeeMultiplier)=="function"?n.fees.baseFeeMultiplier({block:r,client:e,request:s}):((g=n==null?void 0:n.fees)==null?void 0:g.baseFeeMultiplier)??1.2})();if(o<1)throw new Rm;const c=10**(((p=o.toString().split(".")[1])==null?void 0:p.length)??0),l=y=>y*BigInt(Math.ceil(o*c))/BigInt(c),u=r||await ne(e,Ar,"getBlock")({});if(typeof((h=n==null?void 0:n.fees)==null?void 0:h.estimateFeesPerGas)=="function"){const y=await n.fees.estimateFeesPerGas({block:r,client:e,multiply:l,request:s,type:a});if(y!==null)return y}if(a==="eip1559"){if(typeof u.baseFeePerGas!="bigint")throw new yd;const y=typeof(s==null?void 0:s.maxPriorityFeePerGas)=="bigint"?s.maxPriorityFeePerGas:await Gm(e,{block:u,chain:n,request:s}),g=l(u.baseFeePerGas);return{maxFeePerGas:(s==null?void 0:s.maxFeePerGas)??g+y,maxPriorityFeePerGas:y}}return{gasPrice:(s==null?void 0:s.gasPrice)??l(await ne(e,wd,"getGasPrice")({}))}}async function kd(e,{address:t,blockTag:r="latest",blockNumber:n}){const s=await e.request({method:"eth_getTransactionCount",params:[t,typeof n=="bigint"?W(n):r]},{dedupe:!!n});return Jt(s)}function Ed(e){const{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),n=typeof e.blobs[0]=="string"?e.blobs.map(a=>er(a)):e.blobs,s=[];for(const a of n)s.push(Uint8Array.from(t.blobToKzgCommitment(a)));return r==="bytes"?s:s.map(a=>bt(a))}function Cd(e){const{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),n=typeof e.blobs[0]=="string"?e.blobs.map(o=>er(o)):e.blobs,s=typeof e.commitments[0]=="string"?e.commitments.map(o=>er(o)):e.commitments,a=[];for(let o=0;o<n.length;o++){const i=n[o],c=s[o];a.push(Uint8Array.from(t.computeBlobKzgProof(i,c)))}return r==="bytes"?a:a.map(o=>bt(o))}function Rv(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);const s=BigInt(32),a=BigInt(4294967295),o=Number(r>>s&a),i=Number(r&a),c=n?4:0,l=n?0:4;e.setUint32(t+c,o,n),e.setUint32(t+l,i,n)}function Hv(e,t,r){return e&t^~e&r}function $v(e,t,r){return e&t^e&r^t&r}class jm extends Wu{constructor(t,r,n,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=s,this.buffer=new Uint8Array(t),this.view=Vu(this.buffer)}update(t){ba(this),t=xc(t),ws(t);const{view:r,buffer:n,blockLen:s}=this,a=t.length;for(let o=0;o<a;){const i=Math.min(s-this.pos,a-o);if(i===s){const c=Vu(t);for(;s<=a-o;o+=s)this.process(c,o);continue}n.set(t.subarray(o,o+i),this.pos),this.pos+=i,o+=i,this.pos===s&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){ba(this),rm(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:s,isLE:a}=this;let{pos:o}=this;r[o++]=128,Rn(this.buffer.subarray(o)),this.padOffset>s-o&&(this.process(n,0),o=0);for(let d=o;d<s;d++)r[d]=0;Rv(n,s-8,BigInt(this.length*8),a),this.process(n,0);const i=Vu(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<l;d++)i.setUint32(4*d,u[d],a)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:n,length:s,finished:a,destroyed:o,pos:i}=this;return t.destroyed=o,t.finished=a,t.length=s,t.pos=i,s%r&&t.buffer.set(n),t}clone(){return this._cloneInto()}}const jn=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),It=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),Ot=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),Gv=Uint32Array.from([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,2756734187,3204031479,3329325298]),Vn=new Uint32Array(64);class jv extends jm{constructor(t=32){super(64,t,8,!1),this.A=jn[0]|0,this.B=jn[1]|0,this.C=jn[2]|0,this.D=jn[3]|0,this.E=jn[4]|0,this.F=jn[5]|0,this.G=jn[6]|0,this.H=jn[7]|0}get(){const{A:t,B:r,C:n,D:s,E:a,F:o,G:i,H:c}=this;return[t,r,n,s,a,o,i,c]}set(t,r,n,s,a,o,i,c){this.A=t|0,this.B=r|0,this.C=n|0,this.D=s|0,this.E=a|0,this.F=o|0,this.G=i|0,this.H=c|0}process(t,r){for(let d=0;d<16;d++,r+=4)Vn[d]=t.getUint32(r,!1);for(let d=16;d<64;d++){const p=Vn[d-15],h=Vn[d-2],y=$r(p,7)^$r(p,18)^p>>>3,g=$r(h,17)^$r(h,19)^h>>>10;Vn[d]=g+Vn[d-7]+y+Vn[d-16]|0}let{A:n,B:s,C:a,D:o,E:i,F:c,G:l,H:u}=this;for(let d=0;d<64;d++){const p=$r(i,6)^$r(i,11)^$r(i,25),h=u+p+Hv(i,c,l)+Gv[d]+Vn[d]|0,g=($r(n,2)^$r(n,13)^$r(n,22))+$v(n,s,a)|0;u=l,l=c,c=i,i=o+h|0,o=a,a=s,s=n,n=h+g|0}n=n+this.A|0,s=s+this.B|0,a=a+this.C|0,o=o+this.D|0,i=i+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,s,a,o,i,c,l,u)}roundClean(){Rn(Vn)}destroy(){this.set(0,0,0,0,0,0,0,0),Rn(this.buffer)}}const Vm=Jh(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Vv=Vm[0],Wv=Vm[1],Wn=new Uint32Array(80),qn=new Uint32Array(80);class Wm extends jm{constructor(t=64){super(128,t,16,!1),this.Ah=Ot[0]|0,this.Al=Ot[1]|0,this.Bh=Ot[2]|0,this.Bl=Ot[3]|0,this.Ch=Ot[4]|0,this.Cl=Ot[5]|0,this.Dh=Ot[6]|0,this.Dl=Ot[7]|0,this.Eh=Ot[8]|0,this.El=Ot[9]|0,this.Fh=Ot[10]|0,this.Fl=Ot[11]|0,this.Gh=Ot[12]|0,this.Gl=Ot[13]|0,this.Hh=Ot[14]|0,this.Hl=Ot[15]|0}get(){const{Ah:t,Al:r,Bh:n,Bl:s,Ch:a,Cl:o,Dh:i,Dl:c,Eh:l,El:u,Fh:d,Fl:p,Gh:h,Gl:y,Hh:g,Hl:k}=this;return[t,r,n,s,a,o,i,c,l,u,d,p,h,y,g,k]}set(t,r,n,s,a,o,i,c,l,u,d,p,h,y,g,k){this.Ah=t|0,this.Al=r|0,this.Bh=n|0,this.Bl=s|0,this.Ch=a|0,this.Cl=o|0,this.Dh=i|0,this.Dl=c|0,this.Eh=l|0,this.El=u|0,this.Fh=d|0,this.Fl=p|0,this.Gh=h|0,this.Gl=y|0,this.Hh=g|0,this.Hl=k|0}process(t,r){for(let S=0;S<16;S++,r+=4)Wn[S]=t.getUint32(r),qn[S]=t.getUint32(r+=4);for(let S=16;S<80;S++){const C=Wn[S-15]|0,U=qn[S-15]|0,z=pa(C,U,1)^pa(C,U,8)^em(C,U,7),T=ha(C,U,1)^ha(C,U,8)^tm(C,U,7),m=Wn[S-2]|0,b=qn[S-2]|0,x=pa(m,b,19)^yc(m,b,61)^em(m,b,6),A=ha(m,b,19)^gc(m,b,61)^tm(m,b,6),I=d5(T,A,qn[S-7],qn[S-16]),O=f5(I,z,x,Wn[S-7],Wn[S-16]);Wn[S]=O|0,qn[S]=I|0}let{Ah:n,Al:s,Bh:a,Bl:o,Ch:i,Cl:c,Dh:l,Dl:u,Eh:d,El:p,Fh:h,Fl:y,Gh:g,Gl:k,Hh:v,Hl:w}=this;for(let S=0;S<80;S++){const C=pa(d,p,14)^pa(d,p,18)^yc(d,p,41),U=ha(d,p,14)^ha(d,p,18)^gc(d,p,41),z=d&h^~d&g,T=p&y^~p&k,m=p5(w,U,T,Wv[S],qn[S]),b=h5(m,v,C,z,Vv[S],Wn[S]),x=m|0,A=pa(n,s,28)^yc(n,s,34)^yc(n,s,39),I=ha(n,s,28)^gc(n,s,34)^gc(n,s,39),O=n&a^n&i^a&i,D=s&o^s&c^o&c;v=g|0,w=k|0,g=h|0,k=y|0,h=d|0,y=p|0,{h:d,l:p}=fn(l|0,u|0,b|0,x|0),l=i|0,u=c|0,i=a|0,c=o|0,a=n|0,o=s|0;const E=l5(x,I,D);n=u5(E,b,A,O),s=E|0}({h:n,l:s}=fn(this.Ah|0,this.Al|0,n|0,s|0)),{h:a,l:o}=fn(this.Bh|0,this.Bl|0,a|0,o|0),{h:i,l:c}=fn(this.Ch|0,this.Cl|0,i|0,c|0),{h:l,l:u}=fn(this.Dh|0,this.Dl|0,l|0,u|0),{h:d,l:p}=fn(this.Eh|0,this.El|0,d|0,p|0),{h,l:y}=fn(this.Fh|0,this.Fl|0,h|0,y|0),{h:g,l:k}=fn(this.Gh|0,this.Gl|0,g|0,k|0),{h:v,l:w}=fn(this.Hh|0,this.Hl|0,v|0,w|0),this.set(n,s,a,o,i,c,l,u,d,p,h,y,g,k,v,w)}roundClean(){Rn(Wn,qn)}destroy(){Rn(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class qv extends Wm{constructor(){super(48),this.Ah=It[0]|0,this.Al=It[1]|0,this.Bh=It[2]|0,this.Bl=It[3]|0,this.Ch=It[4]|0,this.Cl=It[5]|0,this.Dh=It[6]|0,this.Dl=It[7]|0,this.Eh=It[8]|0,this.El=It[9]|0,this.Fh=It[10]|0,this.Fl=It[11]|0,this.Gh=It[12]|0,this.Gl=It[13]|0,this.Hh=It[14]|0,this.Hl=It[15]|0}}const Td=wc(()=>new jv),Yv=wc(()=>new Wm),Kv=wc(()=>new qv),qm=Td;function Ym(e,t){const r=t||"hex",n=qm(Cr(e,{strict:!1})?un(e):e);return r==="bytes"?n:Be(n)}function Zv(e){const{commitment:t,version:r=1}=e,n=e.to??(typeof t=="string"?"hex":"bytes"),s=Ym(t,"bytes");return s.set([r],0),n==="bytes"?s:bt(s)}function Km(e){const{commitments:t,version:r}=e,n=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const a of t)s.push(Zv({commitment:a,to:n,version:r}));return s}const Zm=6,Xm=32,Sd=4096,Qm=Xm*Sd,Jm=Qm*Zm-1-1*Sd*Zm,e1=1;class Xv extends ${constructor({maxSize:t,size:r}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${r} bytes`],name:"BlobSizeTooLargeError"})}}class t1 extends ${constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class Qv extends ${constructor({hash:t,size:r}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${r}`],name:"InvalidVersionedHashSizeError"})}}class Jv extends ${constructor({hash:t,version:r}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${e1}`,`Received: ${r}`],name:"InvalidVersionedHashVersionError"})}}function e8(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),r=typeof e.data=="string"?er(e.data):e.data,n=it(r);if(!n)throw new t1;if(n>Jm)throw new Xv({maxSize:Jm,size:n});const s=[];let a=!0,o=0;for(;a;){const i=rd(new Uint8Array(Qm));let c=0;for(;c<Sd;){const l=r.slice(o,o+(Xm-1));if(i.pushByte(0),i.pushBytes(l),l.length<31){i.pushByte(128),a=!1;break}c++,o+=31}s.push(i)}return t==="bytes"?s.map(i=>i.bytes):s.map(i=>bt(i.bytes))}function r1(e){const{data:t,kzg:r,to:n}=e,s=e.blobs??e8({data:t,to:n}),a=e.commitments??Ed({blobs:s,kzg:r,to:n}),o=e.proofs??Cd({blobs:s,commitments:a,kzg:r,to:n}),i=[];for(let c=0;c<s.length;c++)i.push({blob:s[c],commitment:a[c],proof:o[c]});return i}function Ad(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new mv({transaction:e})}function Pc(e,{docsPath:t,...r}){const n=(()=>{const s=Tc(e,r);return s instanceof Vo?e:s})();return new yv(n,{docsPath:t,...r})}async function Yn(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return Jt(t)}async function Pd(e,t){var m,b,x,A,I;const{account:r=e.account,accessList:n,authorizationList:s,chain:a=e.chain,blobVersionedHashes:o,blobs:i,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:p,maxPriorityFeePerGas:h,nonce:y,nonceManager:g,to:k,type:v,value:w,...S}=t,C=await(async()=>{if(!r||!g||typeof y<"u")return y;const O=Ke(r),D=a?a.id:await ne(e,Yn,"getChainId")({});return await g.consume({address:O.address,chainId:D,client:e})})();jr(t);const U=(b=(m=a==null?void 0:a.formatters)==null?void 0:m.transactionRequest)==null?void 0:b.format,T=(U||Sr)({...As(S,{format:U}),account:r?Ke(r):void 0,accessList:n,authorizationList:s,blobs:i,blobVersionedHashes:o,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:p,maxPriorityFeePerGas:h,nonce:C,to:k,type:v,value:w},"fillTransaction");try{const O=await e.request({method:"eth_fillTransaction",params:[T]}),E=(((A=(x=a==null?void 0:a.formatters)==null?void 0:x.transaction)==null?void 0:A.format)||Is)(O.tx);delete E.blockHash,delete E.blockNumber,delete E.r,delete E.s,delete E.transactionIndex,delete E.v,delete E.yParity,E.data=E.input,E.gas&&(E.gas=t.gas??E.gas),E.gasPrice&&(E.gasPrice=t.gasPrice??E.gasPrice),E.maxFeePerBlobGas&&(E.maxFeePerBlobGas=t.maxFeePerBlobGas??E.maxFeePerBlobGas),E.maxFeePerGas&&(E.maxFeePerGas=t.maxFeePerGas??E.maxFeePerGas),E.maxPriorityFeePerGas&&(E.maxPriorityFeePerGas=t.maxPriorityFeePerGas??E.maxPriorityFeePerGas),E.nonce&&(E.nonce=t.nonce??E.nonce);const P=await(async()=>{var H,G;if(typeof((H=a==null?void 0:a.fees)==null?void 0:H.baseFeeMultiplier)=="function"){const J=await ne(e,Ar,"getBlock")({});return a.fees.baseFeeMultiplier({block:J,client:e,request:t})}return((G=a==null?void 0:a.fees)==null?void 0:G.baseFeeMultiplier)??1.2})();if(P<1)throw new Rm;const M=10**(((I=P.toString().split(".")[1])==null?void 0:I.length)??0),L=H=>H*BigInt(Math.ceil(P*M))/BigInt(M);return E.maxFeePerGas&&!t.maxFeePerGas&&(E.maxFeePerGas=L(E.maxFeePerGas)),E.gasPrice&&!t.gasPrice&&(E.gasPrice=L(E.gasPrice)),{raw:O.raw,transaction:{from:T.from,...E}}}catch(O){throw Pc(O,{...t,chain:e.chain})}}const Id=["blobVersionedHashes","chainId","fees","gas","nonce","type"],n1=new Map,Od=new ya(128);async function Wo(e,t){var C,U,z;let r=t;r.account??(r.account=e.account),r.parameters??(r.parameters=Id);const{account:n,chain:s=e.chain,nonceManager:a,parameters:o}=r,i=(()=>{if(typeof(s==null?void 0:s.prepareTransactionRequest)=="function")return{fn:s.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(s==null?void 0:s.prepareTransactionRequest))return{fn:s.prepareTransactionRequest[0],runAt:s.prepareTransactionRequest[1].runAt}})();let c;async function l(){return c||(typeof r.chainId<"u"?r.chainId:s?s.id:(c=await ne(e,Yn,"getChainId")({}),c))}const u=n&&Ke(n);let d=r.nonce;if(o.includes("nonce")&&typeof d>"u"&&u&&a){const T=await l();d=await a.consume({address:u.address,chainId:T,client:e})}i!=null&&i.fn&&((C=i.runAt)!=null&&C.includes("beforeFillTransaction"))&&(r=await i.fn({...r,chain:s},{phase:"beforeFillTransaction"}),d??(d=r.nonce));const h=((o.includes("blobVersionedHashes")||o.includes("sidecars"))&&r.kzg&&r.blobs||Od.get(e.uid)===!1||!["fees","gas"].some(m=>o.includes(m))?!1:!!(o.includes("chainId")&&typeof r.chainId!="number"||o.includes("nonce")&&typeof d!="number"||o.includes("fees")&&typeof r.gasPrice!="bigint"&&(typeof r.maxFeePerGas!="bigint"||typeof r.maxPriorityFeePerGas!="bigint")||o.includes("gas")&&typeof r.gas!="bigint"))?await ne(e,Pd,"fillTransaction")({...r,nonce:d}).then(T=>{const{chainId:m,from:b,gas:x,gasPrice:A,nonce:I,maxFeePerBlobGas:O,maxFeePerGas:D,maxPriorityFeePerGas:E,type:P,..._}=T.transaction;return Od.set(e.uid,!0),{...r,...b?{from:b}:{},...P?{type:P}:{},...typeof m<"u"?{chainId:m}:{},...typeof x<"u"?{gas:x}:{},...typeof A<"u"?{gasPrice:A}:{},...typeof I<"u"?{nonce:I}:{},...typeof O<"u"?{maxFeePerBlobGas:O}:{},...typeof D<"u"?{maxFeePerGas:D}:{},...typeof E<"u"?{maxPriorityFeePerGas:E}:{},..."nonceKey"in _&&typeof _.nonceKey<"u"?{nonceKey:_.nonceKey}:{}}}).catch(T=>{var x;const m=T;return m.name!=="TransactionExecutionError"||((x=m.walk)==null?void 0:x.call(m,A=>{const I=A;return I.name==="MethodNotFoundRpcError"||I.name==="MethodNotSupportedRpcError"}))&&Od.set(e.uid,!1),r}):r;d??(d=h.nonce),r={...h,...u?{from:u==null?void 0:u.address}:{},...d?{nonce:d}:{}};const{blobs:y,gas:g,kzg:k,type:v}=r;i!=null&&i.fn&&((U=i.runAt)!=null&&U.includes("beforeFillParameters"))&&(r=await i.fn({...r,chain:s},{phase:"beforeFillParameters"}));let w;async function S(){return w||(w=await ne(e,Ar,"getBlock")({blockTag:"latest"}),w)}if(o.includes("nonce")&&typeof d>"u"&&u&&!a&&(r.nonce=await ne(e,kd,"getTransactionCount")({address:u.address,blockTag:"pending"})),(o.includes("blobVersionedHashes")||o.includes("sidecars"))&&y&&k){const T=Ed({blobs:y,kzg:k});if(o.includes("blobVersionedHashes")){const m=Km({commitments:T,to:"hex"});r.blobVersionedHashes=m}if(o.includes("sidecars")){const m=Cd({blobs:y,commitments:T,kzg:k}),b=r1({blobs:y,commitments:T,proofs:m,to:"hex"});r.sidecars=b}}if(o.includes("chainId")&&(r.chainId=await l()),(o.includes("fees")||o.includes("type"))&&typeof v>"u")try{r.type=Ad(r)}catch{let T=n1.get(e.uid);if(typeof T>"u"){const m=await S();T=typeof(m==null?void 0:m.baseFeePerGas)=="bigint",n1.set(e.uid,T)}r.type=T?"eip1559":"legacy"}if(o.includes("fees"))if(r.type!=="legacy"&&r.type!=="eip2930"){if(typeof r.maxFeePerGas>"u"||typeof r.maxPriorityFeePerGas>"u"){const T=await S(),{maxFeePerGas:m,maxPriorityFeePerGas:b}=await vd(e,{block:T,chain:s,request:r});if(typeof r.maxPriorityFeePerGas>"u"&&r.maxFeePerGas&&r.maxFeePerGas<b)throw new Fv({maxPriorityFeePerGas:b});r.maxPriorityFeePerGas=b,r.maxFeePerGas=m}}else{if(typeof r.maxFeePerGas<"u"||typeof r.maxPriorityFeePerGas<"u")throw new yd;if(typeof r.gasPrice>"u"){const T=await S(),{gasPrice:m}=await vd(e,{block:T,chain:s,request:r,type:"legacy"});r.gasPrice=m}}return o.includes("gas")&&typeof g>"u"&&(r.gas=await ne(e,Bd,"estimateGas")({...r,account:u,prepare:(u==null?void 0:u.type)==="local"?[]:["blobVersionedHashes"]})),i!=null&&i.fn&&((z=i.runAt)!=null&&z.includes("afterFillParameters"))&&(r=await i.fn({...r,chain:s},{phase:"afterFillParameters"})),jr(r),delete r.parameters,r}async function Bd(e,t){var o,i,c;const{account:r=e.account,prepare:n=!0}=t,s=r?Ke(r):void 0,a=(()=>{if(Array.isArray(n))return n;if((s==null?void 0:s.type)!=="local")return["blobVersionedHashes"]})();try{const l=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await Cc({authorization:t.authorizationList[0]}).catch(()=>{throw new $("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:u,authorizationList:d,blobs:p,blobVersionedHashes:h,blockNumber:y,blockTag:g,data:k,gas:v,gasPrice:w,maxFeePerBlobGas:S,maxFeePerGas:C,maxPriorityFeePerGas:U,nonce:z,value:T,stateOverride:m,...b}=n?await Wo(e,{...t,parameters:a,to:l}):t;if(v&&t.gas!==v)return v;const A=(typeof y=="bigint"?W(y):void 0)||g,I=bd(m);jr(t);const O=(c=(i=(o=e.chain)==null?void 0:o.formatters)==null?void 0:i.transactionRequest)==null?void 0:c.format,E=(O||Sr)({...As(b,{format:O}),account:s,accessList:u,authorizationList:d,blobs:p,blobVersionedHashes:h,data:k,gasPrice:w,maxFeePerBlobGas:S,maxFeePerGas:C,maxPriorityFeePerGas:U,nonce:z,to:l,value:T},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:I?[E,A??e.experimental_blockTag??"latest",I]:A?[E,A]:[E]}))}catch(l){throw Bv(l,{...t,account:s,chain:e.chain})}}async function t8(e,t){const{abi:r,address:n,args:s,functionName:a,dataSuffix:o,...i}=t,c=nr({abi:r,args:s,functionName:a});try{return await ne(e,Bd,"estimateGas")({data:`${c}${o?o.replace("0x",""):""}`,to:n,...i})}catch(l){const u=i.account?Ke(i.account):void 0;throw Ss(l,{abi:r,address:n,args:s,docsPath:"/docs/contract/estimateContractGas",functionName:a,sender:u==null?void 0:u.address})}}function Ta(e,t){if(!rt(e,{strict:!1}))throw new xt({address:e});if(!rt(t,{strict:!1}))throw new xt({address:t});return e.toLowerCase()===t.toLowerCase()}const s1="/docs/contract/decodeEventLog";function Ic(e){const{abi:t,data:r,strict:n,topics:s}=e,a=n??!0,[o,...i]=s;if(!o)throw new Lw({docsPath:s1});const c=t.find(g=>g.type==="event"&&o===vc(Er(g)));if(!(c&&"name"in c)||c.type!=="event")throw new Rw(o,{docsPath:s1});const{name:l,inputs:u}=c,d=u==null?void 0:u.some(g=>!("name"in g&&g.name)),p=d?[]:{},h=u.map((g,k)=>[g,k]).filter(([g])=>"indexed"in g&&g.indexed);for(let g=0;g<h.length;g++){const[k,v]=h[g],w=i[g];if(!w)throw new ju({abiItem:c,param:k});p[d?v:k.name||v]=r8({param:k,value:w})}const y=u.filter(g=>!("indexed"in g&&g.indexed));if(y.length>0){if(r&&r!=="0x")try{const g=Eo(y,r);if(g)if(d)for(let k=0;k<u.length;k++)p[k]=p[k]??g.shift();else for(let k=0;k<y.length;k++)p[y[k].name]=g[k]}catch(g){if(a)throw g instanceof Rh||g instanceof Em?new mc({abiItem:c,data:r,params:y,size:it(r)}):g}else if(a)throw new mc({abiItem:c,data:"0x",params:y,size:0})}return{eventName:l,args:Object.values(p).length>0?p:void 0}}function r8({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(Eo([e],t)||[])[0]}function Md(e){const{abi:t,args:r,logs:n,strict:s=!0}=e,a=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return n.map(o=>{var u;const i=t.filter(d=>d.type==="event"&&o.topics[0]===vc(d));if(i.length===0)return null;let c,l;for(const d of i)try{c=Ic({...o,abi:[d],strict:!0}),l=d;break}catch{}if(!c&&!s){l=i[0];try{c=Ic({...o,abi:[l],strict:!1})}catch{const d=(u=l.inputs)==null?void 0:u.some(p=>!("name"in p&&p.name));return{...o,args:d?[]:{},eventName:l.name}}}return!c||!l||a&&!a.includes(c.eventName)||!n8({args:c.args,inputs:l.inputs,matchArgs:r})?null:{...c,...o}}).filter(Boolean)}function n8(e){const{args:t,inputs:r,matchArgs:n}=e;if(!n)return!0;if(!t)return!1;function s(a,o,i){try{return a.type==="address"?Ta(o,i):a.type==="string"||a.type==="bytes"?At(un(o))===i:o===i}catch{return!1}}return Array.isArray(t)&&Array.isArray(n)?n.every((a,o)=>{if(a==null)return!0;const i=r[o];return i?(Array.isArray(a)?a:[a]).some(l=>s(i,l,t[o])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof n=="object"&&!Array.isArray(n)?Object.entries(n).every(([a,o])=>{if(o==null)return!0;const i=r.find(l=>l.name===a);return i?(Array.isArray(o)?o:[o]).some(l=>s(i,l,t[a])):!1}):!1}function Vr(e,{args:t,eventName:r}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}async function _d(e,{address:t,blockHash:r,fromBlock:n,toBlock:s,event:a,events:o,args:i,strict:c}={}){const l=c??!1,u=o??(a?[a]:void 0);let d=[];u&&(d=[u.flatMap(g=>ko({abi:[g],eventName:g.name,args:o?void 0:i}))],a&&(d=d[0]));let p;r?p=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,blockHash:r}]}):p=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,fromBlock:typeof n=="bigint"?W(n):n,toBlock:typeof s=="bigint"?W(s):s}]});const h=p.map(y=>Vr(y));return u?Md({abi:u,args:i,logs:h,strict:l}):h}async function a1(e,t){const{abi:r,address:n,args:s,blockHash:a,eventName:o,fromBlock:i,toBlock:c,strict:l}=t,u=o?ks({abi:r,name:o}):void 0,d=u?void 0:r.filter(p=>p.type==="event");return ne(e,_d,"getLogs")({address:n,args:s,blockHash:a,event:u,events:d,fromBlock:i,toBlock:c,strict:l})}const Ud="/docs/contract/decodeFunctionResult";function Os(e){const{abi:t,args:r,functionName:n,data:s}=e;let a=t[0];if(n){const i=ks({abi:t,args:r,name:n});if(!i)throw new da(n,{docsPath:Ud});a=i}if(a.type!=="function")throw new da(void 0,{docsPath:Ud});if(!a.outputs)throw new jh(a.name,{docsPath:Ud});const o=Eo(a.outputs,s);if(o&&o.length>1)return o;if(o&&o.length===1)return o[0]}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Dd=BigInt(0),Fd=BigInt(1);function qo(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Nd(e){if(!qo(e))throw new Error("Uint8Array expected")}function Yo(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function Oc(e){const t=e.toString(16);return t.length&1?"0"+t:t}function o1(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Dd:BigInt("0x"+e)}const i1=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",s8=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ko(e){if(Nd(e),i1)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=s8[e[r]];return t}const hn={_0:48,_9:57,A:65,F:70,a:97,f:102};function c1(e){if(e>=hn._0&&e<=hn._9)return e-hn._0;if(e>=hn.A&&e<=hn.F)return e-(hn.A-10);if(e>=hn.a&&e<=hn.f)return e-(hn.a-10)}function Bc(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(i1)return Uint8Array.fromHex(e);const t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let s=0,a=0;s<r;s++,a+=2){const o=c1(e.charCodeAt(a)),i=c1(e.charCodeAt(a+1));if(o===void 0||i===void 0){const c=e[a]+e[a+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+a)}n[s]=o*16+i}return n}function Bs(e){return o1(Ko(e))}function l1(e){return Nd(e),o1(Ko(Uint8Array.from(e).reverse()))}function Zo(e,t){return Bc(e.toString(16).padStart(t*2,"0"))}function u1(e,t){return Zo(e,t).reverse()}function dr(e,t,r){let n;if(typeof t=="string")try{n=Bc(t)}catch(a){throw new Error(e+" must be hex string or Uint8Array, cause: "+a)}else if(qo(t))n=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const s=n.length;if(typeof r=="number"&&s!==r)throw new Error(e+" of length "+r+" expected, got "+s);return n}function Mc(...e){let t=0;for(let n=0;n<e.length;n++){const s=e[n];Nd(s),t+=s.length}const r=new Uint8Array(t);for(let n=0,s=0;n<e.length;n++){const a=e[n];r.set(a,s),s+=a.length}return r}const zd=e=>typeof e=="bigint"&&Dd<=e;function Ld(e,t,r){return zd(e)&&zd(t)&&zd(r)&&t<=e&&e<r}function Sa(e,t,r,n){if(!Ld(t,r,n))throw new Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)}function a8(e){let t;for(t=0;e>Dd;e>>=Fd,t+=1);return t}const _c=e=>(Fd<<BigInt(e))-Fd,Rd=e=>new Uint8Array(e),d1=e=>Uint8Array.from(e);function o8(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=Rd(e),s=Rd(e),a=0;const o=()=>{n.fill(1),s.fill(0),a=0},i=(...d)=>r(s,n,...d),c=(d=Rd(0))=>{s=i(d1([0]),d),n=i(),d.length!==0&&(s=i(d1([1]),d),n=i())},l=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let d=0;const p=[];for(;d<t;){n=i();const h=n.slice();p.push(h),d+=n.length}return Mc(...p)};return(d,p)=>{o(),c(d);let h;for(;!(h=p(l()));)c();return o(),h}}const i8={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||qo(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function Uc(e,t,r={}){const n=(s,a,o)=>{const i=i8[a];if(typeof i!="function")throw new Error("invalid validator function");const c=e[s];if(!(o&&c===void 0)&&!i(c,e))throw new Error("param "+String(s)+" is invalid. Expected "+a+", got "+c)};for(const[s,a]of Object.entries(t))n(s,a,!1);for(const[s,a]of Object.entries(r))n(s,a,!0);return e}function f1(e){const t=new WeakMap;return(r,...n)=>{const s=t.get(r);if(s!==void 0)return s;const a=e(r,...n);return t.set(r,a),a}}const c8="0.1.1";function l8(){return c8}class ae extends Error{static setStaticOptions(t){ae.prototype.docsOrigin=t.docsOrigin,ae.prototype.showVersion=t.showVersion,ae.prototype.version=t.version}constructor(t,r={}){const n=(()=>{var u;if(r.cause instanceof ae){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause&&"details"in r.cause&&typeof r.cause.details=="string"?r.cause.details:(u=r.cause)!=null&&u.message?r.cause.message:r.details})(),s=r.cause instanceof ae&&r.cause.docsPath||r.docsPath,a=r.docsOrigin??ae.prototype.docsOrigin,o=`${a}${s??""}`,i=!!(r.version??ae.prototype.showVersion),c=r.version??ae.prototype.version,l=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...n||s||i?["",n?`Details: ${n}`:void 0,s?`See: ${o}`:void 0,i?`Version: ${c}`:void 0]:[]].filter(u=>typeof u=="string").join(`
|
|
39
|
+
`);super(l,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=r.cause,this.details=n,this.docs=o,this.docsOrigin=a,this.docsPath=s,this.shortMessage=t,this.showVersion=i,this.version=c}walk(t){return p1(this,t)}}Object.defineProperty(ae,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${l8()}`}}),ae.setStaticOptions(ae.defaultStaticOptions);function p1(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?p1(e.cause,t):t?null:e}function Aa(e,t){if(Pa(e)>t)throw new P8({givenSize:Pa(e),maxSize:t})}const mn={zero:48,nine:57,A:65,F:70,a:97,f:102};function h1(e){if(e>=mn.zero&&e<=mn.nine)return e-mn.zero;if(e>=mn.A&&e<=mn.F)return e-(mn.A-10);if(e>=mn.a&&e<=mn.f)return e-(mn.a-10)}function u8(e,t={}){const{dir:r,size:n=32}=t;if(n===0)return e;if(e.length>n)throw new I8({size:e.length,targetSize:n,type:"Bytes"});const s=new Uint8Array(n);for(let a=0;a<n;a++){const o=r==="right";s[o?a:n-a-1]=e[o?a:e.length-a-1]}return s}function m1(e,t={}){const{dir:r="left"}=t;let n=e,s=0;for(let a=0;a<n.length-1&&n[r==="left"?a:n.length-a-1].toString()==="0";a++)s++;return n=r==="left"?n.slice(s):n.slice(0,n.length-s),n}function Dc(e,t){if(ft(e)>t)throw new U8({givenSize:ft(e),maxSize:t})}function d8(e,t){if(typeof t=="number"&&t>0&&t>ft(e)-1)throw new S1({offset:t,position:"start",size:ft(e)})}function f8(e,t,r){if(typeof t=="number"&&typeof r=="number"&&ft(e)!==r-t)throw new S1({offset:r,position:"end",size:ft(e)})}function b1(e,t={}){const{dir:r,size:n=32}=t;if(n===0)return e;const s=e.replace("0x","");if(s.length>n*2)throw new D8({size:Math.ceil(s.length/2),targetSize:n,type:"Hex"});return`0x${s[r==="right"?"padEnd":"padStart"](n*2,"0")}`}function p8(e,t={}){const{dir:r="left"}=t;let n=e.replace("0x",""),s=0;for(let a=0;a<n.length-1&&n[r==="left"?a:n.length-a-1].toString()==="0";a++)s++;return n=r==="left"?n.slice(s):n.slice(0,n.length-s),n==="0"?"0x":r==="right"&&n.length%2===1?`0x${n}0`:`0x${n}`}const h8="#__bigint";function Xo(e,t,r){return JSON.stringify(e,(n,s)=>typeof s=="bigint"?s.toString()+h8:s,r)}const m8=new TextDecoder,b8=new TextEncoder;function y8(e){if(!(e instanceof Uint8Array)){if(!e)throw new Fc(e);if(typeof e!="object")throw new Fc(e);if(!("BYTES_PER_ELEMENT"in e))throw new Fc(e);if(e.BYTES_PER_ELEMENT!==1||e.constructor.name!=="Uint8Array")throw new Fc(e)}}function g8(...e){let t=0;for(const n of e)t+=n.length;const r=new Uint8Array(t);for(let n=0,s=0;n<e.length;n++){const a=e[n];r.set(a,s),s+=a.length}return r}function Hd(e){return e instanceof Uint8Array?e:typeof e=="string"?Kn(e):x8(e)}function x8(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function Kn(e,t={}){const{size:r}=t;let n=e;r&&(Dc(e,r),n=_s(e,r));let s=n.slice(2);s.length%2&&(s=`0${s}`);const a=s.length/2,o=new Uint8Array(a);for(let i=0,c=0;i<a;i++){const l=h1(s.charCodeAt(c++)),u=h1(s.charCodeAt(c++));if(l===void 0||u===void 0)throw new ae(`Invalid byte sequence ("${s[c-2]}${s[c-1]}" in "${s}").`);o[i]=l<<4|u}return o}function y1(e,t={}){const{size:r}=t,n=b8.encode(e);return typeof r=="number"?(Aa(n,r),w8(n,r)):n}function w8(e,t){return u8(e,{dir:"right",size:t})}function v8(e){return crypto.getRandomValues(new Uint8Array(e))}function Pa(e){return e.length}function k8(e,t,r,n={}){const{strict:s}=n;return e.slice(t,r)}function E8(e,t={}){const{size:r}=t;typeof r<"u"&&Aa(e,r);const n=Et(e,t);return pt(n,t)}function C8(e,t={}){const{size:r}=t;let n=e;if(typeof r<"u"&&(Aa(n,r),n=g1(n)),n.length>1||n[0]>1)throw new A8(n);return!!n[0]}function bn(e,t={}){const{size:r}=t;typeof r<"u"&&Aa(e,r);const n=Et(e,t);return Jo(n,t)}function T8(e,t={}){const{size:r}=t;let n=e;return typeof r<"u"&&(Aa(n,r),n=x1(n)),m8.decode(n)}function g1(e){return m1(e,{dir:"left"})}function x1(e){return m1(e,{dir:"right"})}function S8(e){try{return y8(e),!0}catch{return!1}}class A8 extends ae{constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}class Fc extends ae{constructor(t){super(`Value \`${typeof t=="object"?Xo(t):t}\` of type \`${typeof t}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}let P8=class extends ae{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},I8=class extends ae{constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};const O8=new TextEncoder,B8=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function M8(e,t={}){const{strict:r=!1}=t;if(!e)throw new C1(e);if(typeof e!="string")throw new C1(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e))throw new T1(e);if(!e.startsWith("0x"))throw new T1(e)}function lt(...e){return`0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}function Nc(e){return e instanceof Uint8Array?Et(e):Array.isArray(e)?Et(new Uint8Array(e)):e}function w1(e,t={}){const r=`0x${Number(e)}`;return typeof t.size=="number"?(Dc(r,t.size),Ms(r,t.size)):r}function Et(e,t={}){let r="";for(let s=0;s<e.length;s++)r+=B8[e[s]];const n=`0x${r}`;return typeof t.size=="number"?(Dc(n,t.size),_s(n,t.size)):n}function X(e,t={}){const{signed:r,size:n}=t,s=BigInt(e);let a;n?r?a=(1n<<BigInt(n)*8n-1n)-1n:a=2n**(BigInt(n)*8n)-1n:typeof e=="number"&&(a=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof a=="bigint"&&r?-a-1n:0;if(a&&s>a||s<o){const l=typeof e=="bigint"?"n":"";throw new E1({max:a?`${a}${l}`:void 0,min:`${o}${l}`,signed:r,size:n,value:`${e}${l}`})}const c=`0x${(r&&s<0?BigInt.asUintN(n*8,BigInt(s)):s).toString(16)}`;return n?Ms(c,n):c}function Qo(e,t={}){return Et(O8.encode(e),t)}function Ms(e,t){return b1(e,{dir:"left",size:t})}function _s(e,t){return b1(e,{dir:"right",size:t})}function v1(e){return Et(v8(e))}function Pe(e,t,r,n={}){const{strict:s}=n;d8(e,t);const a=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return s&&f8(a,t,r),a}function ft(e){return Math.ceil((e.length-2)/2)}function $d(e){return p8(e,{dir:"left"})}function pt(e,t={}){const{signed:r}=t;t.size&&Dc(e,t.size);const n=BigInt(e);if(!r)return n;const s=(e.length-2)/2,a=(1n<<BigInt(s)*8n)-1n,o=a>>1n;return n<=o?n:n-a-1n}function Jo(e,t={}){const{signed:r,size:n}=t;return Number(!r&&!n?e:pt(e,t))}function k1(e,t={}){const{size:r}=t;let n=Kn(e);return r&&(Aa(n,r),n=x1(n)),new TextDecoder().decode(n)}function Pr(e,t={}){const{strict:r=!1}=t;try{return M8(e,{strict:r}),!0}catch{return!1}}class E1 extends ae{constructor({max:t,min:r,signed:n,size:s,value:a}){super(`Number \`${a}\` is not in safe${s?` ${s*8}-bit`:""}${n?" signed":" unsigned"} integer range ${t?`(\`${r}\` to \`${t}\`)`:`(above \`${r}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class C1 extends ae{constructor(t){super(`Value \`${typeof t=="object"?Xo(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class T1 extends ae{constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class _8 extends ae{constructor(t){super(`Hex value \`"${t}"\` is an odd length (${t.length-2} nibbles).`,{metaMessages:["It must be an even length."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidLengthError"})}}class U8 extends ae{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class S1 extends ae{constructor({offset:t,position:r,size:n}){super(`Slice ${r==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class D8 extends ae{constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function F8(e){return{address:e.address,amount:X(e.amount),index:X(e.index),validatorIndex:X(e.validatorIndex)}}function A1(e){return{...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:X(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:X(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:X(e.gasLimit)},...typeof e.number=="bigint"&&{number:X(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:X(e.prevRandao)},...typeof e.time=="bigint"&&{time:X(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(F8)}}}const zc=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],Gd=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],P1=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],I1=[...P1,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],N8=[...P1,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],O1=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],B1=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],M1=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],_1=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],U1=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],z8="0x82ad56cb",D1="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",L8="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",R8="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",jd="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";class Vd extends ${constructor({blockNumber:t,chain:r,contract:n}){super(`Chain "${r.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...t&&n.blockCreated&&n.blockCreated>t?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${n.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class H8 extends ${constructor({chain:t,currentChainId:r}){super(`The current chain of the wallet (id: ${r}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID: ${r}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class $8 extends ${constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(`
|
|
40
|
+
`),{name:"ChainNotFoundError"})}}class F1 extends ${constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}let Ia=class extends ${constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}};const Wd="/docs/contract/encodeDeployData";function Lc(e){const{abi:t,args:r,bytecode:n}=e;if(!r||r.length===0)return n;const s=t.find(o=>"type"in o&&o.type==="constructor");if(!s)throw new Uw({docsPath:Wd});if(!("inputs"in s))throw new Lh({docsPath:Wd});if(!s.inputs||s.inputs.length===0)throw new Lh({docsPath:Wd});const a=Hn(s.inputs,r);return rr([n,a])}function Oa({blockNumber:e,chain:t,contract:r}){var s;const n=(s=t==null?void 0:t.contracts)==null?void 0:s[r];if(!n)throw new Vd({chain:t,contract:{name:r}});if(e&&n.blockCreated&&n.blockCreated>e)throw new Vd({blockNumber:e,chain:t,contract:{name:r,blockCreated:n.blockCreated}});return n.address}function qd(e,{docsPath:t,...r}){const n=(()=>{const s=Tc(e,r);return s instanceof Vo?e:s})();return new Mm(n,{docsPath:t,...r})}function Yd(){let e=()=>{},t=()=>{};return{promise:new Promise((n,s)=>{e=n,t=s}),resolve:e,reject:t}}const Kd=new Map;function N1({fn:e,id:t,shouldSplitBatch:r,wait:n=0,sort:s}){const a=async()=>{const u=c();o();const d=u.map(({args:p})=>p);d.length!==0&&e(d).then(p=>{s&&Array.isArray(p)&&p.sort(s);for(let h=0;h<u.length;h++){const{resolve:y}=u[h];y==null||y([p[h],p])}}).catch(p=>{for(let h=0;h<u.length;h++){const{reject:y}=u[h];y==null||y(p)}})},o=()=>Kd.delete(t),i=()=>c().map(({args:u})=>u),c=()=>Kd.get(t)||[],l=u=>Kd.set(t,[...c(),u]);return{flush:o,async schedule(u){const{promise:d,resolve:p,reject:h}=Yd();return(r==null?void 0:r([...i(),u]))&&a(),c().length>0?(l({args:u,resolve:p,reject:h}),d):(l({args:u,resolve:p,reject:h}),setTimeout(a,n),d)}}}async function ei(e,t){var O,D,E,P;const{account:r=e.account,authorizationList:n,batch:s=!!((O=e.batch)!=null&&O.multicall),blockNumber:a,blockTag:o=e.experimental_blockTag??"latest",accessList:i,blobs:c,blockOverrides:l,code:u,data:d,factory:p,factoryData:h,gas:y,gasPrice:g,maxFeePerBlobGas:k,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:S,to:C,value:U,stateOverride:z,...T}=t,m=r?Ke(r):void 0;if(u&&(p||h))throw new $("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(u&&C)throw new $("Cannot provide both `code` & `to` as parameters.");const b=u&&d,x=p&&h&&C&&d,A=b||x,I=b?z1({code:u,data:d}):x?V8({data:d,factory:p,factoryData:h,to:C}):d;try{jr(t);const M=(typeof a=="bigint"?W(a):void 0)||o,L=l?A1(l):void 0,H=bd(z),G=(P=(E=(D=e.chain)==null?void 0:D.formatters)==null?void 0:E.transactionRequest)==null?void 0:P.format,pe=(G||Sr)({...As(T,{format:G}),accessList:i,account:m,authorizationList:n,blobs:c,data:I,gas:y,gasPrice:g,maxFeePerBlobGas:k,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:S,to:A?void 0:C,value:U},"call");if(s&&G8({request:pe})&&!H&&!L)try{return await j8(e,{...pe,blockNumber:a,blockTag:o})}catch(fe){if(!(fe instanceof F1)&&!(fe instanceof Vd))throw fe}const be=(()=>{const fe=[pe,M];return H&&L?[...fe,H,L]:H?[...fe,H]:L?[...fe,{},L]:fe})(),ie=await e.request({method:"eth_call",params:be});return ie==="0x"?{data:void 0}:{data:ie}}catch(_){const M=W8(_),{offchainLookup:L,offchainLookupSignature:H}=await Promise.resolve().then(()=>J3);if(e.ccipRead!==!1&&(M==null?void 0:M.slice(0,10))===H&&C)return{data:await L(e,{data:M,to:C})};throw A&&(M==null?void 0:M.slice(0,10))==="0x101bb98d"?new vv({factory:p}):qd(_,{...t,account:m,chain:e.chain})}}function G8({request:e}){const{data:t,to:r,...n}=e;return!(!t||t.startsWith(z8)||!r||Object.values(n).filter(s=>typeof s<"u").length>0)}async function j8(e,t){var g;const{batchSize:r=1024,deployless:n=!1,wait:s=0}=typeof((g=e.batch)==null?void 0:g.multicall)=="object"?e.batch.multicall:{},{blockNumber:a,blockTag:o=e.experimental_blockTag??"latest",data:i,to:c}=t,l=(()=>{if(n)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return Oa({blockNumber:a,chain:e.chain,contract:"multicall3"});throw new F1})(),d=(typeof a=="bigint"?W(a):void 0)||o,{schedule:p}=N1({id:`${e.uid}.${d}`,wait:s,shouldSplitBatch(k){return k.reduce((w,{data:S})=>w+(S.length-2),0)>r*2},fn:async k=>{const v=k.map(C=>({allowFailure:!0,callData:C.data,target:C.to})),w=nr({abi:zc,args:[v],functionName:"aggregate3"}),S=await e.request({method:"eth_call",params:[{...l===null?{data:z1({code:jd,data:w})}:{to:l,data:w}},d]});return Os({abi:zc,args:[v],functionName:"aggregate3",data:S||"0x"})}}),[{returnData:h,success:y}]=await p({data:i,to:c});if(!y)throw new Ec({data:h});return h==="0x"?{data:void 0}:{data:h}}function z1(e){const{code:t,data:r}=e;return Lc({abi:Uh(["constructor(bytes, bytes)"]),bytecode:D1,args:[t,r]})}function V8(e){const{data:t,factory:r,factoryData:n,to:s}=e;return Lc({abi:Uh(["constructor(address, bytes, address, bytes)"]),bytecode:L8,args:[s,t,r,n]})}function W8(e){var r;if(!(e instanceof $))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(r=t.data)==null?void 0:r.data:t.data}async function Ir(e,t){const{abi:r,address:n,args:s,functionName:a,...o}=t,i=nr({abi:r,args:s,functionName:a});try{const{data:c}=await ne(e,ei,"call")({...o,data:i,to:n});return Os({abi:r,args:s,functionName:a,data:c||"0x"})}catch(c){throw Ss(c,{abi:r,address:n,args:s,docsPath:"/docs/contract/readContract",functionName:a})}}async function q8(e,t){const{abi:r,address:n,args:s,dataSuffix:a,functionName:o,...i}=t,c=i.account?Ke(i.account):e.account,l=nr({abi:r,args:s,functionName:o});try{const{data:u}=await ne(e,ei,"call")({batch:!1,data:`${l}${a?a.replace("0x",""):""}`,to:n,...i,account:c}),d=Os({abi:r,args:s,functionName:o,data:u||"0x"}),p=r.filter(h=>"name"in h&&h.name===t.functionName);return{result:d,request:{abi:p,address:n,args:s,dataSuffix:a,functionName:o,...i,account:c}}}catch(u){throw Ss(u,{abi:r,address:n,args:s,docsPath:"/docs/contract/simulateContract",functionName:o,sender:c==null?void 0:c.address})}}const Zd=new Map,L1=new Map;let Y8=0;function yn(e,t,r){const n=++Y8,s=()=>Zd.get(e)||[],a=()=>{const u=s();Zd.set(e,u.filter(d=>d.id!==n))},o=()=>{const u=s();if(!u.some(p=>p.id===n))return;const d=L1.get(e);if(u.length===1&&d){const p=d();p instanceof Promise&&p.catch(()=>{})}a()},i=s();if(Zd.set(e,[...i,{id:n,fns:t}]),i&&i.length>0)return o;const c={};for(const u in t)c[u]=((...d)=>{var h,y;const p=s();if(p.length!==0)for(const g of p)(y=(h=g.fns)[u])==null||y.call(h,...d)});const l=r(c);return typeof l=="function"&&L1.set(e,l),o}async function Xd(e){return new Promise(t=>setTimeout(t,e))}function Ba(e,{emitOnBegin:t,initialWaitTime:r,interval:n}){let s=!0;const a=()=>s=!1;return(async()=>{let i;t&&(i=await e({unpoll:a}));const c=await(r==null?void 0:r(i))??n;await Xd(c);const l=async()=>{s&&(await e({unpoll:a}),await Xd(n),l())};l()})(),a}const K8=new Map,Z8=new Map;function X8(e){const t=(s,a)=>({clear:()=>a.delete(s),get:()=>a.get(s),set:o=>a.set(s,o)}),r=t(e,K8),n=t(e,Z8);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function Q8(e,{cacheKey:t,cacheTime:r=Number.POSITIVE_INFINITY}){const n=X8(t),s=n.response.get();if(s&&r>0&&Date.now()-s.created.getTime()<r)return s.data;let a=n.promise.get();a||(a=e(),n.promise.set(a));try{const o=await a;return n.response.set({created:new Date,data:o}),o}finally{n.promise.clear()}}const J8=e=>`blockNumber.${e}`;async function ti(e,{cacheTime:t=e.cacheTime}={}){const r=await Q8(()=>e.request({method:"eth_blockNumber"}),{cacheKey:J8(e.uid),cacheTime:t});return BigInt(r)}async function Rc(e,{filter:t}){const r="strict"in t&&t.strict,n=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof n[0]=="string")return n;const s=n.map(a=>Vr(a));return!("abi"in t)||!t.abi?s:Md({abi:t.abi,logs:s,strict:r})}async function Hc(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function e3(e,t){const{abi:r,address:n,args:s,batch:a=!0,eventName:o,fromBlock:i,onError:c,onLogs:l,poll:u,pollingInterval:d=e.pollingInterval,strict:p}=t;return(typeof u<"u"?u:typeof i=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")))?(()=>{const k=p??!1,v=dt(["watchContractEvent",n,s,a,e.uid,o,d,k,i]);return yn(v,{onLogs:l,onError:c},w=>{let S;i!==void 0&&(S=i-1n);let C,U=!1;const z=Ba(async()=>{var T;if(!U){try{C=await ne(e,xm,"createContractEventFilter")({abi:r,address:n,args:s,eventName:o,strict:k,fromBlock:i})}catch{}U=!0;return}try{let m;if(C)m=await ne(e,Rc,"getFilterChanges")({filter:C});else{const b=await ne(e,ti,"getBlockNumber")({});S&&S<b?m=await ne(e,a1,"getContractEvents")({abi:r,address:n,args:s,eventName:o,fromBlock:S+1n,toBlock:b,strict:k}):m=[],S=b}if(m.length===0)return;if(a)w.onLogs(m);else for(const b of m)w.onLogs([b])}catch(m){C&&m instanceof $n&&(U=!1),(T=w.onError)==null||T.call(w,m)}},{emitOnBegin:!0,interval:d});return async()=>{C&&await ne(e,Hc,"uninstallFilter")({filter:C}),z()}})})():(()=>{const k=p??!1,v=dt(["watchContractEvent",n,s,a,e.uid,o,d,k]);let w=!0,S=()=>w=!1;return yn(v,{onLogs:l,onError:c},C=>((async()=>{try{const U=(()=>{if(e.transport.type==="fallback"){const m=e.transport.transports.find(b=>b.config.type==="webSocket"||b.config.type==="ipc");return m?m.value:e.transport}return e.transport})(),z=o?ko({abi:r,eventName:o,args:s}):[],{unsubscribe:T}=await U.subscribe({params:["logs",{address:n,topics:z}],onData(m){var x;if(!w)return;const b=m.result;try{const{eventName:A,args:I}=Ic({abi:r,data:b.data,topics:b.topics,strict:p}),O=Vr(b,{args:I,eventName:A});C.onLogs([O])}catch(A){let I,O;if(A instanceof mc||A instanceof ju){if(p)return;I=A.abiItem.name,O=(x=A.abiItem.inputs)==null?void 0:x.some(E=>!("name"in E&&E.name))}const D=Vr(b,{args:O?[]:{},eventName:I});C.onLogs([D])}},onError(m){var b;(b=C.onError)==null||b.call(C,m)}});S=T,w||S()}catch(U){c==null||c(U)}})(),()=>S()))})()}class gn extends ${constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
|
|
41
|
+
`),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class Us extends ${constructor({docsPath:t,metaMessages:r,type:n}){super(`Account type "${n}" is not supported.`,{docsPath:t,metaMessages:r,name:"AccountTypeNotSupportedError"})}}function Qd({chain:e,currentChainId:t}){if(!e)throw new $8;if(t!==e.id)throw new H8({chain:e,currentChainId:t})}async function Jd(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const ef=new ya(128);async function $c(e,t){var w,S,C,U;const{account:r=e.account,chain:n=e.chain,accessList:s,authorizationList:a,blobs:o,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:h,type:y,value:g,...k}=t;if(typeof r>"u")throw new gn({docsPath:"/docs/actions/wallet/sendTransaction"});const v=r?Ke(r):null;try{jr(t);const z=await(async()=>{if(t.to)return t.to;if(t.to!==null&&a&&a.length>0)return await Cc({authorization:a[0]}).catch(()=>{throw new $("`to` is required. Could not infer from `authorizationList`.")})})();if((v==null?void 0:v.type)==="json-rpc"||v===null){let T;n!==null&&(T=await ne(e,Yn,"getChainId")({}),Qd({currentChainId:T,chain:n}));const m=(C=(S=(w=e.chain)==null?void 0:w.formatters)==null?void 0:S.transactionRequest)==null?void 0:C.format,x=(m||Sr)({...As(k,{format:m}),accessList:s,account:v,authorizationList:a,blobs:o,chainId:T,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:h,to:z,type:y,value:g},"sendTransaction"),A=ef.get(e.uid),I=A?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:I,params:[x]},{retryCount:0})}catch(O){if(A===!1)throw O;const D=O;if(D.name==="InvalidInputRpcError"||D.name==="InvalidParamsRpcError"||D.name==="MethodNotFoundRpcError"||D.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[x]},{retryCount:0}).then(E=>(ef.set(e.uid,!0),E)).catch(E=>{const P=E;throw P.name==="MethodNotFoundRpcError"||P.name==="MethodNotSupportedRpcError"?(ef.set(e.uid,!1),D):P});throw D}}if((v==null?void 0:v.type)==="local"){const T=await ne(e,Wo,"prepareTransactionRequest")({account:v,accessList:s,authorizationList:a,blobs:o,chain:n,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:h,nonceManager:v.nonceManager,parameters:[...Id,"sidecars"],type:y,value:g,...k,to:z}),m=(U=n==null?void 0:n.serializers)==null?void 0:U.transaction,b=await v.signTransaction(T,{serializer:m});return await ne(e,Jd,"sendRawTransaction")({serializedTransaction:b})}throw(v==null?void 0:v.type)==="smart"?new Us({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new Us({docsPath:"/docs/actions/wallet/sendTransaction",type:v==null?void 0:v.type})}catch(z){throw z instanceof Us?z:Pc(z,{...t,account:v,chain:t.chain||void 0})}}async function ri(e,t){return ri.internal(e,$c,"sendTransaction",t)}(function(e){async function t(r,n,s,a){const{abi:o,account:i=r.account,address:c,args:l,dataSuffix:u,functionName:d,...p}=a;if(typeof i>"u")throw new gn({docsPath:"/docs/contract/writeContract"});const h=i?Ke(i):null,y=nr({abi:o,args:l,functionName:d});try{return await ne(r,n,s)({data:`${y}${u?u.replace("0x",""):""}`,to:c,account:h,...p})}catch(g){throw Ss(g,{abi:o,address:c,args:l,docsPath:"/docs/contract/writeContract",functionName:d,sender:h==null?void 0:h.address})}}e.internal=t})(ri||(ri={}));class t3 extends ${constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}function Gc(e,{delay:t=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((s,a)=>{const o=async({count:i=0}={})=>{const c=async({error:l})=>{const u=typeof t=="function"?t({count:i,error:l}):t;u&&await Xd(u),o({count:i+1})};try{const l=await e();s(l)}catch(l){if(i<r&&await n({count:i,error:l}))return c({error:l});a(l)}};o()})}const R1={"0x0":"reverted","0x1":"success"};function jc(e,t){const r={...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(n=>Vr(n)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Jt(e.transactionIndex):null,status:e.status?R1[e.status]:null,type:e.type?$m[e.type]||e.type:null};return e.blobGasPrice&&(r.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(r.blobGasUsed=BigInt(e.blobGasUsed)),r}const tf=Sc("transactionReceipt",jc),H1="0x5792579257925792579257925792579257925792579257925792579257925792",$1=W(0,{size:32});async function G1(e,t){const{account:r=e.account,capabilities:n,chain:s=e.chain,experimental_fallback:a,experimental_fallbackDelay:o=32,forceAtomic:i=!1,id:c,version:l="2.0.0"}=t,u=r?Ke(r):null,d=t.calls.map(p=>{const h=p,y=h.abi?nr({abi:h.abi,functionName:h.functionName,args:h.args}):h.data;return{data:h.dataSuffix&&y?tr([y,h.dataSuffix]):y,to:h.to,value:h.value?W(h.value):void 0}});try{const p=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:i,calls:d,capabilities:n,chainId:W(s.id),from:u==null?void 0:u.address,id:c,version:l}]},{retryCount:0});return typeof p=="string"?{id:p}:p}catch(p){const h=p;if(a&&(h.name==="MethodNotFoundRpcError"||h.name==="MethodNotSupportedRpcError"||h.name==="UnknownRpcError"||h.details.toLowerCase().includes("does not exist / is not available")||h.details.toLowerCase().includes("missing or invalid. request()")||h.details.toLowerCase().includes("did not match any variant of untagged enum")||h.details.toLowerCase().includes("account upgraded to unsupported contract")||h.details.toLowerCase().includes("eip-7702 not supported")||h.details.toLowerCase().includes("unsupported wc_ method")||h.details.toLowerCase().includes("feature toggled misconfigured")||h.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(n&&Object.values(n).some(w=>!w.optional)){const w="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new va(new $(w,{details:w}))}if(i&&d.length>1){const v="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new ka(new $(v,{details:v}))}const y=[];for(const v of d){const w=$c(e,{account:u,chain:s,data:v.data,to:v.to,value:v.value?Ne(v.value):void 0});y.push(w),o>0&&await new Promise(S=>setTimeout(S,o))}const g=await Promise.allSettled(y);if(g.every(v=>v.status==="rejected"))throw g[0].reason;const k=g.map(v=>v.status==="fulfilled"?v.value:$1);return{id:tr([...k,W(s.id,{size:32}),H1])}}throw Pc(p,{...t,account:u,chain:t.chain})}}async function j1(e,t){async function r(u){if(u.endsWith(H1.slice(2))){const p=$t(Xu(u,-64,-32)),h=Xu(u,0,-64).slice(2).match(/.{1,64}/g),y=await Promise.all(h.map(k=>$1.slice(2)!==k?e.request({method:"eth_getTransactionReceipt",params:[`0x${k}`]},{dedupe:!0}):void 0)),g=y.some(k=>k===null)?100:y.every(k=>(k==null?void 0:k.status)==="0x1")?200:y.every(k=>(k==null?void 0:k.status)==="0x0")?500:600;return{atomic:!1,chainId:Jt(p),receipts:y.filter(Boolean),status:g,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[u]})}const{atomic:n=!1,chainId:s,receipts:a,version:o="2.0.0",...i}=await r(t.id),[c,l]=(()=>{const u=i.status;return u>=100&&u<200?["pending",u]:u>=200&&u<300?["success",u]:u>=300&&u<700?["failure",u]:u==="CONFIRMED"?["success",200]:u==="PENDING"?["pending",100]:[void 0,u]})();return{...i,atomic:n,chainId:s?Jt(s):void 0,receipts:(a==null?void 0:a.map(u=>({...u,blockNumber:Ne(u.blockNumber),gasUsed:Ne(u.gasUsed),status:R1[u.status]})))??[],statusCode:l,status:c,version:o}}async function V1(e,t){const{id:r,pollingInterval:n=e.pollingInterval,status:s=({statusCode:g})=>g===200||g>=300,retryCount:a=4,retryDelay:o=({count:g})=>~~(1<<g)*200,timeout:i=6e4,throwOnFailure:c=!1}=t,l=dt(["waitForCallsStatus",e.uid,r]),{promise:u,resolve:d,reject:p}=Yd();let h;const y=yn(l,{resolve:d,reject:p},g=>{const k=Ba(async()=>{const v=w=>{clearTimeout(h),k(),w(),y()};try{const w=await Gc(async()=>{const S=await ne(e,j1,"getCallsStatus")({id:r});if(c&&S.status==="failure")throw new t3(S);return S},{retryCount:a,delay:o});if(!s(w))return;v(()=>g.resolve(w))}catch(w){v(()=>g.reject(w))}},{interval:n,emitOnBegin:!0});return k});return h=i?setTimeout(()=>{y(),clearTimeout(h),p(new r3({id:r}))},i):void 0,await u}class r3 extends ${constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}const rf=256;let Vc=rf,Wc;function W1(e=11){if(!Wc||Vc+e>rf*2){Wc="",Vc=0;for(let t=0;t<rf;t++)Wc+=(256+Math.random()*256|0).toString(16).substring(1)}return Wc.substring(Vc,Vc+++e)}function q1(e){const{batch:t,chain:r,ccipRead:n,key:s="base",name:a="Base Client",type:o="base"}=e,i=e.experimental_blockTag??(typeof(r==null?void 0:r.experimental_preconfirmationTime)=="number"?"pending":void 0),c=(r==null?void 0:r.blockTime)??12e3,l=Math.min(Math.max(Math.floor(c/2),500),4e3),u=e.pollingInterval??l,d=e.cacheTime??u,p=e.account?Ke(e.account):void 0,{config:h,request:y,value:g}=e.transport({account:p,chain:r,pollingInterval:u}),k={...h,...g},v={account:p,batch:t,cacheTime:d,ccipRead:n,chain:r,key:s,name:a,pollingInterval:u,request:y,transport:k,type:o,uid:W1(),...i?{experimental_blockTag:i}:{}};function w(S){return C=>{const U=C(S);for(const T in v)delete U[T];const z={...S,...U};return Object.assign(z,{extend:w(z)})}}return Object.assign(v,{extend:w(v)})}function nf(e){var r,n,s,a,o,i;if(!(e instanceof $))return!1;const t=e.walk(c=>c instanceof ad);return t instanceof ad?((r=t.data)==null?void 0:r.errorName)==="HttpError"||((n=t.data)==null?void 0:n.errorName)==="ResolverError"||((s=t.data)==null?void 0:s.errorName)==="ResolverNotContract"||((a=t.data)==null?void 0:a.errorName)==="ResolverNotFound"||((o=t.data)==null?void 0:o.errorName)==="ReverseAddressMismatch"||((i=t.data)==null?void 0:i.errorName)==="UnsupportedResolverProfile":!1}function n3(e){const{abi:t,data:r}=e,n=vs(r,0,4),s=t.find(a=>a.type==="function"&&n===vo(Er(a)));if(!s)throw new Hw(n,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:s.name,args:"inputs"in s&&s.inputs&&s.inputs.length>0?Eo(s.inputs,vs(r,4)):void 0}}const sf="/docs/contract/encodeErrorResult";function Y1(e){const{abi:t,errorName:r,args:n}=e;let s=t[0];if(r){const c=ks({abi:t,args:n,name:r});if(!c)throw new Hh(r,{docsPath:sf});s=c}if(s.type!=="error")throw new Hh(void 0,{docsPath:sf});const a=Er(s),o=vo(a);let i="0x";if(n&&n.length>0){if(!s.inputs)throw new zw(s.name,{docsPath:sf});i=Hn(s.inputs,n)}return rr([o,i])}const af="/docs/contract/encodeFunctionResult";function s3(e){const{abi:t,functionName:r,result:n}=e;let s=t[0];if(r){const o=ks({abi:t,name:r});if(!o)throw new da(r,{docsPath:af});s=o}if(s.type!=="function")throw new da(void 0,{docsPath:af});if(!s.outputs)throw new jh(s.name,{docsPath:af});const a=(()=>{if(s.outputs.length===0)return[];if(s.outputs.length===1)return[n];if(Array.isArray(n))return n;throw new Vh(n)})();return Hn(s.outputs,a)}const ni="x-batch-gateway:true";async function K1(e){const{data:t,ccipRequest:r}=e,{args:[n]}=n3({abi:Gd,data:t}),s=[],a=[];return await Promise.all(n.map(async(o,i)=>{try{a[i]=o.urls.includes(ni)?await K1({data:o.data,ccipRequest:r}):await r(o),s[i]=!1}catch(c){s[i]=!0,a[i]=a3(c)}})),s3({abi:Gd,functionName:"query",result:[s,a]})}function a3(e){return e.name==="HttpRequestError"&&e.status?Y1({abi:Gd,errorName:"HttpError",args:[e.status,e.shortMessage]}):Y1({abi:[vm],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}function Z1(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const t=`0x${e.slice(1,65)}`;return Cr(t)?t:null}function of(e){let t=new Uint8Array(32).fill(0);if(!e)return bt(t);const r=e.split(".");for(let n=r.length-1;n>=0;n-=1){const s=Z1(r[n]),a=s?un(s):At(xs(r[n]),"bytes");t=At(tr([t,a]),"bytes")}return bt(t)}function o3(e){return`[${e.slice(2)}]`}function i3(e){const t=new Uint8Array(32).fill(0);return e?Z1(e)||At(xs(e)):bt(t)}function cf(e){const t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);const r=new Uint8Array(xs(t).byteLength+2);let n=0;const s=t.split(".");for(let a=0;a<s.length;a++){let o=xs(s[a]);o.byteLength>255&&(o=xs(o3(i3(s[a])))),r[n]=o.length,r.set(o,n+1),n+=o.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}async function c3(e,t){const{blockNumber:r,blockTag:n,coinType:s,name:a,gatewayUrls:o,strict:i}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Oa({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),u=c==null?void 0:c.ensTlds;if(u&&!u.some(p=>a.endsWith(p)))return null;const d=s!=null?[of(a),BigInt(s)]:[of(a)];try{const p=nr({abi:B1,functionName:"addr",args:d}),h={address:l,abi:I1,functionName:"resolveWithGateways",args:[Be(cf(a)),p,o??[ni]],blockNumber:r,blockTag:n},g=await ne(e,Ir,"readContract")(h);if(g[0]==="0x")return null;const k=Os({abi:B1,args:d,functionName:"addr",data:g[0]});return k==="0x"||$t(k)==="0x00"?null:k}catch(p){if(i)throw p;if(nf(p))return null;throw p}}class l3 extends ${constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"})}}class si extends ${constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}}class lf extends ${constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class u3 extends ${constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const d3=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,f3=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,p3=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,h3=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function m3(e){try{const t=await fetch(e,{method:"HEAD"});if(t.status===200){const r=t.headers.get("content-type");return r==null?void 0:r.startsWith("image/")}return!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(r=>{const n=new Image;n.onload=()=>{r(!0)},n.onerror=()=>{r(!1)},n.src=e})}}function X1(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function Q1({uri:e,gatewayUrls:t}){const r=p3.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};const n=X1(t==null?void 0:t.ipfs,"https://ipfs.io"),s=X1(t==null?void 0:t.arweave,"https://arweave.net"),a=e.match(d3),{protocol:o,subpath:i,target:c,subtarget:l=""}=(a==null?void 0:a.groups)||{},u=o==="ipns:/"||i==="ipns/",d=o==="ipfs:/"||i==="ipfs/"||f3.test(e);if(e.startsWith("http")&&!u&&!d){let h=e;return t!=null&&t.arweave&&(h=e.replace(/https:\/\/arweave.net/g,t==null?void 0:t.arweave)),{uri:h,isOnChain:!1,isEncoded:!1}}if((u||d)&&c)return{uri:`${n}/${u?"ipns":"ipfs"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if(o==="ar:/"&&c)return{uri:`${s}/${c}${l||""}`,isOnChain:!1,isEncoded:!1};let p=e.replace(h3,"");if(p.startsWith("<svg")&&(p=`data:image/svg+xml;base64,${btoa(p)}`),p.startsWith("data:")||p.startsWith("{"))return{uri:p,isOnChain:!0,isEncoded:!1};throw new lf({uri:e})}function J1(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new l3({data:e});return e.image||e.image_url||e.image_data}async function b3({gatewayUrls:e,uri:t}){try{const r=await fetch(t).then(s=>s.json());return await uf({gatewayUrls:e,uri:J1(r)})}catch{throw new lf({uri:t})}}async function uf({gatewayUrls:e,uri:t}){const{uri:r,isOnChain:n}=Q1({uri:t,gatewayUrls:e});if(n||await m3(r))return r;throw new lf({uri:t})}function y3(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[r,n,s]=t.split("/"),[a,o]=r.split(":"),[i,c]=n.split(":");if(!a||a.toLowerCase()!=="eip155")throw new si({reason:"Only EIP-155 supported"});if(!o)throw new si({reason:"Chain ID not found"});if(!c)throw new si({reason:"Contract address not found"});if(!s)throw new si({reason:"Token ID not found"});if(!i)throw new si({reason:"ERC namespace not found"});return{chainID:Number.parseInt(o,10),namespace:i.toLowerCase(),contractAddress:c,tokenID:s}}async function g3(e,{nft:t}){if(t.namespace==="erc721")return Ir(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return Ir(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new u3({namespace:t.namespace})}async function x3(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?w3(e,{gatewayUrls:t,record:r}):uf({uri:r,gatewayUrls:t})}async function w3(e,{gatewayUrls:t,record:r}){const n=y3(r),s=await g3(e,{nft:n}),{uri:a,isOnChain:o,isEncoded:i}=Q1({uri:s,gatewayUrls:t});if(o&&(a.includes("data:application/json;base64,")||a.startsWith("{"))){const l=i?atob(a.replace("data:application/json;base64,","")):a,u=JSON.parse(l);return uf({uri:J1(u),gatewayUrls:t})}let c=n.tokenID;return n.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),b3({gatewayUrls:t,uri:a.replace(/(?:0x)?{id}/,c)})}async function eb(e,t){const{blockNumber:r,blockTag:n,key:s,name:a,gatewayUrls:o,strict:i}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Oa({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),u=c==null?void 0:c.ensTlds;if(u&&!u.some(d=>a.endsWith(d)))return null;try{const d={address:l,abi:I1,args:[Be(cf(a)),nr({abi:O1,functionName:"text",args:[of(a),s]}),o??[ni]],functionName:"resolveWithGateways",blockNumber:r,blockTag:n},h=await ne(e,Ir,"readContract")(d);if(h[0]==="0x")return null;const y=Os({abi:O1,functionName:"text",data:h[0]});return y===""?null:y}catch(d){if(i)throw d;if(nf(d))return null;throw d}}async function v3(e,{blockNumber:t,blockTag:r,assetGatewayUrls:n,name:s,gatewayUrls:a,strict:o,universalResolverAddress:i}){const c=await ne(e,eb,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:s,universalResolverAddress:i,gatewayUrls:a,strict:o});if(!c)return null;try{return await x3(e,{record:c,gatewayUrls:n})}catch{return null}}async function k3(e,t){const{address:r,blockNumber:n,blockTag:s,coinType:a=60n,gatewayUrls:o,strict:i}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Oa({blockNumber:n,chain:c,contract:"ensUniversalResolver"})})();try{const u={address:l,abi:N8,args:[r,a,o??[ni]],functionName:"reverseWithGateways",blockNumber:n,blockTag:s},d=ne(e,Ir,"readContract"),[p]=await d(u);return p||null}catch(u){if(i)throw u;if(nf(u))return null;throw u}}async function E3(e,t){const{blockNumber:r,blockTag:n,name:s}=t,{chain:a}=e,o=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!a)throw new Error("client chain not configured. universalResolverAddress is required.");return Oa({blockNumber:r,chain:a,contract:"ensUniversalResolver"})})(),i=a==null?void 0:a.ensTlds;if(i&&!i.some(l=>s.endsWith(l)))throw new Error(`${s} is not a valid ENS TLD (${i==null?void 0:i.join(", ")}) for chain "${a.name}" (id: ${a.id}).`);const[c]=await ne(e,Ir,"readContract")({address:o,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[Be(cf(s))],blockNumber:r,blockTag:n});return c}async function tb(e,t){var k,v,w;const{account:r=e.account,blockNumber:n,blockTag:s="latest",blobs:a,data:o,gas:i,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:d,to:p,value:h,...y}=t,g=r?Ke(r):void 0;try{jr(t);const C=(typeof n=="bigint"?W(n):void 0)||s,U=(w=(v=(k=e.chain)==null?void 0:k.formatters)==null?void 0:v.transactionRequest)==null?void 0:w.format,T=(U||Sr)({...As(y,{format:U}),account:g,blobs:a,data:o,gas:i,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:d,to:p,value:h},"createAccessList"),m=await e.request({method:"eth_createAccessList",params:[T,C]});return{accessList:m.accessList,gasUsed:BigInt(m.gasUsed)}}catch(S){throw qd(S,{...t,account:g,chain:e.chain})}}async function C3(e){const t=kc(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}}async function rb(e,{address:t,args:r,event:n,events:s,fromBlock:a,strict:o,toBlock:i}={}){const c=s??(n?[n]:void 0),l=kc(e,{method:"eth_newFilter"});let u=[];c&&(u=[c.flatMap(h=>ko({abi:[h],eventName:h.name,args:r}))],n&&(u=u[0]));const d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof a=="bigint"?W(a):a,toBlock:typeof i=="bigint"?W(i):i,...u.length?{topics:u}:{}}]});return{abi:c,args:r,eventName:n?n.name:void 0,fromBlock:a,id:d,request:l(d),strict:!!o,toBlock:i,type:"event"}}async function nb(e){const t=kc(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:t(r),type:"transaction"}}async function T3(e,{address:t,blockNumber:r,blockTag:n=e.experimental_blockTag??"latest"}){const s=typeof r=="bigint"?W(r):void 0,a=await e.request({method:"eth_getBalance",params:[t,s||n]});return BigInt(a)}async function S3(e){const t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}async function A3(e,{blockHash:t,blockNumber:r,blockTag:n="latest"}={}){const s=r!==void 0?W(r):void 0;let a;return t?a=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):a=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[s||n]},{dedupe:!!s}),Jt(a)}async function qc(e,{address:t,blockNumber:r,blockTag:n="latest"}){const s=r!==void 0?W(r):void 0,a=await e.request({method:"eth_getCode",params:[t,s||n]},{dedupe:!!s});if(a!=="0x")return a}class P3 extends ${constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function I3(e,t){const{address:r,factory:n,factoryData:s}=t;try{const[a,o,i,c,l,u,d]=await ne(e,Ir,"readContract")({abi:O3,address:r,functionName:"eip712Domain",factory:n,factoryData:s});return{domain:{name:o,version:i,chainId:Number(c),verifyingContract:l,salt:u},extensions:d,fields:a}}catch(a){const o=a;throw o.name==="ContractFunctionExecutionError"&&o.cause.name==="ContractFunctionZeroDataError"?new P3({address:r}):o}}const O3=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];function B3(e){var t;return{baseFeePerGas:e.baseFeePerGas.map(r=>BigInt(r)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:(t=e.reward)==null?void 0:t.map(r=>r.map(n=>BigInt(n)))}}async function M3(e,{blockCount:t,blockNumber:r,blockTag:n="latest",rewardPercentiles:s}){const a=typeof r=="bigint"?W(r):void 0,o=await e.request({method:"eth_feeHistory",params:[W(t),a||n,s]},{dedupe:!!a});return B3(o)}async function _3(e,{filter:t}){const r=t.strict??!1,s=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(a=>Vr(a));return t.abi?Md({abi:t.abi,logs:s,strict:r}):s}function U3(e){const{authorizationList:t}=e;if(t)for(const r of t){const{chainId:n}=r,s=r.address;if(!rt(s))throw new xt({address:s});if(n<0)throw new Ia({chainId:n})}df(e)}function D3(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new t1;for(const r of t){const n=it(r),s=Jt(vs(r,0,1));if(n!==32)throw new Qv({hash:r,size:n});if(s!==e1)throw new Jv({hash:r,version:s})}}df(e)}function df(e){const{chainId:t,maxPriorityFeePerGas:r,maxFeePerGas:n,to:s}=e;if(t<=0)throw new Ia({chainId:t});if(s&&!rt(s))throw new xt({address:s});if(n&&n>Ps)throw new Gn({maxFeePerGas:n});if(r&&n&&r>n)throw new Ca({maxFeePerGas:n,maxPriorityFeePerGas:r})}function F3(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:a}=e;if(t<=0)throw new Ia({chainId:t});if(a&&!rt(a))throw new xt({address:a});if(r||s)throw new $("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>Ps)throw new Gn({maxFeePerGas:n})}function N3(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:a}=e;if(a&&!rt(a))throw new xt({address:a});if(typeof t<"u"&&t<=0)throw new Ia({chainId:t});if(r||s)throw new $("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>Ps)throw new Gn({maxFeePerGas:n})}function ai(e){if(!e||e.length===0)return[];const t=[];for(let r=0;r<e.length;r++){const{address:n,storageKeys:s}=e[r];for(let a=0;a<s.length;a++)if(s[a].length-2!==64)throw new bv({storageKey:s[a]});if(!rt(n,{strict:!1}))throw new xt({address:n});t.push([n,s])}return t}function Yc(e,t){const r=Ad(e);return r==="eip1559"?R3(e,t):r==="eip2930"?H3(e,t):r==="eip4844"?L3(e,t):r==="eip7702"?z3(e,t):$3(e,t)}function z3(e,t){const{authorizationList:r,chainId:n,gas:s,nonce:a,to:o,value:i,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:d}=e;U3(e);const p=ai(u),h=G3(r);return rr(["0x04",Gr([W(n),a?W(a):"0x",l?W(l):"0x",c?W(c):"0x",s?W(s):"0x",o??"0x",i?W(i):"0x",d??"0x",p,h,...Ma(e,t)])])}function L3(e,t){const{chainId:r,gas:n,nonce:s,to:a,value:o,maxFeePerBlobGas:i,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:d}=e;D3(e);let p=e.blobVersionedHashes,h=e.sidecars;if(e.blobs&&(typeof p>"u"||typeof h>"u")){const S=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(z=>bt(z)),C=e.kzg,U=Ed({blobs:S,kzg:C});if(typeof p>"u"&&(p=Km({commitments:U})),typeof h>"u"){const z=Cd({blobs:S,commitments:U,kzg:C});h=r1({blobs:S,commitments:U,proofs:z})}}const y=ai(u),g=[W(r),s?W(s):"0x",l?W(l):"0x",c?W(c):"0x",n?W(n):"0x",a??"0x",o?W(o):"0x",d??"0x",y,i?W(i):"0x",p??[],...Ma(e,t)],k=[],v=[],w=[];if(h)for(let S=0;S<h.length;S++){const{blob:C,commitment:U,proof:z}=h[S];k.push(C),v.push(U),w.push(z)}return rr(["0x03",Gr(h?[g,k,v,w]:g)])}function R3(e,t){const{chainId:r,gas:n,nonce:s,to:a,value:o,maxFeePerGas:i,maxPriorityFeePerGas:c,accessList:l,data:u}=e;df(e);const d=ai(l),p=[W(r),s?W(s):"0x",c?W(c):"0x",i?W(i):"0x",n?W(n):"0x",a??"0x",o?W(o):"0x",u??"0x",d,...Ma(e,t)];return rr(["0x02",Gr(p)])}function H3(e,t){const{chainId:r,gas:n,data:s,nonce:a,to:o,value:i,accessList:c,gasPrice:l}=e;F3(e);const u=ai(c),d=[W(r),a?W(a):"0x",l?W(l):"0x",n?W(n):"0x",o??"0x",i?W(i):"0x",s??"0x",u,...Ma(e,t)];return rr(["0x01",Gr(d)])}function $3(e,t){const{chainId:r=0,gas:n,data:s,nonce:a,to:o,value:i,gasPrice:c}=e;N3(e);let l=[a?W(a):"0x",c?W(c):"0x",n?W(n):"0x",o??"0x",i?W(i):"0x",s??"0x"];if(t){const u=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(r>0)return BigInt(r*2)+BigInt(35n+t.v-27n);const h=27n+(t.v===27n?0n:1n);if(t.v!==h)throw new hv({v:t.v});return h})(),d=$t(t.r),p=$t(t.s);l=[...l,W(u),d==="0x00"?"0x":d,p==="0x00"?"0x":p]}else r>0&&(l=[...l,W(r),"0x","0x"]);return Gr(l)}function Ma(e,t){const r=t??e,{v:n,yParity:s}=r;if(typeof r.r>"u")return[];if(typeof r.s>"u")return[];if(typeof n>"u"&&typeof s>"u")return[];const a=$t(r.r),o=$t(r.s);return[typeof s=="number"?s?W(1):"0x":n===0n?"0x":n===1n?W(1):n===27n?"0x":W(1),a==="0x00"?"0x":a,o==="0x00"?"0x":o]}function G3(e){if(!e||e.length===0)return[];const t=[];for(const r of e){const{chainId:n,nonce:s,...a}=r,o=r.address;t.push([n?Be(n):"0x",o,s?Be(s):"0x",...Ma({},a)])}return t}async function j3({address:e,authorization:t,signature:r}){return Ta(Ku(e),await Cc({authorization:t,signature:r}))}const Kc=new ya(8192);function V3(e,{enabled:t=!0,id:r}){if(!t||!r)return e();if(Kc.get(r))return Kc.get(r);const n=e().finally(()=>Kc.delete(r));return Kc.set(r,n),n}function W3(e,t={}){return async(r,n={})=>{var d;const{dedupe:s=!1,methods:a,retryDelay:o=150,retryCount:i=3,uid:c}={...t,...n},{method:l}=r;if((d=a==null?void 0:a.exclude)!=null&&d.includes(l))throw new Ts(new Error("method not supported"),{method:l});if(a!=null&&a.include&&!a.include.includes(l))throw new Ts(new Error("method not supported"),{method:l});const u=s?fa(`${c}.${dt(r)}`):void 0;return V3(()=>Gc(async()=>{try{return await e(r)}catch(p){const h=p;switch(h.code){case Ao.code:throw new Ao(h);case Po.code:throw new Po(h);case Io.code:throw new Io(h,{method:r.method});case Oo.code:throw new Oo(h);case Cs.code:throw new Cs(h);case $n.code:throw new $n(h);case Bo.code:throw new Bo(h);case Mo.code:throw new Mo(h);case _o.code:throw new _o(h);case Ts.code:throw new Ts(h,{method:r.method});case xa.code:throw new xa(h);case Uo.code:throw new Uo(h);case wa.code:throw new wa(h);case Do.code:throw new Do(h);case Fo.code:throw new Fo(h);case No.code:throw new No(h);case zo.code:throw new zo(h);case Lo.code:throw new Lo(h);case va.code:throw new va(h);case Ro.code:throw new Ro(h);case Ho.code:throw new Ho(h);case $o.code:throw new $o(h);case Go.code:throw new Go(h);case jo.code:throw new jo(h);case ka.code:throw new ka(h);case 5e3:throw new wa(h);default:throw p instanceof $?p:new Ev(h)}}},{delay:({count:p,error:h})=>{var y;if(h&&h instanceof Es){const g=(y=h==null?void 0:h.headers)==null?void 0:y.get("Retry-After");if(g!=null&&g.match(/\d/))return Number.parseInt(g,10)*1e3}return~~(1<<p)*o},retryCount:i,shouldRetry:({error:p})=>q3(p)}),{enabled:s,id:u})}}function q3(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===xa.code||e.code===Cs.code:e instanceof Es&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:!0}class Y3 extends ${constructor({callbackSelector:t,cause:r,data:n,extraData:s,sender:a,urls:o}){var i;super(r.shortMessage||"An error occurred while fetching for an offchain result.",{cause:r,metaMessages:[...r.metaMessages||[],(i=r.metaMessages)!=null&&i.length?"":[],"Offchain Gateway Call:",o&&[" Gateway URL(s):",...o.map(c=>` ${So(c)}`)],` Sender: ${a}`,` Data: ${n}`,` Callback selector: ${t}`,` Extra data: ${s}`].flat(),name:"OffchainLookupError"})}}class K3 extends ${constructor({result:t,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${So(r)}`,`Response: ${dt(t)}`],name:"OffchainLookupResponseMalformedError"})}}class Z3 extends ${constructor({sender:t,to:r}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${t}`],name:"OffchainLookupSenderMismatchError"})}}const X3="0x556f1830",sb={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function Q3(e,{blockNumber:t,blockTag:r,data:n,to:s}){const{args:a}=Tm({data:n,abi:[sb]}),[o,i,c,l,u]=a,{ccipRead:d}=e,p=d&&typeof(d==null?void 0:d.request)=="function"?d.request:ab;try{if(!Ta(s,o))throw new Z3({sender:o,to:s});const h=i.includes(ni)?await K1({data:c,ccipRequest:p}):await p({data:c,sender:o,urls:i}),{data:y}=await ei(e,{blockNumber:t,blockTag:r,data:tr([l,Hn([{type:"bytes"},{type:"bytes"}],[h,u])]),to:s});return y}catch(h){throw new Y3({callbackSelector:l,cause:h,data:n,extraData:u,sender:o,urls:i})}}async function ab({data:e,sender:t,urls:r}){var s;let n=new Error("An unknown error occurred.");for(let a=0;a<r.length;a++){const o=r[a],i=o.includes("{data}")?"GET":"POST",c=i==="POST"?{data:e,sender:t}:void 0,l=i==="POST"?{"Content-Type":"application/json"}:{};try{const u=await fetch(o.replace("{sender}",t.toLowerCase()).replace("{data}",e),{body:JSON.stringify(c),headers:l,method:i});let d;if((s=u.headers.get("Content-Type"))!=null&&s.startsWith("application/json")?d=(await u.json()).data:d=await u.text(),!u.ok){n=new Es({body:c,details:d!=null&&d.error?dt(d.error):u.statusText,headers:u.headers,status:u.status,url:o});continue}if(!Cr(d)){n=new K3({result:d,url:o});continue}return d}catch(u){n=new Es({body:c,details:u.message,url:o})}}throw n}const J3=Object.freeze(Object.defineProperty({__proto__:null,ccipRequest:ab,offchainLookup:Q3,offchainLookupAbiItem:sb,offchainLookupSignature:X3},Symbol.toStringTag,{value:"Module"}));function f(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};function r(n){return s=>{const a=typeof s=="function"?s(n):s,o={...n,...a};return Object.assign(o,{extend:r(o)})}}return Object.assign(t,{extend:r(t)})}function ek(){return{}}function tk(e,{errorInstance:t=new Error("timed out"),timeout:r,signal:n}){return new Promise((s,a)=>{(async()=>{let o;try{const i=new AbortController;r>0&&(o=setTimeout(()=>{n&&i.abort()},r)),s(await e({signal:(i==null?void 0:i.signal)||null}))}catch(i){(i==null?void 0:i.name)==="AbortError"&&a(t),a(i)}finally{clearTimeout(o)}})()})}function rk(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const ob=rk();function nk(e,t={}){return{async request(r){var p;const{body:n,fetchFn:s=t.fetchFn??fetch,onRequest:a=t.onRequest,onResponse:o=t.onResponse,timeout:i=t.timeout??1e4}=r,c={...t.fetchOptions??{},...r.fetchOptions??{}},{headers:l,method:u,signal:d}=c;try{const h=await tk(async({signal:g})=>{const k={...c,body:Array.isArray(n)?dt(n.map(C=>({jsonrpc:"2.0",id:C.id??ob.take(),...C}))):dt({jsonrpc:"2.0",id:n.id??ob.take(),...n}),headers:{"Content-Type":"application/json",...l},method:u||"POST",signal:d||(i>0?g:null)},v=new Request(e,k),w=await(a==null?void 0:a(v,k))??{...k,url:e};return await s(w.url??e,w)},{errorInstance:new Um({body:n,url:e}),timeout:i,signal:!0});o&&await o(h);let y;if((p=h.headers.get("Content-Type"))!=null&&p.startsWith("application/json"))y=await h.json();else{y=await h.text();try{y=JSON.parse(y||"{}")}catch(g){if(h.ok)throw g;y={error:y}}}if(!h.ok)throw new Es({body:n,details:dt(y.error)||h.statusText,headers:h.headers,status:h.status,url:e});return y}catch(h){throw h instanceof Es||h instanceof Um?h:new Es({body:n,cause:h,url:e})}}}}const sk=`Ethereum Signed Message:
|
|
42
|
+
`;function ak(e){const t=typeof e=="string"?fa(e):typeof e.raw=="string"?e.raw:bt(e.raw),r=fa(`${sk}${it(t)}`);return tr([r,t])}function ib(e,t){return At(ak(e),t)}class ok extends ${constructor({domain:t}){super(`Invalid domain "${dt(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class ik extends ${constructor({primaryType:t,types:r}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(r))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class ck extends ${constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function lk(e){const{domain:t,message:r,primaryType:n,types:s}=e,a=(c,l)=>{const u={...l};for(const d of c){const{name:p,type:h}=d;h==="address"&&(u[p]=u[p].toLowerCase())}return u},o=s.EIP712Domain?t?a(s.EIP712Domain,t):{}:{},i=(()=>{if(n!=="EIP712Domain")return a(s[n],r)})();return dt({domain:o,message:i,primaryType:n,types:s})}function cb(e){const{domain:t,message:r,primaryType:n,types:s}=e,a=(o,i)=>{for(const c of o){const{name:l,type:u}=c,d=i[l],p=u.match(mm);if(p&&(typeof d=="number"||typeof d=="bigint")){const[g,k,v]=p;W(d,{signed:k==="int",size:Number.parseInt(v,10)/8})}if(u==="address"&&typeof d=="string"&&!rt(d))throw new xt({address:d});const h=u.match(L5);if(h){const[g,k]=h;if(k&&it(d)!==Number.parseInt(k,10))throw new Gw({expectedSize:Number.parseInt(k,10),givenSize:it(d)})}const y=s[u];y&&(uk(u),a(y,d))}};if(s.EIP712Domain&&t){if(typeof t!="object")throw new ok({domain:t});a(s.EIP712Domain,t)}if(n!=="EIP712Domain")if(s[n])a(s[n],r);else throw new ik({primaryType:n,types:s})}function lb({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function uk(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new ck({type:e})}function dk(e){const{domain:t={},message:r,primaryType:n}=e,s={EIP712Domain:lb({domain:t}),...e.types};cb({domain:t,message:r,primaryType:n,types:s});const a=["0x1901"];return t&&a.push(fk({domain:t,types:s})),n!=="EIP712Domain"&&a.push(ub({data:r,primaryType:n,types:s})),At(tr(a))}function fk({domain:e,types:t}){return ub({data:e,primaryType:"EIP712Domain",types:t})}function ub({data:e,primaryType:t,types:r}){const n=db({data:e,primaryType:t,types:r});return At(n)}function db({data:e,primaryType:t,types:r}){const n=[{type:"bytes32"}],s=[pk({primaryType:t,types:r})];for(const a of r[t]){const[o,i]=pb({types:r,name:a.name,type:a.type,value:e[a.name]});n.push(o),s.push(i)}return Hn(n,s)}function pk({primaryType:e,types:t}){const r=Be(hk({primaryType:e,types:t}));return At(r)}function hk({primaryType:e,types:t}){let r="";const n=fb({primaryType:e,types:t});n.delete(e);const s=[e,...Array.from(n).sort()];for(const a of s)r+=`${a}(${t[a].map(({name:o,type:i})=>`${i} ${o}`).join(",")})`;return r}function fb({primaryType:e,types:t},r=new Set){const n=e.match(/^\w*/u),s=n==null?void 0:n[0];if(r.has(s)||t[s]===void 0)return r;r.add(s);for(const a of t[s])fb({primaryType:a.type,types:t},r);return r}function pb({types:e,name:t,type:r,value:n}){if(e[r]!==void 0)return[{type:"bytes32"},At(db({data:n,primaryType:r,types:e}))];if(r==="bytes")return[{type:"bytes32"},At(n)];if(r==="string")return[{type:"bytes32"},At(Be(n))];if(r.lastIndexOf("]")===r.length-1){const s=r.slice(0,r.lastIndexOf("[")),a=n.map(o=>pb({name:t,type:s,types:e,value:o}));return[{type:"bytes32"},At(Hn(a.map(([o])=>o),a.map(([,o])=>o)))]}return[{type:r},n]}class mk extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const r=super.get(t);return super.has(t)&&r!==void 0&&(this.delete(t),super.set(t,r)),r}set(t,r){if(super.set(t,r),this.maxSize&&this.size>this.maxSize){const n=this.keys().next().value;n&&this.delete(n)}return this}}const ff={checksum:new mk(8192)}.checksum;function oi(e,t={}){const{as:r=typeof e=="string"?"Hex":"Bytes"}=t,n=um(Hd(e));return r==="Bytes"?n:Et(n)}function bk(e,t={}){const{as:r=typeof e=="string"?"Hex":"Bytes"}=t,n=qm(Hd(e));return r==="Bytes"?n:Et(n)}function yk(e){return Pr(e)&&ft(e)===32}function hb(e,t={}){const{compressed:r}=t,{prefix:n,x:s,y:a}=e;if(r===!1||typeof s=="bigint"&&typeof a=="bigint"){if(n!==4)throw new bb({prefix:n,cause:new Ek});return}if(r===!0||typeof s=="bigint"&&typeof a>"u"){if(n!==3&&n!==2)throw new bb({prefix:n,cause:new kk});return}throw new vk({publicKey:e})}function gk(e){const t=(()=>{if(Pr(e))return mb(e);if(S8(e))return xk(e);const{prefix:r,x:n,y:s}=e;return typeof n=="bigint"&&typeof s=="bigint"?{prefix:r??4,x:n,y:s}:{prefix:r,x:n}})();return hb(t),t}function xk(e){return mb(Et(e))}function mb(e){if(e.length!==132&&e.length!==130&&e.length!==68)throw new Ck({publicKey:e});if(e.length===130){const n=BigInt(Pe(e,0,32)),s=BigInt(Pe(e,32,64));return{prefix:4,x:n,y:s}}if(e.length===132){const n=Number(Pe(e,0,1)),s=BigInt(Pe(e,1,33)),a=BigInt(Pe(e,33,65));return{prefix:n,x:s,y:a}}const t=Number(Pe(e,0,1)),r=BigInt(Pe(e,1,33));return{prefix:t,x:r}}function wk(e,t={}){return Kn(pf(e,t))}function pf(e,t={}){hb(e);const{prefix:r,x:n,y:s}=e,{includePrefix:a=!0}=t;return lt(a?X(r,{size:1}):"0x",X(n,{size:32}),typeof s=="bigint"?X(s,{size:32}):"0x")}class vk extends ae{constructor({publicKey:t}){super(`Value \`${Xo(t)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}class bb extends ae{constructor({prefix:t,cause:r}){super(`Prefix "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}class kk extends ae{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}class Ek extends ae{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}let Ck=class extends ae{constructor({publicKey:t}){super(`Value \`${t}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${ft(Nc(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}};const Tk=/^0x[a-fA-F0-9]{40}$/;function Or(e,t={}){const{strict:r=!0}=t;if(!Tk.test(e))throw new yb({address:e,cause:new Ak});if(r){if(e.toLowerCase()===e)return;if(hf(e)!==e)throw new yb({address:e,cause:new Pk})}}function hf(e){if(ff.has(e))return ff.get(e);Or(e,{strict:!1});const t=e.substring(2).toLowerCase(),r=oi(y1(t),{as:"Bytes"}),n=t.split("");for(let a=0;a<40;a+=2)r[a>>1]>>4>=8&&n[a]&&(n[a]=n[a].toUpperCase()),(r[a>>1]&15)>=8&&n[a+1]&&(n[a+1]=n[a+1].toUpperCase());const s=`0x${n.join("")}`;return ff.set(e,s),s}function Sk(e,t={}){const{checksum:r=!1}=t;return Or(e),r?hf(e):e}function Zc(e,t={}){const r=oi(`0x${pf(e).slice(4)}`).substring(26);return Sk(`0x${r}`,t)}function mf(e,t){return Or(e,{strict:!1}),Or(t,{strict:!1}),e.toLowerCase()===t.toLowerCase()}function Xc(e,t={}){const{strict:r=!0}=t??{};try{return Or(e,{strict:r}),!0}catch{return!1}}class yb extends ae{constructor({address:t,cause:r}){super(`Address "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class Ak extends ae{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class Pk extends ae{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const Ik=/^(.*)\[([0-9]*)\]$/,Ok=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,gb=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,xb=2n**256n-1n;function _a(e,t,r){const{checksumAddress:n,staticPosition:s}=r,a=xf(t.type);if(a){const[o,i]=a;return Mk(e,{...t,type:i},{checksumAddress:n,length:o,staticPosition:s})}if(t.type==="tuple")return Fk(e,t,{checksumAddress:n,staticPosition:s});if(t.type==="address")return Bk(e,{checksum:n});if(t.type==="bool")return _k(e);if(t.type.startsWith("bytes"))return Uk(e,t,{staticPosition:s});if(t.type.startsWith("uint")||t.type.startsWith("int"))return Dk(e,t);if(t.type==="string")return Nk(e,{staticPosition:s});throw new Ef(t.type)}const wb=32,bf=32;function Bk(e,t={}){const{checksum:r=!1}=t,n=e.readBytes(32);return[(a=>r?hf(a):a)(Et(k8(n,-20))),32]}function Mk(e,t,r){const{checksumAddress:n,length:s,staticPosition:a}=r;if(!s){const c=bn(e.readBytes(bf)),l=a+c,u=l+wb;e.setPosition(l);const d=bn(e.readBytes(wb)),p=ii(t);let h=0;const y=[];for(let g=0;g<d;++g){e.setPosition(u+(p?g*32:h));const[k,v]=_a(e,t,{checksumAddress:n,staticPosition:u});h+=v,y.push(k)}return e.setPosition(a+32),[y,32]}if(ii(t)){const c=bn(e.readBytes(bf)),l=a+c,u=[];for(let d=0;d<s;++d){e.setPosition(l+d*32);const[p]=_a(e,t,{checksumAddress:n,staticPosition:l});u.push(p)}return e.setPosition(a+32),[u,32]}let o=0;const i=[];for(let c=0;c<s;++c){const[l,u]=_a(e,t,{checksumAddress:n,staticPosition:a+o});o+=u,i.push(l)}return[i,o]}function _k(e){return[C8(e.readBytes(32),{size:32}),32]}function Uk(e,t,{staticPosition:r}){const[n,s]=t.type.split("bytes");if(!s){const o=bn(e.readBytes(32));e.setPosition(r+o);const i=bn(e.readBytes(32));if(i===0)return e.setPosition(r+32),["0x",32];const c=e.readBytes(i);return e.setPosition(r+32),[Et(c),32]}return[Et(e.readBytes(Number.parseInt(s,10),32)),32]}function Dk(e,t){const r=t.type.startsWith("int"),n=Number.parseInt(t.type.split("int")[1]||"256",10),s=e.readBytes(32);return[n>48?E8(s,{signed:r}):bn(s,{signed:r}),32]}function Fk(e,t,r){const{checksumAddress:n,staticPosition:s}=r,a=t.components.length===0||t.components.some(({name:c})=>!c),o=a?[]:{};let i=0;if(ii(t)){const c=bn(e.readBytes(bf)),l=s+c;for(let u=0;u<t.components.length;++u){const d=t.components[u];e.setPosition(l+i);const[p,h]=_a(e,d,{checksumAddress:n,staticPosition:l});i+=h,o[a?u:d==null?void 0:d.name]=p}return e.setPosition(s+32),[o,32]}for(let c=0;c<t.components.length;++c){const l=t.components[c],[u,d]=_a(e,l,{checksumAddress:n,staticPosition:s});o[a?c:l==null?void 0:l.name]=u,i+=d}return[o,i]}function Nk(e,{staticPosition:t}){const r=bn(e.readBytes(32)),n=t+r;e.setPosition(n);const s=bn(e.readBytes(32));if(s===0)return e.setPosition(t+32),["",32];const a=e.readBytes(s,32),o=T8(g1(a));return e.setPosition(t+32),[o,32]}function zk({checksumAddress:e,parameters:t,values:r}){const n=[];for(let s=0;s<t.length;s++)n.push(yf({checksumAddress:e,parameter:t[s],value:r[s]}));return n}function yf({checksumAddress:e=!1,parameter:t,value:r}){const n=t,s=xf(n.type);if(s){const[a,o]=s;return Rk(r,{checksumAddress:e,length:a,parameter:{...n,type:o}})}if(n.type==="tuple")return Vk(r,{checksumAddress:e,parameter:n});if(n.type==="address")return Lk(r,{checksum:e});if(n.type==="bool")return $k(r);if(n.type.startsWith("uint")||n.type.startsWith("int")){const a=n.type.startsWith("int"),[,,o="256"]=gb.exec(n.type)??[];return Gk(r,{signed:a,size:Number(o)})}if(n.type.startsWith("bytes"))return Hk(r,{type:n.type});if(n.type==="string")return jk(r);throw new Ef(n.type)}function gf(e){let t=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?t+=32:t+=ft(i)}const r=[],n=[];let s=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?(r.push(X(t+s,{size:32})),n.push(i),s+=ft(i)):r.push(i)}return lt(...r,...n)}function Lk(e,t){const{checksum:r=!1}=t;return Or(e,{strict:r}),{dynamic:!1,encoded:Ms(e.toLowerCase())}}function Rk(e,t){const{checksumAddress:r,length:n,parameter:s}=t,a=n===null;if(!Array.isArray(e))throw new Jk(e);if(!a&&e.length!==n)throw new Qk({expectedLength:n,givenLength:e.length,type:`${s.type}[${n}]`});let o=!1;const i=[];for(let c=0;c<e.length;c++){const l=yf({checksumAddress:r,parameter:s,value:e[c]});l.dynamic&&(o=!0),i.push(l)}if(a||o){const c=gf(i);if(a){const l=X(i.length,{size:32});return{dynamic:!0,encoded:i.length>0?lt(l,c):l}}if(o)return{dynamic:!0,encoded:c}}return{dynamic:!1,encoded:lt(...i.map(({encoded:c})=>c))}}function Hk(e,{type:t}){const[,r]=t.split("bytes"),n=ft(e);if(!r){let s=e;return n%32!==0&&(s=_s(s,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:lt(Ms(X(n,{size:32})),s)}}if(n!==Number.parseInt(r,10))throw new Eb({expectedSize:Number.parseInt(r,10),value:e});return{dynamic:!1,encoded:_s(e)}}function $k(e){if(typeof e!="boolean")throw new ae(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Ms(w1(e))}}function Gk(e,{signed:t,size:r}){if(typeof r=="number"){const n=2n**(BigInt(r)-(t?1n:0n))-1n,s=t?-n-1n:0n;if(e>n||e<s)throw new E1({max:n.toString(),min:s.toString(),signed:t,size:r/8,value:e.toString()})}return{dynamic:!1,encoded:X(e,{size:32,signed:t})}}function jk(e){const t=Qo(e),r=Math.ceil(ft(t)/32),n=[];for(let s=0;s<r;s++)n.push(_s(Pe(t,s*32,(s+1)*32)));return{dynamic:!0,encoded:lt(_s(X(ft(t),{size:32})),...n)}}function Vk(e,t){const{checksumAddress:r,parameter:n}=t;let s=!1;const a=[];for(let o=0;o<n.components.length;o++){const i=n.components[o],c=Array.isArray(e)?o:i.name,l=yf({checksumAddress:r,parameter:i,value:e[c]});a.push(l),l.dynamic&&(s=!0)}return{dynamic:s,encoded:s?gf(a):lt(...a.map(({encoded:o})=>o))}}function xf(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function ii(e){var n;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(n=e.components)==null?void 0:n.some(ii);const r=xf(e.type);return!!(r&&ii({...e,type:r[1]}))}const Wk={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 Yk({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new qk({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new vb({offset:e});const 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 vb({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const 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,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function wf(e,{recursiveReadLimit:t=8192}={}){const r=Object.create(Wk);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}class vb extends ae{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class qk extends ae{constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class Yk extends ae{constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}function Kk(e,t,r={}){const{as:n="Array",checksumAddress:s=!1}=r,a=typeof t=="string"?Kn(t):t,o=wf(a);if(Pa(a)===0&&e.length>0)throw new Xk;if(Pa(a)&&Pa(a)<32)throw new Zk({data:typeof t=="string"?t:Et(t),parameters:e,size:Pa(a)});let i=0;const c=n==="Array"?[]:{};for(let l=0;l<e.length;++l){const u=e[l];o.setPosition(i);const[d,p]=_a(o,u,{checksumAddress:s,staticPosition:0});i+=p,n==="Array"?c.push(d):c[u.name??l]=d}return c}function vf(e,t,r){const{checksumAddress:n=!1}={};if(e.length!==t.length)throw new Cb({expectedLength:e.length,givenLength:t.length});const s=zk({checksumAddress:n,parameters:e,values:t}),a=gf(s);return a.length===0?"0x":a}function kf(e,t){if(e.length!==t.length)throw new Cb({expectedLength:e.length,givenLength:t.length});const r=[];for(let n=0;n<e.length;n++){const s=e[n],a=t[n];r.push(kf.encode(s,a))}return lt(...r)}(function(e){function t(r,n,s=!1){if(r==="address"){const c=n;return Or(c),Ms(c.toLowerCase(),s?32:0)}if(r==="string")return Qo(n);if(r==="bytes")return n;if(r==="bool")return Ms(w1(n),s?32:1);const a=r.match(gb);if(a){const[c,l,u="256"]=a,d=Number.parseInt(u,10)/8;return X(n,{size:s?32:d,signed:l==="int"})}const o=r.match(Ok);if(o){const[c,l]=o;if(Number.parseInt(l,10)!==(n.length-2)/2)throw new Eb({expectedSize:Number.parseInt(l,10),value:n});return _s(n,s?32:0)}const i=r.match(Ik);if(i&&Array.isArray(n)){const[c,l]=i,u=[];for(let d=0;d<n.length;d++)u.push(t(l,n[d],!0));return u.length===0?"0x":lt(...u)}throw new Ef(r)}e.encode=t})(kf||(kf={}));function kb(e){return Array.isArray(e)&&typeof e[0]=="string"||typeof e=="string"?Fh(e):e}class Zk extends ae{constructor({data:t,parameters:r,size:n}){super(`Data size of ${n} bytes is too small for given parameters.`,{metaMessages:[`Params: (${la(r)})`,`Data: ${t} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class Xk extends ae{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class Qk extends ae{constructor({expectedLength:t,givenLength:r,type:n}){super(`Array length mismatch for type \`${n}\`. Expected: \`${t}\`. Given: \`${r}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class Eb extends ae{constructor({expectedSize:t,value:r}){super(`Size of bytes "${r}" (bytes${ft(r)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class Cb extends ae{constructor({expectedLength:t,givenLength:r}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${r}`].join(`
|
|
43
|
+
`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class Jk extends ae{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class Ef extends ae{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function eE(e){return tE(e,"Hex")}function tE(e,t){const r=t,n=(()=>{if(typeof e=="string"){if(e.length>3&&e.length%2!==0)throw new _8(e);return Kn(e)}return e})(),s=wf(n,{recursiveReadLimit:Number.POSITIVE_INFINITY});return Tb(s,r)}function Tb(e,t="Hex"){if(e.bytes.length===0)return t==="Hex"?Et(e.bytes):e.bytes;const r=e.readByte();if(r<128&&e.decrementPosition(1),r<192){const s=Sb(e,r,128),a=e.readBytes(s);return t==="Hex"?Et(a):a}const n=Sb(e,r,192);return rE(e,n,t)}function Sb(e,t,r){if(r===128&&t<128)return 1;if(t<=r+55)return t-r;if(t===r+55+1)return e.readUint8();if(t===r+55+2)return e.readUint16();if(t===r+55+3)return e.readUint24();if(t===r+55+4)return e.readUint32();throw new ae("Invalid RLP prefix")}function rE(e,t,r){const n=e.position,s=[];for(;e.position-n<t;)s.push(Tb(e,r));return s}function nE(e,t){const{as:r}=t,n=Ab(e),s=wf(new Uint8Array(n.length));return n.encode(s),r==="Hex"?Et(s.bytes):s.bytes}function sE(e,t={}){const{as:r="Hex"}=t;return nE(e,{as:r})}function Ab(e){return Array.isArray(e)?aE(e.map(t=>Ab(t))):oE(e)}function aE(e){const t=e.reduce((s,a)=>s+a.length,0),r=Pb(t);return{length:t<=55?1+t:1+r+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+r),r===1?s.pushUint8(t):r===2?s.pushUint16(t):r===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:a}of e)a(s)}}}function oE(e){const t=typeof e=="string"?Kn(e):e,r=Pb(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+r),r===1?s.pushUint8(t.length):r===2?s.pushUint16(t.length):r===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function Pb(e){if(e<=255)return 1;if(e<=65535)return 2;if(e<=16777215)return 3;if(e<=4294967295)return 4;throw new ae("Length is too large.")}class Ib extends Wu{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,b5(t);const n=xc(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,a=new Uint8Array(s);a.set(n.length>s?t.create().update(n).digest():n);for(let o=0;o<a.length;o++)a[o]^=54;this.iHash.update(a),this.oHash=t.create();for(let o=0;o<a.length;o++)a[o]^=106;this.oHash.update(a),Rn(a)}update(t){return ba(this),this.iHash.update(t),this}digestInto(t){ba(this),ws(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:r,iHash:n,finished:s,destroyed:a,blockLen:o,outputLen:i}=this;return t=t,t.finished=s,t.destroyed=a,t.blockLen=o,t.outputLen=i,t.oHash=r._cloneInto(t.oHash),t.iHash=n._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Ob=(e,t,r)=>new Ib(e,t).update(r).digest();Ob.create=(e,t)=>new Ib(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Vt=BigInt(0),Nt=BigInt(1),Ds=BigInt(2),iE=BigInt(3),Bb=BigInt(4),Mb=BigInt(5),_b=BigInt(8);function Wt(e,t){const r=e%t;return r>=Vt?r:t+r}function fr(e,t,r){let n=e;for(;t-- >Vt;)n*=n,n%=r;return n}function Cf(e,t){if(e===Vt)throw new Error("invert: expected non-zero number");if(t<=Vt)throw new Error("invert: expected positive modulus, got "+t);let r=Wt(e,t),n=t,s=Vt,a=Nt;for(;r!==Vt;){const i=n/r,c=n%r,l=s-a*i;n=r,r=c,s=a,a=l}if(n!==Nt)throw new Error("invert: does not exist");return Wt(s,t)}function Ub(e,t){const r=(e.ORDER+Nt)/Bb,n=e.pow(t,r);if(!e.eql(e.sqr(n),t))throw new Error("Cannot find square root");return n}function cE(e,t){const r=(e.ORDER-Mb)/_b,n=e.mul(t,Ds),s=e.pow(n,r),a=e.mul(t,s),o=e.mul(e.mul(a,Ds),s),i=e.mul(a,e.sub(o,e.ONE));if(!e.eql(e.sqr(i),t))throw new Error("Cannot find square root");return i}function lE(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-Nt,r=0;for(;t%Ds===Vt;)t/=Ds,r++;let n=Ds;const s=Ua(e);for(;Fb(s,n)===1;)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return Ub;let a=s.pow(n,t);const o=(t+Nt)/Ds;return function(c,l){if(c.is0(l))return l;if(Fb(c,l)!==1)throw new Error("Cannot find square root");let u=r,d=c.mul(c.ONE,a),p=c.pow(l,t),h=c.pow(l,o);for(;!c.eql(p,c.ONE);){if(c.is0(p))return c.ZERO;let y=1,g=c.sqr(p);for(;!c.eql(g,c.ONE);)if(y++,g=c.sqr(g),y===u)throw new Error("Cannot find square root");const k=Nt<<BigInt(u-y-1),v=c.pow(d,k);u=y,d=c.sqr(v),p=c.mul(p,d),h=c.mul(h,v)}return h}}function uE(e){return e%Bb===iE?Ub:e%_b===Mb?cE:lE(e)}const dE=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function fE(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=dE.reduce((n,s)=>(n[s]="function",n),t);return Uc(e,r)}function pE(e,t,r){if(r<Vt)throw new Error("invalid exponent, negatives unsupported");if(r===Vt)return e.ONE;if(r===Nt)return t;let n=e.ONE,s=t;for(;r>Vt;)r&Nt&&(n=e.mul(n,s)),s=e.sqr(s),r>>=Nt;return n}function Db(e,t,r=!1){const n=new Array(t.length).fill(r?e.ZERO:void 0),s=t.reduce((o,i,c)=>e.is0(i)?o:(n[c]=o,e.mul(o,i)),e.ONE),a=e.inv(s);return t.reduceRight((o,i,c)=>e.is0(i)?o:(n[c]=e.mul(o,n[c]),e.mul(o,i)),a),n}function Fb(e,t){const r=(e.ORDER-Nt)/Ds,n=e.pow(t,r),s=e.eql(n,e.ONE),a=e.eql(n,e.ZERO),o=e.eql(n,e.neg(e.ONE));if(!s&&!a&&!o)throw new Error("invalid Legendre symbol result");return s?1:a?0:-1}function Nb(e,t){t!==void 0&&go(t);const r=t!==void 0?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Ua(e,t,r=!1,n={}){if(e<=Vt)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:s,nByteLength:a}=Nb(e,t);if(a>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let o;const i=Object.freeze({ORDER:e,isLE:r,BITS:s,BYTES:a,MASK:_c(s),ZERO:Vt,ONE:Nt,create:c=>Wt(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return Vt<=c&&c<e},is0:c=>c===Vt,isOdd:c=>(c&Nt)===Nt,neg:c=>Wt(-c,e),eql:(c,l)=>c===l,sqr:c=>Wt(c*c,e),add:(c,l)=>Wt(c+l,e),sub:(c,l)=>Wt(c-l,e),mul:(c,l)=>Wt(c*l,e),pow:(c,l)=>pE(i,c,l),div:(c,l)=>Wt(c*Cf(l,e),e),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>Cf(c,e),sqrt:n.sqrt||(c=>(o||(o=uE(e)),o(i,c))),toBytes:c=>r?u1(c,a):Zo(c,a),fromBytes:c=>{if(c.length!==a)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+c.length);return r?l1(c):Bs(c)},invertBatch:c=>Db(i,c),cmov:(c,l,u)=>u?l:c});return Object.freeze(i)}function zb(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function Lb(e){const t=zb(e);return t+Math.ceil(t/2)}function hE(e,t,r=!1){const n=e.length,s=zb(t),a=Lb(t);if(n<16||n<a||n>1024)throw new Error("expected "+a+"-1024 bytes of input, got "+n);const o=r?l1(e):Bs(e),i=Wt(o,t-Nt)+Nt;return r?u1(i,s):Zo(i,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Rb=BigInt(0),Tf=BigInt(1);function Sf(e,t){const r=t.negate();return e?r:t}function Hb(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Af(e,t){Hb(e,t);const r=Math.ceil(t/e)+1,n=2**(e-1),s=2**e,a=_c(e),o=BigInt(e);return{windows:r,windowSize:n,mask:a,maxNumber:s,shiftBy:o}}function $b(e,t,r){const{windowSize:n,mask:s,maxNumber:a,shiftBy:o}=r;let i=Number(e&s),c=e>>o;i>n&&(i-=a,c+=Tf);const l=t*n,u=l+Math.abs(i)-1,d=i===0,p=i<0,h=t%2!==0;return{nextN:c,offset:u,isZero:d,isNeg:p,isNegF:h,offsetF:l}}function mE(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,n)=>{if(!(r instanceof t))throw new Error("invalid point at index "+n)})}function bE(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,n)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+n)})}const Pf=new WeakMap,Gb=new WeakMap;function If(e){return Gb.get(e)||1}function yE(e,t){return{constTimeNegate:Sf,hasPrecomputes(r){return If(r)!==1},unsafeLadder(r,n,s=e.ZERO){let a=r;for(;n>Rb;)n&Tf&&(s=s.add(a)),a=a.double(),n>>=Tf;return s},precomputeWindow(r,n){const{windows:s,windowSize:a}=Af(n,t),o=[];let i=r,c=i;for(let l=0;l<s;l++){c=i,o.push(c);for(let u=1;u<a;u++)c=c.add(i),o.push(c);i=c.double()}return o},wNAF(r,n,s){let a=e.ZERO,o=e.BASE;const i=Af(r,t);for(let c=0;c<i.windows;c++){const{nextN:l,offset:u,isZero:d,isNeg:p,isNegF:h,offsetF:y}=$b(s,c,i);s=l,d?o=o.add(Sf(h,n[y])):a=a.add(Sf(p,n[u]))}return{p:a,f:o}},wNAFUnsafe(r,n,s,a=e.ZERO){const o=Af(r,t);for(let i=0;i<o.windows&&s!==Rb;i++){const{nextN:c,offset:l,isZero:u,isNeg:d}=$b(s,i,o);if(s=c,!u){const p=n[l];a=a.add(d?p.negate():p)}}return a},getPrecomputes(r,n,s){let a=Pf.get(n);return a||(a=this.precomputeWindow(n,r),r!==1&&Pf.set(n,s(a))),a},wNAFCached(r,n,s){const a=If(r);return this.wNAF(a,this.getPrecomputes(a,r,s),n)},wNAFCachedUnsafe(r,n,s,a){const o=If(r);return o===1?this.unsafeLadder(r,n,a):this.wNAFUnsafe(o,this.getPrecomputes(o,r,s),n,a)},setWindowSize(r,n){Hb(n,t),Gb.set(r,n),Pf.delete(r)}}}function gE(e,t,r,n){mE(r,e),bE(n,t);const s=r.length,a=n.length;if(s!==a)throw new Error("arrays of points and scalars must have equal length");const o=e.ZERO,i=a8(BigInt(s));let c=1;i>12?c=i-3:i>4?c=i-2:i>0&&(c=2);const l=_c(c),u=new Array(Number(l)+1).fill(o),d=Math.floor((t.BITS-1)/c)*c;let p=o;for(let h=d;h>=0;h-=c){u.fill(o);for(let g=0;g<a;g++){const k=n[g],v=Number(k>>BigInt(h)&l);u[v]=u[v].add(r[g])}let y=o;for(let g=u.length-1,k=o;g>0;g--)k=k.add(u[g]),y=y.add(k);if(p=p.add(y),h!==0)for(let g=0;g<c;g++)p=p.double()}return p}function jb(e){return fE(e.Fp),Uc(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Nb(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Vb(e){e.lowS!==void 0&&Yo("lowS",e.lowS),e.prehash!==void 0&&Yo("prehash",e.prehash)}function xE(e){const t=jb(e);Uc(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:r,Fp:n,a:s}=t;if(r){if(!n.eql(s,n.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}class wE extends Error{constructor(t=""){super(t)}}const xn={Err:wE,_tlv:{encode:(e,t)=>{const{Err:r}=xn;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length&1)throw new r("tlv.encode: unpadded data");const n=t.length/2,s=Oc(n);if(s.length/2&128)throw new r("tlv.encode: long form length too big");const a=n>127?Oc(s.length/2|128):"";return Oc(e)+a+s+t},decode(e,t){const{Err:r}=xn;let n=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[n++]!==e)throw new r("tlv.decode: wrong tlv");const s=t[n++],a=!!(s&128);let o=0;if(!a)o=s;else{const c=s&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");const l=t.subarray(n,n+c);if(l.length!==c)throw new r("tlv.decode: length bytes not complete");if(l[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(const u of l)o=o<<8|u;if(n+=c,o<128)throw new r("tlv.decode(long): not minimal encoding")}const i=t.subarray(n,n+o);if(i.length!==o)throw new r("tlv.decode: wrong value length");return{v:i,l:t.subarray(n+o)}}},_int:{encode(e){const{Err:t}=xn;if(e<wn)throw new t("integer: negative integers are not allowed");let r=Oc(e);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){const{Err:t}=xn;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return Bs(e)}},toSig(e){const{Err:t,_int:r,_tlv:n}=xn,s=dr("signature",e),{v:a,l:o}=n.decode(48,s);if(o.length)throw new t("invalid signature: left bytes after parsing");const{v:i,l:c}=n.decode(2,a),{v:l,l:u}=n.decode(2,c);if(u.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(i),s:r.decode(l)}},hexFromSig(e){const{_tlv:t,_int:r}=xn,n=t.encode(2,r.encode(e.r)),s=t.encode(2,r.encode(e.s)),a=n+s;return t.encode(48,a)}};function Of(e,t){return Ko(Zo(e,t))}const wn=BigInt(0),Ct=BigInt(1);BigInt(2);const Bf=BigInt(3),vE=BigInt(4);function kE(e){const t=xE(e),{Fp:r}=t,n=Ua(t.n,t.nBitLength),s=t.toBytes||((S,C,U)=>{const z=C.toAffine();return Mc(Uint8Array.from([4]),r.toBytes(z.x),r.toBytes(z.y))}),a=t.fromBytes||(S=>{const C=S.subarray(1),U=r.fromBytes(C.subarray(0,r.BYTES)),z=r.fromBytes(C.subarray(r.BYTES,2*r.BYTES));return{x:U,y:z}});function o(S){const{a:C,b:U}=t,z=r.sqr(S),T=r.mul(z,S);return r.add(r.add(T,r.mul(S,C)),U)}function i(S,C){const U=r.sqr(C),z=o(S);return r.eql(U,z)}if(!i(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const c=r.mul(r.pow(t.a,Bf),vE),l=r.mul(r.sqr(t.b),BigInt(27));if(r.is0(r.add(c,l)))throw new Error("bad curve params: a or b");function u(S){return Ld(S,Ct,t.n)}function d(S){const{allowedPrivateKeyLengths:C,nByteLength:U,wrapPrivateKey:z,n:T}=t;if(C&&typeof S!="bigint"){if(qo(S)&&(S=Ko(S)),typeof S!="string"||!C.includes(S.length))throw new Error("invalid private key");S=S.padStart(U*2,"0")}let m;try{m=typeof S=="bigint"?S:Bs(dr("private key",S,U))}catch{throw new Error("invalid private key, expected hex or "+U+" bytes, got "+typeof S)}return z&&(m=Wt(m,T)),Sa("private key",m,Ct,T),m}function p(S){if(!(S instanceof g))throw new Error("ProjectivePoint expected")}const h=f1((S,C)=>{const{px:U,py:z,pz:T}=S;if(r.eql(T,r.ONE))return{x:U,y:z};const m=S.is0();C==null&&(C=m?r.ONE:r.inv(T));const b=r.mul(U,C),x=r.mul(z,C),A=r.mul(T,C);if(m)return{x:r.ZERO,y:r.ZERO};if(!r.eql(A,r.ONE))throw new Error("invZ was invalid");return{x:b,y:x}}),y=f1(S=>{if(S.is0()){if(t.allowInfinityPoint&&!r.is0(S.py))return;throw new Error("bad point: ZERO")}const{x:C,y:U}=S.toAffine();if(!r.isValid(C)||!r.isValid(U))throw new Error("bad point: x or y not FE");if(!i(C,U))throw new Error("bad point: equation left != right");if(!S.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class g{constructor(C,U,z){if(C==null||!r.isValid(C))throw new Error("x required");if(U==null||!r.isValid(U)||r.is0(U))throw new Error("y required");if(z==null||!r.isValid(z))throw new Error("z required");this.px=C,this.py=U,this.pz=z,Object.freeze(this)}static fromAffine(C){const{x:U,y:z}=C||{};if(!C||!r.isValid(U)||!r.isValid(z))throw new Error("invalid affine point");if(C instanceof g)throw new Error("projective point not allowed");const T=m=>r.eql(m,r.ZERO);return T(U)&&T(z)?g.ZERO:new g(U,z,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(C){const U=Db(r,C.map(z=>z.pz));return C.map((z,T)=>z.toAffine(U[T])).map(g.fromAffine)}static fromHex(C){const U=g.fromAffine(a(dr("pointHex",C)));return U.assertValidity(),U}static fromPrivateKey(C){return g.BASE.multiply(d(C))}static msm(C,U){return gE(g,n,C,U)}_setWindowSize(C){w.setWindowSize(this,C)}assertValidity(){y(this)}hasEvenY(){const{y:C}=this.toAffine();if(r.isOdd)return!r.isOdd(C);throw new Error("Field doesn't support isOdd")}equals(C){p(C);const{px:U,py:z,pz:T}=this,{px:m,py:b,pz:x}=C,A=r.eql(r.mul(U,x),r.mul(m,T)),I=r.eql(r.mul(z,x),r.mul(b,T));return A&&I}negate(){return new g(this.px,r.neg(this.py),this.pz)}double(){const{a:C,b:U}=t,z=r.mul(U,Bf),{px:T,py:m,pz:b}=this;let x=r.ZERO,A=r.ZERO,I=r.ZERO,O=r.mul(T,T),D=r.mul(m,m),E=r.mul(b,b),P=r.mul(T,m);return P=r.add(P,P),I=r.mul(T,b),I=r.add(I,I),x=r.mul(C,I),A=r.mul(z,E),A=r.add(x,A),x=r.sub(D,A),A=r.add(D,A),A=r.mul(x,A),x=r.mul(P,x),I=r.mul(z,I),E=r.mul(C,E),P=r.sub(O,E),P=r.mul(C,P),P=r.add(P,I),I=r.add(O,O),O=r.add(I,O),O=r.add(O,E),O=r.mul(O,P),A=r.add(A,O),E=r.mul(m,b),E=r.add(E,E),O=r.mul(E,P),x=r.sub(x,O),I=r.mul(E,D),I=r.add(I,I),I=r.add(I,I),new g(x,A,I)}add(C){p(C);const{px:U,py:z,pz:T}=this,{px:m,py:b,pz:x}=C;let A=r.ZERO,I=r.ZERO,O=r.ZERO;const D=t.a,E=r.mul(t.b,Bf);let P=r.mul(U,m),_=r.mul(z,b),M=r.mul(T,x),L=r.add(U,z),H=r.add(m,b);L=r.mul(L,H),H=r.add(P,_),L=r.sub(L,H),H=r.add(U,T);let G=r.add(m,x);return H=r.mul(H,G),G=r.add(P,M),H=r.sub(H,G),G=r.add(z,T),A=r.add(b,x),G=r.mul(G,A),A=r.add(_,M),G=r.sub(G,A),O=r.mul(D,H),A=r.mul(E,M),O=r.add(A,O),A=r.sub(_,O),O=r.add(_,O),I=r.mul(A,O),_=r.add(P,P),_=r.add(_,P),M=r.mul(D,M),H=r.mul(E,H),_=r.add(_,M),M=r.sub(P,M),M=r.mul(D,M),H=r.add(H,M),P=r.mul(_,H),I=r.add(I,P),P=r.mul(G,H),A=r.mul(L,A),A=r.sub(A,P),P=r.mul(L,_),O=r.mul(G,O),O=r.add(O,P),new g(A,I,O)}subtract(C){return this.add(C.negate())}is0(){return this.equals(g.ZERO)}wNAF(C){return w.wNAFCached(this,C,g.normalizeZ)}multiplyUnsafe(C){const{endo:U,n:z}=t;Sa("scalar",C,wn,z);const T=g.ZERO;if(C===wn)return T;if(this.is0()||C===Ct)return this;if(!U||w.hasPrecomputes(this))return w.wNAFCachedUnsafe(this,C,g.normalizeZ);let{k1neg:m,k1:b,k2neg:x,k2:A}=U.splitScalar(C),I=T,O=T,D=this;for(;b>wn||A>wn;)b&Ct&&(I=I.add(D)),A&Ct&&(O=O.add(D)),D=D.double(),b>>=Ct,A>>=Ct;return m&&(I=I.negate()),x&&(O=O.negate()),O=new g(r.mul(O.px,U.beta),O.py,O.pz),I.add(O)}multiply(C){const{endo:U,n:z}=t;Sa("scalar",C,Ct,z);let T,m;if(U){const{k1neg:b,k1:x,k2neg:A,k2:I}=U.splitScalar(C);let{p:O,f:D}=this.wNAF(x),{p:E,f:P}=this.wNAF(I);O=w.constTimeNegate(b,O),E=w.constTimeNegate(A,E),E=new g(r.mul(E.px,U.beta),E.py,E.pz),T=O.add(E),m=D.add(P)}else{const{p:b,f:x}=this.wNAF(C);T=b,m=x}return g.normalizeZ([T,m])[0]}multiplyAndAddUnsafe(C,U,z){const T=g.BASE,m=(x,A)=>A===wn||A===Ct||!x.equals(T)?x.multiplyUnsafe(A):x.multiply(A),b=m(this,U).add(m(C,z));return b.is0()?void 0:b}toAffine(C){return h(this,C)}isTorsionFree(){const{h:C,isTorsionFree:U}=t;if(C===Ct)return!0;if(U)return U(g,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:C,clearCofactor:U}=t;return C===Ct?this:U?U(g,this):this.multiplyUnsafe(t.h)}toRawBytes(C=!0){return Yo("isCompressed",C),this.assertValidity(),s(g,this,C)}toHex(C=!0){return Yo("isCompressed",C),Ko(this.toRawBytes(C))}}g.BASE=new g(t.Gx,t.Gy,r.ONE),g.ZERO=new g(r.ZERO,r.ONE,r.ZERO);const{endo:k,nBitLength:v}=t,w=yE(g,k?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:g,normPrivateKeyToScalar:d,weierstrassEquation:o,isWithinCurveOrder:u}}function EE(e){const t=jb(e);return Uc(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function CE(e){const t=EE(e),{Fp:r,n,nByteLength:s,nBitLength:a}=t,o=r.BYTES+1,i=2*r.BYTES+1;function c(E){return Wt(E,n)}function l(E){return Cf(E,n)}const{ProjectivePoint:u,normPrivateKeyToScalar:d,weierstrassEquation:p,isWithinCurveOrder:h}=kE({...t,toBytes(E,P,_){const M=P.toAffine(),L=r.toBytes(M.x),H=Mc;return Yo("isCompressed",_),_?H(Uint8Array.from([P.hasEvenY()?2:3]),L):H(Uint8Array.from([4]),L,r.toBytes(M.y))},fromBytes(E){const P=E.length,_=E[0],M=E.subarray(1);if(P===o&&(_===2||_===3)){const L=Bs(M);if(!Ld(L,Ct,r.ORDER))throw new Error("Point is not on curve");const H=p(L);let G;try{G=r.sqrt(H)}catch(be){const ie=be instanceof Error?": "+be.message:"";throw new Error("Point is not on curve"+ie)}const J=(G&Ct)===Ct;return(_&1)===1!==J&&(G=r.neg(G)),{x:L,y:G}}else if(P===i&&_===4){const L=r.fromBytes(M.subarray(0,r.BYTES)),H=r.fromBytes(M.subarray(r.BYTES,2*r.BYTES));return{x:L,y:H}}else{const L=o,H=i;throw new Error("invalid Point, expected length of "+L+", or uncompressed "+H+", got "+P)}}});function y(E){const P=n>>Ct;return E>P}function g(E){return y(E)?c(-E):E}const k=(E,P,_)=>Bs(E.slice(P,_));class v{constructor(P,_,M){Sa("r",P,Ct,n),Sa("s",_,Ct,n),this.r=P,this.s=_,M!=null&&(this.recovery=M),Object.freeze(this)}static fromCompact(P){const _=s;return P=dr("compactSignature",P,_*2),new v(k(P,0,_),k(P,_,2*_))}static fromDER(P){const{r:_,s:M}=xn.toSig(dr("DER",P));return new v(_,M)}assertValidity(){}addRecoveryBit(P){return new v(this.r,this.s,P)}recoverPublicKey(P){const{r:_,s:M,recovery:L}=this,H=T(dr("msgHash",P));if(L==null||![0,1,2,3].includes(L))throw new Error("recovery id invalid");const G=L===2||L===3?_+t.n:_;if(G>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const J=(L&1)===0?"02":"03",pe=u.fromHex(J+Of(G,r.BYTES)),be=l(G),ie=c(-H*be),fe=c(M*be),Oe=u.BASE.multiplyAndAddUnsafe(pe,ie,fe);if(!Oe)throw new Error("point at infinify");return Oe.assertValidity(),Oe}hasHighS(){return y(this.s)}normalizeS(){return this.hasHighS()?new v(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Bc(this.toDERHex())}toDERHex(){return xn.hexFromSig(this)}toCompactRawBytes(){return Bc(this.toCompactHex())}toCompactHex(){const P=s;return Of(this.r,P)+Of(this.s,P)}}const w={isValidPrivateKey(E){try{return d(E),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const E=Lb(t.n);return hE(t.randomBytes(E),t.n)},precompute(E=8,P=u.BASE){return P._setWindowSize(E),P.multiply(BigInt(3)),P}};function S(E,P=!0){return u.fromPrivateKey(E).toRawBytes(P)}function C(E){if(typeof E=="bigint")return!1;if(E instanceof u)return!0;const _=dr("key",E).length,M=r.BYTES,L=M+1,H=2*M+1;if(!(t.allowedPrivateKeyLengths||s===L))return _===L||_===H}function U(E,P,_=!0){if(C(E)===!0)throw new Error("first arg must be private key");if(C(P)===!1)throw new Error("second arg must be public key");return u.fromHex(P).multiply(d(E)).toRawBytes(_)}const z=t.bits2int||function(E){if(E.length>8192)throw new Error("input is too large");const P=Bs(E),_=E.length*8-a;return _>0?P>>BigInt(_):P},T=t.bits2int_modN||function(E){return c(z(E))},m=_c(a);function b(E){return Sa("num < 2^"+a,E,wn,m),Zo(E,s)}function x(E,P,_=A){if(["recovered","canonical"].some(ve=>ve in _))throw new Error("sign() legacy options not supported");const{hash:M,randomBytes:L}=t;let{lowS:H,prehash:G,extraEntropy:J}=_;H==null&&(H=!0),E=dr("msgHash",E),Vb(_),G&&(E=dr("prehashed msgHash",M(E)));const pe=T(E),be=d(P),ie=[b(be),b(pe)];if(J!=null&&J!==!1){const ve=J===!0?L(r.BYTES):J;ie.push(dr("extraEntropy",ve))}const fe=Mc(...ie),Oe=pe;function Q(ve){const Ue=z(ve);if(!h(Ue))return;const $e=l(Ue),ot=u.BASE.multiply(Ue).toAffine(),Se=c(ot.x);if(Se===wn)return;const ke=c($e*c(Oe+Se*be));if(ke===wn)return;let ye=(ot.x===Se?0:2)|Number(ot.y&Ct),Ze=ke;return H&&y(ke)&&(Ze=g(ke),ye^=1),new v(Se,Ze,ye)}return{seed:fe,k2sig:Q}}const A={lowS:t.lowS,prehash:!1},I={lowS:t.lowS,prehash:!1};function O(E,P,_=A){const{seed:M,k2sig:L}=x(E,P,_),H=t;return o8(H.hash.outputLen,H.nByteLength,H.hmac)(M,L)}u.BASE._setWindowSize(8);function D(E,P,_,M=I){var ye;const L=E;P=dr("msgHash",P),_=dr("publicKey",_);const{lowS:H,prehash:G,format:J}=M;if(Vb(M),"strict"in M)throw new Error("options.strict was renamed to lowS");if(J!==void 0&&J!=="compact"&&J!=="der")throw new Error("format must be compact or der");const pe=typeof L=="string"||qo(L),be=!pe&&!J&&typeof L=="object"&&L!==null&&typeof L.r=="bigint"&&typeof L.s=="bigint";if(!pe&&!be)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let ie,fe;try{if(be&&(ie=new v(L.r,L.s)),pe){try{J!=="compact"&&(ie=v.fromDER(L))}catch(Ze){if(!(Ze instanceof xn.Err))throw Ze}!ie&&J!=="der"&&(ie=v.fromCompact(L))}fe=u.fromHex(_)}catch{return!1}if(!ie||H&&ie.hasHighS())return!1;G&&(P=t.hash(P));const{r:Oe,s:Q}=ie,ve=T(P),Ue=l(Q),$e=c(ve*Ue),ot=c(Oe*Ue),Se=(ye=u.BASE.multiplyAndAddUnsafe(fe,$e,ot))==null?void 0:ye.toAffine();return Se?c(Se.x)===Oe:!1}return{CURVE:t,getPublicKey:S,getSharedSecret:U,sign:O,verify:D,ProjectivePoint:u,Signature:v,utils:w}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function TE(e){return{hash:e,hmac:(t,...r)=>Ob(e,t,k5(...r)),randomBytes:E5}}function Qc(e,t){const r=n=>CE({...e,...TE(n)});return{...r(t),create:r}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Wb=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),qb=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),SE=BigInt(0),AE=BigInt(1),Mf=BigInt(2),Yb=(e,t)=>(e+t/Mf)/t;function PE(e){const t=Wb,r=BigInt(3),n=BigInt(6),s=BigInt(11),a=BigInt(22),o=BigInt(23),i=BigInt(44),c=BigInt(88),l=e*e*e%t,u=l*l*e%t,d=fr(u,r,t)*u%t,p=fr(d,r,t)*u%t,h=fr(p,Mf,t)*l%t,y=fr(h,s,t)*h%t,g=fr(y,a,t)*y%t,k=fr(g,i,t)*g%t,v=fr(k,c,t)*k%t,w=fr(v,i,t)*g%t,S=fr(w,r,t)*u%t,C=fr(S,o,t)*y%t,U=fr(C,n,t)*l%t,z=fr(U,Mf,t);if(!_f.eql(_f.sqr(z),e))throw new Error("Cannot find square root");return z}const _f=Ua(Wb,void 0,void 0,{sqrt:PE}),ci=Qc({a:SE,b:BigInt(7),Fp:_f,n:qb,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=qb,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-AE*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,o=BigInt("0x100000000000000000000000000000000"),i=Yb(a*e,t),c=Yb(-n*e,t);let l=Wt(e-i*r-c*s,t),u=Wt(-i*n-c*a,t);const d=l>o,p=u>o;if(d&&(l=t-l),p&&(u=t-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:l,k2neg:p,k2:u}}}},Td),IE=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:ci},Symbol.toStringTag,{value:"Module"}));function Jc(e,t={}){const{recovered:r}=t;if(typeof e.r>"u")throw new zf({signature:e});if(typeof e.s>"u")throw new zf({signature:e});if(r&&typeof e.yParity>"u")throw new zf({signature:e});if(e.r<0n||e.r>xb)throw new FE({value:e.r});if(e.s<0n||e.s>xb)throw new NE({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new tl({value:e.yParity})}function OE(e){return Uf(Et(e))}function Uf(e){if(e.length!==130&&e.length!==132)throw new DE({signature:e});const t=BigInt(Pe(e,0,32)),r=BigInt(Pe(e,32,64)),n=(()=>{const s=+`0x${e.slice(130)}`;if(!Number.isNaN(s))try{return Ff(s)}catch{throw new tl({value:s})}})();return typeof n>"u"?{r:t,s:r}:{r:t,s:r,yParity:n}}function Kb(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return el(e)}function el(e){const t=typeof e=="string"?Uf(e):e instanceof Uint8Array?OE(e):typeof e.r=="string"?Df(e):e.v?BE(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return Jc(t),t}function BE(e){return{r:e.r,s:e.s,yParity:Ff(e.v)}}function Df(e){const t=(()=>{const r=e.v?Number(e.v):void 0;let n=e.yParity?Number(e.yParity):void 0;if(typeof r=="number"&&typeof n!="number"&&(n=Ff(r)),typeof n!="number")throw new tl({value:e.yParity});return n})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function ME(e){const[t,r,n]=e;return el({r:r==="0x"?0n:BigInt(r),s:n==="0x"?0n:BigInt(n),yParity:t==="0x"?0:Number(t)})}function _E(e){Jc(e);const t=e.r,r=e.s;return lt(X(t,{size:32}),X(r,{size:32}),typeof e.yParity=="number"?X(Nf(e.yParity),{size:1}):"0x")}function Zb(e){const{r:t,s:r,yParity:n}=e;return{r:X(t,{size:32}),s:X(r,{size:32}),yParity:n===0?"0x0":"0x1"}}function UE(e){const{r:t,s:r,yParity:n}=e;return[n?"0x01":"0x",t===0n?"0x":$d(X(t)),r===0n?"0x":$d(X(r))]}function Ff(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new zE({value:e})}function Nf(e){if(e===0)return 27;if(e===1)return 28;throw new tl({value:e})}class DE extends ae{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${ft(Nc(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class zf extends ae{constructor({signature:t}){super(`Signature \`${Xo(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class FE extends ae{constructor({value:t}){super(`Value \`${t}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class NE extends ae{constructor({value:t}){super(`Value \`${t}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class tl extends ae{constructor({value:t}){super(`Value \`${t}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class zE extends ae{constructor({value:t}){super(`Value \`${t}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function LE(e,t={}){return typeof e.chainId=="string"?Xb(e):{...e,...t.signature}}function Xb(e){const{address:t,chainId:r,nonce:n}=e,s=Kb(e);return{address:t,chainId:Number(r),nonce:BigInt(n),...s}}function RE(e){return e.map(Xb)}function HE(e){const{address:t,chainId:r,nonce:n,...s}=e;return{address:t,chainId:X(r),nonce:X(n),...Zb(s)}}function $E(e){return e.map(HE)}function Qb(e){return Zc(GE(e))}function GE(e){const{payload:t,signature:r}=e,{r:n,s,yParity:a}=r,i=new ci.Signature(BigInt(n),BigInt(s)).addRecoveryBit(a).recoverPublicKey(Nc(t).substring(2));return gk(i)}function jE(e){const{address:t,hash:r,payload:n,publicKey:s,signature:a}=e;return t?mf(t,Qb({payload:n,signature:a})):ci.verify(a,Hd(n),wk(s),...r?[{prehash:!0,lowS:!0}]:[])}const VE="0x8010801080108010801080108010801080108010801080108010801080108010",WE=kb("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function Jb(e){if(typeof e=="string"){if(Pe(e,-32)!==VE)throw new KE(e)}else Jc(e.authorization)}function qE(e){Jb(e);const t=Jo(Pe(e,-64,-32)),r=Pe(e,-t-64,-64),n=Pe(e,0,-t-64),[s,a,o]=Kk(WE,r);return{authorization:LE({address:s.delegation,chainId:Number(s.chainId),nonce:s.nonce,yParity:s.yParity,r:s.r,s:s.s}),signature:n,...o&&o!=="0x"?{data:o,to:a}:{}}}function YE(e){try{return Jb(e),!0}catch{return!1}}let KE=class extends ae{constructor(t){super(`Value \`${t}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}};function ZE(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function XE(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?Jt(e.nonce):void 0,storageProof:e.storageProof?ZE(e.storageProof):void 0}}async function QE(e,{address:t,blockNumber:r,blockTag:n,storageKeys:s}){const a=n??"latest",o=r!==void 0?W(r):void 0,i=await e.request({method:"eth_getProof",params:[t,s,o||a]});return XE(i)}async function JE(e,{address:t,blockNumber:r,blockTag:n="latest",slot:s}){const a=r!==void 0?W(r):void 0;return await e.request({method:"eth_getStorageAt",params:[t,s,a||n]})}async function Lf(e,{blockHash:t,blockNumber:r,blockTag:n,hash:s,index:a,sender:o,nonce:i}){var p,h,y;const c=n||"latest",l=r!==void 0?W(r):void 0;let u=null;if(s?u=await e.request({method:"eth_getTransactionByHash",params:[s]},{dedupe:!0}):t?u=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,W(a)]},{dedupe:!0}):typeof a=="number"?u=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[l||c,W(a)]},{dedupe:!!l}):o&&typeof i=="number"&&(u=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[o,W(i)]},{dedupe:!0})),!u)throw new Im({blockHash:t,blockNumber:r,blockTag:c,hash:s,index:a});return(((y=(h=(p=e.chain)==null?void 0:p.formatters)==null?void 0:h.transaction)==null?void 0:y.format)||Is)(u,"getTransaction")}async function eC(e,{hash:t,transactionReceipt:r}){const[n,s]=await Promise.all([ne(e,ti,"getBlockNumber")({}),t?ne(e,Lf,"getTransaction")({hash:t}):void 0]),a=(r==null?void 0:r.blockNumber)||(s==null?void 0:s.blockNumber);return a?n-a+1n:0n}async function rl(e,{hash:t}){var s,a,o;const r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!r)throw new Om({hash:t});return(((o=(a=(s=e.chain)==null?void 0:s.formatters)==null?void 0:a.transactionReceipt)==null?void 0:o.format)||jc)(r,"getTransactionReceipt")}async function tC(e,t){var w;const{account:r,authorizationList:n,allowFailure:s=!0,blockNumber:a,blockOverrides:o,blockTag:i,stateOverride:c}=t,l=t.contracts,{batchSize:u=t.batchSize??1024,deployless:d=t.deployless??!1}=typeof((w=e.batch)==null?void 0:w.multicall)=="object"?e.batch.multicall:{},p=(()=>{if(t.multicallAddress)return t.multicallAddress;if(d)return null;if(e.chain)return Oa({blockNumber:a,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),h=[[]];let y=0,g=0;for(let S=0;S<l.length;S++){const{abi:C,address:U,args:z,functionName:T}=l[S];try{const m=nr({abi:C,args:z,functionName:T});g+=(m.length-2)/2,u>0&&g>u&&h[y].length>0&&(y++,g=(m.length-2)/2,h[y]=[]),h[y]=[...h[y],{allowFailure:!0,callData:m,target:U}]}catch(m){const b=Ss(m,{abi:C,address:U,args:z,docsPath:"/docs/contract/multicall",functionName:T,sender:r});if(!s)throw b;h[y]=[...h[y],{allowFailure:!0,callData:"0x",target:U}]}}const k=await Promise.allSettled(h.map(S=>ne(e,Ir,"readContract")({...p===null?{code:jd}:{address:p},abi:zc,account:r,args:[S],authorizationList:n,blockNumber:a,blockOverrides:o,blockTag:i,functionName:"aggregate3",stateOverride:c}))),v=[];for(let S=0;S<k.length;S++){const C=k[S];if(C.status==="rejected"){if(!s)throw C.reason;for(let z=0;z<h[S].length;z++)v.push({status:"failure",error:C.reason,result:void 0});continue}const U=C.value;for(let z=0;z<U.length;z++){const{returnData:T,success:m}=U[z],{callData:b}=h[S][z],{abi:x,address:A,functionName:I,args:O}=l[v.length];try{if(b==="0x")throw new yo;if(!m)throw new Ec({data:T});const D=Os({abi:x,args:O,data:T,functionName:I});v.push(s?{result:D,status:"success"}:D)}catch(D){const E=Ss(D,{abi:x,address:A,args:O,docsPath:"/docs/contract/multicall",functionName:I});if(!s)throw E;v.push({error:E,result:void 0,status:"failure"})}}}if(v.length!==l.length)throw new $("multicall results mismatch");return v}async function Rf(e,t){const{blockNumber:r,blockTag:n=e.experimental_blockTag??"latest",blocks:s,returnFullTransactions:a,traceTransfers:o,validation:i}=t;try{const c=[];for(const p of s){const h=p.blockOverrides?A1(p.blockOverrides):void 0,y=p.calls.map(k=>{const v=k,w=v.account?Ke(v.account):void 0,S=v.abi?nr(v):v.data,C={...v,account:w,data:v.dataSuffix?tr([S||"0x",v.dataSuffix]):S,from:v.from??(w==null?void 0:w.address)};return jr(C),Sr(C)}),g=p.stateOverrides?bd(p.stateOverrides):void 0;c.push({blockOverrides:h,calls:y,stateOverrides:g})}const u=(typeof r=="bigint"?W(r):void 0)||n;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:a,traceTransfers:o,validation:i},u]})).map((p,h)=>({...gd(p),calls:p.calls.map((y,g)=>{var x,A;const{abi:k,args:v,functionName:w,to:S}=s[h].calls[g],C=((x=y.error)==null?void 0:x.data)??y.returnData,U=BigInt(y.gasUsed),z=(A=y.logs)==null?void 0:A.map(I=>Vr(I)),T=y.status==="0x1"?"success":"failure",m=k&&T==="success"&&C!=="0x"?Os({abi:k,data:C,functionName:w}):null,b=(()=>{var O;if(T==="success")return;let I;if(((O=y.error)==null?void 0:O.data)==="0x"?I=new yo:y.error&&(I=new Ec(y.error)),!!I)return Ss(I,{abi:k??[],address:S??"0x",args:v,functionName:w??"<unknown>"})})();return{data:C,gasUsed:U,logs:z,status:T,...T==="success"?{result:m}:{error:b}}})}))}catch(c){const l=c,u=Tc(l,{});throw u instanceof Vo?l:u}}function Hf(e){let t=!0,r="",n=0,s="",a=!1;for(let o=0;o<e.length;o++){const i=e[o];if(["(",")",","].includes(i)&&(t=!0),i==="("&&n++,i===")"&&n--,!!t){if(n===0){if(i===" "&&["event","function","error",""].includes(s))s="";else if(s+=i,i===")"){a=!0;break}continue}if(i===" "){e[o-1]!==","&&r!==","&&r!==",("&&(r="",t=!1);continue}s+=i,r+=i}}if(!a)throw new ae("Unable to normalize signature.");return s}function $f(e,t){const r=typeof e,n=t.type;switch(n){case"address":return Xc(e,{strict:!1});case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in t?Object.values(t.components).every((s,a)=>$f(Object.values(e)[a],s)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(e)&&e.every(s=>$f(s,{...t,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function ey(e,t,r){for(const n in e){const s=e[n],a=t[n];if(s.type==="tuple"&&a.type==="tuple"&&"components"in s&&"components"in a)return ey(s.components,a.components,r[n]);const o=[s.type,a.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")?Xc(r[n],{strict:!1}):o.includes("address")&&o.includes("bytes")?Xc(r[n],{strict:!1}):!1)return o}}function ty(e,t={}){const{prepare:r=!0}=t,n=Array.isArray(e)||typeof e=="string"?Dh(e):e;return{...n,...r?{hash:Da(n)}:{}}}function nl(e,t,r){const{args:n=[],prepare:s=!0}=r??{},a=Pr(t,{strict:!1}),o=e.filter(l=>a?l.type==="function"||l.type==="error"?ry(l)===Pe(t,0,4):l.type==="event"?Da(l)===t:!1:"name"in l&&l.name===t);if(o.length===0)throw new sl({name:t});if(o.length===1)return{...o[0],...s?{hash:Da(o[0])}:{}};let i;for(const l of o){if(!("inputs"in l))continue;if(!n||n.length===0){if(!l.inputs||l.inputs.length===0)return{...l,...s?{hash:Da(l)}:{}};continue}if(!l.inputs||l.inputs.length===0||l.inputs.length!==n.length)continue;if(n.every((d,p)=>{const h="inputs"in l&&l.inputs[p];return h?$f(d,h):!1})){if(i&&"inputs"in i&&i.inputs){const d=ey(l.inputs,i.inputs,n);if(d)throw new nC({abiItem:l,type:d[0]},{abiItem:i,type:d[1]})}i=l}}const c=(()=>{if(i)return i;const[l,...u]=o;return{...l,overloads:u}})();if(!c)throw new sl({name:t});return{...c,...s?{hash:Da(c)}:{}}}function ry(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,n]=e;return nl(r,n)}return e[0]})();return Pe(Da(t),0,4)}function rC(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,s]=e;return nl(n,s)}return e[0]})(),r=typeof t=="string"?t:fc(t);return Hf(r)}function Da(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,n]=e;return nl(r,n)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:oi(Qo(rC(t)))}class nC extends ae{constructor(t,r){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${Hf(fc(t.abiItem))}\`, and`,`\`${r.type}\` in \`${Hf(fc(r.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}class sl extends ae{constructor({name:t,data:r,type:n="item"}){const s=t?` with name "${t}"`:r?` with data "${r}"`:"";super(`ABI ${n}${s} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}function sC(...e){var a;const[t,r]=(()=>{if(Array.isArray(e[0])){const[o,i]=e;return[oC(o),i]}return e})(),{bytecode:n,args:s}=r;return lt(n,(a=t.inputs)!=null&&a.length&&(s!=null&&s.length)?vf(t.inputs,s):"0x")}function aC(e){return ty(e)}function oC(e){const t=e.find(r=>r.type==="constructor");if(!t)throw new sl({name:"constructor"});return t}function iC(...e){const[t,r=[]]=(()=>{if(Array.isArray(e[0])){const[l,u,d]=e;return[ny(l,u,{args:d}),d]}const[i,c]=e;return[i,c]})(),{overloads:n}=t,s=n?ny([t,...n],t.name,{args:r}):t,a=cC(s),o=r.length>0?vf(s.inputs,r):void 0;return o?lt(a,o):a}function Fa(e,t={}){return ty(e,t)}function ny(e,t,r){const n=nl(e,t,r);if(n.type!=="function")throw new sl({name:t,type:"function"});return n}function cC(e){return ry(e)}const lC="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",Wr="0x0000000000000000000000000000000000000000",uC="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function dC(e,t){const{blockNumber:r,blockTag:n,calls:s,stateOverrides:a,traceAssetChanges:o,traceTransfers:i,validation:c}=t,l=t.account?Ke(t.account):void 0;if(o&&!l)throw new $("`account` is required when `traceAssetChanges` is true");const u=l?sC(aC("constructor(bytes, bytes)"),{bytecode:D1,args:[uC,iC(Fa("function getBalance(address)"),[l.address])]}):void 0,d=o?await Promise.all(t.calls.map(async M=>{if(!M.data&&!M.abi)return;const{accessList:L}=await tb(e,{account:l.address,...M,data:M.abi?nr(M):M.data});return L.map(({address:H,storageKeys:G})=>G.length>0?H:null)})).then(M=>M.flat().filter(Boolean)):[],p=await Rf(e,{blockNumber:r,blockTag:n,blocks:[...o?[{calls:[{data:u}],stateOverrides:a},{calls:d.map((M,L)=>({abi:[Fa("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:M,from:Wr,nonce:L})),stateOverrides:[{address:Wr,nonce:0}]}]:[],{calls:[...s,{}].map(M=>({...M,from:l==null?void 0:l.address})),stateOverrides:a},...o?[{calls:[{data:u}]},{calls:d.map((M,L)=>({abi:[Fa("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:M,from:Wr,nonce:L})),stateOverrides:[{address:Wr,nonce:0}]},{calls:d.map((M,L)=>({to:M,abi:[Fa("function decimals() returns (uint256)")],functionName:"decimals",from:Wr,nonce:L})),stateOverrides:[{address:Wr,nonce:0}]},{calls:d.map((M,L)=>({to:M,abi:[Fa("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:Wr,nonce:L})),stateOverrides:[{address:Wr,nonce:0}]},{calls:d.map((M,L)=>({to:M,abi:[Fa("function symbol() returns (string)")],functionName:"symbol",from:Wr,nonce:L})),stateOverrides:[{address:Wr,nonce:0}]}]:[]],traceTransfers:i,validation:c}),h=o?p[2]:p[0],[y,g,,k,v,w,S,C]=o?p:[],{calls:U,...z}=h,T=U.slice(0,-1)??[],m=(y==null?void 0:y.calls)??[],b=(g==null?void 0:g.calls)??[],x=[...m,...b].map(M=>M.status==="success"?Ne(M.data):null),A=(k==null?void 0:k.calls)??[],I=(v==null?void 0:v.calls)??[],O=[...A,...I].map(M=>M.status==="success"?Ne(M.data):null),D=((w==null?void 0:w.calls)??[]).map(M=>M.status==="success"?M.result:null),E=((C==null?void 0:C.calls)??[]).map(M=>M.status==="success"?M.result:null),P=((S==null?void 0:S.calls)??[]).map(M=>M.status==="success"?M.result:null),_=[];for(const[M,L]of O.entries()){const H=x[M];if(typeof L!="bigint"||typeof H!="bigint")continue;const G=D[M-1],J=E[M-1],pe=P[M-1],be=M===0?{address:lC,decimals:18,symbol:"ETH"}:{address:d[M-1],decimals:pe||G?Number(G??1):void 0,symbol:J??void 0};_.some(ie=>ie.token.address===be.address)||_.push({token:be,value:{pre:H,post:L,diff:L-H}})}return{assetChanges:_,block:z,results:T}}const sy="0x6492649264926492649264926492649264926492649264926492649264926492";function fC(e){if(Pe(e,-32)!==sy)throw new mC(e)}function pC(e){const{data:t,signature:r,to:n}=e;return lt(vf(kb("address, bytes, bytes"),[n,t,r]),sy)}function hC(e){try{return fC(e),!0}catch{return!1}}class mC extends ae{constructor(t){super(`Value \`${t}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}function bC({r:e,s:t,to:r="hex",v:n,yParity:s}){const a=(()=>{if(s===0||s===1)return s;if(n&&(n===27n||n===28n||n>=35n))return n%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),o=`0x${new ci.Signature(Ne(e),Ne(t)).toCompactHex()}${a===0?"1b":"1c"}`;return r==="hex"?o:er(o)}async function li(e,t){var c,l,u,d;const{address:r,chain:n=e.chain,hash:s,erc6492VerifierAddress:a=t.universalSignatureVerifierAddress??((l=(c=n==null?void 0:n.contracts)==null?void 0:c.erc6492Verifier)==null?void 0:l.address),multicallAddress:o=t.multicallAddress??((d=(u=n==null?void 0:n.contracts)==null?void 0:u.multicall3)==null?void 0:d.address)}=t;if(n!=null&&n.verifyHash)return await n.verifyHash(e,t);const i=(()=>{const p=t.signature;return Cr(p)?p:typeof p=="object"&&"r"in p&&"s"in p?bC(p):bt(p)})();try{return YE(i)?await yC(e,{...t,multicallAddress:o,signature:i}):await gC(e,{...t,verifierAddress:a,signature:i})}catch(p){try{if(Ta(Ku(r),await Fm({hash:s,signature:i})))return!0}catch{}if(p instanceof Fs)return!1;throw p}}async function yC(e,t){var k;const{address:r,blockNumber:n,blockTag:s,hash:a,multicallAddress:o}=t,{authorization:i,data:c,signature:l,to:u}=qE(t.signature);if(await qc(e,{address:r,blockNumber:n,blockTag:s})===rr(["0xef0100",i.address]))return await xC(e,{address:r,blockNumber:n,blockTag:s,hash:a,signature:l});const p={address:i.address,chainId:Number(i.chainId),nonce:Number(i.nonce),r:W(i.r,{size:32}),s:W(i.s,{size:32}),yParity:i.yParity};if(!await j3({address:r,authorization:p}))throw new Fs;const y=await ne(e,Ir,"readContract")({...o?{address:o}:{code:jd},authorizationList:[p],abi:zc,blockNumber:n,blockTag:"pending",functionName:"aggregate3",args:[[...c?[{allowFailure:!0,target:u??r,callData:c}]:[],{allowFailure:!0,target:r,callData:nr({abi:M1,functionName:"isValidSignature",args:[a,l]})}]]}),g=(k=y[y.length-1])==null?void 0:k.returnData;if(g!=null&&g.startsWith("0x1626ba7e"))return!0;throw new Fs}async function gC(e,t){const{address:r,factory:n,factoryData:s,hash:a,signature:o,verifierAddress:i,...c}=t,l=await(async()=>!n&&!s||hC(o)?o:pC({data:s,signature:o,to:n}))(),u=i?{to:i,data:nr({abi:_1,functionName:"isValidSig",args:[r,a,l]}),...c}:{data:Lc({abi:_1,args:[r,a,l],bytecode:R8}),...c},{data:d}=await ne(e,ei,"call")(u).catch(p=>{throw p instanceof Mm?new Fs:p});if(Qw(d??"0x0"))return!0;throw new Fs}async function xC(e,t){const{address:r,blockNumber:n,blockTag:s,hash:a,signature:o}=t;if((await ne(e,Ir,"readContract")({address:r,abi:M1,args:[a,o],blockNumber:n,blockTag:s,functionName:"isValidSignature"}).catch(c=>{throw c instanceof _m?new Fs:c})).startsWith("0x1626ba7e"))return!0;throw new Fs}let Fs=class extends Error{};async function wC(e,{address:t,message:r,factory:n,factoryData:s,signature:a,...o}){const i=ib(r);return ne(e,li,"verifyHash")({address:t,factory:n,factoryData:s,hash:i,signature:a,...o})}async function vC(e,t){const{address:r,factory:n,factoryData:s,signature:a,message:o,primaryType:i,types:c,domain:l,...u}=t,d=dk({message:o,primaryType:i,types:c,domain:l});return ne(e,li,"verifyHash")({address:r,factory:n,factoryData:s,hash:d,signature:a,...u})}function ay(e,{emitOnBegin:t=!1,emitMissed:r=!1,onBlockNumber:n,onError:s,poll:a,pollingInterval:o=e.pollingInterval}){const i=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc"));let c;return i?(()=>{const d=dt(["watchBlockNumber",e.uid,t,r,o]);return yn(d,{onBlockNumber:n,onError:s},p=>Ba(async()=>{var h;try{const y=await ne(e,ti,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(y===c)return;if(y-c>1&&r)for(let g=c+1n;g<y;g++)p.onBlockNumber(g,c),c=g}(c===void 0||y>c)&&(p.onBlockNumber(y,c),c=y)}catch(y){(h=p.onError)==null||h.call(p,y)}},{emitOnBegin:t,interval:o}))})():(()=>{const d=dt(["watchBlockNumber",e.uid,t,r]);return yn(d,{onBlockNumber:n,onError:s},p=>{let h=!0,y=()=>h=!1;return(async()=>{try{const g=(()=>{if(e.transport.type==="fallback"){const v=e.transport.transports.find(w=>w.config.type==="webSocket"||w.config.type==="ipc");return v?v.value:e.transport}return e.transport})(),{unsubscribe:k}=await g.subscribe({params:["newHeads"],onData(v){var S;if(!h)return;const w=Ne((S=v.result)==null?void 0:S.number);p.onBlockNumber(w,c),c=w},onError(v){var w;(w=p.onError)==null||w.call(p,v)}});y=k,h||y()}catch(g){s==null||s(g)}})(),()=>y()})})()}async function oy(e,t){const{checkReplacement:r=!0,confirmations:n=1,hash:s,onReplaced:a,retryCount:o=6,retryDelay:i=({count:U})=>~~(1<<U)*200,timeout:c=18e4}=t,l=dt(["waitForTransactionReceipt",e.uid,s]),u=(()=>{var U;return t.pollingInterval?t.pollingInterval:(U=e.chain)!=null&&U.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval})();let d,p,h,y=!1,g,k;const{promise:v,resolve:w,reject:S}=Yd(),C=c?setTimeout(()=>{k==null||k(),g==null||g(),S(new gv({hash:s}))},c):void 0;return g=yn(l,{onReplaced:a,resolve:w,reject:S},async U=>{if(h=await ne(e,rl,"getTransactionReceipt")({hash:s}).catch(()=>{}),h&&n<=1){clearTimeout(C),U.resolve(h),g==null||g();return}k=ne(e,ay,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:u,async onBlockNumber(z){const T=b=>{clearTimeout(C),k==null||k(),b(),g==null||g()};let m=z;if(!y)try{if(h){if(n>1&&(!h.blockNumber||m-h.blockNumber+1n<n))return;T(()=>U.resolve(h));return}if(r&&!d&&(y=!0,await Gc(async()=>{d=await ne(e,Lf,"getTransaction")({hash:s}),d.blockNumber&&(m=d.blockNumber)},{delay:i,retryCount:o}),y=!1),h=await ne(e,rl,"getTransactionReceipt")({hash:s}),n>1&&(!h.blockNumber||m-h.blockNumber+1n<n))return;T(()=>U.resolve(h))}catch(b){if(b instanceof Im||b instanceof Om){if(!d){y=!1;return}try{p=d,y=!0;const x=await Gc(()=>ne(e,Ar,"getBlock")({blockNumber:m,includeTransactions:!0}),{delay:i,retryCount:o,shouldRetry:({error:O})=>O instanceof Hm});y=!1;const A=x.transactions.find(({from:O,nonce:D})=>O===p.from&&D===p.nonce);if(!A||(h=await ne(e,rl,"getTransactionReceipt")({hash:A.hash}),n>1&&(!h.blockNumber||m-h.blockNumber+1n<n)))return;let I="replaced";A.to===p.to&&A.value===p.value&&A.input===p.input?I="repriced":A.from===A.to&&A.value===0n&&(I="cancelled"),T(()=>{var O;(O=U.onReplaced)==null||O.call(U,{reason:I,replacedTransaction:p,transaction:A,transactionReceipt:h}),U.resolve(h)})}catch(x){T(()=>U.reject(x))}}else T(()=>U.reject(b))}}})}),v}function kC(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:s,onError:a,includeTransactions:o,poll:i,pollingInterval:c=e.pollingInterval}){const l=typeof i<"u"?i:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),u=o??!1;let d;return l?(()=>{const y=dt(["watchBlocks",e.uid,t,r,n,u,c]);return yn(y,{onBlock:s,onError:a},g=>Ba(async()=>{var k;try{const v=await ne(e,Ar,"getBlock")({blockTag:t,includeTransactions:u});if(v.number!==null&&(d==null?void 0:d.number)!=null){if(v.number===d.number)return;if(v.number-d.number>1&&r)for(let w=(d==null?void 0:d.number)+1n;w<v.number;w++){const S=await ne(e,Ar,"getBlock")({blockNumber:w,includeTransactions:u});g.onBlock(S,d),d=S}}((d==null?void 0:d.number)==null||t==="pending"&&(v==null?void 0:v.number)==null||v.number!==null&&v.number>d.number)&&(g.onBlock(v,d),d=v)}catch(v){(k=g.onError)==null||k.call(g,v)}},{emitOnBegin:n,interval:c}))})():(()=>{let y=!0,g=!0,k=()=>y=!1;return(async()=>{try{n&&ne(e,Ar,"getBlock")({blockTag:t,includeTransactions:u}).then(S=>{y&&g&&(s(S,void 0),g=!1)}).catch(a);const v=(()=>{if(e.transport.type==="fallback"){const S=e.transport.transports.find(C=>C.config.type==="webSocket"||C.config.type==="ipc");return S?S.value:e.transport}return e.transport})(),{unsubscribe:w}=await v.subscribe({params:["newHeads"],async onData(S){var U;if(!y)return;const C=await ne(e,Ar,"getBlock")({blockNumber:(U=S.result)==null?void 0:U.number,includeTransactions:u}).catch(()=>{});y&&(s(C,d),g=!1,d=C)},onError(S){a==null||a(S)}});k=w,y||k()}catch(v){a==null||a(v)}})(),()=>k()})()}function EC(e,{address:t,args:r,batch:n=!0,event:s,events:a,fromBlock:o,onError:i,onLogs:c,poll:l,pollingInterval:u=e.pollingInterval,strict:d}){const p=typeof l<"u"?l:typeof o=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),h=d??!1;return p?(()=>{const k=dt(["watchEvent",t,r,n,e.uid,s,u,o]);return yn(k,{onLogs:c,onError:i},v=>{let w;o!==void 0&&(w=o-1n);let S,C=!1;const U=Ba(async()=>{var z;if(!C){try{S=await ne(e,rb,"createEventFilter")({address:t,args:r,event:s,events:a,strict:h,fromBlock:o})}catch{}C=!0;return}try{let T;if(S)T=await ne(e,Rc,"getFilterChanges")({filter:S});else{const m=await ne(e,ti,"getBlockNumber")({});w&&w!==m?T=await ne(e,_d,"getLogs")({address:t,args:r,event:s,events:a,fromBlock:w+1n,toBlock:m}):T=[],w=m}if(T.length===0)return;if(n)v.onLogs(T);else for(const m of T)v.onLogs([m])}catch(T){S&&T instanceof $n&&(C=!1),(z=v.onError)==null||z.call(v,T)}},{emitOnBegin:!0,interval:u});return async()=>{S&&await ne(e,Hc,"uninstallFilter")({filter:S}),U()}})})():(()=>{let k=!0,v=()=>k=!1;return(async()=>{try{const w=(()=>{if(e.transport.type==="fallback"){const z=e.transport.transports.find(T=>T.config.type==="webSocket"||T.config.type==="ipc");return z?z.value:e.transport}return e.transport})(),S=a??(s?[s]:void 0);let C=[];S&&(C=[S.flatMap(T=>ko({abi:[T],eventName:T.name,args:r}))],s&&(C=C[0]));const{unsubscribe:U}=await w.subscribe({params:["logs",{address:t,topics:C}],onData(z){var m;if(!k)return;const T=z.result;try{const{eventName:b,args:x}=Ic({abi:S??[],data:T.data,topics:T.topics,strict:h}),A=Vr(T,{args:x,eventName:b});c([A])}catch(b){let x,A;if(b instanceof mc||b instanceof ju){if(d)return;x=b.abiItem.name,A=(m=b.abiItem.inputs)==null?void 0:m.some(O=>!("name"in O&&O.name))}const I=Vr(T,{args:A?[]:{},eventName:x});c([I])}},onError(z){i==null||i(z)}});v=U,k||v()}catch(w){i==null||i(w)}})(),()=>v()})()}function CC(e,{batch:t=!0,onError:r,onTransactions:n,poll:s,pollingInterval:a=e.pollingInterval}){return(typeof s<"u"?s:e.transport.type!=="webSocket"&&e.transport.type!=="ipc")?(()=>{const l=dt(["watchPendingTransactions",e.uid,t,a]);return yn(l,{onTransactions:n,onError:r},u=>{let d;const p=Ba(async()=>{var h;try{if(!d)try{d=await ne(e,nb,"createPendingTransactionFilter")({});return}catch(g){throw p(),g}const y=await ne(e,Rc,"getFilterChanges")({filter:d});if(y.length===0)return;if(t)u.onTransactions(y);else for(const g of y)u.onTransactions([g])}catch(y){(h=u.onError)==null||h.call(u,y)}},{emitOnBegin:!0,interval:a});return async()=>{d&&await ne(e,Hc,"uninstallFilter")({filter:d}),p()}})})():(()=>{let l=!0,u=()=>l=!1;return(async()=>{try{const{unsubscribe:d}=await e.transport.subscribe({params:["newPendingTransactions"],onData(p){if(!l)return;const h=p.result;n([h])},onError(p){r==null||r(p)}});u=d,l||u()}catch(d){r==null||r(d)}})(),()=>u()})()}function TC(e){var d,p,h;const{scheme:t,statement:r,...n}=((d=e.match(SC))==null?void 0:d.groups)??{},{chainId:s,expirationTime:a,issuedAt:o,notBefore:i,requestId:c,...l}=((p=e.match(AC))==null?void 0:p.groups)??{},u=(h=e.split("Resources:")[1])==null?void 0:h.split(`
|
|
44
|
+
- `).slice(1);return{...n,...l,...s?{chainId:Number(s)}:{},...a?{expirationTime:new Date(a)}:{},...o?{issuedAt:new Date(o)}:{},...i?{notBefore:new Date(i)}:{},...c?{requestId:c}:{},...u?{resources:u}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}const SC=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,AC=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function PC(e){const{address:t,domain:r,message:n,nonce:s,scheme:a,time:o=new Date}=e;if(r&&n.domain!==r||s&&n.nonce!==s||a&&n.scheme!==a||n.expirationTime&&o>=n.expirationTime||n.notBefore&&o<n.notBefore)return!1;try{if(!n.address||!rt(n.address,{strict:!1})||t&&!Ta(n.address,t))return!1}catch{return!1}return!0}async function IC(e,t){const{address:r,domain:n,message:s,nonce:a,scheme:o,signature:i,time:c=new Date,...l}=t,u=TC(s);if(!u.address||!PC({address:r,domain:n,message:u,nonce:a,scheme:o,time:c}))return!1;const p=ib(s);return li(e,{address:u.address,hash:p,signature:i,...l})}async function Gf(e,{serializedTransaction:t,throwOnReceiptRevert:r,timeout:n}){var i,c,l;const s=await e.request({method:"eth_sendRawTransactionSync",params:n?[t,W(n)]:[t]},{retryCount:0}),o=(((l=(c=(i=e.chain)==null?void 0:i.formatters)==null?void 0:c.transactionReceipt)==null?void 0:l.format)||jc)(s);if(o.status==="reverted"&&r)throw new Bm({receipt:o});return o}function OC(e){return{call:t=>ei(e,t),createAccessList:t=>tb(e,t),createBlockFilter:()=>C3(e),createContractEventFilter:t=>xm(e,t),createEventFilter:t=>rb(e,t),createPendingTransactionFilter:()=>nb(e),estimateContractGas:t=>t8(e,t),estimateGas:t=>Bd(e,t),getBalance:t=>T3(e,t),getBlobBaseFee:()=>S3(e),getBlock:t=>Ar(e,t),getBlockNumber:t=>ti(e,t),getBlockTransactionCount:t=>A3(e,t),getBytecode:t=>qc(e,t),getChainId:()=>Yn(e),getCode:t=>qc(e,t),getContractEvents:t=>a1(e,t),getEip712Domain:t=>I3(e,t),getEnsAddress:t=>c3(e,t),getEnsAvatar:t=>v3(e,t),getEnsName:t=>k3(e,t),getEnsResolver:t=>E3(e,t),getEnsText:t=>eb(e,t),getFeeHistory:t=>M3(e,t),estimateFeesPerGas:t=>Lv(e,t),getFilterChanges:t=>Rc(e,t),getFilterLogs:t=>_3(e,t),getGasPrice:()=>wd(e),getLogs:t=>_d(e,t),getProof:t=>QE(e,t),estimateMaxPriorityFeePerGas:t=>zv(e,t),fillTransaction:t=>Pd(e,t),getStorageAt:t=>JE(e,t),getTransaction:t=>Lf(e,t),getTransactionConfirmations:t=>eC(e,t),getTransactionCount:t=>kd(e,t),getTransactionReceipt:t=>rl(e,t),multicall:t=>tC(e,t),prepareTransactionRequest:t=>Wo(e,t),readContract:t=>Ir(e,t),sendRawTransaction:t=>Jd(e,t),sendRawTransactionSync:t=>Gf(e,t),simulate:t=>Rf(e,t),simulateBlocks:t=>Rf(e,t),simulateCalls:t=>dC(e,t),simulateContract:t=>q8(e,t),verifyHash:t=>li(e,t),verifyMessage:t=>wC(e,t),verifySiweMessage:t=>IC(e,t),verifyTypedData:t=>vC(e,t),uninstallFilter:t=>Hc(e,t),waitForTransactionReceipt:t=>oy(e,t),watchBlocks:t=>kC(e,t),watchBlockNumber:t=>ay(e,t),watchContractEvent:t=>e3(e,t),watchEvent:t=>EC(e,t),watchPendingTransactions:t=>CC(e,t)}}function BC(e){const{key:t="public",name:r="Public Client"}=e;return q1({...e,key:t,name:r,type:"publicClient"}).extend(OC)}async function MC(e,{chain:t}){const{id:r,name:n,nativeCurrency:s,rpcUrls:a,blockExplorers:o}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:W(r),chainName:n,nativeCurrency:s,rpcUrls:a.default.http,blockExplorerUrls:o?Object.values(o).map(({url:i})=>i):void 0}]},{dedupe:!0,retryCount:0})}function _C(e,t){const{abi:r,args:n,bytecode:s,...a}=t,o=Lc({abi:r,args:n,bytecode:s});return $c(e,{...a,...a.authorizationList?{to:null}:{},data:o})}async function UC(e){var r;return((r=e.account)==null?void 0:r.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(n=>wo(n))}async function DC(e,t={}){const{account:r=e.account,chainId:n}=t,s=r?Ke(r):void 0,a=n?[s==null?void 0:s.address,[W(n)]]:[s==null?void 0:s.address],o=await e.request({method:"wallet_getCapabilities",params:a}),i={};for(const[c,l]of Object.entries(o)){i[Number(c)]={};for(let[u,d]of Object.entries(l))u==="addSubAccount"&&(u="unstable_addSubAccount"),i[Number(c)][u]=d}return typeof n=="number"?i[n]:i}async function FC(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function iy(e,t){var c;const{account:r=e.account,chainId:n,nonce:s}=t;if(!r)throw new gn({docsPath:"/docs/eip7702/prepareAuthorization"});const a=Ke(r),o=(()=>{if(t.executor)return t.executor==="self"?t.executor:Ke(t.executor)})(),i={address:t.contractAddress??t.address,chainId:n,nonce:s};return typeof i.chainId>"u"&&(i.chainId=((c=e.chain)==null?void 0:c.id)??await ne(e,Yn,"getChainId")({})),typeof i.nonce>"u"&&(i.nonce=await ne(e,kd,"getTransactionCount")({address:a.address,blockTag:"pending"}),(o==="self"||o!=null&&o.address&&Ta(o.address,a.address))&&(i.nonce+=1)),i}async function NC(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(r=>Ku(r))}async function zC(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function LC(e,t){const{chain:r=e.chain}=t,n=t.timeout??Math.max(((r==null?void 0:r.blockTime)??0)*3,5e3),s=await G1(e,t);return await V1(e,{...t,id:s.id,timeout:n})}const jf=new ya(128);async function cy(e,t){var U,z,T,m;const{account:r=e.account,chain:n=e.chain,accessList:s,authorizationList:a,blobs:o,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:h,pollingInterval:y,throwOnReceiptRevert:g,type:k,value:v,...w}=t,S=t.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3);if(typeof r>"u")throw new gn({docsPath:"/docs/actions/wallet/sendTransactionSync"});const C=r?Ke(r):null;try{jr(t);const b=await(async()=>{if(t.to)return t.to;if(t.to!==null&&a&&a.length>0)return await Cc({authorization:a[0]}).catch(()=>{throw new $("`to` is required. Could not infer from `authorizationList`.")})})();if((C==null?void 0:C.type)==="json-rpc"||C===null){let x;n!==null&&(x=await ne(e,Yn,"getChainId")({}),Qd({currentChainId:x,chain:n}));const A=(T=(z=(U=e.chain)==null?void 0:U.formatters)==null?void 0:z.transactionRequest)==null?void 0:T.format,O=(A||Sr)({...As(w,{format:A}),accessList:s,account:C,authorizationList:a,blobs:o,chainId:x,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:h,to:b,type:k,value:v},"sendTransaction"),D=jf.get(e.uid),E=D?"wallet_sendTransaction":"eth_sendTransaction",P=await(async()=>{try{return await e.request({method:E,params:[O]},{retryCount:0})}catch(M){if(D===!1)throw M;const L=M;if(L.name==="InvalidInputRpcError"||L.name==="InvalidParamsRpcError"||L.name==="MethodNotFoundRpcError"||L.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[O]},{retryCount:0}).then(H=>(jf.set(e.uid,!0),H)).catch(H=>{const G=H;throw G.name==="MethodNotFoundRpcError"||G.name==="MethodNotSupportedRpcError"?(jf.set(e.uid,!1),L):G});throw L}})(),_=await ne(e,oy,"waitForTransactionReceipt")({checkReplacement:!1,hash:P,pollingInterval:y,timeout:S});if(g&&_.status==="reverted")throw new Bm({receipt:_});return _}if((C==null?void 0:C.type)==="local"){const x=await ne(e,Wo,"prepareTransactionRequest")({account:C,accessList:s,authorizationList:a,blobs:o,chain:n,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:p,nonce:h,nonceManager:C.nonceManager,parameters:[...Id,"sidecars"],type:k,value:v,...w,to:b}),A=(m=n==null?void 0:n.serializers)==null?void 0:m.transaction,I=await C.signTransaction(x,{serializer:A});return await ne(e,Gf,"sendRawTransactionSync")({serializedTransaction:I,throwOnReceiptRevert:g})}throw(C==null?void 0:C.type)==="smart"?new Us({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new Us({docsPath:"/docs/actions/wallet/sendTransactionSync",type:C==null?void 0:C.type})}catch(b){throw b instanceof Us?b:Pc(b,{...t,account:C,chain:t.chain||void 0})}}async function RC(e,t){const{id:r}=t;await e.request({method:"wallet_showCallsStatus",params:[r]})}async function HC(e,t){const{account:r=e.account}=t;if(!r)throw new gn({docsPath:"/docs/eip7702/signAuthorization"});const n=Ke(r);if(!n.signAuthorization)throw new Us({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const s=await iy(e,t);return n.signAuthorization(s)}async function $C(e,{account:t=e.account,message:r}){if(!t)throw new gn({docsPath:"/docs/actions/wallet/signMessage"});const n=Ke(t);if(n.signMessage)return n.signMessage({message:r});const s=typeof r=="string"?fa(r):r.raw instanceof Uint8Array?Be(r.raw):r.raw;return e.request({method:"personal_sign",params:[s,n.address]},{retryCount:0})}async function GC(e,t){var l,u,d,p;const{account:r=e.account,chain:n=e.chain,...s}=t;if(!r)throw new gn({docsPath:"/docs/actions/wallet/signTransaction"});const a=Ke(r);jr({account:a,...t});const o=await ne(e,Yn,"getChainId")({});n!==null&&Qd({currentChainId:o,chain:n});const i=(n==null?void 0:n.formatters)||((l=e.chain)==null?void 0:l.formatters),c=((u=i==null?void 0:i.transactionRequest)==null?void 0:u.format)||Sr;return a.signTransaction?a.signTransaction({...s,chainId:o},{serializer:(p=(d=e.chain)==null?void 0:d.serializers)==null?void 0:p.transaction}):await e.request({method:"eth_signTransaction",params:[{...c({...s,account:a},"signTransaction"),chainId:W(o),from:a.address}]},{retryCount:0})}async function jC(e,t){const{account:r=e.account,domain:n,message:s,primaryType:a}=t;if(!r)throw new gn({docsPath:"/docs/actions/wallet/signTypedData"});const o=Ke(r),i={EIP712Domain:lb({domain:n}),...t.types};if(cb({domain:n,message:s,primaryType:a,types:i}),o.signTypedData)return o.signTypedData({domain:n,message:s,primaryType:a,types:i});const c=lk({domain:n,message:s,primaryType:a,types:i});return e.request({method:"eth_signTypedData_v4",params:[o.address,c]},{retryCount:0})}async function VC(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:W(t)}]},{retryCount:0})}async function WC(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}async function qC(e,t){return ri.internal(e,cy,"sendTransactionSync",t)}function YC(e){return{addChain:t=>MC(e,t),deployContract:t=>_C(e,t),fillTransaction:t=>Pd(e,t),getAddresses:()=>UC(e),getCallsStatus:t=>j1(e,t),getCapabilities:t=>DC(e,t),getChainId:()=>Yn(e),getPermissions:()=>FC(e),prepareAuthorization:t=>iy(e,t),prepareTransactionRequest:t=>Wo(e,t),requestAddresses:()=>NC(e),requestPermissions:t=>zC(e,t),sendCalls:t=>G1(e,t),sendCallsSync:t=>LC(e,t),sendRawTransaction:t=>Jd(e,t),sendRawTransactionSync:t=>Gf(e,t),sendTransaction:t=>$c(e,t),sendTransactionSync:t=>cy(e,t),showCallsStatus:t=>RC(e,t),signAuthorization:t=>HC(e,t),signMessage:t=>$C(e,t),signTransaction:t=>GC(e,t),signTypedData:t=>jC(e,t),switchChain:t=>VC(e,t),waitForCallsStatus:t=>V1(e,t),watchAsset:t=>WC(e,t),writeContract:t=>ri(e,t),writeContractSync:t=>qC(e,t)}}function KC(e){const{key:t="wallet",name:r="Wallet Client",transport:n}=e;return q1({...e,key:t,name:r,transport:n,type:"walletClient"}).extend(YC)}function ly({key:e,methods:t,name:r,request:n,retryCount:s=3,retryDelay:a=150,timeout:o,type:i},c){const l=W1();return{config:{key:e,methods:t,name:r,request:n,retryCount:s,retryDelay:a,timeout:o,type:i},request:W3(n,{methods:t,retryCount:s,retryDelay:a,uid:l}),value:c}}function ZC(e,t={}){const{key:r="custom",methods:n,name:s="Custom Provider",retryDelay:a}=t;return({retryCount:o})=>ly({key:r,methods:n,name:s,request:e.request.bind(e),retryCount:t.retryCount??o,retryDelay:a,type:"custom"})}class XC extends ${constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function QC(e,t={}){const{batch:r,fetchFn:n,fetchOptions:s,key:a="http",methods:o,name:i="HTTP JSON-RPC",onFetchRequest:c,onFetchResponse:l,retryDelay:u,raw:d}=t;return({chain:p,retryCount:h,timeout:y})=>{const{batchSize:g=1e3,wait:k=0}=typeof r=="object"?r:{},v=t.retryCount??h,w=y??t.timeout??1e4,S=p==null?void 0:p.rpcUrls.default.http[0];if(!S)throw new XC;const C=nk(S,{fetchFn:n,fetchOptions:s,onRequest:c,onResponse:l,timeout:w});return ly({key:a,methods:o,name:i,async request({method:U,params:z}){const T={method:U,params:z},{schedule:m}=N1({id:S,wait:k,shouldSplitBatch(I){return I.length>g},fn:I=>C.request({body:I}),sort:(I,O)=>I.id-O.id}),b=async I=>r?m(I):[await C.request({body:I})],[{error:x,result:A}]=await b(T);if(d)return{error:x,result:A};if(x)throw new od({body:T,error:x,url:S});return A},retryCount:v,retryDelay:u,timeout:w,type:"http"},{fetchOptions:s,url:S})}}function JC(e){const{r:t,s:r}=ci.Signature.fromCompact(e.slice(2,130)),n=+`0x${e.slice(130)}`,[s,a]=(()=>{if(n===0||n===1)return[void 0,n];if(n===27)return[BigInt(n),0];if(n===28)return[BigInt(n),1];throw new Error("Invalid yParityOrV value")})();return typeof s<"u"?{r:W(t,{size:32}),s:W(r,{size:32}),v:s,yParity:a}:{r:W(t,{size:32}),s:W(r,{size:32}),yParity:a}}const e7=f({id:16600,name:"0G Newton Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-newton.0g.ai"}},testnet:!0}),t7=f({id:16601,name:"0G Galileo Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-galileo.0g.ai"}},testnet:!0}),r7=f({id:16661,name:"0G Mainnet",nativeCurrency:{name:"0G",symbol:"0G",decimals:18},rpcUrls:{default:{http:["https://evmrpc.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan.0g.ai"}},testnet:!1}),n7=f({id:16602,name:"0G Galileo Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-galileo.0g.ai"}},testnet:!0}),s7=f({id:995,name:"5ireChain",nativeCurrency:{name:"5ire Token",symbol:"5IRE",decimals:18},rpcUrls:{default:{http:["https://rpc.5ire.network"]}},blockExplorers:{default:{name:"5ireChain Mainnet Explorer",url:"https://5irescan.io/"}},testnet:!1}),a7=f({id:179,name:"ABEY Mainnet",nativeCurrency:{name:"ABEY",symbol:"ABEY",decimals:18},rpcUrls:{default:{http:["https://rpc.abeychain.com"]}},blockExplorers:{default:{name:"Abey Scan",url:"https://abeyscan.com"}},testnet:!1}),Vf=50000n,uy=Dv*32n,dy={block:xd({format(e){var r;const t=(r=e.transactions)==null?void 0:r.map(n=>{var a;if(typeof n=="string")return n;const s=(a=dy.transaction)==null?void 0:a.format(n);return s.typeHex==="0x71"?s.type="eip712":s.typeHex==="0xff"&&(s.type="priority"),s});return{l1BatchNumber:e.l1BatchNumber?Ne(e.l1BatchNumber):null,l1BatchTimestamp:e.l1BatchTimestamp?Ne(e.l1BatchTimestamp):null,transactions:t}}}),transaction:Ac({format(e){const t={};return e.type==="0x71"?t.type="eip712":e.type==="0xff"&&(t.type="priority"),{...t,l1BatchNumber:e.l1BatchNumber?Ne(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?Ne(e.l1BatchTxIndex):null}}}),transactionReceipt:tf({format(e){return{l1BatchNumber:e.l1BatchNumber?Ne(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?Ne(e.l1BatchTxIndex):null,logs:e.logs.map(t=>({...Vr(t),l1BatchNumber:t.l1BatchNumber?Ne(t.l1BatchNumber):null,transactionLogIndex:Jt(t.transactionLogIndex),logType:t.logType})),l2ToL1Logs:e.l2ToL1Logs.map(t=>({blockNumber:Ne(t.blockHash),blockHash:t.blockHash,l1BatchNumber:t.l1BatchNumber?Ne(t.l1BatchNumber):null,transactionIndex:Ne(t.transactionIndex),shardId:Ne(t.shardId),isService:t.isService,sender:t.sender,key:t.key,value:t.value,transactionHash:t.transactionHash,logIndex:Ne(t.logIndex)}))}}}),transactionRequest:md({exclude:["customSignature","factoryDeps","gasPerPubdata","paymaster","paymasterInput"],format(e){return e.gasPerPubdata||e.paymaster&&e.paymasterInput||e.factoryDeps||e.customSignature?{eip712Meta:{...e.gasPerPubdata?{gasPerPubdata:Be(e.gasPerPubdata)}:{gasPerPubdata:Be(Vf)},...e.paymaster&&e.paymasterInput?{paymasterParams:{paymaster:e.paymaster,paymasterInput:Array.from(er(e.paymasterInput))}}:{},...e.factoryDeps?{factoryDeps:e.factoryDeps.map(t=>Array.from(er(t)))}:{},...e.customSignature?{customSignature:Array.from(er(e.customSignature))}:{}},type:"0x71"}:{}}})};class o7 extends ${constructor(){super(["Transaction is not an EIP712 transaction.","","Transaction must:",' - include `type: "eip712"`'," - include one of the following: `customSignature`, `paymaster`, `paymasterInput`, `gasPerPubdata`, `factoryDeps`"].join(`
|
|
45
|
+
`),{name:"InvalidEip712TransactionError"})}}function fy(e){return!!(e.type==="eip712"||"customSignature"in e&&e.customSignature||"paymaster"in e&&e.paymaster||"paymasterInput"in e&&e.paymasterInput||"gasPerPubdata"in e&&typeof e.gasPerPubdata=="bigint"||"factoryDeps"in e&&e.factoryDeps)}function py(e){const{chainId:t,to:r,from:n,paymaster:s,paymasterInput:a}=e;if(!fy(e))throw new o7;if(!t||t<=0)throw new Ia({chainId:t});if(r&&!rt(r))throw new xt({address:r});if(n&&!rt(n))throw new xt({address:n});if(s&&!rt(s))throw new xt({address:s});if(s&&!a)throw new $("`paymasterInput` must be provided when `paymaster` is defined");if(!s&&a)throw new $("`paymaster` must be provided when `paymasterInput` is defined")}function i7(e,t){return fy(e)?l7(e):Yc(e,t)}const c7={transaction:i7};function l7(e){const{chainId:t,gas:r,nonce:n,to:s,from:a,value:o,maxFeePerGas:i,maxPriorityFeePerGas:c,customSignature:l,factoryDeps:u,paymaster:d,paymasterInput:p,gasPerPubdata:h,data:y}=e;py(e);const g=[n?Be(n):"0x",c?Be(c):"0x",i?Be(i):"0x",r?Be(r):"0x",s??"0x",o?Be(o):"0x",y??"0x",Be(t),Be(""),Be(""),Be(t),a??"0x",Be(h||Vf),u??[],l??"0x",d&&p?[d,p]:[]];return rr(["0x71",Gr(g)])}class u7 extends ${constructor({givenLength:t,maxBytecodeSize:r}){super(`Bytecode cannot be longer than ${r} bytes. Given length: ${t}`,{name:"BytecodeLengthExceedsMaxSizeError"})}}class d7 extends ${constructor({givenLengthInWords:t}){super(`Bytecode length in 32-byte words must be odd. Given length in words: ${t}`,{name:"BytecodeLengthInWordsMustBeOddError"})}}class f7 extends ${constructor({givenLength:t}){super(`The bytecode length in bytes must be divisible by 32. Given length: ${t}`,{name:"BytecodeLengthMustBeDivisibleBy32Error"})}}function p7(e){const t=un(e);if(t.length%32!==0)throw new f7({givenLength:t.length});if(t.length>uy)throw new u7({givenLength:t.length,maxBytecodeSize:uy});const r=Ym(t),n=un(r),s=t.length/32;if(s%2===0)throw new d7({givenLengthInWords:s});const a=un(s),o=gs(a,{size:2}),i=new Uint8Array([1,0]);return n.set(i,0),n.set(o,2),n}const h7=e=>{py(e);const t=m7(e);return{domain:{name:"zkSync",version:"2",chainId:e.chainId},types:{Transaction:[{name:"txType",type:"uint256"},{name:"from",type:"uint256"},{name:"to",type:"uint256"},{name:"gasLimit",type:"uint256"},{name:"gasPerPubdataByteLimit",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymaster",type:"uint256"},{name:"nonce",type:"uint256"},{name:"value",type:"uint256"},{name:"data",type:"bytes"},{name:"factoryDeps",type:"bytes32[]"},{name:"paymasterInput",type:"bytes"}]},primaryType:"Transaction",message:t}};function m7(e){const{gas:t,nonce:r,to:n,from:s,value:a,maxFeePerGas:o,maxPriorityFeePerGas:i,factoryDeps:c,paymaster:l,paymasterInput:u,gasPerPubdata:d,data:p}=e;return{txType:113n,from:BigInt(s),to:n?BigInt(n):0n,gasLimit:t??0n,gasPerPubdataByteLimit:d??Vf,maxFeePerGas:o??0n,maxPriorityFeePerGas:i??0n,paymaster:l?BigInt(l):0n,nonce:r?BigInt(r):0n,value:a??0n,data:p??"0x",factoryDeps:(c==null?void 0:c.map(h=>Be(p7(h))))??[],paymasterInput:u||"0x"}}const ar={blockTime:1e3,formatters:dy,serializers:c7,custom:{getEip712Domain:h7}},b7=f({...ar,blockTime:200,id:2741,name:"Abstract",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://api.mainnet.abs.xyz"],webSocket:["wss://api.mainnet.abs.xyz/ws"]}},blockExplorers:{default:{name:"Etherscan",url:"https://abscan.org"},native:{name:"Abstract Explorer",url:"https://explorer.mainnet.abs.xyz"}},contracts:{multicall3:{address:"0xAa4De41dba0Ca5dCBb288b7cC6b708F3aaC759E7",blockCreated:5288},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:5263}}}),y7=f({...ar,blockTime:200,id:11124,name:"Abstract Testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://api.testnet.abs.xyz"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.abscan.org"},native:{name:"Abstract Explorer",url:"https://explorer.testnet.abs.xyz"}},testnet:!0,contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963",blockCreated:358349},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:431682}}}),g7=f({id:787,name:"Acala",network:"acala",nativeCurrency:{name:"Acala",symbol:"ACA",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-acala.aca-api.network"],webSocket:["wss://eth-rpc-acala.aca-api.network"]}},blockExplorers:{default:{name:"Acala Blockscout",url:"https://blockscout.acala.network",apiUrl:"https://blockscout.acala.network/api"}},testnet:!1}),x7=f({id:47,name:"Acria IntelliChain",nativeCurrency:{decimals:18,name:"ACRIA",symbol:"ACRIA"},rpcUrls:{default:{http:["https://aic.acria.ai"]}},blockExplorers:{default:{name:"Acria Explorer",url:"https://explorer.acria.ai"}},testnet:!1}),w7=f({id:1215,name:"ADF Chain",nativeCurrency:{name:"ADDFILL",symbol:"ADF",decimals:18},rpcUrls:{default:{http:["https://mainnet.adftechnology.com"]}},blockExplorers:{default:{name:"ADF Mainnet Explorer",url:"https://explorer.adftechnology.com"}},testnet:!1}),v7=f({id:9990,name:"Agung Network",nativeCurrency:{decimals:18,name:"Agung",symbol:"AGNG"},rpcUrls:{default:{http:["https://wss-async.agung.peaq.network"],webSocket:["wss://wss-async.agung.peaq.network"]}},blockExplorers:{default:{name:"Subscan",url:"https://agung-testnet.subscan.io"}},testnet:!0}),k7=f({id:168,name:"AIOZ Network",nativeCurrency:{decimals:18,name:"AIOZ",symbol:"AIOZ"},rpcUrls:{default:{http:["https://eth-dataseed.aioz.network"]}},blockExplorers:{default:{name:"AIOZ Explorer",url:"https://explorer.aioz.network"}},testnet:!1}),E7=f({id:41455,name:"Aleph Zero",nativeCurrency:{name:"Aleph Zero",symbol:"AZERO",decimals:18},rpcUrls:{default:{http:["https://rpc.alephzero.raas.gelato.cloud"]}},blockExplorers:{default:{name:"Aleph Zero EVM Explorer",url:"https://evm-explorer.alephzero.org",apiUrl:"https://evm-explorer.alephzero.org/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4603377}}}),C7=f({id:2039,name:"Aleph Zero Testnet",nativeCurrency:{name:"TZERO",symbol:"TZERO",decimals:18},rpcUrls:{default:{http:["https://rpc.alephzero-testnet.gelato.digital"],webSocket:["wss://ws.alephzero-testnet.gelato.digital"]}},blockExplorers:{default:{name:"Aleph Zero EVM Testnet explorer",url:"https://evm-explorer-testnet.alephzero.org",apiUrl:"https://evm-explorer-testnet.alephzero.org/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2861745}},testnet:!0}),T7=f({id:10241024,name:"AlienX Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.alienxchain.io/http"]}},blockExplorers:{default:{name:"AlienX Explorer",url:"https://explorer.alienxchain.io"}},testnet:!1}),S7=f({id:10241025,name:"ALIENX Hal Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://hal-rpc.alienxchain.io/http"]}},blockExplorers:{default:{name:"AlienX Explorer",url:"https://hal-explorer.alienxchain.io"}},testnet:!0}),hy={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},Wf={block:xd({format(e){var r;return{transactions:(r=e.transactions)==null?void 0:r.map(n=>{if(typeof n=="string")return n;const s=Is(n);return s.typeHex==="0x7e"&&(s.isSystemTx=n.isSystemTx,s.mint=n.mint?Ne(n.mint):void 0,s.sourceHash=n.sourceHash,s.type="deposit"),s}),stateRoot:e.stateRoot}}}),transaction:Ac({format(e){const t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?Ne(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:tf({format(e){return{l1GasPrice:e.l1GasPrice?Ne(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?Ne(e.l1GasUsed):null,l1Fee:e.l1Fee?Ne(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};function my(e,t){return I7(e)?P7(e):Yc(e,t)}const A7={transaction:my};function P7(e){O7(e);const{sourceHash:t,data:r,from:n,gas:s,isSystemTx:a,mint:o,to:i,value:c}=e,l=[t,n,i??"0x",o?Be(o):"0x",c?Be(c):"0x",s?Be(s):"0x",a?"0x1":"0x",r??"0x"];return rr(["0x7e",Gr(l)])}function I7(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function O7(e){const{from:t,to:r}=e;if(t&&!rt(t))throw new xt({address:t});if(r&&!rt(r))throw new xt({address:r})}const j={blockTime:2e3,contracts:hy,formatters:Wf,serializers:A7},al=1,B7=f({...j,id:888888888,name:"Ancient8",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.ancient8.gg"]}},blockExplorers:{default:{name:"Ancient8 explorer",url:"https://scan.ancient8.gg",apiUrl:"https://scan.ancient8.gg/api"}},contracts:{...j.contracts,l2OutputOracle:{[al]:{address:"0xB09DC08428C8b4EFB4ff9C0827386CDF34277996"}},portal:{[al]:{address:"0x639F2AECE398Aa76b07e59eF6abe2cFe32bacb68",blockCreated:19070571}},l1StandardBridge:{[al]:{address:"0xd5e3eDf5b68135D559D572E26bF863FBC1950033",blockCreated:19070571}}},sourceId:al}),ol=11155111,M7=f({...j,id:28122024,name:"Ancient8 Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpcv2-testnet.ancient8.gg"]}},blockExplorers:{default:{name:"Ancient8 Celestia Testnet explorer",url:"https://scanv2-testnet.ancient8.gg",apiUrl:"https://scanv2-testnet.ancient8.gg/api"}},contracts:{...j.contracts,l2OutputOracle:{[ol]:{address:"0x942fD5017c0F60575930D8574Eaca13BEcD6e1bB"}},portal:{[ol]:{address:"0xfa1d9E26A6aCD7b22115D27572c1221B9803c960",blockCreated:4972908}},l1StandardBridge:{[ol]:{address:"0xF6Bc0146d3c74D48306e79Ae134A260E418C9335",blockCreated:4972908}}},sourceId:ol}),_7=f({id:31337,name:"Anvil",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}}),U7=f({id:33139,name:"ApeChain",nativeCurrency:{name:"ApeCoin",symbol:"APE",decimals:18},rpcUrls:{default:{http:["https://rpc.apechain.com/http"],webSocket:["wss://rpc.apechain.com/ws"]}},blockExplorers:{default:{name:"Apescan",url:"https://apescan.io",apiUrl:"https://api.apescan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:20889}},sourceId:42161}),D7=f({id:3993,name:"APEX Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.apexlayer.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp-testnet.apexlayer.xyz",apiUrl:"https://exp-testnet.apexlayer.xyz/api"}},contracts:{multicall3:{address:"0xf7642be33a6b18D16a995657adb5a68CD0438aE2",blockCreated:283775}},testnet:!0}),F7=f({id:62606,name:"Apollo",nativeCurrency:{decimals:18,name:"Apollo",symbol:"APOLLO"},rpcUrls:{default:{http:["https://mainnet-rpc.apolloscan.io"]}},blockExplorers:{default:{name:"Apollo Explorer",url:"https://apolloscan.io"}}}),N7=f({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:250,rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),z7=f({id:421613,name:"Arbitrum Goerli",nativeCurrency:{name:"Arbitrum Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://goerli.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:88114}},testnet:!0}),L7=f({id:42170,name:"Arbitrum Nova",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://nova.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://nova.arbiscan.io",apiUrl:"https://api-nova.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1746963}}}),R7=f({id:421614,name:"Arbitrum Sepolia",blockTime:250,nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://sepolia.arbiscan.io",apiUrl:"https://api-sepolia.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:81930}},testnet:!0}),H7=f({id:5042002,name:"Arc Testnet",nativeCurrency:{name:"USDC",symbol:"USDC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.arc.network","https://rpc.quicknode.testnet.arc.network","https://rpc.blockdaemon.testnet.arc.network"],webSocket:["wss://rpc.testnet.arc.network","wss://rpc.quicknode.testnet.arc.network"]}},blockExplorers:{default:{name:"ArcScan",url:"https://testnet.arcscan.app",apiUrl:"https://testnet.arcscan.app/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!0}),$7=f({id:7897,name:"Arena-Z",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.arena-z.gg"]}},blockExplorers:{default:{name:"Arena-Z Explorer",url:"https://explorer.arena-z.gg",apiUrl:"https://explorer.arena-z.gg"}}}),G7=f({id:463,name:"Areon Network",nativeCurrency:{decimals:18,name:"AREA",symbol:"AREA"},rpcUrls:{default:{http:["https://mainnet-rpc.areon.network"],webSocket:["wss://mainnet-ws.areon.network"]}},blockExplorers:{default:{name:"Areonscan",url:"https://areonscan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:353286}},testnet:!1}),j7=f({id:462,name:"Areon Network Testnet",nativeCurrency:{decimals:18,name:"TAREA",symbol:"TAREA"},rpcUrls:{default:{http:["https://testnet-rpc.areon.network"],webSocket:["wss://testnet-ws.areon.network"]}},blockExplorers:{default:{name:"Areonscan",url:"https://areonscan.com"}},testnet:!0}),V7=f({id:463,name:"Areum",nativeCurrency:{decimals:18,name:"AREA",symbol:"AREA"},rpcUrls:{default:{http:["https://mainnet-rpc.areum.network"],webSocket:["wss://mainnet-ws.areum.network"]}},blockExplorers:{default:{name:"Areum Explorer",url:"https://explorer.areum.network"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:353286}},testnet:!1}),W7=f({id:11822,name:"Artela Testnet",nativeCurrency:{name:"ART",symbol:"ART",decimals:18},rpcUrls:{default:{http:["https://betanet-rpc1.artela.network"]}},blockExplorers:{default:{name:"Artela",url:"https://betanet-scan.artela.network",apiUrl:"https://betanet-scan.artela.network/api"}},contracts:{multicall3:{address:"0xd07c8635f76e8745Ee7092fbb6e8fbc5FeF09DD7",blockCreated:7001871}},testnet:!0}),q7=f({id:10242,name:"Arthera",nativeCurrency:{name:"Arthera",symbol:"AA",decimals:18},rpcUrls:{default:{http:["https://rpc.arthera.net"]}},blockExplorers:{default:{name:"Arthera EVM Explorer",url:"https://explorer.arthera.net",apiUrl:"https://explorer.arthera.net/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4502791}}}),Y7=f({id:10243,name:"Arthera Testnet",nativeCurrency:{name:"Arthera",symbol:"AA",decimals:18},rpcUrls:{default:{http:["https://rpc-test.arthera.net"]}},blockExplorers:{default:{name:"Arthera EVM Explorer",url:"https://explorer-test.arthera.net",apiUrl:"https://explorer-test.arthera.net/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:22051}}}),K7=f({id:42420,name:"AssetChain Mainnet",nativeCurrency:{decimals:18,name:"Real World Asset",symbol:"RWA"},rpcUrls:{default:{http:["https://mainnet-rpc.assetchain.org"]}},blockExplorers:{default:{name:"Asset Chain Explorer",url:"https://scan.assetchain.org",apiUrl:"https://scan.assetchain.org/api"}},testnet:!1,contracts:{}}),Z7=f({id:42421,name:"AssetChain Testnet",nativeCurrency:{decimals:18,name:"Real World Asset",symbol:"RWA"},rpcUrls:{default:{http:["https://enugu-rpc.assetchain.org"]}},blockExplorers:{default:{name:"Asset Chain Testnet Explorer",url:"https://scan-testnet.assetchain.org",apiUrl:"https://scan-testnet.assetchain.org/api"}},testnet:!0,contracts:{multicall3:{address:"0x989F832D35988cb5e3eB001Fa2Fe789469EC31Ea",blockCreated:17177}}}),X7=f({id:592,name:"Astar",network:"astar-mainnet",nativeCurrency:{name:"Astar",symbol:"ASTR",decimals:18},rpcUrls:{default:{http:["https://astar.api.onfinality.io/public"]}},blockExplorers:{default:{name:"Astar Subscan",url:"https://astar.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:761794}},testnet:!1}),Q7=f({id:3776,name:"Astar zkEVM",network:"AstarZkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-zkevm.astar.network"]}},blockExplorers:{default:{name:"Astar zkEVM Explorer",url:"https://astar-zkevm.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:93528}},testnet:!1}),J7=f({id:6038361,name:"Astar zkEVM Testnet zKyoto",network:"zKyoto",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.startale.com/zkyoto"]}},blockExplorers:{default:{name:"zKyoto Explorer",url:"https://zkyoto.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:196153}},testnet:!0}),eT=f({id:2340,name:"Atleta Olympia",nativeCurrency:{decimals:18,name:"Atla",symbol:"ATLA"},rpcUrls:{default:{http:["https://testnet-rpc.atleta.network:9944","https://testnet-rpc.atleta.network"],ws:["wss://testnet-rpc.atleta.network:9944"]}},blockExplorers:{default:{name:"Atleta Olympia Explorer",url:"https://blockscout.atleta.network",apiUrl:"https://blockscout.atleta.network/api"}},contracts:{multicall3:{address:"0x1472ec6392180fb84F345d2455bCC75B26577115",blockCreated:1076473}},testnet:!0}),tT=f({id:1313161554,name:"Aurora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.aurora.dev"]}},blockExplorers:{default:{name:"Aurorascan",url:"https://aurorascan.dev",apiUrl:"https://aurorascan.dev/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:62907816}}}),rT=f({id:1313161555,name:"Aurora Testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.aurora.dev"]}},blockExplorers:{default:{name:"Aurorascan",url:"https://testnet.aurorascan.dev",apiUrl:"https://testnet.aurorascan.dev/api"}},testnet:!0}),nT=f({id:205205,name:"Auroria Testnet",network:"auroria",nativeCurrency:{name:"Auroria Stratis",symbol:"tSTRAX",decimals:18},rpcUrls:{default:{http:["https://auroria.rpc.stratisevm.com"]}},blockExplorers:{default:{name:"Auroria Testnet Explorer",url:"https://auroria.explorer.stratisevm.com"}},testnet:!0}),sT=f({id:785,name:"Autheo Testnet",nativeCurrency:{decimals:18,name:"Autheo",symbol:"THEO"},rpcUrls:{default:{http:["https://testnet-rpc1.autheo.com","https://testnet-rpc2.autheo.com"]}},blockExplorers:{default:{name:"Autheo Testnet Block Explorer",url:"https://testnet-explorer.autheo.com/"}}}),aT=f({id:43114,name:"Avalanche",blockTime:1700,nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://snowtrace.io",apiUrl:"https://api.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),oT=f({id:43113,name:"Avalanche Fuji",nativeCurrency:{decimals:18,name:"Avalanche Fuji",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax-test.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://testnet.snowtrace.io",apiUrl:"https://api-testnet.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7096959}},testnet:!0}),iT=f({id:8333,name:"B3",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.b3.fun/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.b3.fun"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}},sourceId:8453}),cT=f({id:1993,name:"B3 Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.b3.fun/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia.explorer.b3.fun"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}},testnet:!0,sourceId:168587773}),lT=f({id:5165,network:"bahamut",name:"Bahamut",nativeCurrency:{name:"Fasttoken",symbol:"FTN",decimals:18},rpcUrls:{default:{http:["https://rpc1.bahamut.io","https://bahamut-rpc.publicnode.com","https://rpc2.bahamut.io"],webSocket:["wss://ws1.sahara.bahamutchain.com","wss://bahamut-rpc.publicnode.com","wss://ws2.sahara.bahamutchain.com"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://www.ftnscan.com",apiUrl:"https://www.ftnscan.com/api"}}}),ui=1,by=f({...j,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:{...j.contracts,disputeGameFactory:{[ui]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[ui]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[ui]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[ui]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:ui}),uT=f({...by,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://mainnet-preconf.base.org"]}}}),dT=f({id:123420001114,name:"Basecamp Testnet",nativeCurrency:{decimals:18,name:"Camp",symbol:"CAMP"},rpcUrls:{default:{http:["https://rpc.basecamp.t.raas.gelato.cloud"]}},blockExplorers:{default:{name:"basecamp",url:"https://basecamp.cloud.blockscout.com"}},testnet:!0}),il=5,fT=f({...j,id:84531,name:"Base Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://goerli.basescan.org",apiUrl:"https://goerli.basescan.org/api"}},contracts:{...j.contracts,l2OutputOracle:{[il]:{address:"0x2A35891ff30313CcFa6CE88dcf3858bb075A2298"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1376988},portal:{[il]:{address:"0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA"}},l1StandardBridge:{[il]:{address:"0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a"}}},testnet:!0,sourceId:il}),di=11155111,yy=f({...j,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:{...j.contracts,disputeGameFactory:{[di]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[di]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[di]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[di]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:di}),pT=f({...yy,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-preconf.base.org"]}}}),hT=f({id:4337,name:"Beam",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{default:{http:["https://build.onbeam.com/rpc"],webSocket:["wss://build.onbeam.com/ws"]}},blockExplorers:{default:{name:"Beam Explorer",url:"https://subnets.avax.network/beam"}},contracts:{multicall3:{address:"0x4956f15efdc3dc16645e90cc356eafa65ffc65ec",blockCreated:1}}}),mT=f({id:13337,name:"Beam Testnet",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{default:{http:["https://build.onbeam.com/rpc/testnet"],webSocket:["wss://build.onbeam.com/ws/testnet"]}},blockExplorers:{default:{name:"Beam Explorer",url:"https://subnets-test.avax.network/beam"}},contracts:{multicall3:{address:"0x9bf49b704ee2a095b95c1f2d4eb9010510c41c9e",blockCreated:3}},testnet:!0}),bT=f({id:641230,name:"Bear Network Chain Mainnet",nativeCurrency:{decimals:18,name:"BearNetworkChain",symbol:"BRNKC"},rpcUrls:{default:{http:["https://brnkc-mainnet.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkScan",url:"https://brnkscan.bearnetwork.net",apiUrl:"https://brnkscan.bearnetwork.net/api"}}}),yT=f({id:751230,name:"Bear Network Chain Testnet",nativeCurrency:{decimals:18,name:"tBRNKC",symbol:"tBRNKC"},rpcUrls:{default:{http:["https://brnkc-test.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkTestScan",url:"https://brnktest-scan.bearnetwork.net",apiUrl:"https://brnktest-scan.bearnetwork.net/api"}},testnet:!0}),gT=f({id:80094,name:"Berachain",blockTime:2e3,nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},ensRegistry:{address:"0x5b22280886a2f5e09a49bea7e320eab0e5320e28",blockCreated:877007},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:9310021}},rpcUrls:{default:{http:["https://rpc.berachain.com"]}},blockExplorers:{default:{name:"Berascan",url:"https://berascan.com"}},ensTlds:[".bera"],testnet:!1}),xT=f({id:80069,blockTime:2e3,name:"Berachain Bepolia",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},rpcUrls:{default:{http:["https://bepolia.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berascan",url:"https://bepolia.beratrail.io"}},testnet:!0}),wT=f({id:80085,name:"Berachain Artio",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},rpcUrls:{default:{http:["https://artio.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berachain",url:"https://artio.beratrail.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:866924}},testnet:!0}),vT=f({id:80084,name:"Berachain bArtio",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:109269},ensRegistry:{address:"0xB0eef18971290b333450586D33dcA6cE122651D2",blockCreated:7736794},ensUniversalResolver:{address:"0x41692Ef1EA0C79E6b73077E4A67572D2BDbD7057",blockCreated:7736795}},ensTlds:[".bera"],rpcUrls:{default:{http:["https://bartio.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berachain bArtio Beratrail",url:"https://bartio.beratrail.io"}},testnet:!0}),kT=f({id:11501,name:"BEVM Mainnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet-1.bevm.io"]}},blockExplorers:{default:{name:"Bevmscan",url:"https://scan-mainnet.bevm.io",apiUrl:"https://scan-mainnet-api.bevm.io/api"}}}),ET=f({id:3068,name:"Bifrost Mainnet",nativeCurrency:{name:"BFC",symbol:"BFC",decimals:18},rpcUrls:{default:{http:["https://public-01.mainnet.bifrostnetwork.com/rpc"]}},blockExplorers:{default:{name:"Bifrost Blockscout",url:"https://explorer.mainnet.bifrostnetwork.com"}},testnet:!1}),CT=f({id:53456,name:"BirdLayer",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.birdlayer.xyz","https://rpc1.birdlayer.xyz"],webSocket:["wss://rpc.birdlayer.xyz/ws"]}},blockExplorers:{default:{name:"BirdLayer Explorer",url:"https://scan.birdlayer.xyz"}}}),TT=f({id:32520,name:"Bitgert Mainnet",nativeCurrency:{decimals:18,name:"Brise",symbol:"Brise"},rpcUrls:{default:{http:["https://rpc-bitgert.icecreamswap.com"]}},blockExplorers:{default:{name:"Bitgert Scan",url:"https://brisescan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2118034}},testnet:!1}),ST=f({id:96,name:"KUB Mainnet",nativeCurrency:{name:"KUB Coin",symbol:"KUB",decimals:18},rpcUrls:{default:{http:["https://rpc.bitkubchain.io"]}},blockExplorers:{default:{name:"KUB Chain Mainnet Explorer",url:"https://www.bkcscan.com",apiUrl:"https://www.bkcscan.com/api"}}}),AT=f({id:25925,name:"Bitkub Testnet",network:"Bitkub Testnet",nativeCurrency:{name:"Bitkub Test",symbol:"tKUB",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.bitkubchain.io"]}},blockExplorers:{default:{name:"Bitkub Chain Testnet Explorer",url:"https://testnet.bkcscan.com",apiUrl:"https://testnet.bkcscan.com/api"}},testnet:!0}),PT=f({id:200901,name:"Bitlayer Mainnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bitlayer.org"],webSocket:["wss://ws.bitlayer.org"]}},blockExplorers:{default:{name:"bitlayer mainnet scan",url:"https://www.btrscan.com"}},contracts:{multicall3:{address:"0x5B256fE9e993902eCe49D138a5b1162cBb529474",blockCreated:2421963}}}),IT=f({id:200810,name:"Bitlayer Testnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bitlayer.org"],webSocket:["wss://testnet-ws.bitlayer.org"]}},blockExplorers:{default:{name:"bitlayer testnet scan",url:"https://testnet.btrscan.com"}},contracts:{multicall3:{address:"0x5B256fE9e993902eCe49D138a5b1162cBb529474",blockCreated:4135671}},testnet:!0}),OT=f({id:7171,name:"Bitrock Mainnet",nativeCurrency:{name:"BROCK",symbol:"BROCK",decimals:18},rpcUrls:{default:{http:["https://brockrpc.io"]}},blockExplorers:{default:{name:"Bitrock Explorer",url:"https://explorer.bit-rock.io"}},testnet:!1}),BT=f({id:199,name:"BitTorrent",network:"bittorrent-chain-mainnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://rpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://bttcscan.com",apiUrl:"https://api.bttcscan.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:31078552}}}),MT=f({id:1028,name:"BitTorrent Chain Testnet",network:"bittorrent-chain-testnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://testrpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://testnet.bttcscan.com",apiUrl:"https://testnet.bttcscan.com/api"}},testnet:!0}),cl=1,_T=f({...j,id:81457,name:"Blast",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.blast.io"]}},blockExplorers:{default:{name:"Blastscan",url:"https://blastscan.io",apiUrl:"https://api.blastscan.io/api"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:212929},l2OutputOracle:{[cl]:{address:"0x826D1B0D4111Ad9146Eb8941D7Ca2B6a44215c76",blockCreated:19300358}},portal:{[cl]:{address:"0x0Ec68c5B10F21EFFb74f2A5C61DFe6b08C0Db6Cb",blockCreated:19300357}},l1StandardBridge:{[cl]:{address:"0x697402166Fbf2F22E970df8a6486Ef171dbfc524",blockCreated:19300360}}},sourceId:cl}),UT=f({id:168587773,name:"Blast Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.blast.io"]}},blockExplorers:{default:{name:"Blastscan",url:"https://sepolia.blastscan.io",apiUrl:"https://api-sepolia.blastscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:756690}},testnet:!0,sourceId:11155111}),qf=1,DT=f({...j,id:60808,name:"BOB",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.gobob.xyz"],webSocket:["wss://rpc.gobob.xyz"]}},blockExplorers:{default:{name:"BOB Explorer",url:"https://explorer.gobob.xyz"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:23131},l2OutputOracle:{[qf]:{address:"0xdDa53E23f8a32640b04D7256e651C1db98dB11C1",blockCreated:4462615}},portal:{[qf]:{address:"0x8AdeE124447435fE03e3CD24dF3f4cAE32E65a3E",blockCreated:4462615}}},sourceId:qf}),FT=f({id:288,name:"Boba Network",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.boba.network"]}},blockExplorers:{default:{name:"BOBAScan",url:"https://bobascan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:446859}}}),NT=f({id:28882,name:"Boba Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.boba.network"]}},blockExplorers:{default:{name:"BOBAScan",url:"https://testnet.bobascan.com"}},testnet:!0}),Yf=11155111,zT=f({...j,id:808813,name:"BOB Sepolia",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://bob-sepolia.rpc.gobob.xyz"],webSocket:["wss://bob-sepolia.rpc.gobob.xyz"]}},blockExplorers:{default:{name:"BOB Sepolia Explorer",url:"https://bob-sepolia.explorer.gobob.xyz"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:35677},l2OutputOracle:{[Yf]:{address:"0x14D0069452b4AE2b250B395b8adAb771E4267d2f",blockCreated:4462615}},portal:{[Yf]:{address:"0x867B1Aa872b9C8cB5E9F7755feDC45BB24Ad0ae4",blockCreated:4462615}}},testnet:!0,sourceId:Yf}),LT=f({id:11100,name:"Bool Beta Mainnet",nativeCurrency:{decimals:18,name:"BOL",symbol:"BOL"},rpcUrls:{default:{http:["https://beta-rpc-node-http.bool.network"]}},blockExplorers:{default:{name:"BoolScan",url:"https://beta-mainnet.boolscan.com/"}},testnet:!1}),RT=f({id:3637,name:"Botanix",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.botanixlabs.com"],webSocket:["wss://rpc.botanixlabs.com/ws"]}},blockExplorers:{default:{name:"Botanixscan",url:"https://botanixscan.io"}}}),HT=f({id:3636,name:"Botanix Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://node.botanixlabs.dev"]}},blockExplorers:{default:{name:"Botanix Testnet Explorer",url:"https://testnet.botanixscan.io"}},testnet:!0}),$T=f({id:6001,name:"BounceBit Mainnet",nativeCurrency:{name:"BounceBit",symbol:"BB",decimals:18},rpcUrls:{default:{http:["https://fullnode-mainnet.bouncebitapi.com"]}},blockExplorers:{default:{name:"BB Scan",url:"https://bbscan.io"}},testnet:!1}),GT=f({id:6e3,name:"BounceBit Testnet",nativeCurrency:{name:"BounceBit",symbol:"BB",decimals:18},rpcUrls:{default:{http:["https://fullnode-testnet.bouncebitapi.com"]}},blockExplorers:{default:{name:"BB Scan",url:"https://testnet.bbscan.io"}},testnet:!0}),jT=f({id:1039,name:"Bronos",nativeCurrency:{decimals:18,name:"BRO",symbol:"BRO"},rpcUrls:{default:{http:["https://evm.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://broscan.bronos.org"}}}),VT=f({id:1038,name:"Bronos Testnet",nativeCurrency:{decimals:18,name:"Bronos Coin",symbol:"tBRO"},rpcUrls:{default:{http:["https://evm-testnet.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://tbroscan.bronos.org"}},testnet:!0}),WT=f({id:56,name:"BNB Smart Chain",blockTime:750,nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://56.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}}),qT=f({id:1017,name:"BNB Greenfield Chain",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://greenfield-chain.bnbchain.org"]}},blockExplorers:{default:{name:"BNB Greenfield Mainnet Scan",url:"https://greenfieldscan.com"}},testnet:!1}),YT=f({id:97,name:"BNB Smart Chain Testnet",nativeCurrency:{decimals:18,name:"BNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]}},blockExplorers:{default:{name:"BscScan",url:"https://testnet.bscscan.com",apiUrl:"https://api-testnet.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:17422483}},testnet:!0}),KT=f({id:223,name:"B2",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bsquared.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.bsquared.network"}}}),ZT=f({id:1123,name:"B2 Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bsquared.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://testnet-explorer.bsquared.network"}},testnet:!0}),XT=f({id:200901,name:"Bitlayer",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bitlayer.org","https://rpc.bitlayer-rpc.com"],webSocket:["wss://ws.bitlayer.org","wss://ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"Bitlayer(BTR) Scan",url:"https://www.btrscan.com"}}}),QT=f({id:200810,name:"Bitlayer Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bitlayer.org"],webSocket:["wss://testnet-ws.bitlayer.org","wss://testnet-ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"Bitlayer(BTR) Scan",url:"https://testnet.btrscan.com"}},testnet:!0}),JT=f({id:4999,name:"BlackFort Exchange Network",nativeCurrency:{name:"BlackFort Token",symbol:"BXN",decimals:18},rpcUrls:{default:{http:["https://mainnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.blackfort.network",apiUrl:"https://explorer.blackfort.network/api"}}}),e9=f({id:4777,name:"BlackFort Exchange Network Testnet",nativeCurrency:{name:"BlackFort Testnet Token",symbol:"TBXN",decimals:18},rpcUrls:{default:{http:["https://testnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.blackfort.network",apiUrl:"https://testnet-explorer.blackfort.network/api"}},testnet:!0}),t9=f({id:13370,name:"Cannon",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),r9=f({id:7700,name:"Canto",nativeCurrency:{decimals:18,name:"Canto",symbol:"CANTO"},rpcUrls:{default:{http:["https://canto.gravitychain.io"]}},blockExplorers:{default:{name:"Tuber.Build (Blockscout)",url:"https://tuber.build"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2905789}}}),n9={estimateFeesPerGas:async e=>{var s;if(!((s=e.request)!=null&&s.feeCurrency))return null;const[t,r]=await Promise.all([s9(e.client,e.request.feeCurrency),a9(e.client,e.request.feeCurrency)]);return{maxFeePerGas:e.multiply(t-r)+r,maxPriorityFeePerGas:r}}};async function s9(e,t){const r=await e.request({method:"eth_gasPrice",params:[t]});return BigInt(r)}async function a9(e,t){const r=await e.request({method:"eth_maxPriorityFeePerGas",params:[t]});return BigInt(r)}function gy(e){return e===0||e===0n||e===void 0||e===null||e==="0"||e===""||typeof e=="string"&&($t(e).toLowerCase()==="0x"||$t(e).toLowerCase()==="0x00")}function fi(e){return!gy(e)}function o9(e){return typeof e.maxFeePerGas<"u"&&typeof e.maxPriorityFeePerGas<"u"}function xy(e){return e.type==="cip64"?!0:o9(e)&&fi(e.feeCurrency)}const i9={block:xd({format(e){var r;return{transactions:(r=e.transactions)==null?void 0:r.map(n=>typeof n=="string"?n:{...Is(n),...n.gatewayFee?{gatewayFee:Ne(n.gatewayFee),gatewayFeeRecipient:n.gatewayFeeRecipient}:{},feeCurrency:n.feeCurrency})}}}),transaction:Ac({format(e){if(e.type==="0x7e")return{isSystemTx:e.isSystemTx,mint:e.mint?Ne(e.mint):void 0,sourceHash:e.sourceHash,type:"deposit"};const t={feeCurrency:e.feeCurrency};return e.type==="0x7b"?t.type="cip64":(e.type==="0x7c"&&(t.type="cip42"),t.gatewayFee=e.gatewayFee?Ne(e.gatewayFee):null,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}}),transactionRequest:md({format(e){const t={};return e.feeCurrency&&(t.feeCurrency=e.feeCurrency),xy(e)&&(t.type="0x7b"),t}})};function c9(e,t){return xy(e)?u9(e,t):my(e,t)}const l9={transaction:c9};function u9(e,t){f9(e);const{chainId:r,gas:n,nonce:s,to:a,value:o,maxFeePerGas:i,maxPriorityFeePerGas:c,accessList:l,feeCurrency:u,data:d}=e,p=[Be(r),s?Be(s):"0x",c?Be(c):"0x",i?Be(i):"0x",n?Be(n):"0x",a??"0x",o?Be(o):"0x",d??"0x",ai(l),u,...Ma(e,t)];return rr(["0x7b",Gr(p)])}const d9=Ps;function f9(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:a,feeCurrency:o}=e;if(t<=0)throw new Ia({chainId:t});if(a&&!rt(a))throw new xt({address:a});if(n)throw new $("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(fi(s)&&s>d9)throw new Gn({maxFeePerGas:s});if(fi(r)&&fi(s)&&r>s)throw new Ca({maxFeePerGas:s,maxPriorityFeePerGas:r});if(fi(o)&&!rt(o))throw new $("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(gy(o))throw new $("`feeCurrency` must be provided for CIP-64 transactions.")}const pi={blockTime:1e3,contracts:hy,formatters:i9,serializers:l9,fees:n9},p9=f({...pi,id:42220,name:"Celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://celoscan.io",apiUrl:"https://api.celoscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13112599}},testnet:!1}),ll=17e3,h9=f({...pi,id:44787,name:"Alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"A-CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Alfajores Explorer",url:"https://celo-alfajores.blockscout.com",apiUrl:"https://celo-alfajores.blockscout.com/api"}},contracts:{...pi.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:14569001},portal:{[ll]:{address:"0x82527353927d8D069b3B452904c942dA149BA381",blockCreated:2411324}},disputeGameFactory:{[ll]:{address:"0xE28AAdcd9883746c0e5068F58f9ea06027b214cb",blockCreated:2411324}},l2OutputOracle:{[ll]:{address:"0x4a2635e9e4f6e45817b1D402ac4904c1d1752438",blockCreated:2411324}},l1StandardBridge:{[ll]:{address:"0xD1B0E0581973c9eB7f886967A606b9441A897037",blockCreated:2411324}}},testnet:!0}),Kf=11155111,m9=f({...pi,id:11142220,name:"Celo Sepolia Testnet",nativeCurrency:{decimals:18,name:"CELO",symbol:"S-CELO"},rpcUrls:{default:{http:["https://forno.celo-sepolia.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Sepolia Explorer",url:"https://celo-sepolia.blockscout.com/",apiUrl:"https://celo-sepolia.blockscout.com/api"}},contracts:{...pi.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1},portal:{[Kf]:{address:"0x44ae3d41a335a7d05eb533029917aad35662dcc2",blockCreated:8825790}},disputeGameFactory:{[Kf]:{address:"0x57c45d82d1a995f1e135b8d7edc0a6bb5211cfaa",blockCreated:8825790}},l1StandardBridge:{[Kf]:{address:"0xec18a3c30131a0db4246e785355fbc16e2eaf408",blockCreated:8825790}}},testnet:!0}),b9=f({id:5858,name:"Chang Chain Foundation Mainnet",nativeCurrency:{decimals:18,name:"CTH",symbol:"CTH"},rpcUrls:{default:{http:["https://rpc.cthscan.com"]}},blockExplorers:{default:{name:"Chang Chain explorer",url:"https://cthscan.com"}}}),y9=f({id:88888,name:"Chiliz Chain",network:"chiliz-chain",nativeCurrency:{decimals:18,name:"CHZ",symbol:"CHZ"},rpcUrls:{default:{http:["https://rpc.chiliz.com"]}},blockExplorers:{default:{name:"Chiliz Explorer",url:"https://scan.chiliz.com",apiUrl:"https://scan.chiliz.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:8080847}}}),g9=f({id:2882,name:"Chips Network",network:"CHIPS",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://node.chips.ooo/wasp/api/v1/chains/iota1pp3d3mnap3ufmgqnjsnw344sqmf5svjh26y2khnmc89sv6788y3r207a8fn/evm"]}}}),x9=f({id:5115,name:"Citrea Testnet",nativeCurrency:{name:"cBTC",symbol:"cBTC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.citrea.xyz"]}},blockExplorers:{default:{name:"Citrea Explorer",url:"https://explorer.testnet.citrea.xyz",apiUrl:"https://explorer.testnet.citrea.xyz/api"}},testnet:!0}),w9=f({id:61,name:"Ethereum Classic",nativeCurrency:{decimals:18,name:"ETC",symbol:"ETC"},rpcUrls:{default:{http:["https://etc.rivet.link"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.com/etc/mainnet"}}}),v9=f({id:112,name:"Coinbit Mainnet",nativeCurrency:{name:"GIDR",symbol:"GIDR",decimals:18},rpcUrls:{default:{http:["https://coinbit-rpc-mainnet.chain.sbcrypto.app"]}},blockExplorers:{default:{name:"Coinbit Explorer",url:"https://coinbit-explorer.chain.sbcrypto.app"}},testnet:!1}),k9=f({id:52,name:"CoinEx Mainnet",nativeCurrency:{name:"cet",symbol:"cet",decimals:18},rpcUrls:{default:{http:["https://rpc.coinex.net"]}},blockExplorers:{default:{name:"CoinEx Explorer",url:"https://www.coinex.net"}},testnet:!1}),E9=f({id:1030,name:"Conflux eSpace",nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evm.confluxrpc.com"],webSocket:["wss://evm.confluxrpc.com/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evm.confluxscan.org"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:68602935}}}),C9=f({id:71,name:"Conflux eSpace Testnet",network:"cfx-espace-testnet",testnet:!0,nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evmtestnet.confluxrpc.com"],webSocket:["wss://evmtestnet.confluxrpc.com/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evmtestnet.confluxscan.org"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:117499050}}}),T9=f({id:1116,name:"Core Dao",nativeCurrency:{decimals:18,name:"Core",symbol:"CORE"},rpcUrls:{default:{http:["https://rpc.coredao.org"]}},blockExplorers:{default:{name:"CoreDao",url:"https://scan.coredao.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:11907934}},testnet:!1}),S9=f({id:1115,name:"Core Testnet",nativeCurrency:{decimals:18,name:"tCore",symbol:"TCORE"},rpcUrls:{default:{http:["https://rpc.test.btcs.network"]}},blockExplorers:{default:{name:"Core Testnet",url:"https://scan.test.btcs.network",apiUrl:"https://api.test.btcs.network/api"}},contracts:{multicall3:{address:"0xCcddF20A1932537123C2E48Bd8e00b108B8f7569",blockCreated:29350509}},testnet:!0}),A9=f({id:1114,name:"Core Testnet2",nativeCurrency:{decimals:18,name:"tCore2",symbol:"TCORE2"},rpcUrls:{default:{http:["https://rpc.test2.btcs.network"]}},blockExplorers:{default:{name:"Core Testnet2",url:"https://scan.test2.btcs.network",apiUrl:"https://api.test2.btcs.network/api"}},contracts:{multicall3:{address:"0x3CB285ff3Cd5C7C7e570b1E7DE3De17A0f985e56",blockCreated:3838600}},testnet:!0}),P9=f({id:21e6,name:"Corn",nativeCurrency:{decimals:18,name:"Bitcorn",symbol:"BTCN"},rpcUrls:{default:{http:["https://21000000.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Corn Explorer",url:"https://cornscan.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/21000000/etherscan/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3228}},sourceId:1}),I9=f({id:21000001,name:"Corn Testnet",nativeCurrency:{decimals:18,name:"Bitcorn",symbol:"BTCN"},rpcUrls:{default:{http:["https://21000001.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Corn Testnet Explorer",url:"https://testnet.cornscan.io",apiUrl:"https://api.routescan.io/v2/network/testnet/evm/21000001/etherscan/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4886}},testnet:!0,sourceId:11155111}),O9=f({id:44,name:"Crab Network",nativeCurrency:{decimals:18,name:"Crab Network Native Token",symbol:"CRAB"},rpcUrls:{default:{http:["https://crab-rpc.darwinia.network"],webSocket:["wss://crab-rpc.darwinia.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://crab-scan.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3032593}}}),B9=f({id:66665,name:"Creator",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.creatorchain.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.creatorchain.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!0}),M9=f({id:102032,name:"Creditcoin Devnet",nativeCurrency:{name:"Devnet CTC",symbol:"devCTC",decimals:18},rpcUrls:{default:{http:["https://rpc.cc3-devnet.creditcoin.network"],webSocket:["wss://rpc.cc3-devnet.creditcoin.network/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://creditcoin-devnet.blockscout.com",apiUrl:"https://creditcoin3-dev.subscan.io"}},testnet:!0}),_9=f({id:102030,name:"Creditcoin",nativeCurrency:{name:"Creditcoin",symbol:"CTC",decimals:18},rpcUrls:{default:{http:["https://mainnet3.creditcoin.network"],webSocket:["wss://mainnet3.creditcoin.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://creditcoin.blockscout.com",apiUrl:"https://creditcoin.blockscout.com/api"}},testnet:!1}),U9=f({id:102031,name:"Creditcoin Testnet",nativeCurrency:{name:"Creditcoin Testnet",symbol:"tCTC",decimals:18},rpcUrls:{default:{http:["https://rpc.cc3-testnet.creditcoin.network"],webSocket:["wss://rpc.cc3-testnet.creditcoin.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://creditcoin-testnet.blockscout.com",apiUrl:"https://creditcoin-testnet.blockscout.com/api"}},testnet:!0}),D9=f({id:25,name:"Cronos Mainnet",nativeCurrency:{decimals:18,name:"Cronos",symbol:"CRO"},rpcUrls:{default:{http:["https://evm.cronos.org"]}},blockExplorers:{default:{name:"Cronos Explorer",url:"https://explorer.cronos.org",apiUrl:"https://explorer-api.cronos.org/mainnet/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1963112}}}),F9=f({id:338,name:"Cronos Testnet",nativeCurrency:{decimals:18,name:"CRO",symbol:"tCRO"},rpcUrls:{default:{http:["https://evm-t3.cronos.org"]}},blockExplorers:{default:{name:"Cronos Explorer (Testnet)",url:"https://explorer.cronos.org/testnet"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:10191251}},testnet:!0}),N9=f({id:388,name:"Cronos zkEVM Mainnet",nativeCurrency:{decimals:18,name:"Cronos zkEVM CRO",symbol:"zkCRO"},rpcUrls:{default:{http:["https://mainnet.zkevm.cronos.org"]}},blockExplorers:{default:{name:"Cronos zkEVM (Mainnet) Chain Explorer",url:"https://explorer.zkevm.cronos.org"}},contracts:{multicall3:{address:"0x06f4487d7c4a5983d2660db965cc6d2565e4cfaa",blockCreated:72}}}),z9=f({id:282,name:"Cronos zkEVM Testnet",nativeCurrency:{decimals:18,name:"Cronos zkEVM Test Coin",symbol:"zkTCRO"},rpcUrls:{default:{http:["https://testnet.zkevm.cronos.org"]}},blockExplorers:{default:{name:"Cronos zkEVM Testnet Explorer",url:"https://explorer.zkevm.cronos.org/testnet"}},testnet:!0}),L9=f({id:3737,name:"Crossbell",nativeCurrency:{decimals:18,name:"CSB",symbol:"CSB"},rpcUrls:{default:{http:["https://rpc.crossbell.io"]}},blockExplorers:{default:{name:"CrossScan",url:"https://scan.crossbell.io",apiUrl:"https://scan.crossbell.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:38246031}}}),R9=f({id:4158,name:"CrossFi Mainnet",nativeCurrency:{decimals:18,name:"CrossFi",symbol:"XFI"},rpcUrls:{default:{http:["https://rpc.mainnet.ms"]}},blockExplorers:{default:{name:"CrossFi Blockchain Explorer",url:"https://xfiscan.com"}},testnet:!1}),H9=f({id:33111,name:"Curtis",nativeCurrency:{name:"ApeCoin",symbol:"APE",decimals:18},rpcUrls:{default:{http:["https://rpc.curtis.apechain.com"]}},blockExplorers:{default:{name:"Curtis Explorer",url:"https://explorer.curtis.apechain.com"}},testnet:!0}),$9=f({id:7560,name:"Cyber",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cyber.alt.technology"]}},blockExplorers:{default:{name:"Blockscout",url:"https://cyberscan.co",apiUrl:"https://cyberscan.co/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),G9=f({id:111557560,name:"Cyber Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cyber-testnet.alt.technology"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet.cyberscan.co",apiUrl:"https://testnet.cyberscan.co/api"}},contracts:{multicall3:{address:"0xffc391F0018269d4758AEA1a144772E8FB99545E",blockCreated:304545}},testnet:!0}),j9=f({id:824,name:"Daily Network Mainnet",nativeCurrency:{decimals:18,name:"Daily",symbol:"DLY"},rpcUrls:{default:{http:["https://rpc.mainnet.dailycrypto.net"]}},blockExplorers:{default:{name:"Daily Mainnet Explorer",url:"https://explorer.mainnet.dailycrypto.net"}},testnet:!1}),V9=f({id:825,name:"Daily Network Testnet",nativeCurrency:{decimals:18,name:"Daily",symbol:"DLY"},rpcUrls:{default:{http:["https://rpc.testnet.dailycrypto.net"]}},blockExplorers:{default:{name:"Daily Testnet Explorer",url:"https://explorer.testnet.dailycrypto.net"}},testnet:!0}),W9=f({id:46,name:"Darwinia Network",nativeCurrency:{decimals:18,name:"RING",symbol:"RING"},rpcUrls:{default:{http:["https://rpc.darwinia.network"],webSocket:["wss://rpc.darwinia.network"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:69420}}}),q9=f({id:55931,name:"Datahaven Testnet",nativeCurrency:{decimals:18,name:"MOCK",symbol:"MOCK"},rpcUrls:{default:{http:["https://services.datahaven-testnet.network/testnet"],webSocket:["wss://services.datahaven-testnet.network/testnet"]}},blockExplorers:{default:{name:"DhScan",url:"https://testnet.dhscan.io/",apiUrl:"https://testnet.dhscan.io/api-docs"}},contracts:{},testnet:!0}),Y9=f({id:20240603,name:"DBK chain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.dbkchain.io"]}},blockExplorers:{default:{name:"DBK Chain Explorer",url:"https://scan.dbkchain.io"}},testnet:!1}),K9=f({...j,id:2716446429837e3,name:"Dchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://dchain-2716446429837000-1.jsonrpc.sagarpc.io"]}},blockExplorers:{default:{name:"Dchain Explorer",url:"https://dchain-2716446429837000-1.sagaexplorer.io",apiUrl:"https://api-dchain-2716446429837000-1.sagaexplorer.io/api"}},contracts:{...j.contracts}}),Z9=f({...j,id:2713017997578e3,name:"Dchain Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://dchaintestnet-2713017997578000-1.jsonrpc.testnet.sagarpc.io"]}},blockExplorers:{default:{name:"Dchain Explorer",url:"https://dchaintestnet-2713017997578000-1.testnet.sagaexplorer.io",apiUrl:"https://api-dchaintestnet-2713017997578000-1.testnet.sagaexplorer.io/api"}},contracts:{...j.contracts}}),X9=f({id:1130,network:"defichain-evm",name:"DeFiChain EVM Mainnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:18},rpcUrls:{default:{http:["https://eth.mainnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:137852}}}),Q9=f({id:1131,network:"defichain-evm-testnet",name:"DeFiChain EVM Testnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:18},rpcUrls:{default:{http:["https://eth.testnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live/?network=TestNet"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:156462}},testnet:!0}),J9=f({id:666666666,name:"Degen",nativeCurrency:{decimals:18,name:"Degen",symbol:"DEGEN"},rpcUrls:{default:{http:["https://rpc.degen.tips"],webSocket:["wss://rpc.degen.tips"]}},blockExplorers:{default:{name:"Degen Chain Explorer",url:"https://explorer.degen.tips",apiUrl:"https://explorer.degen.tips/api/v2"}}}),eS=f({id:53935,name:"DFK Chain",nativeCurrency:{decimals:18,name:"Jewel",symbol:"JEWEL"},rpcUrls:{default:{http:["https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"]}},blockExplorers:{default:{name:"DFKSubnetScan",url:"https://subnets.avax.network/defi-kingdoms"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14790551}}}),tS=f({id:15,name:"Diode Prenet",nativeCurrency:{decimals:18,name:"DIODE",symbol:"DIODE"},rpcUrls:{default:{http:["https://prenet.diode.io:8443"],webSocket:["wss://prenet.diode.io:8443/ws"]}},blockExplorers:{default:{name:"Diode Explorer",url:"https://diode.io/prenet"}},testnet:!1}),rS=f({id:513100,name:"DisChain",nativeCurrency:{decimals:18,name:"DIS",symbol:"DIS"},rpcUrls:{default:{http:["https://rpc.dischain.xyz"]}},blockExplorers:{default:{name:"DisChain Explorer",url:"https://www.oklink.com/dis"}}}),nS=f({id:53457,name:"DODOchain Testnet",nativeCurrency:{decimals:18,name:"DODO",symbol:"DODO"},rpcUrls:{default:{http:["https://dodochain-testnet.alt.technology"],webSocket:["wss://dodochain-testnet.alt.technology/ws"]}},blockExplorers:{default:{name:"DODOchain Testnet (Sepolia) Explorer",url:"https://testnet-scan.dodochain.com"}},testnet:!0}),sS=f({id:2e3,name:"Dogechain",nativeCurrency:{decimals:18,name:"Wrapped Dogecoin",symbol:"WDOGE"},rpcUrls:{default:{http:["https://rpc.dogechain.dog"]}},blockExplorers:{default:{name:"DogeChainExplorer",url:"https://explorer.dogechain.dog",apiUrl:"https://explorer.dogechain.dog/api"}},contracts:{multicall3:{address:"0x68a8609a60a008EFA633dfdec592c03B030cC508",blockCreated:25384031}}}),aS=f({id:97476,name:"Doma Testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc-testnet.doma.xyz"]}},blockExplorers:{default:{name:"Doma Testnet Explorer",url:"https://explorer-testnet.doma.xyz"}},testnet:!0}),oS=f({id:42026,name:"Donatuz",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.donatuz.com"]}},blockExplorers:{default:{name:"Donatuz Explorer",url:"https://explorer.donatuz.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}}}),iS=f({id:7979,name:"DOS Chain",nativeCurrency:{decimals:18,name:"DOS Chain",symbol:"DOS"},rpcUrls:{default:{http:["https://main.doschain.com"]}},blockExplorers:{default:{name:"DOS Chain Explorer",url:"https://doscan.io",apiUrl:"https://api.doscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:161908}}}),cS=f({id:3939,name:"DOS Chain Testnet",nativeCurrency:{decimals:18,name:"DOS Chain Testnet",symbol:"DOS"},rpcUrls:{default:{http:["https://test.doschain.com"]}},blockExplorers:{default:{name:"DOS Chain Testnet Explorer",url:"https://test.doscan.io",apiUrl:"https://api-test.doscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:69623}},testnet:!0}),lS=f({id:23451,name:"DreyerX Mainnet",nativeCurrency:{name:"DreyerX",symbol:"DRX",decimals:18},rpcUrls:{default:{http:["https://rpc.dreyerx.com"]}},blockExplorers:{default:{name:"DreyerX Scan",url:"https://scan.dreyerx.com"}}}),uS=f({id:23452,name:"DreyerX Testnet",nativeCurrency:{name:"DreyerX",symbol:"DRX",decimals:18},rpcUrls:{default:{http:["http://testnet-rpc.dreyerx.com"]}},blockExplorers:{default:{name:"DreyerX Testnet Scan",url:"https://testnet-scan.dreyerx.com"}},testnet:!0}),dS=f({id:555888,name:"DustBoy IoT",nativeCurrency:{name:"Ether",symbol:"DST",decimals:18},rpcUrls:{default:{http:["https://dustboy-rpc.jibl2.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://dustboy.jibl2.com",apiUrl:"https://dustboy.jibl2.com/api"}},contracts:{multicall3:{address:"0xFFD34aa2C62B2D52E00A361e466C229788f4eD6a",blockCreated:526569}},testnet:!1}),fS=f({id:1100,name:"Dymension",nativeCurrency:{name:"DYM",symbol:"DYM",decimals:18},rpcUrls:{default:{http:["https://dymension-evm-rpc.publicnode.com"],webSocket:["wss://dymension-evm-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Dym FYI",url:"https://dym.fyi"}},testnet:!1}),pS=f({id:5424,name:"edeXa",nativeCurrency:{name:"edeXa",symbol:"EDX",decimals:18},rpcUrls:{default:{http:["https://rpc.edexa.network"]}},blockExplorers:{default:{name:"edeXa Explorer",url:"https://explorer.edexa.network",apiUrl:"https://explorer.edexa.network/api/v2"}}}),hS=f({id:1995,name:"edeXa Testnet",nativeCurrency:{name:"edeXa",symbol:"tEDX",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.edexa.network"]}},blockExplorers:{default:{name:"edeXa Testnet Explorer",url:"https://explorer.testnet.edexa.network",apiUrl:"https://explorer.testnet.edexa.network/api/v2"}},testnet:!0}),mS=f({id:2026,name:"Edgeless Network",nativeCurrency:{name:"Edgeless Wrapped ETH",symbol:"EwETH",decimals:18},rpcUrls:{default:{http:["https://rpc.edgeless.network/http"],webSocket:["wss://rpc.edgeless.network/ws"]}},blockExplorers:{default:{name:"Edgeless Explorer",url:"https://explorer.edgeless.network"}}}),bS=f({id:202,name:"Edgeless Testnet",nativeCurrency:{name:"Edgeless Wrapped ETH",symbol:"EwETH",decimals:18},rpcUrls:{default:{http:["https://edgeless-testnet.rpc.caldera.xyz/http"],webSocket:["wss://edgeless-testnet.rpc.caldera.xyz/ws"]}},blockExplorers:{default:{name:"Edgeless Testnet Explorer",url:"https://testnet.explorer.edgeless.network"}}}),yS=f({id:2021,name:"Edgeware EdgeEVM Mainnet",nativeCurrency:{decimals:18,name:"Edgeware",symbol:"EDG"},rpcUrls:{default:{http:["https://edgeware-evm.jelliedowl.net"]}},blockExplorers:{default:{name:"Edgscan by Bharathcoorg",url:"https://edgscan.live",apiUrl:"https://edgscan.live/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:18117872}}}),gS=f({id:2022,name:"Beresheet BereEVM Testnet",nativeCurrency:{decimals:18,name:"Testnet EDG",symbol:"tEDG"},rpcUrls:{default:{http:["https://beresheet-evm.jelliedowl.net"]}},blockExplorers:{default:{name:"Edgscan by Bharathcoorg",url:"https://testnet.edgscan.live",apiUrl:"https://testnet.edgscan.live/api"}}}),xS=f({id:41923,name:"EDU Chain",nativeCurrency:{decimals:18,name:"EDU",symbol:"EDU"},rpcUrls:{default:{http:["https://rpc.edu-chain.raas.gelato.cloud"]}},blockExplorers:{default:{name:"EDU Chain Explorer",url:"https://educhain.blockscout.com/"}},testnet:!1}),wS=f({id:656476,name:"EDU Chain Testnet",nativeCurrency:{decimals:18,name:"EDU",symbol:"EDU"},rpcUrls:{default:{http:["https://rpc.open-campus-codex.gelato.digital/"],webSocket:["wss://ws.open-campus-codex.gelato.digital"]}},blockExplorers:{default:{name:"EDU Chain Testnet Explorer",url:"https://opencampus-codex.blockscout.com",apiUrl:"https://opencampus-codex.blockscout.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:15514133}},testnet:!0}),vS=f({id:1994,name:"Ekta",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{default:{http:["https://main.ekta.io"]}},blockExplorers:{default:{name:"Ektascan",url:"https://ektascan.io",apiUrl:"https://ektascan.io/api"}}}),kS=f({id:1004,name:"Ekta Testnet",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{default:{http:["https://test.ekta.io:8545"]}},blockExplorers:{default:{name:"Test Ektascan",url:"https://test.ektascan.io",apiUrl:"https://test.ektascan.io/api"}},testnet:!0}),ES=f({id:20,name:"Elastos Smart Chain",nativeCurrency:{name:"ELA",symbol:"ELA",decimals:18},rpcUrls:{default:{http:["https://api2.elastos.io/eth"]}},blockExplorers:{default:{name:"Elastos Explorer",url:"https://esc.elastos.io"}},testnet:!1}),CS=f({id:21,name:"Elastos Smart Chain Testnet",nativeCurrency:{name:"tELA",symbol:"tELA",decimals:18},rpcUrls:{default:{http:["https://api-testnet.elastos.io/eth"]}},blockExplorers:{default:{name:"Elastos Explorer",url:"https://esc-testnet.elastos.io"}},testnet:!0}),TS=f({id:52014,name:"Electroneum Mainnet",nativeCurrency:{name:"ETN",symbol:"ETN",decimals:18},rpcUrls:{default:{http:["https://rpc.electroneum.com"]}},blockExplorers:{default:{name:"Electroneum Block Explorer",url:"https://blockexplorer.electroneum.com"}},testnet:!1}),SS=f({id:5201420,name:"Electroneum Testnet",nativeCurrency:{name:"ETN",symbol:"ETN",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.electroneum.com"]}},blockExplorers:{default:{name:"Electroneum Block Explorer",url:"https://blockexplorer.thesecurityteam.rocks"}},testnet:!0}),AS=f({...j,id:1338,name:"Elysium Testnet",nativeCurrency:{decimals:18,name:"LAVA",symbol:"LAVA"},rpcUrls:{default:{http:["https://elysium-test-rpc.vulcanforged.com"]}},blockExplorers:{default:{name:"Elysium testnet explorer",url:"https://elysium-explorer.vulcanforged.com"}},testnet:!0}),PS=f({id:246,name:"Energy Mainnet",nativeCurrency:{name:"EWT",symbol:"EWT",decimals:18},rpcUrls:{default:{http:["https://rpc.energyweb.org"]}},blockExplorers:{default:{name:"EnergyWeb Explorer",url:"https://explorer.energyweb.org"}},testnet:!1}),IS=f({id:173,name:"ENI Mainnet",nativeCurrency:{decimals:18,name:"ENI",symbol:"ENI"},rpcUrls:{default:{http:["https://rpc.eniac.network"]}},blockExplorers:{default:{name:"ENI Explorer",url:"https://scan.eniac.network"}},testnet:!1}),OS=f({id:6912115,name:"ENI Testnet",nativeCurrency:{decimals:18,name:"ENI Testnet Token",symbol:"ENI"},rpcUrls:{default:{http:["https://rpc-testnet.eniac.network"]}},blockExplorers:{default:{name:"ENI Testnet Explorer",url:"https://scan-testnet.eniac.network"}},testnet:!0}),BS=f({id:119,name:"ENULS Mainnet",nativeCurrency:{decimals:18,name:"NULS",symbol:"NULS"},rpcUrls:{default:{http:["https://evmapi2.nuls.io"]}},blockExplorers:{default:{name:"ENULS Explorer",url:"https://evmscan.nuls.io"}},testnet:!1}),MS=f({id:7332,name:"Horizen EON",nativeCurrency:{decimals:18,name:"ZEN",symbol:"ZEN"},rpcUrls:{default:{http:["https://eon-rpc.horizenlabs.io/ethv1"]}},blockExplorers:{default:{name:"EON Explorer",url:"https://eon-explorer.horizenlabs.io"}},contracts:{}}),_S=f({id:17777,name:"EOS EVM",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.evm.eosnetwork.com"]}},blockExplorers:{default:{name:"EOS EVM Explorer",url:"https://explorer.evm.eosnetwork.com",apiUrl:"https://explorer.evm.eosnetwork.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7943933}}}),US=f({id:15557,name:"EOS EVM Testnet",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.testnet.evm.eosnetwork.com"]}},blockExplorers:{default:{name:"EOS EVM Testnet Explorer",url:"https://explorer.testnet.evm.eosnetwork.com",apiUrl:"https://explorer.testnet.evm.eosnetwork.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:9067940}},testnet:!0}),DS=f({id:140,name:"Eteria",nativeCurrency:{name:"Eteria",symbol:"ERA",decimals:18},rpcUrls:{default:{http:["https://mainnet.eteria.io/v1"]}},blockExplorers:{default:{name:"Eteria Explorer",url:"https://explorer.eteria.io",apiUrl:"https://explorer.eteria.io/api"}}}),FS=f({id:42793,name:"Etherlink",blockTime:4830,nativeCurrency:{decimals:18,name:"Tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.mainnet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink",url:"https://explorer.etherlink.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:33899}}}),NS=f({id:127823,name:"Etherlink Shadownet Testnet",nativeCurrency:{decimals:18,name:"tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.shadownet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink Shadownet Testnet Explorer",url:"https://shadownet.explorer.etherlink.com"}},testnet:!0}),zS=f({id:128123,name:"Etherlink Testnet",nativeCurrency:{decimals:18,name:"Tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.ghostnet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink Testnet",url:"https://testnet.explorer.etherlink.com"}},testnet:!0}),LS=f({id:183,name:"Ethernity",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.ethernitychain.io"]}},blockExplorers:{default:{name:"Ethernity Explorer",url:"https://ernscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!1}),RS=f({id:20256789,name:"ETP Mainnet",nativeCurrency:{decimals:18,name:"ETP Chain Native Token",symbol:"ETP"},rpcUrls:{default:{http:["https://rpc.etpscan.xyz"]}},blockExplorers:{default:{name:"ETP Scan",url:"https://etpscan.xyz"}}}),HS=f({id:9001,name:"Evmos",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.org:8545"]}},blockExplorers:{default:{name:"Evmos Block Explorer",url:"https://escan.live"}}}),$S=f({id:9e3,name:"Evmos Testnet",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.dev:8545"]}},blockExplorers:{default:{name:"Evmos Testnet Block Explorer",url:"https://evm.evmos.dev/"}}}),GS=f({id:22052002,name:"Excelon Mainnet",network:"XLON",nativeCurrency:{decimals:18,name:"Excelon",symbol:"xlon"},rpcUrls:{default:{http:["https://edgewallet1.xlon.org"]}},blockExplorers:{default:{name:"Excelon explorer",url:"https://explorer.excelon.io"}}}),jS=f({id:2,name:"Expanse Network",nativeCurrency:{decimals:18,name:"EXP",symbol:"EXP"},rpcUrls:{default:{http:["https://node.expanse.tech"]}},blockExplorers:{default:{name:"Expanse Explorer",url:"https://explorer.expanse.tech"}},testnet:!1}),VS=f({id:7200,name:"exSat Network",nativeCurrency:{decimals:18,name:"BTC",symbol:"BTC"},rpcUrls:{default:{http:["https://evm.exsat.network"]}},blockExplorers:{default:{name:"exSat Explorer",url:"https://scan.exsat.network",apiUrl:"https://scan.exsat.network/api"}}}),WS=f({id:839999,name:"exSat Testnet",nativeCurrency:{decimals:18,name:"BTC",symbol:"BTC"},rpcUrls:{default:{http:["https://evm-tst3.exsat.network"]}},blockExplorers:{default:{name:"exSat Explorer",url:"https://scan-testnet.exsat.network",apiUrl:"https://scan-testnet.exsat.network/api"}}}),qS=f({id:250,name:"Fantom",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://250.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"FTMScan",url:"https://ftmscan.com",apiUrl:"https://api.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:33001987}}}),YS=f({id:64240,name:"Fantom Sonic Open Testnet",network:"fantom-sonic-testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpcapi.sonic.fantom.network"]}},blockExplorers:{default:{name:"Fantom Sonic Open Testnet Explorer",url:"https://public-sonic.fantom.network"}},testnet:!0}),KS=f({id:4002,name:"Fantom Testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.testnet.fantom.network"]}},blockExplorers:{default:{name:"FTMScan",url:"https://testnet.ftmscan.com",apiUrl:"https://testnet.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:8328688}},testnet:!0}),ZS=f({id:12306,name:"Fibo Chain",nativeCurrency:{decimals:18,name:"fibo",symbol:"FIBO"},rpcUrls:{default:{http:["https://network.hzroc.art"]}},blockExplorers:{default:{name:"FiboScan",url:"https://scan.fibochain.org"}}}),XS=f({id:314,name:"Filecoin Mainnet",nativeCurrency:{decimals:18,name:"filecoin",symbol:"FIL"},rpcUrls:{default:{http:["https://api.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://filfox.info/en"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3328594}}}),QS=f({id:314159,name:"Filecoin Calibration",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.calibration.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filscan",url:"https://calibration.filscan.io"}},testnet:!0}),JS=f({id:3141,name:"Filecoin Hyperspace",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.hyperspace.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://hyperspace.filfox.info/en"}},testnet:!0}),e4=f({id:253368190,name:"Flame",network:"flame",nativeCurrency:{symbol:"TIA",name:"TIA",decimals:18},rpcUrls:{default:{http:["https://rpc.flame.astria.org"],webSocket:["wss://ws.flame.astria.org"]}},blockExplorers:{default:{name:"Flame Explorer",url:"https://explorer.flame.astria.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:6829148}}}),t4=f({id:14,name:"Flare Mainnet",nativeCurrency:{decimals:18,name:"Flare",symbol:"FLR"},rpcUrls:{default:{http:["https://flare-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Flare Explorer",url:"https://flare-explorer.flare.network",apiUrl:"https://flare-explorer.flare.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3002461}}}),r4=f({id:114,name:"Flare Testnet Coston2",nativeCurrency:{decimals:18,name:"Coston2 Flare",symbol:"C2FLR"},rpcUrls:{default:{http:["https://coston2-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Coston2 Explorer",url:"https://coston2-explorer.flare.network",apiUrl:"https://coston2-explorer.flare.network/api"}},testnet:!0}),n4=f({id:747,name:"Flow EVM Mainnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://mainnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Mainnet Explorer",url:"https://evm.flowscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6205}},blockTime:800}),s4=f({id:646,name:"Flow EVM Previewnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://previewnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Previewnet Explorer",url:"https://previewnet.flowdiver.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6205}}}),a4=f({id:545,name:"Flow EVM Testnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://testnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Flow Diver",url:"https://evm-testnet.flowscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:137518}},testnet:!0,blockTime:800}),o4=f({id:9999999,name:"Fluence",nativeCurrency:{name:"FLT",symbol:"FLT",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.fluence.dev"],webSocket:["wss://ws.mainnet.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.mainnet.fluence.dev",apiUrl:"https://blockscout.mainnet.fluence.dev/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:207583}}}),i4=f({id:123420000220,name:"Fluence Stage",nativeCurrency:{name:"tFLT",symbol:"tFLT",decimals:18},rpcUrls:{default:{http:["https://rpc.stage.fluence.dev"],webSocket:["wss://ws.stage.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.stage.fluence.dev",apiUrl:"https://blockscout.stage.fluence.dev/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83227}},testnet:!0}),c4=f({id:52164803,name:"Fluence Testnet",nativeCurrency:{name:"tFLT",symbol:"tFLT",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.fluence.dev"],webSocket:["wss://ws.testnet.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.testnet.fluence.dev",apiUrl:"https://blockscout.testnet.fluence.dev/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96424}},testnet:!0}),l4=f({id:20993,name:"Fluent Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.dev.gblend.xyz"]}},blockExplorers:{default:{name:"Fluent Explorer",url:"https://blockscout.dev.gblend.xyz"}},testnet:!0}),Na=1,u4=f({id:478,name:"Form Network",nativeCurrency:{decimals:18,name:"Ethereum",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.form.network/http"],webSocket:["wss://rpc.form.network/ws"]}},blockExplorers:{default:{name:"Form Explorer",url:"https://explorer.form.network"}},contracts:{...j.contracts,addressManager:{[Na]:{address:"0x15c249E46A2F924C2dB3A1560CF86729bAD1f07B"}},l1CrossDomainMessenger:{[Na]:{address:"0xF333158DCCad1dF6C3F0a3aEe8BC31fA94d9eD5c"}},l2OutputOracle:{[Na]:{address:"0x4ccAAF69F41c5810cA875183648B577CaCf1F67E"}},portal:{[Na]:{address:"0x4E259Ee5F4136408908160dD32295A5031Fa426F"}},l1StandardBridge:{[Na]:{address:"0xdc20aA63D3DE59574E065957190D8f24e0F7B8Ba"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},sourceId:Na}),d4=f({id:984122,name:"Forma",network:"forma",nativeCurrency:{symbol:"TIA",name:"TIA",decimals:18},rpcUrls:{default:{http:["https://rpc.forma.art"],webSocket:["wss://ws.forma.art"]}},blockExplorers:{default:{name:"Forma Explorer",url:"https://explorer.forma.art"}},contracts:{multicall3:{address:"0xd53C6FFB123F7349A32980F87faeD8FfDc9ef079",blockCreated:252705}}}),za=11155111,f4=f({id:132902,name:"Form Testnet",nativeCurrency:{decimals:18,name:"Ethereum",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia-rpc.form.network/http"],webSocket:["wss://sepolia-rpc.form.network/ws"]}},blockExplorers:{default:{name:"Form Testnet Explorer",url:"https://sepolia-explorer.form.network"}},contracts:{...j.contracts,addressManager:{[za]:{address:"0xd5C38fa934f7fd7477D4800F4f38a1c5BFdF1373"}},l1CrossDomainMessenger:{[za]:{address:"0x37A68565c4BE9700b3E3Ec60cC4416cAC3052FAa"}},l2OutputOracle:{[za]:{address:"0x9eA2239E65a59EC9C7F1ED4C116dD58Da71Fc1e2"}},portal:{[za]:{address:"0x60377e3cE15dF4CCA24c4beF076b60314240b032"}},l1StandardBridge:{[za]:{address:"0xD4531f633942b2725896F47cD2aFd260b44Ab1F7"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!0,sourceId:za}),p4=f({id:80931,name:"Forta Chain",nativeCurrency:{symbol:"FORT",name:"FORT",decimals:18},rpcUrls:{default:{http:["https://rpc-forta-chain-8gj1qndmfc.t.conduit.xyz"]}},blockExplorers:{default:{name:"Forta Explorer",url:"https://explorer.forta.org"}}}),h4=f({id:31337,name:"Foundry",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}}),ul=1,m4=f({...j,id:252,name:"Fraxtal",nativeCurrency:{name:"Frax",symbol:"FRAX",decimals:18},rpcUrls:{default:{http:["https://rpc.frax.com"]}},blockExplorers:{default:{name:"fraxscan",url:"https://fraxscan.com",apiUrl:"https://api.fraxscan.com/api"}},contracts:{...j.contracts,l2OutputOracle:{[ul]:{address:"0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[ul]:{address:"0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D",blockCreated:19135323}},l1StandardBridge:{[ul]:{address:"0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2",blockCreated:19135323}}},sourceId:ul}),dl=17e3,b4=f({...j,id:2522,name:"Fraxtal Testnet",nativeCurrency:{name:"Frax",symbol:"FRAX",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.frax.com"]}},blockExplorers:{default:{name:"fraxscan testnet",url:"https://holesky.fraxscan.com",apiUrl:"https://api-holesky.fraxscan.com/api"}},contracts:{...j.contracts,l2OutputOracle:{[dl]:{address:"0x715EA64DA13F4d0831ece4Ad3E8c1aa013167F32"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[dl]:{address:"0xB9c64BfA498d5b9a8398Ed6f46eb76d90dE5505d",blockCreated:318416}},l1StandardBridge:{[dl]:{address:"0x0BaafC217162f64930909aD9f2B27125121d6332",blockCreated:318416}}},sourceId:dl}),y4=f({...j,id:33979,name:"Funki",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.funkichain.com"]}},blockExplorers:{default:{name:"Funki Mainnet Explorer",url:"https://funkiscan.io"}},contracts:{...j.contracts},sourceId:1}),g4=f({...j,id:3397901,network:"funkiSepolia",name:"Funki Sepolia Sandbox",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://funki-testnet.alt.technology"]}},blockExplorers:{default:{name:"Funki Sepolia Sandbox Explorer",url:"https://sepolia-sandbox.funkichain.com/"}},testnet:!0,contracts:{...j.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204}},sourceId:11155111}),x4=f({id:122,name:"Fuse",nativeCurrency:{name:"Fuse",symbol:"FUSE",decimals:18},rpcUrls:{default:{http:["https://rpc.fuse.io"]}},blockExplorers:{default:{name:"Fuse Explorer",url:"https://explorer.fuse.io",apiUrl:"https://explorer.fuse.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:16146628}}}),w4=f({id:123,name:"Fuse Sparknet",nativeCurrency:{name:"Spark",symbol:"SPARK",decimals:18},rpcUrls:{default:{http:["https://rpc.fusespark.io"]}},blockExplorers:{default:{name:"Sparkent Explorer",url:"https://explorer.fusespark.io",apiUrl:"https://explorer.fusespark.io/api"}}}),v4=f({id:32659,name:"Fusion Mainnet",nativeCurrency:{name:"Fusion",symbol:"FSN",decimals:18},rpcUrls:{default:{http:["https://mainnet.fusionnetwork.io"],webSocket:["wss://mainnet.fusionnetwork.io"]}},blockExplorers:{default:{name:"FSNscan",url:"https://fsnscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10441605}},testnet:!1}),k4=f({id:46688,name:"Fusion Testnet",nativeCurrency:{name:"Fusion",symbol:"FSN",decimals:18},rpcUrls:{default:{http:["https://testnet.fusionnetwork.io"],webSocket:["wss://testnet.fusionnetwork.io"]}},blockExplorers:{default:{name:"FSNscan",url:"https://testnet.fsnscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10428309}},testnet:!0}),fl=17e3,E4=f({...j,name:"Garnet Testnet",testnet:!0,id:17069,sourceId:fl,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.garnetchain.com"],webSocket:["wss://rpc.garnetchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.garnetchain.com"}},contracts:{...j.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[fl]:{address:"0x57ee40586fbE286AfC75E67cb69511A6D9aF5909",blockCreated:1274684}},l2OutputOracle:{[fl]:{address:"0xCb8E7AC561b8EF04F2a15865e9fbc0766FEF569B",blockCreated:1274684}},l1StandardBridge:{[fl]:{address:"0x09bcDd311FE398F80a78BE37E489f5D440DB95DE",blockCreated:1274684}}}}),C4=f({id:86,name:"GateChain Mainnet",nativeCurrency:{name:"GateChainToken",symbol:"GT",decimals:18},rpcUrls:{default:{http:["https://evm.nodeinfo.cc"],webSocket:["wss://evm-ws.gatenode.cc"]}},blockExplorers:{default:{name:"Gate Scan",url:"https://www.gatescan.org",apiUrl:"https://gatescan.org/api"}},testnet:!1}),T4=f({id:63157,name:"Geist Mainnet",nativeCurrency:{decimals:18,name:"Aavegotchi GHST Token",symbol:"GHST"},rpcUrls:{default:{http:["https://geist-mainnet.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Blockscout",url:"https://geist-mainnet.explorer.alchemy.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:660735}}}),S4=f({id:16507,name:"Genesys Mainnet",nativeCurrency:{decimals:18,name:"GSYS",symbol:"GSYS"},rpcUrls:{default:{http:["https://rpc.genesys.network"]}},blockExplorers:{default:{name:"Genesys Explorer",url:"https://gchainexplorer.genesys.network"}},testnet:!1}),pl=11155111,wy=f({...j,id:91342,network:"giwa-sepolia",name:"GIWA Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://sepolia-rpc.giwa.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-explorer.giwa.io",apiUrl:"https://sepolia-explorer.giwa.io/api"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},disputeGameFactory:{[pl]:{address:"0x37347caB2afaa49B776372279143D71ad1f354F6"}},portal:{[pl]:{address:"0x956962C34687A954e611A83619ABaA37Ce6bC78A"}},l1StandardBridge:{[pl]:{address:"0x77b2ffc0F57598cAe1DB76cb398059cF5d10A7E7"}}},testnet:!0,sourceId:pl}),A4=f({...wy,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-rpc-flashblocks.giwa.io"]}}}),P4=f({id:251,name:"Glide L1 Protocol XP",nativeCurrency:{name:"GLXP",symbol:"GLXP",decimals:18},rpcUrls:{default:{http:["https://rpc-api.glideprotocol.xyz/l1-rpc"],webSocket:["wss://rpc-api.glideprotocol.xyz/l1-rpc"]}},blockExplorers:{default:{name:"Glide Protocol Explore",url:"https://blockchain-explorer.glideprotocol.xyz"}},testnet:!1}),I4=f({id:253,name:"Glide L2 Protocol XP",nativeCurrency:{name:"GLXP",symbol:"GLXP",decimals:18},rpcUrls:{default:{http:["https://rpc-api.glideprotocol.xyz/l2-rpc"],webSocket:["wss://rpc-api.glideprotocol.xyz/l2-rpc"]}},blockExplorers:{default:{name:"Glide Protocol Explore",url:"https://blockchain-explorer.glideprotocol.xyz"}},testnet:!1}),O4=f({id:100,name:"Gnosis",nativeCurrency:{decimals:18,name:"xDAI",symbol:"XDAI"},blockTime:5e3,rpcUrls:{default:{http:["https://rpc.gnosischain.com"],webSocket:["wss://rpc.gnosischain.com/wss"]}},blockExplorers:{default:{name:"Gnosisscan",url:"https://gnosisscan.io",apiUrl:"https://api.gnosisscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:21022491}}}),B4=f({id:10200,name:"Gnosis Chiado",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},blockTime:5e3,rpcUrls:{default:{http:["https://rpc.chiadochain.net"],webSocket:["wss://rpc.chiadochain.net/wss"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.chiadochain.net",apiUrl:"https://blockscout.chiadochain.net/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4967313}},testnet:!0}),M4=f({id:2345,name:"GOAT",nativeCurrency:{decimals:18,name:"Bitcoin",symbol:"BTC"},rpcUrls:{default:{http:["https://rpc.goat.network"]}},blockExplorers:{default:{name:"Goat Explorer",url:"https://explorer.goat.network"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),_4=f({id:1663,name:"Horizen Gobi Testnet",nativeCurrency:{decimals:18,name:"Test ZEN",symbol:"tZEN"},rpcUrls:{default:{http:["https://gobi-testnet.horizenlabs.io/ethv1"]}},blockExplorers:{default:{name:"Gobi Explorer",url:"https://gobi-explorer.horizen.io"}},contracts:{},testnet:!0}),U4=f({id:60,name:"GoChain",nativeCurrency:{decimals:18,name:"GO",symbol:"GO"},rpcUrls:{default:{http:["https://rpc.gochain.io"]}},blockExplorers:{default:{name:"GoChain Explorer",url:"https://explorer.gochain.io"}},testnet:!1}),D4=f({id:71402,name:"Godwoken Mainnet",nativeCurrency:{decimals:18,name:"pCKB",symbol:"pCKB"},rpcUrls:{default:{http:["https://v1.mainnet.godwoken.io/rpc"]}},blockExplorers:{default:{name:"GW Scan",url:"https://v1.gwscan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:15034}},testnet:!1}),F4=f({id:5,name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://5.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.etherscan.io",apiUrl:"https://api-goerli.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xfc4AC75C46C914aF5892d6d3eFFcebD7917293F1",blockCreated:10339206},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),N4=f({id:440017,name:"Graphite Network",nativeCurrency:{name:"Graphite",symbol:"@G",decimals:18},rpcUrls:{default:{http:["https://anon-entrypoint-1.atgraphite.com"],webSocket:["wss://ws-anon-entrypoint-1.atgraphite.com"]}},blockExplorers:{default:{name:"Graphite Spectre",url:"https://main.atgraphite.com",apiUrl:"https://api.main.atgraphite.com/api"}},testnet:!1}),z4=f({id:54170,name:"Graphite Network Testnet",nativeCurrency:{name:"Graphite",symbol:"@G",decimals:18},rpcUrls:{default:{http:["https://anon-entrypoint-test-1.atgraphite.com"],webSocket:["wss://ws-anon-entrypoint-test-1.atgraphite.com"]}},blockExplorers:{default:{name:"Graphite Testnet Spectre",url:"https://test.atgraphite.com",apiUrl:"https://api.test.atgraphite.com/api"}},testnet:!0}),L4=f({id:1625,name:"Gravity Alpha Mainnet",nativeCurrency:{name:"G",symbol:"G",decimals:18},rpcUrls:{default:{http:["https://rpc.gravity.xyz"]}},blockExplorers:{default:{name:"Gravity Explorer",url:"https://explorer.gravity.xyz",apiUrl:"https://explorer.gravity.xyz/api"}},contracts:{multicall3:{address:"0xf8ac4BEB2F75d2cFFb588c63251347fdD629B92c",blockCreated:16851}}}),R4=f({id:43419,name:"Gunz Mainnet",nativeCurrency:{name:"GUN",symbol:"GUN",decimals:18},rpcUrls:{default:{http:["https://rpc.gunzchain.io/ext/bc/2M47TxWHGnhNtq6pM5zPXdATBtuqubxn5EPFgFmEawCQr9WFML/rpc"]}},blockExplorers:{default:{name:"Gunz Explorer",url:"https://gunzscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:70502}}}),H4=f({id:260,name:"Guru Network Mainnet",nativeCurrency:{name:"GURU Token",symbol:"GURU",decimals:18},rpcUrls:{default:{http:["https://rpc-main.gurunetwork.ai","https://rpc.gurunetwork.ai/archive/260"]}},blockExplorers:{default:{name:"Guruscan",url:"https://scan.gurunetwork.ai"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:271691}},testnet:!1}),$4=f({id:261,name:"Guru Network Testnet",nativeCurrency:{name:"tGURU Token",symbol:"tGURU",decimals:18},rpcUrls:{default:{http:["https://rpc-test.gurunetwork.ai","https://rpc.gurunetwork.ai/archive/261"]}},blockExplorers:{default:{name:"Guruscan",url:"https://sepolia.gurunetwork.ai"}},testnet:!0}),G4=f({id:5112,name:"Ham",nativeCurrency:{decimals:18,name:"Ham",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.ham.fun"],webSocket:["wss://rpc.ham.fun"]}},blockExplorers:{default:{name:"Ham Chain Explorer",url:"https://explorer.ham.fun",apiUrl:"https://explorer.ham.fun/api/v2"}}}),j4=f({id:216,name:"Happychain Testnet",nativeCurrency:{symbol:"HAPPY",name:"HAPPY",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.happy.tech/http"],webSocket:["wss://rpc.testnet.happy.tech/ws"]}},blockExplorers:{default:{name:"Happy Chain Testnet Explorer",url:"https://explorer.testnet.happy.tech"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1}},testnet:!0}),V4=f({id:11235,name:"HAQQ Mainnet",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLM"},rpcUrls:{default:{http:["https://rpc.eth.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.haqq.network",apiUrl:"https://explorer.haqq.network/api"}}}),W4=f({id:54211,name:"HAQQ Testedge 2",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLMT"},rpcUrls:{default:{http:["https://rpc.eth.testedge2.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.testedge2.haqq.network",apiUrl:"https://explorer.testedge2.haqq.network/api"}}}),q4=f({id:31337,name:"Hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),Y4=f({id:16666e5,name:"Harmony One",nativeCurrency:{name:"Harmony",symbol:"ONE",decimals:18},rpcUrls:{default:{http:["https://1666600000.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Harmony Explorer",url:"https://explorer.harmony.one"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:24185753}}}),K4=f({id:177,name:"HashKey Chain",nativeCurrency:{decimals:18,name:"HashKey EcoPoints",symbol:"HSK"},rpcUrls:{default:{http:["https://mainnet.hsk.xyz"]}},blockExplorers:{default:{name:"HashKey Chain Explorer",url:"https://hashkey.blockscout.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}}}),Z4=f({id:133,name:"HashKey Chain Testnet",nativeCurrency:{decimals:18,name:"HashKey EcoPoints",symbol:"HSK"},rpcUrls:{default:{http:["https://testnet.hsk.xyz"]}},blockExplorers:{default:{name:"HashKey Chain Testnet explorer",url:"https://testnet-explorer.hsk.xyz"}},testnet:!0}),X4=f({id:1523903251,name:"Haust Network Testnet",nativeCurrency:{decimals:18,name:"HAUST",symbol:"HAUST"},rpcUrls:{default:{http:["https://rpc-testnet.haust.app"]}},blockExplorers:{default:{name:"Haust Network Testnet Explorer",url:"https://explorer-testnet.haust.app"}},testnet:!0}),Q4=f({id:295,name:"Hedera Mainnet",network:"hedera-mainnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://mainnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/mainnet"}},testnet:!1}),J4=f({id:297,name:"Hedera Previewnet",network:"hedera-previewnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://previewnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/previewnet"}},testnet:!0}),eA=f({id:296,name:"Hedera Testnet",network:"hedera-testnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://testnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/testnet"}},testnet:!0}),tA=f({id:8668,name:"Hela Mainnet",nativeCurrency:{name:"HLUSD",symbol:"HLUSD",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.helachain.com"]}},blockExplorers:{default:{name:"Hela explorer",url:"https://mainnet-blockexplorer.helachain.com"}},testnet:!1}),rA=f({id:42e3,name:"Helios Testnet",network:"helios-testnet",nativeCurrency:{symbol:"HLS",name:"Helios",decimals:18},rpcUrls:{default:{http:["https://testnet1.helioschainlabs.org"]}},blockExplorers:{default:{name:"Helios Testnet Explorer",url:"https://explorer.helioschainlabs.org/"}},testnet:!0}),nA=f({id:43111,name:"Hemi",network:"Hemi",blockTime:12e3,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hemi.network/rpc"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.hemi.xyz"}},testnet:!1}),sA=f({id:743111,name:"Hemi Sepolia",network:"Hemi Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.rpc.hemi.network/rpc"]}},blockExplorers:{default:{name:"Hemi Sepolia explorer",url:"https://testnet.explorer.hemi.xyz"}},testnet:!0}),aA=f({id:68414,name:"Henesys",nativeCurrency:{name:"NEXPACE",symbol:"NXPC",decimals:18},rpcUrls:{default:{http:["https://henesys-rpc.msu.io"]}},blockExplorers:{default:{name:"Avalanche Explorer",url:"https://subnets.avax.network/henesys"}}}),oA=f({id:17e3,name:"Holesky",nativeCurrency:{name:"Holesky Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://holesky.etherscan.io",apiUrl:"https://api-holesky.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:77},ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:4295055}},testnet:!0}),iA=f({id:560048,name:"Hoodi",nativeCurrency:{name:"Hoodi Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hoodi.ethpandaops.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://hoodi.etherscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2589}},testnet:!0}),cA=f({id:269,name:"High Performance Blockchain",nativeCurrency:{name:"HPB",symbol:"HPB",decimals:18},rpcUrls:{default:{http:["https://hpbnode.com"]}},blockExplorers:{default:{name:"hpbScan",url:"https://hscan.org"}},testnet:!1}),lA=f({id:190415,name:"HPP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.hpp.io"],webSocket:["wss://mainnet.hpp.io"]}},blockExplorers:{default:{name:"HPP Mainnet Explorer",url:"https://explorer.hpp.io"}},testnet:!1}),uA=f({id:181228,name:"HPP Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.hpp.io"],webSocket:["wss://testnet.hpp.io"]}},blockExplorers:{default:{name:"HPP Sepolia Explorer",url:"https://sepolia-explorer.hpp.io"}},testnet:!0}),dA=f({id:12323,name:"Huddle01 dRTC Chain",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://huddle01.calderachain.xyz/http"],webSocket:["wss://huddle01.calderachain.xyz/ws"]}},blockExplorers:{default:{name:"Huddle01 Caldera Explorer",url:"https://huddle01.calderaexplorer.xyz",apiUrl:"https://huddle01.calderaexplorer.xyz/api"}},sourceId:42161}),fA=f({id:2524852,name:"Huddle01 dRTC Chain Testnet",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://huddle-testnet.rpc.caldera.xyz/http"],webSocket:["wss://huddle-testnet.rpc.caldera.xyz/ws"]}},blockExplorers:{default:{name:"Huddle01 Caldera Explorer",url:"https://huddle-testnet.explorer.caldera.xyz",apiUrl:"https://huddle-testnet.explorer.caldera.xyz/api"}},sourceId:421614}),pA=f({id:6985385,name:"Humanity",nativeCurrency:{name:"H",symbol:"H",decimals:18},rpcUrls:{default:{http:["https://humanity-mainnet.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Humanity Mainnet Explorer",url:"https://humanity-mainnet.explorer.alchemy.com",apiUrl:"https://humanity-mainnet.explorer.alchemy.com/api"}},testnet:!1}),hA=f({id:7080969,name:"Humanity Testnet",nativeCurrency:{name:"tHP",symbol:"tHP",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.humanity.org"]}},blockExplorers:{default:{name:"Humanity Testnet Explorer",url:"https://humanity-testnet.explorer.alchemy.com",apiUrl:"https://humanity-testnet.explorer.alchemy.com/api"}},testnet:!0}),mA=f({id:5234,name:"Humanode",nativeCurrency:{name:"HMND",symbol:"HMND",decimals:18},rpcUrls:{default:{http:["https://explorer-rpc-http.mainnet.stages.humanode.io"],webSocket:["wss://explorer-rpc-ws.mainnet.stages.humanode.io"]}},blockExplorers:{default:{name:"Subscan",url:"https://humanode.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4413097}}}),bA=f({id:14853,name:"Humanode Testnet 5",nativeCurrency:{name:"HMND",symbol:"HMND",decimals:18},rpcUrls:{default:{http:["https://explorer-rpc-http.testnet5.stages.humanode.io"],webSocket:["wss://explorer-rpc-ws.testnet5.stages.humanode.io"]}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}}}),yA=f({id:2911,name:"HYCHAIN",nativeCurrency:{name:"HYTOPIA",symbol:"TOPIA",decimals:18},rpcUrls:{default:{http:["https://rpc.hychain.com/http"]}},blockExplorers:{default:{name:"HYCHAIN Explorer",url:"https://explorer.hychain.com"}},testnet:!1}),gA=f({id:29112,name:"HYCHAIN Testnet",nativeCurrency:{name:"HYTOPIA",symbol:"TOPIA",decimals:18},rpcUrls:{default:{http:["https://rpc.hychain.com/http"]}},blockExplorers:{default:{name:"HYCHAIN Explorer",url:"https://testnet-rpc.hychain.com/http"}},testnet:!0}),vy=f({id:999,name:"HyperEVM",nativeCurrency:{name:"HYPE",symbol:"HYPE",decimals:18},blockExplorers:{default:{name:"HyperEVMScan",url:"https://hyperevmscan.io"}},rpcUrls:{default:{http:["https://rpc.hyperliquid.xyz/evm"]}},testnet:!1}),xA=f({id:998,name:"Hyperliquid EVM Testnet",nativeCurrency:{name:"HYPE",symbol:"HYPE",decimals:18},rpcUrls:{default:{http:["https://rpc.hyperliquid-testnet.xyz/evm"]}},testnet:!0}),wA=f({id:73115,name:"ICB Network",nativeCurrency:{decimals:18,name:"ICB Native Token",symbol:"ICBX"},rpcUrls:{default:{http:["https://rpc1-mainnet.icbnetwork.info"]}},blockExplorers:{default:{name:"ICB Explorer",url:"https://icbscan.io",apiUrl:"https://icbscan.io/api"}},testnet:!1}),vA=f({id:74,name:"IDChain Mainnet",nativeCurrency:{decimals:18,name:"EIDI",symbol:"EIDI"},rpcUrls:{default:{http:["https://idchain.one/rpc"],webSocket:["wss://idchain.one/ws"]}},blockExplorers:{default:{name:"IDChain Explorer",url:"https://explorer.idchain.one"}},testnet:!1}),kA=f({id:13371,name:"Immutable zkEVM",nativeCurrency:{decimals:18,name:"Immutable Coin",symbol:"IMX"},rpcUrls:{default:{http:["https://rpc.immutable.com"]}},blockExplorers:{default:{name:"Immutable Explorer",url:"https://explorer.immutable.com",apiUrl:"https://explorer.immutable.com/api"}},contracts:{multicall3:{address:"0x236bdA4589e44e6850f5aC6a74BfCa398a86c6c0",blockCreated:4335972}}}),EA=f({id:13473,name:"Immutable zkEVM Testnet",nativeCurrency:{decimals:18,name:"Immutable Coin",symbol:"IMX"},rpcUrls:{default:{http:["https://rpc.testnet.immutable.com"]}},blockExplorers:{default:{name:"Immutable Testnet Explorer",url:"https://explorer.testnet.immutable.com/"}},contracts:{multicall3:{address:"0x2CC787Ed364600B0222361C4188308Fa8E68bA60",blockCreated:5977391}},testnet:!0}),CA=f({id:2525,name:"inEVM Mainnet",nativeCurrency:{decimals:18,name:"Injective",symbol:"INJ"},rpcUrls:{default:{http:["https://mainnet.rpc.inevm.com/http"]}},blockExplorers:{default:{name:"inEVM Explorer",url:"https://inevm.calderaexplorer.xyz",apiUrl:"https://inevm.calderaexplorer.xyz/api/v2"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:118606}}}),TA=f({id:7233,name:"InitVerse Mainnet",nativeCurrency:{decimals:18,name:"InitVerse",symbol:"INI"},rpcUrls:{default:{http:["https://rpc-mainnet.inichain.com"]}},blockExplorers:{default:{name:"InitVerseScan",url:"https://www.iniscan.com",apiUrl:"https://explorer-api.inichain.com/api"}},contracts:{multicall3:{address:"0x83466BE48A067115FFF91f7b892Ed1726d032e47",blockCreated:2318}}}),SA=f({id:7234,name:"InitVerse Genesis Testnet",nativeCurrency:{decimals:18,name:"InitVerse",symbol:"INI"},rpcUrls:{default:{http:["https://rpc-testnet.inichain.com"]}},blockExplorers:{default:{name:"InitVerseGenesisScan",url:"https://genesis-testnet.iniscan.com",apiUrl:"https://explorer-testnet-api.inichain.com/api"}},contracts:{multicall3:{address:"0x0cF32CBDd6c437331EA4f85ed2d881A5379B5a6F",blockCreated:16361}},testnet:!0}),AA=f({id:1776,name:"Injective",nativeCurrency:{decimals:18,name:"Injective",symbol:"INJ"},rpcUrls:{default:{http:["https://sentry.evm-rpc.injective.network"],webSocket:["wss://sentry.evm-ws.injective.network"]}},blockExplorers:{default:{name:"Injective Explorer",url:"https://blockscout.injective.network",apiUrl:"https://blockscout.injective.network/api"}},testnet:!1}),PA=f({id:1439,name:"Injective Testnet",nativeCurrency:{decimals:18,name:"Injective",symbol:"INJ"},rpcUrls:{default:{http:["https://k8s.testnet.json-rpc.injective.network"],webSocket:["wss://k8s.testnet.ws.injective.network"]}},blockExplorers:{default:{name:"Injective Explorer",url:"https://testnet.blockscout.injective.network",apiUrl:"https://testnet.blockscout.injective.network/api"}},testnet:!0}),hl=1,IA=f({...j,id:57073,name:"Ink",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-gel.inkonchain.com","https://rpc-qnd.inkonchain.com"],webSocket:["wss://rpc-gel.inkonchain.com","wss://rpc-qnd.inkonchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.inkonchain.com",apiUrl:"https://explorer.inkonchain.com/api/v2"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},...j.contracts,disputeGameFactory:{[hl]:{address:"0x10d7b35078d3baabb96dd45a9143b94be65b12cd"}},portal:{[hl]:{address:"0x5d66c1782664115999c47c9fa5cd031f495d3e4f"}},l1StandardBridge:{[hl]:{address:"0x88ff1e5b602916615391f55854588efcbb7663f0"}}},testnet:!1,sourceId:hl}),ml=11155111,OA=f({...j,id:763373,name:"Ink Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-gel-sepolia.inkonchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer-sepolia.inkonchain.com/",apiUrl:"https://explorer-sepolia.inkonchain.com/api/v2"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},disputeGameFactory:{[ml]:{address:"0x860e626c700af381133d9f4af31412a2d1db3d5d"}},portal:{[ml]:{address:"0x5c1d29c6c9c8b0800692acc95d700bcb4966a1d7"}},l1StandardBridge:{[ml]:{address:"0x33f60714bbd74d62b66d79213c348614de51901c"}}},testnet:!0,sourceId:ml}),BA=f({id:8822,name:"IOTA EVM",network:"iotaevm",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://json-rpc.evm.iotaledger.net"],webSocket:["wss://ws.json-rpc.evm.iotaledger.net"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.evm.iota.org",apiUrl:"https://explorer.evm.iota.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:25022}}}),MA=f({id:1075,name:"IOTA EVM Testnet",network:"iotaevm-testnet",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://json-rpc.evm.testnet.iotaledger.net"],webSocket:["wss://ws.json-rpc.evm.testnet.iotaledger.net"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.evm.testnet.iotaledger.net",apiUrl:"https://explorer.evm.testnet.iotaledger.net/api"}},testnet:!0}),_A=f({id:4689,name:"IoTeX",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.mainnet.iotex.io"],webSocket:["wss://babel-api.mainnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://iotexscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:22163670}}}),UA=f({id:4690,name:"IoTeX Testnet",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.testnet.iotex.io"],webSocket:["wss://babel-api.testnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://testnet.iotexscan.io"}},contracts:{multicall3:{address:"0xb5cecD6894c6f473Ec726A176f1512399A2e355d",blockCreated:24347592}},testnet:!0}),DA=f({id:8017,name:"iSunCoin Mainnet",nativeCurrency:{decimals:18,name:"ISC",symbol:"ISC"},rpcUrls:{default:{http:["https://mainnet.isuncoin.com"]}},blockExplorers:{default:{name:"iSunCoin Explorer",url:"https://baifa.io/app/chains/8017"}}}),FA=f({id:680,name:"Jasmy Chain",network:"jasmyChain",nativeCurrency:{name:"JasmyCoin",symbol:"JASMY",decimals:18},rpcUrls:{default:{http:["https://rpc.jasmychain.io"],webSocket:["wss://rpc.jasmychain.io"]}},testnet:!1}),NA=f({id:681,name:"Jasmy Chain Testnet",network:"jasmyChainTestnet",nativeCurrency:{name:"JasmyCoin",symbol:"JASMY",decimals:18},rpcUrls:{default:{http:["https://rpc_testnet.jasmychain.io"],webSocket:["wss://rpc_testnet.jasmychain.io"]}},testnet:!0}),zA=f({id:8899,name:"JB Chain",network:"jbc",nativeCurrency:{name:"JBC",symbol:"JBC",decimals:18},rpcUrls:{default:{http:["https://rpc-l1.jibchain.net"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp-l1.jibchain.net",apiUrl:"https://exp-l1.jibchain.net/api"}},contracts:{multicall3:{address:"0xc0C8C486D1466C57Efe13C2bf000d4c56F47CBdC",blockCreated:2299048}},testnet:!1}),LA=f({id:88991,name:"Jibchain Testnet",nativeCurrency:{name:"tJBC",symbol:"tJBC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.jibchain.net"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp.testnet.jibchain.net",apiUrl:"https://exp.testnet.jibchain.net/api"}},contracts:{multicall3:{address:"0xa1a858ad9041B4741e620355a3F96B3c78e70ecE",blockCreated:32848}},testnet:!0}),RA=f({id:81,name:"Japan Open Chain Mainnet",nativeCurrency:{decimals:18,name:"Japan Open Chain Token",symbol:"JOC"},rpcUrls:{default:{http:["https://rpc-1.japanopenchain.org:8545","https://rpc-2.japanopenchain.org:8545","https://rpc-3.japanopenchain.org"]}},blockExplorers:{default:{name:"Block Explorer",url:"https://explorer.japanopenchain.org"}},testnet:!1}),HA=f({id:10081,name:"Japan Open Chain Testnet",nativeCurrency:{decimals:18,name:"Japan Open Chain Testnet Token",symbol:"JOCT"},rpcUrls:{default:{http:["https://rpc-1.testnet.japanopenchain.org:8545","https://rpc-2.testnet.japanopenchain.org:8545","https://rpc-3.testnet.japanopenchain.org"]}},blockExplorers:{default:{name:"Testnet Block Explorer",url:"https://explorer.testnet.japanopenchain.org"}},testnet:!0}),$A=f({id:5734951,name:"Jovay Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.jovay.io"]}},blockExplorers:{default:{name:"Jovay Explorer",url:"https://explorer.jovay.io/l2"}},testnet:!1}),GA=f({id:2019775,name:"Jovay Sepolia Testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://api.zan.top/public/jovay-testnet"]}},blockExplorers:{default:{name:"Jovay Testnet Explorer",url:"https://sepolia-explorer.jovay.io/l2"}},testnet:!0}),jA=f({id:45003,name:"Juneo JUNE-Chain",nativeCurrency:{decimals:18,name:"JUNE-Chain",symbol:"JUNE"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/JUNE/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/2",apiUrl:"https://juneoscan.io/chain/2/api"}}}),VA=f({id:45013,name:"Juneo BCH1-Chain",nativeCurrency:{decimals:18,name:"Juneo BCH1-Chain",symbol:"BCH1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/BCH1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/12",apiUrl:"https://juneoscan.io/chain/12/api"}}}),WA=f({id:45004,name:"Juneo DAI1-Chain",nativeCurrency:{decimals:18,name:"Juneo DAI1-Chain",symbol:"DAI1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/DAI1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/5",apiUrl:"https://juneoscan.io/chain/5/api"}}}),qA=f({id:45010,name:"Juneo DOGE1-Chain",nativeCurrency:{decimals:18,name:"Juneo DOGE1-Chain",symbol:"DOGE1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/DOGE1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/10",apiUrl:"https://juneoscan.io/chain/10/api"}}}),YA=f({id:45011,name:"Juneo EUR1-Chain",nativeCurrency:{decimals:18,name:"Juneo EUR1-Chain",symbol:"EUR1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/EUR1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/6",apiUrl:"https://juneoscan.io/chain/6/api"}}}),KA=f({id:45008,name:"Juneo GLD1-Chain",nativeCurrency:{decimals:18,name:"Juneo GLD1-Chain",symbol:"GLD1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/GLD1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/8",apiUrl:"https://juneoscan.io/chain/8/api"}}}),ZA=f({id:45014,name:"Juneo LINK1-Chain",nativeCurrency:{decimals:18,name:"Juneo LINK1-Chain",symbol:"LINK1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/LINK1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/13",apiUrl:"https://juneoscan.io/chain/13/api"}}}),XA=f({id:45009,name:"Juneo LTC1-Chain",nativeCurrency:{decimals:18,name:"Juneo LTC1-Chain",symbol:"LTC1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/LTC1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/11",apiUrl:"https://juneoscan.io/chain/11/api"}}}),QA=f({id:45007,name:"Juneo mBTC1-Chain",nativeCurrency:{decimals:18,name:"Juneo mBTC1-Chain",symbol:"mBTC1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/mBTC1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/9",apiUrl:"https://juneoscan.io/chain/9/api"}}}),JA=f({id:45012,name:"Juneo SGD1-Chain",nativeCurrency:{decimals:18,name:"Juneo SGD1-Chain",symbol:"SGD1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/SGD1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/7",apiUrl:"https://juneoscan.io/chain/7/api"}}}),eP=f({id:101003,name:"Socotra JUNE-Chain",nativeCurrency:{decimals:18,name:"Socotra JUNE-Chain",symbol:"JUNE"},rpcUrls:{default:{http:["https://rpc.socotra-testnet.network/ext/bc/JUNE/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://socotra.juneoscan.io/chain/2",apiUrl:"https://socotra.juneoscan.io/chain/2/api"}},testnet:!0}),tP=f({id:45006,name:"Juneo USD1-Chain",nativeCurrency:{decimals:18,name:"Juneo USD1-Chain",symbol:"USD1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/USD1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/4",apiUrl:"https://juneoscan.io/chain/4/api"}}}),rP=f({id:45005,name:"Juneo USDT1-Chain",nativeCurrency:{decimals:18,name:"Juneo USDT1-Chain",symbol:"USDT1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/USDT1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/3",apiUrl:"https://juneoscan.io/chain/3/api"}}}),nP=f({id:8217,name:"Kaia",nativeCurrency:{decimals:18,name:"Kaia",symbol:"KAIA"},rpcUrls:{default:{http:["https://public-en.node.kaia.io"]}},blockExplorers:{default:{name:"KaiaScan",url:"https://kaiascan.io",apiUrl:"https://api-cypress.klaytnscope.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96002415}}}),sP=f({id:1001,name:"Kairos Testnet",network:"kairos",nativeCurrency:{decimals:18,name:"Kairos KAIA",symbol:"KAIA"},rpcUrls:{default:{http:["https://public-en-kairos.node.kaia.io"]}},blockExplorers:{default:{name:"KaiaScan",url:"https://kairos.kaiascan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:123390593}},testnet:!0}),aP=f({id:1802203764,name:"Kakarot Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.kakarot.org"]}},blockExplorers:{default:{name:"Kakarot Scan",url:"https://sepolia.kakarotscan.org"}},testnet:!0}),oP=f({id:920637907288165,name:"Kakarot Starknet Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.kakarot.org"]}},blockExplorers:{default:{name:"Kakarot Scan",url:"https://sepolia.kakarotscan.org"}},testnet:!0}),iP=f({id:24,name:"KardiaChain Mainnet",nativeCurrency:{name:"KAI",symbol:"KAI",decimals:18},rpcUrls:{default:{http:["https://rpc.kardiachain.io"]}},blockExplorers:{default:{name:"KardiaChain Explorer",url:"https://explorer.kardiachain.io"}},testnet:!1}),cP=f({id:686,name:"Karura",network:"karura",nativeCurrency:{name:"Karura",symbol:"KAR",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-karura.aca-api.network"],webSocket:["wss://eth-rpc-karura.aca-api.network"]}},blockExplorers:{default:{name:"Karura Blockscout",url:"https://blockscout.karura.network",apiUrl:"https://blockscout.karura.network/api"}},testnet:!1}),lP=f({id:747474,name:"Katana",network:"katana",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.katana.network"]}},blockExplorers:{default:{name:"katana explorer",url:"https://katanascan.com"}},testnet:!1}),uP=f({id:2222,name:"Kava EVM",network:"kava-mainnet",nativeCurrency:{name:"Kava",symbol:"KAVA",decimals:18},rpcUrls:{default:{http:["https://evm.kava.io"]}},blockExplorers:{default:{name:"Kava EVM Explorer",url:"https://kavascan.com",apiUrl:"https://kavascan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3661165}},testnet:!1}),dP=f({id:2221,name:"Kava EVM Testnet",network:"kava-testnet",nativeCurrency:{name:"Kava",symbol:"KAVA",decimals:18},rpcUrls:{default:{http:["https://evm.testnet.kava.io"]}},blockExplorers:{default:{name:"Kava EVM Testnet Explorer",url:"https://testnet.kavascan.com/",apiUrl:"https://testnet.kavascan.com/api"}},contracts:{multicall3:{address:"0xDf1D724A7166261eEB015418fe8c7679BBEa7fd6",blockCreated:7242179}},testnet:!0}),fP=f({id:321,name:"KCC Mainnet",network:"KCC Mainnet",nativeCurrency:{decimals:18,name:"KCS",symbol:"KCS"},rpcUrls:{default:{http:["https://kcc-rpc.com"]}},blockExplorers:{default:{name:"KCC Explorer",url:"https://explorer.kcc.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11760430}},testnet:!1}),pP=f({id:1336,name:"Kii Testnet Oro",network:"kii-testnet-oro",nativeCurrency:{name:"Kii",symbol:"KII",decimals:18},rpcUrls:{default:{http:["https://json-rpc.uno.sentry.testnet.v3.kiivalidator.com"]}},blockExplorers:{default:{name:"KiiExplorer",url:"https://explorer.kiichain.io/testnet"}},testnet:!0}),hP=f({id:7887,name:"Kinto Mainnet",network:"Kinto Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.kinto.xyz/http"]}},blockExplorers:{default:{name:"Kinto Explorer",url:"https://explorer.kinto.xyz"}},testnet:!1}),mP=f({id:8217,name:"Klaytn",nativeCurrency:{decimals:18,name:"Klaytn",symbol:"KLAY"},rpcUrls:{default:{http:["https://public-en-cypress.klaytn.net"]}},blockExplorers:{default:{name:"KlaytnScope",url:"https://scope.klaytn.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96002415}}}),bP=f({id:1001,name:"Klaytn Baobab Testnet",network:"klaytn-baobab",nativeCurrency:{decimals:18,name:"Baobab Klaytn",symbol:"KLAY"},rpcUrls:{default:{http:["https://public-en-baobab.klaytn.net"]}},blockExplorers:{default:{name:"KlaytnScope",url:"https://baobab.klaytnscope.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:123390593}},testnet:!0}),yP=f({id:701,name:"Koi Network",nativeCurrency:{decimals:18,name:"Koi Network Native Token",symbol:"KRING"},rpcUrls:{default:{http:["https://koi-rpc.darwinia.network"],webSocket:["wss://koi-rpc.darwinia.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://koi-scan.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:180001}},testnet:!0}),gP=f({id:255,name:"Kroma",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://api.kroma.network"]}},blockExplorers:{default:{name:"Kroma Explorer",url:"https://blockscout.kroma.network",apiUrl:"https://blockscout.kroma.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:16054868}},testnet:!1}),xP=f({id:2358,name:"Kroma Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://api.sepolia.kroma.network"]}},blockExplorers:{default:{name:"Kroma Sepolia Explorer",url:"https://blockscout.sepolia.kroma.network",apiUrl:"https://blockscout.sepolia.kroma.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:8900914}},testnet:!0}),wP=f({id:12324,name:"L3X Protocol",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.l3x.com"],webSocket:["wss://rpc-mainnet.l3x.com"]}},blockExplorers:{default:{name:"L3X Mainnet Explorer",url:"https://explorer.l3x.com",apiUrl:"https://explorer.l3x.com/api/v2"}},testnet:!1}),vP=f({id:12325,name:"L3X Protocol Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.l3x.com"],webSocket:["wss://rpc-testnet.l3x.com"]}},blockExplorers:{default:{name:"L3X Testnet Explorer",url:"https://explorer-testnet.l3x.com",apiUrl:"https://explorer-testnet.l3x.com/api/v2"}},testnet:!0}),kP=f({id:360890,name:"LAVITA Mainnet",nativeCurrency:{name:"vTFUEL",symbol:"vTFUEL",decimals:18},rpcUrls:{default:{http:["https://tsub360890-eth-rpc.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"LAVITA Explorer",url:"https://tsub360890-explorer.thetatoken.org"}},testnet:!1}),EP=f({id:232,name:"Lens",nativeCurrency:{name:"GHO",symbol:"GHO",decimals:18},rpcUrls:{default:{http:["https://rpc.lens.xyz"]}},blockExplorers:{default:{name:"Lens Block Explorer",url:"https://explorer.lens.xyz",apiUrl:"https://explorer.lens.xyz/api"}}}),CP=f({id:37111,name:"Lens Testnet",nativeCurrency:{name:"GRASS",symbol:"GRASS",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.lens.dev"],webSocket:["wss://rpc.testnet.lens.dev/ws"]}},blockExplorers:{default:{name:"Lens Block Explorer",url:"https://block-explorer.testnet.lens.dev",apiUrl:"https://block-explorer-api.staging.lens.dev/api"}},testnet:!0}),TP=f({id:21363,name:"Lestnet",nativeCurrency:{name:"Lestnet Ether",symbol:"LETH",decimals:18},rpcUrls:{default:{http:["https://service.lestnet.org"]}},blockExplorers:{default:{name:"Lestnet Explorer",url:"https://explore.lestnet.org"}},testnet:!0}),SP=f({id:1891,name:"LightLink Pegasus Testnet",network:"lightlink-pegasus",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://replicator.pegasus.lightlink.io/rpc/v1"]}},blockExplorers:{default:{name:"LightLink Pegasus Explorer",url:"https://pegasus.lightlink.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:127188532}},testnet:!0}),AP=f({id:1890,name:"LightLink Phoenix Mainnet",network:"lightlink-phoenix",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://replicator.phoenix.lightlink.io/rpc/v1"]}},blockExplorers:{default:{name:"LightLink Phoenix Explorer",url:"https://phoenix.lightlink.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:125499184}},testnet:!1});async function PP(e,t){var s,a,o;const{account:r=e.account}=t;if(!r)throw new gn;const n=Ke(r);try{const{accessList:i,blockNumber:c,blockTag:l,data:u,gas:d,gasPrice:p,maxFeePerGas:h,maxPriorityFeePerGas:y,nonce:g,to:k,value:v,...w}=t,C=(typeof c=="bigint"?W(c):void 0)||l;jr(t);const U=(o=(a=(s=e.chain)==null?void 0:s.formatters)==null?void 0:a.transactionRequest)==null?void 0:o.format,T=(U||Sr)({...As(w,{format:U}),account:n,accessList:i,data:u,gas:d,gasPrice:p,maxFeePerGas:h,maxPriorityFeePerGas:y,nonce:g,to:k,value:v},"estimateGas"),{baseFeePerGas:m,gasLimit:b,priorityFeePerGas:x}=await e.request({method:"linea_estimateGas",params:C?[T,C]:[T]});return{baseFeePerGas:BigInt(m),gasLimit:BigInt(b),priorityFeePerGas:BigInt(x)}}catch(i){throw qd(i,{...t,account:n,chain:e.chain})}}const Zf={fees:{estimateFeesPerGas:ky,async maxPriorityFeePerGas({block:e,client:t,request:r}){const n=await ky({block:e,client:t,multiply:s=>s,request:r,type:"eip1559"});return n!=null&&n.maxPriorityFeePerGas?n.maxPriorityFeePerGas:null}}};async function ky({client:e,multiply:t,request:r,type:n}){try{const s=await PP(e,{...r,account:r==null?void 0:r.account}),{priorityFeePerGas:a}=s,i=t(BigInt(s.baseFeePerGas))+a;return n==="legacy"?{gasPrice:i}:{maxFeePerGas:i,maxPriorityFeePerGas:a}}catch{return null}}const IP=f({...Zf,id:59144,name:"Linea Mainnet",blockTime:2e3,nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build",apiUrl:"https://api.lineascan.build/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:42},ensRegistry:{address:"0x50130b669B28C339991d8676FA73CF122a121267",blockCreated:6682888},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:22222151}},ensTlds:[".linea.eth"],testnet:!1}),OP=f({id:59140,name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build",apiUrl:"https://api-goerli.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:498623}},testnet:!0}),BP=f({...Zf,id:59141,name:"Linea Sepolia Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.sepolia.linea.build"],webSocket:["wss://rpc.sepolia.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.lineascan.build",apiUrl:"https://api-sepolia.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:227427},ensRegistry:{address:"0x5B2636F0f2137B4aE722C01dd5122D7d3e9541f7",blockCreated:2395094},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:17168484}},ensTlds:[".linea.eth"],testnet:!0}),MP=f({id:59140,name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build",apiUrl:"https://goerli.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:498623}},testnet:!0}),bl=1,_P=f({...j,id:1135,name:"Lisk",network:"lisk",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.api.lisk.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.lisk.com",apiUrl:"https://blockscout.lisk.com/api"}},contracts:{...j.contracts,multicall3:{address:"0xA9d71E1dd7ca26F26e656E66d6AA81ed7f745bf0"},l2OutputOracle:{[bl]:{address:"0x113cB99283AF242Da0A0C54347667edF531Aa7d6"}},portal:{[bl]:{address:"0x26dB93F8b8b4f7016240af62F7730979d353f9A7"}},l1StandardBridge:{[bl]:{address:"0x2658723Bf70c7667De6B25F99fcce13A16D25d08"}}},sourceId:bl}),yl=11155111,UP=f({...j,id:4202,network:"lisk-sepolia",name:"Lisk Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.sepolia-api.lisk.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-blockscout.lisk.com",apiUrl:"https://sepolia-blockscout.lisk.com/api"}},contracts:{...j.contracts,l2OutputOracle:{[yl]:{address:"0xA0E35F56C318DE1bD5D9ca6A94Fe7e37C5663348"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[yl]:{address:"0xe3d90F21490686Ec7eF37BE788E02dfC12787264"}},l1StandardBridge:{[yl]:{address:"0x1Fb30e446eA791cd1f011675E5F3f5311b70faF5"}}},testnet:!0,sourceId:yl}),DP=f({id:9496,name:"Load Alphanet",nativeCurrency:{name:"Testnet LOAD",symbol:"tLOAD",decimals:18},rpcUrls:{default:{http:["https://alphanet.load.network"]}},blockExplorers:{default:{name:"Load Alphanet Explorer",url:"https://explorer.load.network"}},testnet:!0}),FP=f({id:1337,name:"Localhost",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),NP=f({id:15551,name:"LoopNetwork Mainnet",nativeCurrency:{name:"LOOP",symbol:"LOOP",decimals:18},rpcUrls:{default:{http:["https://api.mainnetloop.com"]}},blockExplorers:{default:{name:"LoopNetwork Blockchain Explorer",url:"https://explorer.mainnetloop.com/"}},testnet:!1}),zP=f({id:42,network:"lukso",name:"LUKSO",nativeCurrency:{name:"LUKSO",symbol:"LYX",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.lukso.network"],webSocket:["wss://ws-rpc.mainnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Mainnet Explorer",url:"https://explorer.execution.mainnet.lukso.network",apiUrl:"https://api.explorer.execution.mainnet.lukso.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:468183}}}),LP=f({id:4201,name:"LUKSO Testnet",nativeCurrency:{decimals:18,name:"LUKSO Testnet",symbol:"LYXt"},rpcUrls:{default:{http:["https://rpc.testnet.lukso.network"],webSocket:["wss://ws-rpc.testnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Testnet Explorer",url:"https://explorer.execution.testnet.lukso.network",apiUrl:"https://api.explorer.execution.testnet.lukso.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:605348}},testnet:!0}),RP=f({id:994873017,name:"Lumia Mainnet",network:"LumiaMainnet",nativeCurrency:{name:"Lumia",symbol:"LUMIA",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.lumia.org"]}},blockExplorers:{default:{name:"Lumia Explorer",url:"https://explorer.lumia.org/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3975939}},testnet:!1}),HP=f({id:1952959480,name:"Lumia Testnet",network:"LumiaTestnet",nativeCurrency:{name:"Lumia",symbol:"LUMIA",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.lumia.org"]}},blockExplorers:{default:{name:"Lumia Testnet Explorer",url:"https://testnet-explorer.lumia.org/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2235063}},testnet:!0}),$P=f({id:96370,name:"Lumoz",nativeCurrency:{decimals:18,name:"Lumoz Token",symbol:"MOZ"},rpcUrls:{default:{http:["https://rpc.lumoz.org"]}},blockExplorers:{default:{name:"Lumoz Scan",url:"https://scan.lumoz.info"}},testnet:!1}),GP=f({id:105363,name:"Lumoz Testnet",nativeCurrency:{decimals:18,name:"Lumoz Testnet Token",symbol:"MOZ"},rpcUrls:{default:{http:["https://testnet-rpc.lumoz.org"]}},testnet:!0}),jP=f({id:721,name:"Lycan",nativeCurrency:{decimals:18,name:"Lycan",symbol:"LYC"},rpcUrls:{default:{http:["https://rpc.lycanchain.com","https://us-east.lycanchain.com","https://us-west.lycanchain.com","https://eu-north.lycanchain.com","https://eu-west.lycanchain.com","https://asia-southeast.lycanchain.com"],webSocket:["wss://rpc.lycanchain.com","wss://us-east.lycanchain.com","wss://us-west.lycanchain.com","wss://eu-north.lycanchain.com","wss://eu-west.lycanchain.com","wss://asia-southeast.lycanchain.com"]}},blockExplorers:{default:{name:"Lycan Explorer",url:"https://explorer.lycanchain.com"}}}),VP=f({id:957,name:"Lyra Chain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.lyra.finance"]}},blockExplorers:{default:{name:"Lyra Explorer",url:"https://explorer.lyra.finance",apiUrl:"https://explorer.lyra.finance/api/v2"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1935198}}}),WP=f({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),qP=f({id:595,name:"Mandala TC9",network:"mandala",nativeCurrency:{name:"Mandala",symbol:"mACA",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-tc9.aca-staging.network"],webSocket:["wss://eth-rpc-tc9.aca-staging.network"]}},blockExplorers:{default:{name:"Mandala Blockscout",url:"https://blockscout.mandala.aca-staging.network",apiUrl:"https://blockscout.mandala.aca-staging.network/api"}},testnet:!0}),YP=f({id:169,name:"Manta Pacific Mainnet",network:"manta",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://pacific-rpc.manta.network/http"]}},blockExplorers:{default:{name:"Manta Explorer",url:"https://pacific-explorer.manta.network",apiUrl:"https://pacific-explorer.manta.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:332890}}}),KP=f({id:3441006,name:"Manta Pacific Sepolia Testnet",network:"manta-sepolia",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://pacific-rpc.sepolia-testnet.manta.network/http"]}},blockExplorers:{default:{name:"Manta Sepolia Testnet Explorer",url:"https://pacific-explorer.sepolia-testnet.manta.network",apiUrl:"https://pacific-explorer.sepolia-testnet.manta.network/api"}},contracts:{multicall3:{address:"0xca54918f7B525C8df894668846506767412b53E3",blockCreated:479584}},testnet:!0}),ZP=f({id:3441005,name:"Manta Pacific Testnet",network:"manta-testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://manta-testnet.calderachain.xyz/http"]}},blockExplorers:{default:{name:"Manta Testnet Explorer",url:"https://pacific-explorer.testnet.manta.network",apiUrl:"https://pacific-explorer.testnet.manta.network/api"}},contracts:{multicall3:{address:"0x211B1643b95Fe76f11eD8880EE810ABD9A4cf56C",blockCreated:419915}},testnet:!0}),XP=f({id:5e3,name:"Mantle",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Explorer",url:"https://mantlescan.xyz/",apiUrl:"https://api.mantlescan.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:304717}}}),QP=f({id:5003,name:"Mantle Sepolia Testnet",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.sepolia.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Testnet Explorer",url:"https://explorer.sepolia.mantle.xyz/",apiUrl:"https://explorer.sepolia.mantle.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4584012}},testnet:!0}),JP=f({id:5001,name:"Mantle Testnet",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.testnet.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Testnet Explorer",url:"https://explorer.testnet.mantle.xyz",apiUrl:"https://explorer.testnet.mantle.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:561333}},testnet:!0}),eI=f({id:5887,name:"MANTRA DuKong EVM Testnet",nativeCurrency:{decimals:18,name:"MANTRA",symbol:"MANTRA"},rpcUrls:{default:{http:["https://evm.dukong.mantrachain.io"]}},blockExplorers:{default:{name:"MANTRAScan",url:"https://mantrascan.io/dukong"}},testnet:!0}),tI=f({id:5888,name:"MANTRA EVM",nativeCurrency:{decimals:18,name:"OM",symbol:"OM"},rpcUrls:{default:{http:["https://evm.mantrachain.io"],webSocket:["https://evm.mantrachain.io/ws"]}},blockExplorers:{default:{name:"MANTRA Scan",url:"https://mantrascan.io/mainnet"}}}),rI=f({id:22776,name:"MAP Protocol",nativeCurrency:{decimals:18,name:"MAPO",symbol:"MAPO"},rpcUrls:{default:{http:["https://rpc.maplabs.io"]}},blockExplorers:{default:{name:"MAPO Scan",url:"https://maposcan.io"}},testnet:!1}),nI=f({id:698,name:"Matchain",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://rpc.matchain.io"]}},blockExplorers:{default:{name:"Matchain Scan",url:"https://matchscan.io"}}}),sI=f({id:699,name:"Matchain Testnet",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.matchain.io"]}},blockExplorers:{default:{name:"Matchain Scan",url:"https://testnet.matchscan.io"}},testnet:!0}),aI=f({id:29548,name:"MCH Verse",nativeCurrency:{name:"Oasys",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.oasys.mycryptoheroes.net"]}},blockExplorers:{default:{name:"MCH Verse Explorer",url:"https://explorer.oasys.mycryptoheroes.net",apiUrl:"https://explorer.oasys.mycryptoheroes.net/api"}},testnet:!1}),oI=f({id:6342,blockTime:1e3,name:"MegaETH Testnet",nativeCurrency:{name:"MegaETH Testnet Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://carrot.megaeth.com/rpc"],webSocket:["wss://carrot.megaeth.com/ws"]}},blockExplorers:{default:{name:"MegaETH Testnet Explorer",url:"https://www.megaexplorer.xyz/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!0}),iI=f({id:7078815900,name:"Mekong Pectra Devnet",nativeCurrency:{name:"eth",symbol:"eth",decimals:18},rpcUrls:{default:{http:["https://rpc.mekong.ethpandaops.io"]}},blockExplorers:{default:{name:"Block Explorer",url:"https://explorer.mekong.ethpandaops.io"}},testnet:!0}),cI=f({id:333000333,name:"Meld",nativeCurrency:{decimals:18,name:"Meld",symbol:"MELD"},rpcUrls:{default:{http:["https://rpc-1.meld.com"]}},blockExplorers:{default:{name:"MELDscan",url:"https://meldscan.io"}},contracts:{multicall3:{address:"0x769ee5a8e82c15c1b6e358f62ac8eb6e3abe8dc5",blockCreated:360069}}}),lI=f({id:4352,name:"MemeCore",nativeCurrency:{decimals:18,name:"M",symbol:"M"},rpcUrls:{default:{http:["https://rpc.memecore.net"],webSocket:["wss://ws.memecore.net"]}},blockExplorers:{default:{name:"MemeCore Explorer",url:"https://memecorescan.io",apiUrl:"https://api.memecorescan.io/api"},okx:{name:"MemeCore Explorer",url:"https://web3.okx.com/explorer/memecore"},memecore:{name:"MemeCore Explorer",url:"https://blockscout.memecore.com",apiUrl:"https://blockscout.memecore.com/api"}}}),uI=f({id:43521,name:"Formicarium",nativeCurrency:{decimals:18,name:"M",symbol:"M"},rpcUrls:{default:{http:["https://rpc.formicarium.memecore.net"],webSocket:["wss://ws.formicarium.memecore.net"]}},blockExplorers:{default:{name:"MemeCore Testnet Explorer",url:"https://formicarium.memecorescan.io"},okx:{name:"MemeCore Testnet Explorer",url:"https://web3.okx.com/explorer/formicarium-testnet"},memecore:{name:"MemeCore Testnet Explorer",url:"https://formicarium.blockscout.memecore.com",apiUrl:"https://formicarium.blockscout.memecore.com/api"}},testnet:!0}),dI=f({id:4200,name:"Merlin",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.merlinchain.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://scan.merlinchain.io",apiUrl:"https://scan.merlinchain.io/api"}}}),fI=f({id:4203,name:"Merlin Erigon Testnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-erigon-rpc.merlinchain.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://testnet-erigon-scan.merlinchain.io",apiUrl:"https://testnet-erigon-scan.merlinchain.io/api"}},testnet:!0}),pI=f({id:571,name:"MetaChain Mainnet",nativeCurrency:{name:"Metatime Coin",symbol:"MTC",decimals:18},rpcUrls:{default:{http:["https://rpc.metatime.com"]}},blockExplorers:{default:{name:"MetaExplorer",url:"https://explorer.metatime.com"}},contracts:{multicall3:{address:"0x0000000000000000000000000000000000003001",blockCreated:0}}}),hI=f({id:1453,name:"MetaChain Istanbul",nativeCurrency:{name:"Metatime Coin",symbol:"MTC",decimals:18},rpcUrls:{default:{http:["https://istanbul-rpc.metachain.dev"]}},blockExplorers:{default:{name:"MetaExplorer",url:"https://istanbul-explorer.metachain.dev"}},contracts:{multicall3:{address:"0x0000000000000000000000000000000000003001",blockCreated:0}},testnet:!0}),mI=f({id:11,name:"Metadium Network",nativeCurrency:{decimals:18,name:"META",symbol:"META"},rpcUrls:{default:{http:["https://api.metadium.com/prod"]}},blockExplorers:{default:{name:"Metadium Explorer",url:"https://explorer.metadium.com"}},testnet:!1}),gl=1,bI=f({...j,id:1750,name:"Metal L2",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.metall2.com"],webSocket:["wss://rpc.metall2.com"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.metall2.com",apiUrl:"https://explorer.metall2.com/api"}},contracts:{...j.contracts,l2OutputOracle:{[gl]:{address:"0x3B1F7aDa0Fcc26B13515af752Dd07fB1CAc11426"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},portal:{[gl]:{address:"0x3F37aBdE2C6b5B2ed6F8045787Df1ED1E3753956"}},l1StandardBridge:{[gl]:{address:"0x6d0f65D59b55B0FEC5d2d15365154DcADC140BF3"}}},sourceId:gl}),yI=f({id:82,name:"Meter",nativeCurrency:{decimals:18,name:"MTR",symbol:"MTR"},rpcUrls:{default:{http:["https://rpc.meter.io"]}},blockExplorers:{default:{name:"MeterScan",url:"https://scan.meter.io"}}}),gI=f({id:83,name:"Meter Testnet",nativeCurrency:{decimals:18,name:"MTR",symbol:"MTR"},rpcUrls:{default:{http:["https://rpctest.meter.io"]}},blockExplorers:{default:{name:"MeterTestnetScan",url:"https://scan-warringstakes.meter.io"}}}),xI=f({id:1088,name:"Metis",nativeCurrency:{decimals:18,name:"Metis",symbol:"METIS"},rpcUrls:{default:{http:["https://metis.rpc.hypersync.xyz","https://metis-pokt.nodies.app","https://api.blockeden.xyz/metis/67nCBdZQSH9z3YqDDjdm","https://metis-andromeda.rpc.thirdweb.com","https://metis-andromeda.gateway.tenderly.co","https://metis.api.onfinality.io/public","https://andromeda.metis.io/?owner=1088","https://metis-mainnet.public.blastapi.io"],webSocket:["wss://metis-rpc.publicnode.com","wss://metis.drpc.org"]}},blockExplorers:{default:{name:"Metis Explorer",url:"https://explorer.metis.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2338552}}}),wI=f({id:599,name:"Metis Goerli",nativeCurrency:{decimals:18,name:"Metis Goerli",symbol:"METIS"},rpcUrls:{default:{http:["https://goerli.gateway.metisdevops.link"]}},blockExplorers:{default:{name:"Metis Goerli Explorer",url:"https://goerli.explorer.metisdevops.link",apiUrl:"https://goerli.explorer.metisdevops.link/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1006207}}}),vI=f({id:59902,name:"Metis Sepolia",nativeCurrency:{decimals:18,name:"Test Metis",symbol:"tMETIS"},rpcUrls:{default:{http:["https://sepolia.metisdevops.link","https://metis-sepolia-rpc.publicnode.com","https://metis-sepolia.gateway.tenderly.co"],webSocket:["wss://metis-sepolia-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Metis Sepolia Explorer",url:"https://sepolia-explorer.metisdevops.link",apiUrl:"https://sepolia-explorer.metisdevops.link/api-docs"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:224185}}}),kI=f({id:7518,name:"MEVerse Chain Mainnet",nativeCurrency:{decimals:18,name:"MEVerse",symbol:"MEV"},rpcUrls:{default:{http:["https://rpc.meversemainnet.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://www.meversescan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:86881340}}}),EI=f({id:4759,name:"MEVerse Chain Testnet",nativeCurrency:{decimals:18,name:"MEVerse",symbol:"MEV"},rpcUrls:{default:{http:["https://rpc.meversetestnet.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.meversescan.io/"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:64371115}},testnet:!0}),CI=f({id:185,name:"Mint Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.mintchain.io"]}},blockExplorers:{default:{name:"Mintchain explorer",url:"https://explorer.mintchain.io"}},testnet:!1}),TI=f({id:1686,name:"Mint Sepolia Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.mintchain.io"]}},blockExplorers:{default:{name:"Mintchain Testnet explorer",url:"https://testnet-explorer.mintchain.io"}},testnet:!0}),SI=f({id:124832,name:"Mitosis Testnet",nativeCurrency:{name:"MITO",symbol:"MITO",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.mitosis.org"]}},blockExplorers:{default:{name:"Mitosis testnet explorer",url:"https://testnet.mitosiscan.xyz"}},testnet:!0}),xl=1,AI=f({...j,id:34443,name:"Mode Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.mode.network"]}},blockExplorers:{default:{name:"Modescan",url:"https://modescan.io"}},contracts:{...j.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2465882},l2OutputOracle:{[xl]:{address:"0x4317ba146D4933D889518a3e5E11Fe7a53199b04"}},portal:{[xl]:{address:"0x8B34b14c7c7123459Cf3076b8Cb929BE097d0C07"}},l1StandardBridge:{[xl]:{address:"0x735aDBbE72226BD52e818E7181953f42E3b0FF21"}}},sourceId:xl}),wl=11155111,PI=f({...j,id:919,name:"Mode Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.mode.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia.explorer.mode.network",apiUrl:"https://sepolia.explorer.mode.network/api"}},contracts:{...j.contracts,l2OutputOracle:{[wl]:{address:"0x2634BD65ba27AB63811c74A63118ACb312701Bfa",blockCreated:3778393}},portal:{[wl]:{address:"0x320e1580effF37E008F1C92700d1eBa47c1B23fD",blockCreated:3778395}},l1StandardBridge:{[wl]:{address:"0xbC5C679879B2965296756CD959C3C739769995E2",blockCreated:3778392}},multicall3:{address:"0xBAba8373113Fb7a68f195deF18732e01aF8eDfCF",blockCreated:3019007}},testnet:!0,sourceId:wl}),II=f({id:143,name:"Monad",blockTime:400,nativeCurrency:{name:"Monad",symbol:"MON",decimals:18},rpcUrls:{default:{http:["https://rpc.monad.xyz","https://rpc1.monad.xyz"],webSocket:["wss://rpc.monad.xyz","wss://rpc1.monad.xyz"]}},blockExplorers:{default:{name:"MonadVision",url:"https://monadvision.com"},monadscan:{name:"Monadscan",url:"https://monadscan.com",apiUrl:"https://api.monadscan.com/api"}},testnet:!1,contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:9248132}}}),OI=f({id:10143,name:"Monad Testnet",blockTime:400,nativeCurrency:{name:"Testnet MON Token",symbol:"MON",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.monad.xyz"]}},blockExplorers:{default:{name:"Monad Testnet explorer",url:"https://testnet.monadexplorer.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:251449}},testnet:!0}),BI=f({id:1287,name:"Moonbase Alpha",nativeCurrency:{decimals:18,name:"DEV",symbol:"DEV"},rpcUrls:{default:{http:["https://rpc.api.moonbase.moonbeam.network"],webSocket:["wss://wss.api.moonbase.moonbeam.network"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonbase.moonscan.io",apiUrl:"https://moonbase.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1850686}},testnet:!0}),MI=f({id:1284,name:"Moonbeam",nativeCurrency:{decimals:18,name:"GLMR",symbol:"GLMR"},rpcUrls:{default:{http:["https://rpc.api.moonbeam.network"],webSocket:["wss://wss.api.moonbeam.network"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonscan.io",apiUrl:"https://api-moonbeam.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:609002}},testnet:!1}),_I=f({id:1281,name:"Moonbeam Development Node",nativeCurrency:{decimals:18,name:"DEV",symbol:"DEV"},rpcUrls:{default:{http:["http://127.0.0.1:9944"],webSocket:["wss://127.0.0.1:9944"]}}}),UI=f({id:1285,name:"Moonriver",nativeCurrency:{decimals:18,name:"MOVR",symbol:"MOVR"},rpcUrls:{default:{http:["https://rpc.api.moonriver.moonbeam.network"],webSocket:["wss://wss.api.moonriver.moonbeam.network"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonriver.moonscan.io",apiUrl:"https://api-moonriver.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1597904}},testnet:!1}),DI=f({id:2818,name:"Morph",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.morphl2.io"],webSocket:["wss://rpc.morphl2.io:8443"]}},blockExplorers:{default:{name:"Morph Explorer",url:"https://explorer.morphl2.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3654913}},testnet:!1}),FI=f({id:2810,name:"Morph Holesky",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-quicknode-holesky.morphl2.io"],webSocket:["wss://rpc-quicknode-holesky.morphl2.io"]}},blockExplorers:{default:{name:"Morph Holesky Explorer",url:"https://explorer-holesky.morphl2.io",apiUrl:"https://explorer-api-holesky.morphl2.io/api?"}},testnet:!0}),NI=f({id:2710,name:"Morph Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.morphl2.io"]}},blockExplorers:{default:{name:"Morph Testnet Explorer",url:"https://explorer-testnet.morphl2.io",apiUrl:"https://explorer-api-testnet.morphl2.io/api"}},testnet:!0}),zI=f({id:5551,name:"Nahmii 2 Mainnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://l2.nahmii.io"]}},blockExplorers:{default:{name:"Nahmii 2 Explorer",url:"https://explorer.n2.nahmii.io"}},testnet:!1}),LI=f({id:22222,name:"Nautilus Mainnet",nativeCurrency:{name:"ZBC",symbol:"ZBC",decimals:9},rpcUrls:{default:{http:["https://api.nautilus.nautchain.xyz"]}},blockExplorers:{default:{name:"NautScan",url:"https://nautscan.com"}}}),RI=f({id:397,name:"NEAR Protocol",nativeCurrency:{decimals:18,name:"NEAR",symbol:"NEAR"},rpcUrls:{default:{http:["https://eth-rpc.mainnet.near.org"]}},blockExplorers:{default:{name:"NEAR Explorer",url:"https://eth-explorer.near.org"}},testnet:!1}),HI=f({id:398,name:"NEAR Protocol Testnet",nativeCurrency:{decimals:18,name:"NEAR",symbol:"NEAR"},rpcUrls:{default:{http:["https://eth-rpc.testnet.near.org"]}},blockExplorers:{default:{name:"NEAR Explorer",url:"https://eth-explorer-testnet.near.org"}},testnet:!0}),$I=f({id:245022926,name:"Neon EVM DevNet",nativeCurrency:{name:"NEON",symbol:"NEON",decimals:18},rpcUrls:{default:{http:["https://devnet.neonevm.org"]}},blockExplorers:{default:{name:"Neonscan",url:"https://devnet.neonscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:205206112}},testnet:!0}),GI=f({id:245022934,network:"neonMainnet",name:"Neon EVM MainNet",nativeCurrency:{name:"NEON",symbol:"NEON",decimals:18},rpcUrls:{default:{http:["https://neon-proxy-mainnet.solana.p2p.org"]}},blockExplorers:{default:{name:"Neonscan",url:"https://neonscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:206545524}},testnet:!1}),jI=f({id:47763,name:"Neo X Mainnet",nativeCurrency:{name:"Gas",symbol:"GAS",decimals:18},rpcUrls:{default:{http:["https://mainnet-1.rpc.banelabs.org","https://mainnet-2.rpc.banelabs.org"]}},blockExplorers:{default:{name:"Neo X - Explorer",url:"https://xexplorer.neo.org"}},testnet:!1}),VI=f({id:12227332,name:"Neo X Testnet T4",nativeCurrency:{name:"Gas",symbol:"GAS",decimals:18},rpcUrls:{default:{http:["https://testnet.rpc.banelabs.org/"]}},blockExplorers:{default:{name:"neox-scan",url:"https://xt4scan.ngd.network"}},testnet:!0}),WI=f({id:1012,name:"Newton",nativeCurrency:{name:"Newton",symbol:"NEW",decimals:18},rpcUrls:{default:{http:["https://global.rpc.mainnet.newtonproject.org"]}},blockExplorers:{default:{name:"NewFi explorer",url:"https://explorer.newtonproject.org/"}},testnet:!1}),qI=f({id:4242,name:"Nexi",nativeCurrency:{name:"Nexi",symbol:"NEXI",decimals:18},rpcUrls:{default:{http:["https://rpc.chain.nexi.technology"]}},blockExplorers:{default:{name:"NexiScan",url:"https://www.nexiscan.com",apiUrl:"https://www.nexiscan.com/api"}},contracts:{multicall3:{address:"0x0277A46Cc69A57eE3A6C8c158bA874832F718B8E",blockCreated:25770160}}}),YI=f({id:240,name:"Nexilix Smart Chain",nativeCurrency:{decimals:18,name:"Nexilix",symbol:"NEXILIX"},rpcUrls:{default:{http:["https://rpcurl.pos.nexilix.com"]}},blockExplorers:{default:{name:"NexilixScan",url:"https://scan.nexilix.com"}},contracts:{multicall3:{address:"0x58381c8e2BF9d0C2C4259cA14BdA9Afe02831244",blockCreated:74448}}}),KI=f({id:6900,name:"Nibiru",nativeCurrency:{decimals:18,name:"NIBI",symbol:"NIBI"},rpcUrls:{default:{http:["https://evm-rpc.nibiru.fi"]}},blockExplorers:{default:{name:"NibiScan",url:"https://nibiscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:19587573}}}),ZI=f({id:200024,name:"Nitrograph Testnet",testnet:!0,rpcUrls:{default:{http:["https://rpc-testnet.nitrograph.foundation"]}},nativeCurrency:{name:"Nitro",symbol:"NOS",decimals:18},blockExplorers:{default:{url:"https://explorer-testnet.nitrograph.foundation",name:"Nitrograph Explorer"}}}),XI=f({id:166,name:"Nomina",nativeCurrency:{name:"Nomina",symbol:"NOM",decimals:18},rpcUrls:{default:{http:["https://mainnet.nomina.io"],webSocket:["wss://mainnet.nomina.io"]}},blockExplorers:{default:{name:"Nomina Explorer",url:"https://nomscan.io"}},testnet:!1}),QI=f({id:4090,network:"oasis-testnet",name:"Oasis Testnet",nativeCurrency:{name:"Fasttoken",symbol:"FTN",decimals:18},rpcUrls:{default:{http:["https://rpc1.oasis.bahamutchain.com"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://oasis.ftnscan.com",apiUrl:"https://oasis.ftnscan.com/api"}},testnet:!0}),JI=f({id:248,name:"Oasys",nativeCurrency:{name:"Oasys",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.oasys.games"]}},blockExplorers:{default:{name:"OasysScan",url:"https://scan.oasys.games",apiUrl:"https://scan.oasys.games/api"}}}),eO=f({id:911867,name:"Odyssey Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://odyssey.ithaca.xyz"]}},blockExplorers:{default:{name:"Odyssey Explorer",url:"https://odyssey-explorer.ithaca.xyz",apiUrl:"https://odyssey-explorer.ithaca.xyz/api"}},testnet:!0}),tO=f({id:66,name:"OKC",nativeCurrency:{decimals:18,name:"OKT",symbol:"OKT"},rpcUrls:{default:{http:["https://exchainrpc.okex.org"]}},blockExplorers:{default:{name:"oklink",url:"https://www.oklink.com/okc"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10364792}}}),rO=f({id:311,name:"Omax Mainnet",nativeCurrency:{decimals:18,name:"OMAX",symbol:"OMAX"},rpcUrls:{default:{http:["https://mainapi.omaxray.com"]}},blockExplorers:{default:{name:"Omax Explorer",url:"https://omaxscan.com"}},testnet:!1}),nO=f({id:166,name:"Omni",nativeCurrency:{name:"Omni",symbol:"OMNI",decimals:18},rpcUrls:{default:{http:["https://mainnet.omni.network"],webSocket:["wss://mainnet.omni.network"]}},blockExplorers:{default:{name:"OmniScan",url:"https://omniscan.network"}},testnet:!1}),sO=f({id:164,name:"Omni Omega",nativeCurrency:{name:"Omni",symbol:"OMNI",decimals:18},rpcUrls:{default:{http:["https://omega.omni.network"],webSocket:["wss://omega.omni.network"]}},blockExplorers:{default:{name:"Omega OmniScan",url:"https://omega.omniscan.network/"}},testnet:!0}),aO=f({id:309075,name:"One World Chain Mainnet",nativeCurrency:{decimals:18,name:"OWCT",symbol:"OWCT"},rpcUrls:{default:{http:["https://mainnet-rpc.oneworldchain.org"]}},blockExplorers:{default:{name:"One World Explorer",url:"https://mainnet.oneworldchain.org"}},testnet:!1}),oO=f({id:9700,name:"OORT MainnetDev",nativeCurrency:{decimals:18,name:"OORT",symbol:"OORT"},rpcUrls:{default:{http:["https://dev-rpc.oortech.com"]}},blockExplorers:{default:{name:"OORT MainnetDev Explorer",url:"https://dev-scan.oortech.com"}}}),vl=56,iO=f({id:204,name:"opBNB",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://opbnb-mainnet-rpc.bnbchain.org"]}},blockExplorers:{default:{name:"opBNB (BSCScan)",url:"https://opbnb.bscscan.com",apiUrl:"https://api-opbnb.bscscan.com/api"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:512881},l2OutputOracle:{[vl]:{address:"0x153CAB79f4767E2ff862C94aa49573294B13D169"}},portal:{[vl]:{address:"0x1876EA7702C0ad0C6A2ae6036DE7733edfBca519"}},l1StandardBridge:{[vl]:{address:"0xF05F0e4362859c3331Cb9395CBC201E3Fa6757Ea"}}},sourceId:vl}),kl=97,cO=f({id:5611,name:"opBNB Testnet",nativeCurrency:{decimals:18,name:"tBNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://opbnb-testnet-rpc.bnbchain.org"]}},blockExplorers:{default:{name:"opbnbscan",url:"https://testnet.opbnbscan.com"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3705108},l2OutputOracle:{[kl]:{address:"0xFf2394Bb843012562f4349C6632a0EcB92fC8810"}},portal:{[kl]:{address:"0x4386C8ABf2009aC0c263462Da568DD9d46e52a31"}},l1StandardBridge:{[kl]:{address:"0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840"}}},testnet:!0,sourceId:kl}),lO=f({id:1612,name:"OpenLedger",nativeCurrency:{name:"Open",symbol:"OPEN",decimals:18},rpcUrls:{default:{http:["https://rpc.openledger.xyz"]}},blockExplorers:{default:{name:"OpenLedger Explorer",url:"https://scan.openledger.xyz"}},testnet:!1}),hi=1,uO=f({...j,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:{...j.contracts,disputeGameFactory:{[hi]:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{[hi]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[hi]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[hi]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:hi}),El=5,dO=f({...j,id:420,name:"Optimism Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli.optimism.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io",apiUrl:"https://goerli-optimism.etherscan.io/api"}},contracts:{...j.contracts,l2OutputOracle:{[El]:{address:"0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461},portal:{[El]:{address:"0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383"}},l1StandardBridge:{[El]:{address:"0x636Af16bf2f682dD3109e60102b8E1A089FedAa8"}}},testnet:!0,sourceId:El}),mi=11155111,fO=f({...j,id:11155420,name:"OP Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.optimism.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com",apiUrl:"https://optimism-sepolia.blockscout.com/api"}},contracts:{...j.contracts,disputeGameFactory:{[mi]:{address:"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1"}},l2OutputOracle:{[mi]:{address:"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204},portal:{[mi]:{address:"0x16Fc5058F25648194471939df75CF27A2fdC48BC"}},l1StandardBridge:{[mi]:{address:"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1"}}},testnet:!0,sourceId:mi}),pO=f({id:62050,name:"Optopia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.optopia.ai"]}},blockExplorers:{default:{name:"Optopia Explorer",url:"https://scan.optopia.ai"}},testnet:!1}),hO=f({id:62049,name:"Optopia Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.optopia.ai"]}},blockExplorers:{default:{name:"Optopia Explorer",url:"https://scan-testnet.optopia.ai"}},testnet:!0}),mO=f({id:291,name:"Orderly",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.orderly.network"]}},blockExplorers:{default:{name:"Orderly Explorer",url:"https://explorer.orderly.network"}},testnet:!1}),bO=f({id:4460,name:"Orderly Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://l2-orderly-l2-4460-sepolia-8tc3sd7dvy.t.conduit.xyz"]}},blockExplorers:{default:{name:"Orderly Explorer",url:"https://explorerl2new-orderly-l2-4460-sepolia-8tc3sd7dvy.t.conduit.xyz"}},testnet:!0}),yO=f({id:41144114,name:"Otim Devnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["http://devnet.otim.xyz"]}},contracts:{batchInvoker:{address:"0x5FbDB2315678afecb367f032d93F642f64180aa3"}}}),gO=f({id:11297108109,name:"Palm",nativeCurrency:{decimals:18,name:"PALM",symbol:"PALM"},rpcUrls:{default:{http:["https://palm-mainnet.public.blastapi.io"],webSocket:["wss://palm-mainnet.public.blastapi.io"]}},blockExplorers:{default:{name:"Chainlens",url:"https://palm.chainlens.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15429248}}}),xO=f({id:11297108099,name:"Palm Testnet",nativeCurrency:{decimals:18,name:"PALM",symbol:"PALM"},rpcUrls:{default:{http:["https://palm-mainnet.public.blastapi.io"],webSocket:["wss://palm-mainnet.public.blastapi.io"]}},blockExplorers:{default:{name:"Chainlens",url:"https://palm.chainlens.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15429248}},testnet:!0}),wO=f({id:3338,name:"Peaq",nativeCurrency:{decimals:18,name:"peaq",symbol:"PEAQ"},rpcUrls:{default:{http:["https://quicknode1.peaq.xyz","https://quicknode2.peaq.xyz","https://quicknode3.peaq.xyz"],webSocket:["wss://quicknode1.peaq.xyz","wss://quicknode2.peaq.xyz","wss://quicknode3.peaq.xyz"]}},blockExplorers:{default:{name:"Subscan",url:"https://peaq.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3566354}}}),Cl=1,vO=f({id:424,network:"pgn",name:"PGN",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.publicgoods.network"]}},blockExplorers:{default:{name:"PGN Explorer",url:"https://explorer.publicgoods.network",apiUrl:"https://explorer.publicgoods.network/api"}},contracts:{l2OutputOracle:{[Cl]:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3380209},portal:{[Cl]:{address:"0xb26Fd985c5959bBB382BAFdD0b879E149e48116c"}},l1StandardBridge:{[Cl]:{address:"0xD0204B9527C1bA7bD765Fa5CCD9355d38338272b"}}},formatters:Wf,sourceId:Cl}),Tl=11155111,kO=f({id:58008,network:"pgn-testnet",name:"PGN",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.publicgoods.network"]}},blockExplorers:{default:{name:"PGN Testnet Explorer",url:"https://explorer.sepolia.publicgoods.network",apiUrl:"https://explorer.sepolia.publicgoods.network/api"}},contracts:{l2OutputOracle:{[Tl]:{address:"0xD5bAc3152ffC25318F848B3DD5dA6C85171BaEEe"}},portal:{[Tl]:{address:"0xF04BdD5353Bb0EFF6CA60CfcC78594278eBfE179"}},l1StandardBridge:{[Tl]:{address:"0xFaE6abCAF30D23e233AC7faF747F2fC3a5a6Bfa3"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3754925}},formatters:Wf,sourceId:Tl,testnet:!0}),EO=f({id:13381,name:"Phoenix Blockchain",nativeCurrency:{name:"Phoenix",symbol:"PHX",decimals:18},rpcUrls:{default:{http:["https://rpc.phoenixplorer.com"]}},blockExplorers:{default:{name:"Phoenixplorer",url:"https://phoenixplorer.com",apiUrl:"https://phoenixplorer.com/api"}},contracts:{multicall3:{address:"0x498cF757a575cFF2c2Ed9f532f56Efa797f86442",blockCreated:5620192}}}),CO=f({id:7070,name:"Planq Mainnet",nativeCurrency:{decimals:18,name:"PLQ",symbol:"PLQ"},rpcUrls:{default:{http:["https://planq-rpc.nodies.app","https://evm-rpc.planq.network","https://jsonrpc.planq.nodestake.top"]}},blockExplorers:{default:{name:"Planq Explorer",url:"https://evm.planq.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:8470015}},testnet:!1}),TO=f({id:9745,name:"Plasma",blockTime:1e3,nativeCurrency:{name:"Plasma",symbol:"XPL",decimals:18},rpcUrls:{default:{http:["https://rpc.plasma.to"]}},blockExplorers:{default:{name:"PlasmaScan",url:"https://plasmascan.to"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),SO=f({id:9747,name:"Plasma Devnet",nativeCurrency:{name:"Devnet Plasma",symbol:"XPL",decimals:18},rpcUrls:{default:{http:["https://devnet-rpc.plasma.to"]}},testnet:!0,contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),AO=f({id:9746,name:"Plasma Testnet",nativeCurrency:{name:"Testnet Plasma",symbol:"XPL",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.plasma.to"]}},blockExplorers:{default:{name:"RouteScan",url:"https://testnet.plasmascan.to"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!0}),PO=f({...ar,id:1612127,name:"PlayFi Albireo Testnet",network:"albireo",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://albireo-rpc.playfi.ai"],webSocket:["wss://albireo-rpc-ws.playfi.ai/ws"]}},blockExplorers:{default:{name:"PlayFi Albireo Explorer",url:"https://albireo-explorer.playfi.ai"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"}},testnet:!0}),IO=f({id:242,name:"Plinga",nativeCurrency:{name:"Plinga",symbol:"PLINGA",decimals:18},rpcUrls:{default:{http:["https://rpcurl.mainnet.plgchain.com"]}},blockExplorers:{default:{name:"Plgscan",url:"https://www.plgscan.com"}},contracts:{multicall3:{address:"0x0989576160f2e7092908BB9479631b901060b6e4",blockCreated:204489}}}),OO=f({id:98865,name:"Plume (Legacy)",nativeCurrency:{name:"Plume Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.plumenetwork.xyz"],webSocket:["wss://rpc.plumenetwork.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.plumenetwork.xyz",apiUrl:"https://explorer.plumenetwork.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:48577}},sourceId:1}),BO=f({id:98864,name:"Plume Devnet (Legacy)",nativeCurrency:{name:"Plume Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://test-rpc.plumenetwork.xyz"],webSocket:["wss://test-rpc.plumenetwork.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://test-explorer.plumenetwork.xyz",apiUrl:"https://test-explorer.plumenetwork.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:481948}},testnet:!0,sourceId:11155111}),MO=f({id:98866,name:"Plume",nativeCurrency:{name:"Plume",symbol:"PLUME",decimals:18},rpcUrls:{default:{http:["https://rpc.plume.org"],webSocket:["wss://rpc.plume.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.plume.org",apiUrl:"https://explorer.plume.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:39679}},sourceId:1}),_O=f({id:98867,name:"Plume Testnet",nativeCurrency:{name:"Plume",symbol:"PLUME",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.plume.org"],webSocket:["wss://testnet-rpc.plume.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.plume.org",apiUrl:"https://testnet-explorer.plume.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:199712}},testnet:!0,sourceId:11155111}),UO=f({id:161221135,name:"Plume Testnet (Legacy)",nativeCurrency:{name:"Plume Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.plumenetwork.xyz/http"],webSocket:["wss://testnet-rpc.plumenetwork.xyz/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.plumenetwork.xyz",apiUrl:"https://testnet-explorer.plumenetwork.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:6022332}},testnet:!0,sourceId:11155111}),DO=f({id:631571,name:"Polter Testnet",nativeCurrency:{decimals:18,name:"Polter GHST",symbol:"GHST"},rpcUrls:{default:{http:["https://geist-polter.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Blockscout",url:"https://polter-testnet.explorer.alchemy.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11245}},testnet:!0}),FO=f({id:137,name:"Polygon",blockTime:2e3,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),NO=f({id:80002,name:"Polygon Amoy",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://rpc-amoy.polygon.technology"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://amoy.polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3127388}},testnet:!0}),zO=f({id:80001,name:"Polygon Mumbai",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{default:{http:["https://80001.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://mumbai.polygonscan.com",apiUrl:"https://api-testnet.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}},testnet:!0}),LO=f({id:1101,name:"Polygon zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://zkevm.polygonscan.com",apiUrl:"https://api-zkevm.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:57746}}}),RO=f({id:2442,name:"Polygon zkEVM Cardona",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.cardona.zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://cardona-zkevm.polygonscan.com",apiUrl:"https://cardona-zkevm.polygonscan.com/api"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:114091}}}),HO=f({id:1442,name:"Polygon zkEVM Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.public.zkevm-test.net"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://testnet-zkevm.polygonscan.com",apiUrl:"https://testnet-zkevm.polygonscan.com/api"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:525686}}}),$O=f({id:8008,name:"Polynomial",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.polynomial.fi"]}},blockExplorers:{default:{name:"Polynomial Scan",url:"https://polynomialscan.io"}},testnet:!1,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}}}),GO=f({id:80008,name:"Polynomia Sepolia",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.sepolia.polynomial.fi"]}},blockExplorers:{default:{name:"Polynomial Scan",url:"https://sepolia.polynomialscan.io"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}}}),jO=f({id:60603,name:"POTOS Mainnet",nativeCurrency:{decimals:18,name:"POTOS Token",symbol:"POT"},rpcUrls:{default:{http:["https://rpc.potos.hk"]}},blockExplorers:{default:{name:"POTOS Mainnet explorer",url:"https://scan.potos.hk"}},testnet:!1}),VO=f({id:60600,name:"POTOS Testnet",nativeCurrency:{decimals:18,name:"POTOS Token",symbol:"POT"},rpcUrls:{default:{http:["https://rpc-testnet.potos.hk"]}},blockExplorers:{default:{name:"POTOS Testnet explorer",url:"https://scan-testnet.potos.hk"}},testnet:!0}),WO=f({id:23023,name:"PremiumBlock Testnet",nativeCurrency:{name:"Premium Block",symbol:"PBLK",decimals:18},rpcUrls:{default:{http:["https://rpc.premiumblock.org"]}},blockExplorers:{default:{name:"PremiumBlocks Explorer",url:"https://scan.premiumblock.org"}},testnet:!0}),qO=f({id:369,name:"PulseChain",nativeCurrency:{name:"Pulse",symbol:"PLS",decimals:18},testnet:!1,blockTime:1e4,rpcUrls:{default:{http:["https://rpc.pulsechain.com"],webSocket:["wss://ws.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://ipfs.scan.pulsechain.com",apiUrl:"https://api.scan.pulsechain.com/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),YO=f({id:943,name:"PulseChain V4",testnet:!0,nativeCurrency:{name:"V4 Pulse",symbol:"v4PLS",decimals:18},blockTime:1e4,rpcUrls:{default:{http:["https://rpc.v4.testnet.pulsechain.com"],webSocket:["wss://ws.v4.testnet.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://scan.v4.testnet.pulsechain.com",apiUrl:"https://scan.v4.testnet.pulsechain.com/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),KO=f({id:490092,name:"Pumpfi Testnet",nativeCurrency:{decimals:18,name:"PMPT",symbol:"PMPT"},rpcUrls:{default:{http:["https://rpc1testnet.pumpfi.me"]}},blockExplorers:{default:{name:"Pumpfi Testnet Scan",url:"https://testnetscan.pumpfi.me"}},testnet:!0}),Ey=11155111,ZO=f({...j,name:"Pyrope Testnet",testnet:!0,id:695569,sourceId:Ey,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.pyropechain.com"],webSocket:["wss://rpc.pyropechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://pyrope.blockscout.com"}},contracts:{...j.contracts,l1StandardBridge:{[Ey]:{address:"0xC24932c31D9621aE9e792576152B7ef010cFC2F8"}}}}),XO=f({id:766,name:"QL1",nativeCurrency:{decimals:18,name:"QOM",symbol:"QOM"},rpcUrls:{default:{http:["https://rpc.qom.one"]}},blockExplorers:{default:{name:"Ql1 Explorer",url:"https://scan.qom.one"}},contracts:{multicall3:{address:"0x7A52370716ea730585884F5BDB0f6E60C39b8C64"}},testnet:!1}),QO=f({id:35441,name:"Q Mainnet",nativeCurrency:{decimals:18,name:"Q",symbol:"Q"},rpcUrls:{default:{http:["https://rpc.q.org"]}},blockExplorers:{default:{name:"Q Mainnet Explorer",url:"https://explorer.q.org",apiUrl:"https://explorer.q.org/api"}}}),JO=f({id:35443,name:"Q Testnet",nativeCurrency:{decimals:18,name:"Q",symbol:"Q"},rpcUrls:{default:{http:["https://rpc.qtestnet.org"]}},blockExplorers:{default:{name:"Q Testnet Explorer",url:"https://explorer.qtestnet.org",apiUrl:"https://explorer.qtestnet.org/api"}},testnet:!0}),eB=f({id:9,name:"Quai Network Mainnet",nativeCurrency:{decimals:18,name:"Quai",symbol:"QUAI"},rpcUrls:{default:{http:["https://rpc.quai.network/cyprus1"]}},blockExplorers:{default:{name:"Quaiscan",url:"https://quaiscan.io",apiUrl:"https://quaiscan.io/api"}},testnet:!1}),tB=f({id:15e3,name:"Quai Network Testnet",nativeCurrency:{decimals:18,name:"Quai",symbol:"QUAI"},rpcUrls:{default:{http:["https://orchard.rpc.quai.network/cyprus1"]}},blockExplorers:{default:{name:"Orchard Quaiscan",url:"https://orchard.quaiscan.io",apiUrl:"https://orchard.quaiscan.io/api"}},testnet:!0}),rB=f({id:5318007,name:"Reactive Lasna Testnet",nativeCurrency:{decimals:18,name:"Lasna React",symbol:"lREACT"},rpcUrls:{default:{http:["https://lasna-rpc.rnk.dev"]}},blockExplorers:{default:{name:"Reactscan",url:"https://lasna.reactscan.net"}},testnet:!0}),nB=f({id:111188,name:"re.al",nativeCurrency:{name:"reETH",decimals:18,symbol:"reETH"},rpcUrls:{default:{http:["https://rpc.realforreal.gelato.digital"]}},blockExplorers:{default:{name:"re.al Explorer",url:"https://explorer.re.al",apiUrl:"https://explorer.re.al/api/v2"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:695}}}),sB=f({id:151,name:"Redbelly Network Mainnet",nativeCurrency:{name:"Redbelly Native Coin",symbol:"RBNT",decimals:18},rpcUrls:{default:{http:["https://governors.mainnet.redbelly.network"]}},blockExplorers:{default:{name:"Routescan",url:"https://redbelly.routescan.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/151/etherscan/api"}},testnet:!1}),aB=f({id:153,name:"Redbelly Network Testnet",nativeCurrency:{name:"Redbelly Native Coin",symbol:"RBNT",decimals:18},rpcUrls:{default:{http:["https://governors.testnet.redbelly.network"]}},blockExplorers:{default:{name:"Routescan",url:"https://redbelly.testnet.routescan.io",apiUrl:"https://api.routescan.io/v2/network/testnet/evm/153_2/etherscan/api"}},testnet:!0}),oB=f({id:50342,name:"Reddio",nativeCurrency:{name:"Reddio",symbol:"RED",decimals:18},rpcUrls:{default:{http:["https://mainnet.reddio.com/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://reddio.cloud.blockscout.com",apiUrl:"https://reddio.cloud.blockscout.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:848849}},testnet:!1}),iB=f({id:50341,name:"Reddio Sepolia",nativeCurrency:{name:"Reddio",symbol:"RED",decimals:18},rpcUrls:{default:{http:["https://reddio-dev.reddio.com"]}},blockExplorers:{default:{name:"Reddioscan",url:"https://reddio-devnet.l2scan.co",apiUrl:"https://reddio-devnet.l2scan.co/api"}},testnet:!0}),Sl=1,cB=f({...j,name:"Redstone",id:690,sourceId:Sl,nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.redstonechain.com"],webSocket:["wss://rpc.redstonechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.redstone.xyz"}},contracts:{...j.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[Sl]:{address:"0xC7bCb0e8839a28A1cFadd1CF716de9016CdA51ae",blockCreated:19578329}},l2OutputOracle:{[Sl]:{address:"0xa426A052f657AEEefc298b3B5c35a470e4739d69",blockCreated:19578337}},l1StandardBridge:{[Sl]:{address:"0xc473ca7E02af24c129c2eEf51F2aDf0411c1Df69",blockCreated:19578331}}}}),lB=f({id:47805,name:"REI Mainnet",nativeCurrency:{decimals:18,name:"REI",symbol:"REI"},rpcUrls:{default:{http:["https://rpc.rei.network"],webSocket:["wss://rpc.rei.network"]}},blockExplorers:{default:{name:"REI Scan",url:"https://scan.rei.network"}},testnet:!1}),uB=f({id:1729,name:"Reya Network",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.reya.network"],webSocket:["wss://ws.reya.network"]}},blockExplorers:{default:{name:"Reya Network Explorer",url:"https://explorer.reya.network"}},testnet:!1}),dB=f({id:11155931,name:"RISE Testnet",nativeCurrency:{name:"RISE Testnet Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.riselabs.xyz"],webSocket:["wss://testnet.riselabs.xyz/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.testnet.riselabs.xyz/",apiUrl:"https://explorer.testnet.riselabs.xyz/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}},testnet:!0}),fB=f({id:753,name:"Rivalz",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rivalz.calderachain.xyz/http"]}},blockExplorers:{default:{name:"Rivalz Caldera Explorer",url:"https://rivalz.calderaexplorer.xyz"}},testnet:!1}),pB=f({id:570,name:"Rollux Mainnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.rollux.com"],webSocket:["wss://rpc.rollux.com/wss"]}},blockExplorers:{default:{name:"RolluxExplorer",url:"https://explorer.rollux.com",apiUrl:"https://explorer.rollux.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:119222}}}),hB=f({id:57e3,name:"Rollux Testnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc-tanenbaum.rollux.com/"],webSocket:["wss://rpc-tanenbaum.rollux.com/wss"]}},blockExplorers:{default:{name:"RolluxTestnetExplorer",url:"https://rollux.tanenbaum.io",apiUrl:"https://rollux.tanenbaum.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1813675}}}),mB=f({id:2020,name:"Ronin",nativeCurrency:{name:"RON",symbol:"RON",decimals:18},rpcUrls:{default:{http:["https://api.roninchain.com/rpc"]}},blockExplorers:{default:{name:"Ronin Explorer",url:"https://app.roninchain.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:26023535}}}),bB=f({id:7668,name:"The Root Network",nativeCurrency:{decimals:18,name:"XRP",symbol:"XRP"},rpcUrls:{default:{http:["https://root.rootnet.live/archive"],webSocket:["wss://root.rootnet.live/archive/ws"]}},blockExplorers:{default:{name:"Rootscan",url:"https://rootscan.io"}},contracts:{multicall3:{address:"0xc9C2E2429AeC354916c476B30d729deDdC94988d",blockCreated:9218338}}}),yB=f({id:7672,name:"The Root Network - Porcini",nativeCurrency:{decimals:18,name:"XRP",symbol:"XRP"},rpcUrls:{default:{http:["https://porcini.rootnet.app/archive"],webSocket:["wss://porcini.rootnet.app/archive/ws"]}},blockExplorers:{default:{name:"Rootscan",url:"https://porcini.rootscan.io"}},contracts:{multicall3:{address:"0xc9C2E2429AeC354916c476B30d729deDdC94988d",blockCreated:10555692}},testnet:!0}),gB=f({id:30,name:"Rootstock Mainnet",network:"rootstock",nativeCurrency:{decimals:18,name:"Rootstock Bitcoin",symbol:"RBTC"},rpcUrls:{default:{http:["https://public-node.rsk.co"]}},blockExplorers:{default:{name:"RSK Explorer",url:"https://explorer.rsk.co"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4249540}}}),xB=f({id:31,name:"Rootstock Testnet",network:"rootstock",nativeCurrency:{decimals:18,name:"Rootstock Bitcoin",symbol:"tRBTC"},rpcUrls:{default:{http:["https://public-node.testnet.rsk.co"]}},blockExplorers:{default:{name:"RSK Explorer",url:"https://explorer.testnet.rootstock.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2771150}},testnet:!0}),Al=1,wB=f({...j,id:12553,name:"RSS3 VSL Mainnet",nativeCurrency:{name:"RSS3",symbol:"RSS3",decimals:18},rpcUrls:{default:{http:["https://rpc.rss3.io"]}},blockExplorers:{default:{name:"RSS3 VSL Mainnet Scan",url:"https://scan.rss3.io",apiUrl:"https://scan.rss3.io/api"}},contracts:{...j.contracts,l2OutputOracle:{[Al]:{address:"0xE6f24d2C32B3109B18ed33cF08eFb490b1e09C10"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14193},portal:{[Al]:{address:"0x6A12432491bbbE8d3babf75F759766774C778Db4",blockCreated:19387057}},l1StandardBridge:{[Al]:{address:"0x4cbab69108Aa72151EDa5A3c164eA86845f18438"}}},sourceId:Al}),Pl=11155111,vB=f({...j,id:2331,name:"RSS3 VSL Sepolia Testnet",nativeCurrency:{name:"RSS3",symbol:"RSS3",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.rss3.io"]}},blockExplorers:{default:{name:"RSS3 VSL Sepolia Testnet Scan",url:"https://scan.testnet.rss3.io",apiUrl:"https://scan.testnet.rss3.io/api"}},contracts:{...j.contracts,l2OutputOracle:{[Pl]:{address:"0xDb5c46C3Eaa6Ed6aE8b2379785DF7dd029C0dC81"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:55697},portal:{[Pl]:{address:"0xcBD77E8E1E7F06B25baDe67142cdE82652Da7b57",blockCreated:5345035}},l1StandardBridge:{[Pl]:{address:"0xdDD29bb63B0839FB1cE0eE439Ff027738595D07B"}}},testnet:!0,sourceId:Pl}),kB=f({id:7225878,name:"Saakuru Mainnet",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.saakuru.network"]}},blockExplorers:{default:{name:"Saakuru Explorer",url:"https://explorer.saakuru.network"}},testnet:!1}),EB=f({id:5464,name:"Saga",network:"saga",nativeCurrency:{decimals:18,name:"gas",symbol:"GAS"},rpcUrls:{default:{http:["https://sagaevm.jsonrpc.sagarpc.io"]}},blockExplorers:{default:{name:"Saga Explorer",url:"https://sagaevm.sagaexplorer.io"}},contracts:{multicall3:{address:"0x864DDc9B50B9A0dF676d826c9B9EDe9F8913a160",blockCreated:467530}}}),CB=f({id:2021,name:"Saigon Testnet",nativeCurrency:{name:"RON",symbol:"RON",decimals:18},rpcUrls:{default:{http:["https://saigon-testnet.roninchain.com/rpc"]}},blockExplorers:{default:{name:"Saigon Explorer",url:"https://saigon-app.roninchain.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:18736871}},testnet:!0}),TB=f({id:1996,name:"Sanko",nativeCurrency:{name:"DMT",symbol:"DMT",decimals:18},rpcUrls:{default:{http:["https://mainnet.sanko.xyz"]}},blockExplorers:{default:{name:"Sanko Explorer",url:"https://explorer.sanko.xyz"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:37}},testnet:!1}),SB=f({id:23294,name:"Oasis Sapphire",network:"sapphire",nativeCurrency:{name:"Sapphire Rose",symbol:"ROSE",decimals:18},rpcUrls:{default:{http:["https://sapphire.oasis.io"],webSocket:["wss://sapphire.oasis.io/ws"]}},blockExplorers:{default:{name:"Oasis Explorer",url:"https://explorer.oasis.io/mainnet/sapphire"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:734531}}}),AB=f({id:23295,name:"Oasis Sapphire Testnet",network:"sapphire-testnet",nativeCurrency:{name:"Sapphire Test Rose",symbol:"TEST",decimals:18},rpcUrls:{default:{http:["https://testnet.sapphire.oasis.dev"],webSocket:["wss://testnet.sapphire.oasis.dev/ws"]}},blockExplorers:{default:{name:"Oasis Explorer",url:"https://explorer.oasis.io/testnet/sapphire"}},testnet:!0}),PB=f({id:3109,name:"SatoshiVM Alpha Mainnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://alpha-rpc-node-http.svmscan.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://svmscan.io",apiUrl:"https://svmscan.io/api"}}}),IB=f({id:3110,name:"SatoshiVM Testnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://test-rpc-node-http.svmscan.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://testnet.svmscan.io",apiUrl:"https://testnet.svmscan.io/api"}},testnet:!0}),OB=f({id:534352,name:"Scroll",blockTime:3e3,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.scroll.io"],webSocket:["wss://wss-rpc.scroll.io/ws"]}},blockExplorers:{default:{name:"Scrollscan",url:"https://scrollscan.com",apiUrl:"https://api.scrollscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14}},testnet:!1}),BB=f({id:534351,name:"Scroll Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.scroll.io"]}},blockExplorers:{default:{name:"Scrollscan",url:"https://sepolia.scrollscan.com",apiUrl:"https://api-sepolia.scrollscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:9473}},testnet:!0}),MB=f({id:1329,name:"Sei Network",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc.sei-apis.com/"],webSocket:["wss://evm-ws.sei-apis.com/"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com",apiUrl:"https://seitrace.com/pacific-1/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}}}),_B=f({id:713715,name:"Sei Devnet",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc-arctic-1.sei-apis.com"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com"}},testnet:!0}),UB=f({id:5124,name:"Seismic Devnet",nativeCurrency:{name:"Seismic Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://node-2.seismicdev.net/rpc"]}},blockExplorers:{default:{name:"Seismic Devnet Explorer",url:"https://explorer-2.seismicdev.net"}},testnet:!0}),DB=f({id:1328,name:"Sei Testnet",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc-testnet.sei-apis.com"],webSocket:["wss://evm-ws-testnet.sei-apis.com"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:98697651}},testnet:!0}),FB=f({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://11155111.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:8928790}},testnet:!0}),Il=1,NB=f({...j,id:360,name:"Shape",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.shape.network"]}},blockExplorers:{default:{name:"shapescan",url:"https://shapescan.xyz",apiUrl:"https://shapescan.xyz/api"}},contracts:{...j.contracts,l2OutputOracle:{[Il]:{address:"0x6Ef8c69CfE4635d866e3E02732068022c06e724D",blockCreated:20369940}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1},portal:{[Il]:{address:"0xEB06fFa16011B5628BaB98E29776361c83741dd3",blockCreated:20369933}},l1StandardBridge:{[Il]:{address:"0x62Edd5f4930Ea92dCa3fB81689bDD9b9d076b57B",blockCreated:20369935}}},sourceId:Il}),zB=f({...j,id:11011,name:"Shape Sepolia Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.shape.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer-sepolia.shape.network/",apiUrl:"https://explorer-sepolia.shape.network/api/v2"}},contracts:{...j.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1}},testnet:!0,sourceId:11155111}),LB=f({id:8118,name:"Shardeum",nativeCurrency:{name:"Shardeum",symbol:"SHM",decimals:18},rpcUrls:{default:{http:["https://api.shardeum.org"]}},blockExplorers:{default:{name:"Shardeum Explorer",url:"https://explorer.shardeum.org"}},testnet:!1}),RB=f({id:8082,name:"Shardeum Sphinx",nativeCurrency:{name:"SHARDEUM",symbol:"SHM",decimals:18},rpcUrls:{default:{http:["https://sphinx.shardeum.org"]}},blockExplorers:{default:{name:"Shardeum Explorer",url:"https://explorer-sphinx.shardeum.org"}},testnet:!0}),HB=f({id:109,name:"Shibarium",network:"shibarium",nativeCurrency:{name:"Bone",symbol:"BONE",decimals:18},rpcUrls:{default:{http:["https://rpc.shibrpc.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://shibariumscan.io"}},contracts:{multicall3:{address:"0x864Bf681ADD6052395188A89101A1B37d3B4C961",blockCreated:265900}}}),$B=f({id:157,name:"Puppynet Shibarium",nativeCurrency:{decimals:18,name:"Bone",symbol:"BONE"},rpcUrls:{default:{http:["https://puppynet.shibrpc.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://puppyscan.shib.io",apiUrl:"https://puppyscan.shib.io/api"}},contracts:{multicall3:{address:"0xA4029b74FBA366c926eDFA7Dd10B21C621170a4c",blockCreated:3035769}},testnet:!0}),GB=f({id:336,name:"Shiden",nativeCurrency:{decimals:18,name:"SDN",symbol:"SDN"},rpcUrls:{default:{http:["https://shiden.public.blastapi.io"],webSocket:["wss://shiden-rpc.dwellir.com"]}},blockExplorers:{default:{name:"Shiden Scan",url:"https://shiden.subscan.io"}},testnet:!1}),jB=f({id:148,name:"Shimmer",network:"shimmer",nativeCurrency:{decimals:18,name:"Shimmer",symbol:"SMR"},rpcUrls:{default:{http:["https://json-rpc.evm.shimmer.network"]}},blockExplorers:{default:{name:"Shimmer Network Explorer",url:"https://explorer.evm.shimmer.network",apiUrl:"https://explorer.evm.shimmer.network/api"}}}),VB=f({id:1073,name:"Shimmer Testnet",network:"shimmer-testnet",nativeCurrency:{decimals:18,name:"Shimmer",symbol:"SMR"},rpcUrls:{default:{http:["https://json-rpc.evm.testnet.shimmer.network"]}},blockExplorers:{default:{name:"Shimmer Network Explorer",url:"https://explorer.evm.testnet.shimmer.network",apiUrl:"https://explorer.evm.testnet.shimmer.network/api"}},testnet:!0}),WB=f({id:97453,name:"Sidra Chain",nativeCurrency:{decimals:18,name:"Sidra Digital Asset",symbol:"SDA"},rpcUrls:{default:{http:["https://node.sidrachain.com"]}},blockExplorers:{default:{name:"Sidra Chain Explorer",url:"https://ledger.sidrachain.com"}}}),qB=f({id:380929,name:"Silent Data Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.silentdata.com"]}},blockExplorers:{default:{name:"Silent Data Mainnet Explorer",url:"https://explorer-mainnet.rollup.silentdata.com"}},testnet:!1}),YB=f({id:2355,name:"Silicon zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.silicon.network","https://silicon-mainnet.nodeinfra.com"]}},blockExplorers:{default:{name:"SiliconScope",url:"https://scope.silicon.network"}}}),KB=f({id:1722641160,name:"Silicon Sepolia zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-sepolia.silicon.network","https://silicon-testnet.nodeinfra.com"]}},blockExplorers:{default:{name:"SiliconSepoliaScope",url:"https://scope-sepolia.silicon.network"}},testnet:!0}),ZB=f({id:98,name:"Six Protocol",nativeCurrency:{decimals:18,name:"SIX",symbol:"SIX"},rpcUrls:{default:{http:["https://sixnet-rpc-evm.sixprotocol.net"]}},blockExplorers:{default:{name:"Six Protocol Scan",url:"https://sixscan.io/sixnet"}},testnet:!1}),XB=f({id:391845894,name:"SKALE | Block Brawlers",nativeCurrency:{name:"BRAWL",symbol:"BRAWL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/frayed-decent-antares"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/frayed-decent-antares"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://frayed-decent-antares.explorer.mainnet.skalenodes.com"}},contracts:{}}),QB=f({id:1564830818,name:"SKALE Calypso Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/honorable-steel-rasalhague"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3107626}}}),JB=f({id:974399131,name:"SKALE Calypso Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/giant-half-dual-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/giant-half-dual-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://giant-half-dual-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:103220}},testnet:!0}),eM=f({id:1026062157,name:"SKALE | CryptoBlades",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/affectionate-immediate-pollux"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/affectionate-immediate-pollux"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://affectionate-immediate-pollux.explorer.mainnet.skalenodes.com"}},contracts:{}}),tM=f({id:1032942172,name:"SKALE | Crypto Colosseum",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/haunting-devoted-deneb"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/haunting-devoted-deneb"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://haunting-devoted-deneb.explorer.mainnet.skalenodes.com"}},contracts:{}}),rM=f({id:2046399126,name:"SKALE Europa Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/elated-tan-skat"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/elated-tan-skat"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://elated-tan-skat.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3113495}}}),nM=f({id:1444673419,name:"SKALE Europa Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/juicy-low-small-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/juicy-low-small-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://juicy-low-small-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:110858}},testnet:!0}),sM=f({id:2139927552,name:"Exorde Network",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/light-vast-diphda"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/light-vast-diphda"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://light-vast-diphda.explorer.mainnet.skalenodes.com"}},contracts:{}}),aM=f({id:1273227453,name:"SKALE | Human Protocol",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/wan-red-ain"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/wan-red-ain"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://wan-red-ain.explorer.mainnet.skalenodes.com"}},contracts:{}}),oM=f({id:1482601649,name:"SKALE Nebula Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/green-giddy-denebola"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/green-giddy-denebola"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://green-giddy-denebola.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2372986}}}),iM=f({id:37084624,name:"SKALE Nebula Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/lanky-ill-funny-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/lanky-ill-funny-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://lanky-ill-funny-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:105141}},testnet:!0}),cM=f({id:278611351,name:"SKALE | Razor Network",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/turbulent-unique-scheat"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/turbulent-unique-scheat"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://turbulent-unique-scheat.explorer.mainnet.skalenodes.com"}},contracts:{}}),lM=f({id:1187947933,name:"SKALE Base",nativeCurrency:{name:"Credits",symbol:"CREDIT",decimals:18},rpcUrls:{default:{http:["https://skale-base.skalenodes.com/v1/base"],webSocket:["wss://skale-base.skalenodes.com/v1/ws/base"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://skale-base-explorer.skalenodes.com/"}},testnet:!0}),uM=f({id:324705682,name:"SKALE Base Sepolia Testnet",nativeCurrency:{name:"Credits",symbol:"CREDIT",decimals:18},rpcUrls:{default:{http:["https://base-sepolia-testnet.skalenodes.com/v1/base-testnet"],webSocket:["wss://base-sepolia-testnet.skalenodes.com/v1/ws/base-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://base-sepolia-testnet-explorer.skalenodes.com/"}},testnet:!0}),dM=f({id:1350216234,name:"SKALE Titan Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/parallel-stormy-spica"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/parallel-stormy-spica"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://parallel-stormy-spica.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2076458}}}),fM=f({id:1020352220,name:"SKALE Titan Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/aware-fake-trim-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/aware-fake-trim-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://aware-fake-trim-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:104072}},testnet:!0}),pM=f({id:984123,name:"Forma Sketchpad",network:"sketchpad",nativeCurrency:{symbol:"TIA",name:"TIA",decimals:18},rpcUrls:{default:{http:["https://rpc.sketchpad-1.forma.art"],webSocket:["wss://ws.sketchpad-1.forma.art"]}},blockExplorers:{default:{name:"Sketchpad Explorer",url:"https://explorer.sketchpad-1.forma.art"}},testnet:!0}),bi=1,hM=f({...j,id:2192,network:"snaxchain-mainnet",name:"SnaxChain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.snaxchain.io"]}},blockExplorers:{default:{name:"Snax Explorer",url:"https://explorer.snaxchain.io",apiUrl:"https://explorer.snaxchain.io/api"}},contracts:{...j.contracts,disputeGameFactory:{[bi]:{address:"0x472562Fcf26D6b2793f8E0b0fB660ba0E5e08A46"}},l2OutputOracle:{[bi]:{address:"0x2172e492Fc807F5d5645D0E3543f139ECF539294"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[bi]:{address:"0x79f446D024d74D0Bb6E699C131c703463c5D65E9"}},l1StandardBridge:{[bi]:{address:"0x6534Bdb6b5c060d3e6aa833433333135eFE8E0aA"}}},sourceId:bi}),yi=11155111,mM=f({...j,id:13001,network:"snaxchain-testnet",name:"SnaxChain Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.snaxchain.io"]}},blockExplorers:{default:{name:"Snax Explorer",url:"https://testnet-explorer.snaxchain.io",apiUrl:"https://testnet-explorer.snaxchain.io/api"}},contracts:{...j.contracts,disputeGameFactory:{[yi]:{address:"0x206a75d89d45F146C54020F132FF93bEDD09f55E"}},l2OutputOracle:{[yi]:{address:"0x60e3A368a4cdCEf85ffB964e372726F56A46221e"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[yi]:{address:"0xb5afdd0E8dDF081Ef90e8A3e0c7b5798e66E954E"}},l1StandardBridge:{[yi]:{address:"0xbd37E1a59D4C00C9A46F75018dffd84061bC5f74"}}},testnet:!0,sourceId:yi}),bM=f({id:5031,name:"Somnia",nativeCurrency:{name:"Somnia",symbol:"SOMI",decimals:18},rpcUrls:{default:{http:["https://api.infra.mainnet.somnia.network"]}},blockExplorers:{default:{name:"Somnia Explorer",url:"https://explorer.somnia.network",apiUrl:"https://explorer.somnia.network/api"}},testnet:!1}),yM=f({id:50312,name:"Somnia Testnet",nativeCurrency:{name:"STT",symbol:"STT",decimals:18},rpcUrls:{default:{http:["https://dream-rpc.somnia.network"]}},blockExplorers:{default:{name:"Somnia Testnet Explorer",url:"https://shannon-explorer.somnia.network/",apiUrl:"https://shannon-explorer.somnia.network/api"}},contracts:{multicall3:{address:"0x841b8199E6d3Db3C6f264f6C2bd8848b3cA64223",blockCreated:71314235}},testnet:!0}),gi=1,gM=f({...j,id:1868,name:"Soneium Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.soneium.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://soneium.blockscout.com",apiUrl:"https://soneium.blockscout.com/api"}},contracts:{...j.contracts,disputeGameFactory:{[gi]:{address:"0x512a3d2c7a43bd9261d2b8e8c9c70d4bd4d503c0"}},l2OutputOracle:{[gi]:{address:"0x0000000000000000000000000000000000000000"}},portal:{[gi]:{address:"0x88e529a6ccd302c948689cd5156c83d4614fae92",blockCreated:7061266}},l1StandardBridge:{[gi]:{address:"0xeb9bf100225c214efc3e7c651ebbadcf85177607",blockCreated:7061266}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}},sourceId:gi}),xi=11155111,xM=f({...j,id:1946,name:"Soneium Minato Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.minato.soneium.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://soneium-minato.blockscout.com",apiUrl:"https://soneium-minato.blockscout.com/api"}},contracts:{...j.contracts,disputeGameFactory:{[xi]:{address:"0xB3Ad2c38E6e0640d7ce6aA952AB3A60E81bf7a01"}},l2OutputOracle:{[xi]:{address:"0x710e5286C746eC38beeB7538d0146f60D27be343"}},portal:{[xi]:{address:"0x65ea1489741A5D72fFdD8e6485B216bBdcC15Af3",blockCreated:6466136}},l1StandardBridge:{[xi]:{address:"0x5f5a404A5edabcDD80DB05E8e54A78c9EBF000C2",blockCreated:6466136}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}},testnet:!0,sourceId:xi}),wM=f({id:19,name:"Songbird Canary-Network",nativeCurrency:{decimals:18,name:"Songbird",symbol:"SGB"},rpcUrls:{default:{http:["https://songbird-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Songbird Explorer",url:"https://songbird-explorer.flare.network",apiUrl:"https://songbird-explorer.flare.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13382504}}}),vM=f({id:16,name:"Songbird Testnet Coston",nativeCurrency:{decimals:18,name:"Coston Flare",symbol:"CFLR"},rpcUrls:{default:{http:["https://coston-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Coston Explorer",url:"https://coston-explorer.flare.network",apiUrl:"https://coston-explorer.flare.network/api"}},testnet:!0}),kM=f({id:146,name:"Sonic",blockTime:630,nativeCurrency:{decimals:18,name:"Sonic",symbol:"S"},rpcUrls:{default:{http:["https://rpc.soniclabs.com"]}},blockExplorers:{default:{name:"Sonic Explorer",url:"https://sonicscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:60}},testnet:!1}),EM=f({id:57054,name:"Sonic Blaze Testnet",nativeCurrency:{decimals:18,name:"Sonic",symbol:"S"},rpcUrls:{default:{http:["https://rpc.blaze.soniclabs.com"]}},blockExplorers:{default:{name:"Sonic Blaze Testnet Explorer",url:"https://testnet.sonicscan.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1100}},testnet:!0}),CM=f({id:64165,name:"Sonic Testnet",nativeCurrency:{decimals:18,name:"Sonic",symbol:"S"},rpcUrls:{default:{http:["https://rpc.testnet.soniclabs.com"]}},blockExplorers:{default:{name:"Sonic Testnet Explorer",url:"https://testnet.soniclabs.com/"}},testnet:!0}),TM=f({...ar,blockTime:200,id:50104,name:"Sophon",nativeCurrency:{decimals:18,name:"Sophon",symbol:"SOPH"},rpcUrls:{default:{http:["https://rpc.sophon.xyz"],webSocket:["wss://rpc.sophon.xyz/ws"]}},blockExplorers:{default:{name:"Sophon Block Explorer",url:"https://explorer.sophon.xyz"}},contracts:{multicall3:{address:"0x5f4867441d2416cA88B1b3fd38f21811680CD2C8",blockCreated:116}},testnet:!1}),SM=f({...ar,blockTime:200,id:531050104,name:"Sophon Testnet",nativeCurrency:{decimals:18,name:"Sophon",symbol:"SOPH"},rpcUrls:{default:{http:["https://rpc.testnet.sophon.xyz"],webSocket:["wss://rpc.testnet.sophon.xyz/ws"]}},blockExplorers:{default:{name:"Sophon Block Explorer",url:"https://explorer.testnet.sophon.xyz"}},contracts:{multicall3:{address:"0x83c04d112adedA2C6D9037bb6ecb42E7f0b108Af",blockCreated:15642}},testnet:!0}),AM=f({id:100021,name:"Sova",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.sova.io"]}},blockExplorers:{default:{name:"Sova Block Explorer",url:"hhttps://explorer.sova.io"}},testnet:!1}),PM=f({id:120893,name:"Sova Network Sepolia",nativeCurrency:{decimals:18,name:"Sepolia Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.testnet.sova.io"]}},blockExplorers:{default:{name:"Sova Sepolia Explorer",url:"https://explorer.testnet.sova.io"}},testnet:!0}),IM=f({id:88882,name:"Chiliz Spicy Testnet",network:"chiliz-spicy-Testnet",nativeCurrency:{decimals:18,name:"CHZ",symbol:"CHZ"},rpcUrls:{default:{http:["https://spicy-rpc.chiliz.com","https://chiliz-spicy-rpc.publicnode.com"],webSocket:["wss://spicy-rpc-ws.chiliz.com","wss://chiliz-spicy-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Chiliz Explorer",url:"http://spicy-explorer.chiliz.com",apiUrl:"http://spicy-explorer.chiliz.com/api"}},testnet:!0}),OM=f({id:2201,name:"Stable Testnet",nativeCurrency:{decimals:18,name:"gUSDT",symbol:"gUSDT"},rpcUrls:{default:{http:["https://rpc.testnet.stable.xyz"],webSocket:["wss://rpc.testnet.stable.xyz"]}},blockExplorers:{default:{name:"Stablescan",url:"https://testnet.stablescan.xyz",apiUrl:"https://testnet.stablescan.xyz/api"}},testnet:!0}),Cy=f({...Zf,id:1660990954,name:"Status Network Sepolia",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://public.sepolia.rpc.status.network"],webSocket:["wss://public.sepolia.rpc.status.network/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepoliascan.status.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1578364}},testnet:!0}),BM=f({id:1234,name:"Step Network",nativeCurrency:{name:"FITFI",symbol:"FITFI",decimals:18},rpcUrls:{default:{http:["https://rpc.step.network"]}},blockExplorers:{default:{name:"Step Scan",url:"https://stepscan.io"}},testnet:!1}),MM=f({id:1514,name:"Story",nativeCurrency:{decimals:18,name:"IP Token",symbol:"IP"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:340998},ensRegistry:{address:"0x5dc881dda4e4a8d312be3544ad13118d1a04cb17",blockCreated:648924},ensUniversalResolver:{address:"0xddfb18888a9466688235887dec2a10c4f5effee9",blockCreated:649114}},rpcUrls:{default:{http:["https://mainnet.storyrpc.io"]}},blockExplorers:{default:{name:"Story explorer",url:"https://storyscan.io",apiUrl:"https://storyscan.io/api/v2"}},ensTlds:[".ip"],testnet:!1}),_M=f({id:1315,name:"Story Aeneid",network:"story-aeneid",nativeCurrency:{decimals:18,name:"IP",symbol:"IP"},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1792},ensRegistry:{address:"0x5dC881dDA4e4a8d312be3544AD13118D1a04Cb17",blockCreated:1322033},ensUniversalResolver:{address:"0x6D3B3F99177FB2A5de7F9E928a9BD807bF7b5BAD",blockCreated:1322097}},rpcUrls:{default:{http:["https://aeneid.storyrpc.io"]}},blockExplorers:{default:{name:"Story Aeneid Explorer",url:"https://aeneid.storyscan.io",apiUrl:"https://aeneid.storyscan.io/api/v2"}},ensTlds:[".ip"],testnet:!0}),UM=f({id:1516,name:"Story Odyssey",nativeCurrency:{decimals:18,name:"IP",symbol:"IP"},rpcUrls:{default:{http:["https://rpc.odyssey.storyrpc.io"]}},blockExplorers:{default:{name:"Story Odyssey Explorer",url:"https://odyssey.storyscan.xyz"}},testnet:!0}),DM=f({id:1513,name:"Story Testnet",nativeCurrency:{decimals:18,name:"IP",symbol:"IP"},rpcUrls:{default:{http:["https://testnet.storyrpc.io"]}},blockExplorers:{default:{name:"Story Testnet Explorer",url:"https://testnet.storyscan.xyz"}},testnet:!0}),FM=f({id:105105,name:"Stratis Mainnet",network:"stratis",nativeCurrency:{name:"Stratis",symbol:"STRAX",decimals:18},rpcUrls:{default:{http:["https://rpc.stratisevm.com"]}},blockExplorers:{default:{name:"Stratis Explorer",url:"https://explorer.stratisevm.com"}}}),NM=f({id:8866,name:"SuperLumio",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.lumio.io"]}},blockExplorers:{default:{name:"Lumio explorer",url:"https://explorer.lumio.io"}},testnet:!1}),zM=f({id:55244,name:"Superposition",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.superposition.so"]}},blockExplorers:{default:{name:"Superposition Explorer",url:"https://explorer.superposition.so"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:39}},testnet:!1}),wi=1,LM=f({...j,id:5330,name:"Superseed",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.superseed.xyz"]}},blockExplorers:{default:{name:"Superseed Explorer",url:"https://explorer.superseed.xyz",apiUrl:"https://explorer.superseed.xyz/api/v2"}},contracts:{...j.contracts,disputeGameFactory:{[wi]:{address:"0x8b097CF1f9BbD9cbFD0DD561858a1FCbC8857Be0",blockCreated:20737481}},l2OutputOracle:{[wi]:{address:"0x693A0F8854F458D282DE3C5b69E8eE5EEE8aA949",blockCreated:20737481}},portal:{[wi]:{address:"0x2c2150aa5c75A24fB93d4fD2F2a895D618054f07",blockCreated:20737481}},l1StandardBridge:{[wi]:{address:"0x8b0576E39F1233679109F9b40cFcC2a7E0901Ede",blockCreated:20737481}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},sourceId:wi}),Xf=11155111,RM=f({...j,id:53302,name:"Superseed Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.superseed.xyz"]}},blockExplorers:{default:{name:"Superseed Sepolia Explorer",url:"https://sepolia-explorer.superseed.xyz",apiUrl:"https://sepolia-explorer.superseed.xyz/api/v2"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"},portal:{[Xf]:{address:"0x7A0db8C51432d2C3eb4e8f360a2EeB26FF2809fB",blockCreated:5523438}},l1StandardBridge:{[Xf]:{address:"0x2B227A603fAAdB3De0ED050b63ADD232B5f2c28C",blockCreated:5523442}}},testnet:!0,sourceId:Xf}),HM=f({id:763375,name:"Surge Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://l2-rpc.hoodi.surge.wtf"],webSocket:["wss://l2-ws.hoodi.surge.wtf"]}},blockExplorers:{default:{name:"Surge Testnet Blockscout",url:"https://explorer.hoodi.surge.wtf"}},testnet:!0}),$M=f({id:254,name:"Swan Chain Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.swanchain.org"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://swanscan.io"}},testnet:!1}),GM=f({id:20241133,name:"Swan Proxima Testnet",nativeCurrency:{name:"Swan Ether",symbol:"sETH",decimals:18},rpcUrls:{default:{http:["https://rpc-proxima.swanchain.io"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://proxima-explorer.swanchain.io"}},testnet:!0}),jM=f({id:2024,name:"Swan Saturn Testnet",nativeCurrency:{name:"Swan Ether",symbol:"sETH",decimals:18},rpcUrls:{default:{http:["https://saturn-rpc.swanchain.io"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://saturn-explorer.swanchain.io"}},testnet:!0}),VM=f({...j,id:1923,name:"Swellchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://swell-mainnet.alt.technology"]}},blockExplorers:{default:{name:"Swell Explorer",url:"https://explorer.swellnetwork.io",apiUrl:"https://explorer.swellnetwork.io/api"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}}}),WM=f({...j,id:1924,name:"Swellchain Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://swell-testnet.alt.technology"]}},blockExplorers:{default:{name:"Swellchain Testnet Explorer",url:"https://swell-testnet-explorer.alt.technology",apiUrl:"https://swell-testnet-explorer.alt.technology/api"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}}}),qM=f({id:94,name:"SwissDLT Mainnet",nativeCurrency:{decimals:18,name:"BCTS",symbol:"BCTS"},rpcUrls:{default:{http:["https://rpc.swissdlt.ch"]}},blockExplorers:{default:{name:"SwissDLT Explorer",url:"https://explorer.swissdlt.ch"}},testnet:!1}),YM=f({id:57,name:"Syscoin Mainnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.syscoin.org"],webSocket:["wss://rpc.syscoin.org/wss"]}},blockExplorers:{default:{name:"SyscoinExplorer",url:"https://explorer.syscoin.org",apiUrl:"https://explorer.syscoin.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:287139}}}),KM=f({id:5700,name:"Syscoin Tanenbaum Testnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.tanenbaum.io"],webSocket:["wss://rpc.tanenbaum.io/wss"]}},blockExplorers:{default:{name:"SyscoinTestnetExplorer",url:"https://tanenbaum.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:271288}}}),ZM=f({id:239,name:"TAC",nativeCurrency:{name:"TAC",symbol:"TAC",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/tac"]}},blockExplorers:{default:{name:"Blockscout",url:"https://tac.blockscout.com",apiUrl:"https://tac.blockscout.com/api"},native:{name:"TAC Explorer",url:"https://explorer.tac.build",apiUrl:"https://explorer.tac.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}}}),XM=f({id:2391,name:"TAC SPB Testnet",nativeCurrency:{name:"TAC",symbol:"TAC",decimals:18},rpcUrls:{default:{http:["https://spb.rpc.tac.build"]}},blockExplorers:{default:{name:"TAC",url:"https://spb.explorer.tac.build",apiUrl:"https://spb.explorer.tac.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:471429}},testnet:!0}),QM=f({id:167e3,name:"Taiko Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.mainnet.taiko.xyz"],webSocket:["wss://ws.mainnet.taiko.xyz"]}},blockExplorers:{default:{name:"Etherscan",url:"https://taikoscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:11269}}}),JM=f({id:167009,name:"Taiko Hekla L2",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hekla.taiko.xyz"]}},blockExplorers:{default:{name:"Taikoscan",url:"https://hekla.taikoscan.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:59757}},testnet:!0}),e_=f({id:167013,name:"Taiko Hoodi",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hoodi.taiko.xyz"],webSocket:["wss://ws.hoodi.taiko.xyz"]}},blockExplorers:{default:{name:"Etherscan",url:"https://hoodi.taikoscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:581116}},testnet:!0}),t_=f({id:167007,name:"Taiko Jolnir (Alpha-5 Testnet)",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.jolnir.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.jolnir.taiko.xyz"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:732706}},testnet:!0}),r_=f({id:167008,name:"Taiko Katla (Alpha-6 Testnet)",network:"tko-katla",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.katla.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.katla.taiko.xyz"}}}),n_=f({id:167005,name:"Taiko (Alpha-3 Testnet)",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.test.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.test.taiko.xyz"}}}),s_=f({id:841,name:"Taraxa Mainnet",nativeCurrency:{name:"Tara",symbol:"TARA",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.taraxa.io"]}},blockExplorers:{default:{name:"Taraxa Explorer",url:"https://explorer.mainnet.taraxa.io"}}}),a_=f({id:842,name:"Taraxa Testnet",nativeCurrency:{name:"Tara",symbol:"TARA",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.taraxa.io"]}},blockExplorers:{default:{name:"Taraxa Explorer",url:"https://explorer.testnet.taraxa.io"}},testnet:!0}),o_=f({id:10218,name:"Tea Sepolia",nativeCurrency:{name:"Sepolia Tea",symbol:"TEA",decimals:18},rpcUrls:{default:{http:["https://tea-sepolia.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Tea Sepolia Explorer",url:"https://sepolia.tea.xyz"}},testnet:!0}),i_=f({id:2017,name:"Telcoin Adiri Testnet",nativeCurrency:{name:"Telcoin",symbol:"TEL",decimals:18},rpcUrls:{default:{http:["https://rpc.telcoin.network"]}},blockExplorers:{default:{name:"telscan",url:"https://telscan.io"}},testnet:!0}),c_=f({id:40,name:"Telos",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://rpc.telos.net"]}},blockExplorers:{default:{name:"Teloscan",url:"https://www.teloscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:246530709}}}),l_=f({id:41,name:"Telos",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://rpc.testnet.telos.net"]}},blockExplorers:{default:{name:"Teloscan (testnet)",url:"https://testnet.teloscan.io/"}},testnet:!0});/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ty=Ua(BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff")),u_=Ty.create(BigInt("-3")),d_=BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),f_=Qc({a:u_,b:d_,Fp:Ty,n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"),h:BigInt(1),lowS:!1},Td),Sy=Ua(BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff")),p_=Sy.create(BigInt("-3")),h_=BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef");Qc({a:p_,b:h_,Fp:Sy,n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f"),h:BigInt(1),lowS:!1},Kv);const Ay=Ua(BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")),m_=Ay.create(BigInt("-3")),b_=BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00");Qc({a:m_,b:b_,Fp:Ay,n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650"),h:BigInt(1),lowS:!1,allowedPrivateKeyLengths:[130,131,132]},Yv);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const y_=f_;function Py(e){const{hash:t,payload:r,publicKey:n,signature:s}=e;return y_.verify(s,r instanceof Uint8Array?r:Kn(r),pf(n).substring(2),...t?[{prehash:!0,lowS:!0}]:[])}const g_=new TextEncoder;Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[t,e.charCodeAt(0)]);const Ol={...Object.fromEntries(Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[e.charCodeAt(0),t])),61:0,45:62,95:63};function x_(e){const t=e.replace(/=+$/,""),r=t.length,n=new Uint8Array(r+3);g_.encodeInto(t+"===",n);for(let a=0,o=0;a<t.length;a+=4,o+=3){const i=(Ol[n[a]]<<18)+(Ol[n[a+1]]<<12)+(Ol[n[a+2]]<<6)+Ol[n[a+3]];n[o]=i>>16,n[o+1]=i>>8&255,n[o+2]=i&255}const s=(r>>2)*3+(r%4&&r%4-1);return new Uint8Array(n.buffer,0,s)}Uint8Array.from([105,171,180,181,160,222,75,198,42,42,32,31,141,37,186,233]);function w_(e){const{challenge:t,hash:r=!0,metadata:n,publicKey:s,signature:a}=e,{authenticatorData:o,challengeIndex:i,clientDataJSON:c,typeIndex:l,userVerificationRequired:u}=n,d=Kn(o);if(d.length<37)return!1;const p=d[32];if((p&1)!==1||u&&(p&4)!==4||(p&8)!==8&&(p&16)===16)return!1;if(l!==void 0){const w='"type":"webauthn.get"';if(w!==c.slice(Number(l),w.length+1))return!1}const h=i!==void 0?c.slice(Number(i)).match(/^"challenge":"(.*?)"/):c.match(/"challenge":"(.*?)"/);if(!h)return!1;const[y,g]=h;if(Et(x_(g))!==t)return!1;const k=bk(y1(c),{as:"Bytes"}),v=g8(d,k);return Py({hash:r,payload:v,publicKey:s,signature:a})}const Qf="0x01",Jf="0x02",Iy="0x03",Ns="0x7777777777777777777777777777777777777777777777777777777777777777";function La(e){const t=e.endsWith(Ns.slice(2))?Pe(e,0,-ft(Ns)):e;if(ft(t)===65){const o=Uf(t);return Jc(o),{signature:o,type:"secp256k1"}}const n=Pe(t,0,1),s=Pe(t,1),a=ft(s);if(n===Qf){if(a!==129)throw new Ei({reason:`Invalid P256 signature envelope size: expected 129 bytes, got ${a} bytes`,serialized:t});return{publicKey:{prefix:4,x:pt(Pe(s,64,96)),y:pt(Pe(s,96,128))},prehash:Jo(Pe(s,128,129))!==0,signature:{r:pt(Pe(s,0,32)),s:pt(Pe(s,32,64))},type:"p256"}}if(n===Jf){if(a<128)throw new Ei({reason:`Invalid WebAuthn signature envelope size: expected at least 128 bytes, got ${a} bytes`,serialized:t});const o=a-128,i=Pe(s,0,o);let c,l;for(let u=37;u<o;u++){const d=k1(Pe(i,u));if(d.startsWith("{")&&d.endsWith("}"))try{JSON.parse(d),c=Pe(i,0,u),l=d;break}catch{}}if(!c||!l)throw new Ei({reason:"Unable to parse WebAuthn metadata: could not extract valid authenticatorData and clientDataJSON",serialized:t});return{publicKey:{prefix:4,x:pt(Pe(s,o+64,o+96)),y:pt(Pe(s,o+96,o+128))},metadata:{authenticatorData:c,clientDataJSON:l},signature:{r:pt(Pe(s,o,o+32)),s:pt(Pe(s,o+32,o+64))},type:"webAuthn"}}if(n===Iy){const o=Pe(s,0,20),i=La(Pe(s,20));return{userAddress:o,inner:i,type:"keychain"}}throw new Ei({reason:`Unknown signature type identifier: ${n}. Expected ${Qf} (P256) or ${Jf} (WebAuthn)`,serialized:t})}function vi(e){if(typeof e=="string")return La(e);if(typeof e=="object"&&e!==null&&"r"in e&&"s"in e&&"yParity"in e)return{signature:e,type:"secp256k1"};const t=ep(e);return{...e,...t==="p256"?{prehash:e.prehash}:{},type:t}}function Bl(e){if(e.type==="secp256k1")return{signature:Df(e),type:"secp256k1"};if(e.type==="p256")return{prehash:e.preHash,publicKey:{prefix:4,x:pt(e.pubKeyX),y:pt(e.pubKeyY)},signature:{r:pt(e.r),s:pt(e.s)},type:"p256"};if(e.type==="webAuthn"){const t=e.webauthnData,r=ft(t);let n,s;for(let a=37;a<r;a++){const o=k1(Pe(t,a));if(o.startsWith("{")&&o.endsWith("}"))try{JSON.parse(o),n=Pe(t,0,a),s=o;break}catch{}}if(!n||!s)throw new Ei({reason:"Unable to parse WebAuthn metadata: could not extract valid authenticatorData and clientDataJSON",serialized:t});return{metadata:{authenticatorData:n,clientDataJSON:s},publicKey:{prefix:4,x:pt(e.pubKeyX),y:pt(e.pubKeyY)},signature:{r:pt(e.r),s:pt(e.s)},type:"webAuthn"}}if(e.type==="keychain"||"userAddress"in e&&"signature"in e)return{type:"keychain",userAddress:e.userAddress,inner:Bl(e.signature)};throw new ki({envelope:e})}function ep(e){if(typeof e!="object"||e===null)throw new ki({envelope:e});if("type"in e&&e.type)return e.type;if("signature"in e&&!("publicKey"in e)&&typeof e.signature=="object"&&e.signature!==null&&"r"in e.signature&&"s"in e.signature&&"yParity"in e.signature||"r"in e&&"s"in e&&"yParity"in e)return"secp256k1";if("signature"in e&&"prehash"in e&&"publicKey"in e&&typeof e.prehash=="boolean")return"p256";if("signature"in e&&"metadata"in e&&"publicKey"in e)return"webAuthn";if("userAddress"in e&&"inner"in e)return"keychain";throw new ki({envelope:e})}function Ml(e,t={}){const r=ep(e);if(r==="secp256k1")return lt(_E(e.signature),t.magic?Ns:"0x");if(r==="p256"){const n=e;return lt(Qf,X(n.signature.r,{size:32}),X(n.signature.s,{size:32}),X(n.publicKey.x,{size:32}),X(n.publicKey.y,{size:32}),X(n.prehash?1:0,{size:1}),t.magic?Ns:"0x")}if(r==="webAuthn"){const n=e,s=lt(n.metadata.authenticatorData,Qo(n.metadata.clientDataJSON));return lt(Jf,s,X(n.signature.r,{size:32}),X(n.signature.s,{size:32}),X(n.publicKey.x,{size:32}),X(n.publicKey.y,{size:32}),t.magic?Ns:"0x")}if(r==="keychain"){const n=e;return lt(Iy,n.userAddress,Ml(n.inner),t.magic?Ns:"0x")}throw new ki({envelope:e})}function tp(e){const t=ep(e);if(t==="secp256k1")return{...Zb(e.signature),type:"secp256k1"};if(t==="p256"){const r=e;return{preHash:r.prehash,pubKeyX:X(r.publicKey.x,{size:32}),pubKeyY:X(r.publicKey.y,{size:32}),r:X(r.signature.r,{size:32}),s:X(r.signature.s,{size:32}),type:"p256"}}if(t==="webAuthn"){const r=e,n=lt(r.metadata.authenticatorData,Qo(r.metadata.clientDataJSON));return{pubKeyX:X(r.publicKey.x,{size:32}),pubKeyY:X(r.publicKey.y,{size:32}),r:X(r.signature.r,{size:32}),s:X(r.signature.s,{size:32}),type:"webAuthn",webauthnData:n}}if(t==="keychain"){const r=e;return{type:"keychain",userAddress:r.userAddress,signature:tp(r.inner)}}throw new ki({envelope:e})}function v_(e,t){const{payload:r}=t,n=(()=>{if(t.address)return t.address;if(t.publicKey)return Zc(t.publicKey)})();if(!n)return!1;const s=vi(e);if(s.type==="secp256k1")return n?jE({address:n,payload:r,signature:s.signature}):!1;if(s.type==="p256"){const a=Zc(s.publicKey);return mf(a,n)?Py({hash:s.prehash,publicKey:s.publicKey,payload:r,signature:s.signature}):!1}if(s.type==="webAuthn"){const a=Zc(s.publicKey);return mf(a,n)?w_({challenge:Nc(r),metadata:s.metadata,publicKey:s.publicKey,signature:s.signature}):!1}throw new k_(`Unable to verify signature envelope of type "${s.type}".`)}class ki extends ae{constructor({envelope:t}){super(`Unable to coerce value (\`${Xo(t)}\`) to a valid signature envelope.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.CoercionError"})}}let Ei=class extends ae{constructor({reason:t,serialized:r}){super(`Unable to deserialize signature envelope: ${t}`,{metaMessages:[`Serialized: ${r}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.InvalidSerializedError"})}};class k_ extends ae{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.VerificationError"})}}function E_(e,t={}){return typeof e.chainId=="string"?Oy(e):t.signature?{...e,signature:t.signature}:e}function Oy(e){const{address:t,chainId:r,nonce:n}=e,s=Bl(e.signature);return{address:t,chainId:Number(r),nonce:BigInt(n),signature:s}}function C_(e){return e.map(t=>Oy(t))}function T_(e){const[t,r,n,s]=e,a={address:r,chainId:t==="0x"?0:Number(t),nonce:n==="0x"?0n:BigInt(n)};return s&&(a.signature=La(s)),E_(a)}function S_(e){const t=[];for(const r of e)t.push(T_(r));return t}function A_(e){const{address:t,chainId:r,nonce:n,signature:s}=e;return{address:t,chainId:X(r),nonce:X(n),signature:tp(s)}}function P_(e){return e.map(t=>A_(t))}function I_(e){const{address:t,chainId:r,nonce:n}=e,s=e.signature?Ml(e.signature):void 0;return[r?X(r):"0x",t,n?X(n):"0x",...s?[s]:[]]}function O_(e){if(!e||e.length===0)return[];const t=[];for(const r of e)t.push(I_(r));return t}function B_(e,t={}){return typeof e.expiry=="string"?By(e):t.signature?{...e,signature:vi(t.signature)}:e}function By(e){const{chainId:t="0x0",keyId:r,expiry:n=0,limits:s,keyType:a}=e,o=Bl(e.signature);return{address:r,chainId:t==="0x"?0n:pt(t),expiry:Number(n),limits:s==null?void 0:s.map(i=>({token:i.token,limit:BigInt(i.limit)})),signature:o,type:a}}function M_(e){const[t,r]=e,[n,s,a,o,i]=t,c=(()=>{switch(s){case"0x":case"0x00":return"secp256k1";case"0x01":return"p256";case"0x02":return"webAuthn";default:throw new Error(`Invalid key type: ${s}`)}})(),l={address:a,expiry:typeof o<"u"?Jo(o):void 0,type:c,...n!=="0x"?{chainId:pt(n)}:{},...typeof o<"u"?{expiry:Jo(o)}:{},...typeof i<"u"?{limits:i.map(([u,d])=>({token:u,limit:BigInt(d)}))}:{}};return r&&(l.signature=La(r)),B_(l)}function __(e){const{address:t,chainId:r=0n,expiry:n,limits:s,type:a,signature:o}=e;return{chainId:r===0n?"0x":X(r),expiry:typeof n=="number"?X(n):null,limits:s==null?void 0:s.map(({token:i,limit:c})=>({token:i,limit:X(c)})),keyId:t,signature:tp(o),keyType:a}}function U_(e){const{address:t,chainId:r=0n,expiry:n,limits:s}=e,a=e.signature?Ml(e.signature):void 0,o=(()=>{switch(e.type){case"secp256k1":return"0x";case"p256":return"0x01";case"webAuthn":return"0x02";default:throw new Error(`Invalid key type: ${e.type}`)}})();return[[r===0n?"0x":X(r),o,t,typeof n=="number"?X(n):void 0,(s==null?void 0:s.map(c=>[c.token,X(c.limit)]))??void 0].filter(Boolean),...a?[a]:[]]}const D_="0x20c0";function My(e){if(typeof e=="string")return Or(e),e;const t=X(e,{size:18});return lt(D_,t)}const _y={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"},Uy={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function F_(e,t={}){if(!e)return null;const r=Kb(e),n={...e,...r};return n.blockNumber=e.blockNumber?BigInt(e.blockNumber):null,n.data=e.input,n.gas=BigInt(e.gas??0n),n.nonce=BigInt(e.nonce??0n),n.transactionIndex=e.transactionIndex?Number(e.transactionIndex):null,n.value=BigInt(e.value??0n),e.authorizationList&&(n.authorizationList=RE(e.authorizationList)),e.chainId&&(n.chainId=Number(e.chainId)),e.gasPrice&&(n.gasPrice=BigInt(e.gasPrice)),e.maxFeePerBlobGas&&(n.maxFeePerBlobGas=BigInt(e.maxFeePerBlobGas)),e.maxFeePerGas&&(n.maxFeePerGas=BigInt(e.maxFeePerGas)),e.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=BigInt(e.maxPriorityFeePerGas)),e.type&&(n.type=Uy[e.type]??e.type),r&&(n.v=Nf(r.yParity)),n}const Dy={..._y,tempo:"0x76"},N_={...Uy,"0x76":"tempo"};function z_(e,t={}){if(!e)return null;const r=F_(e);return r.type=N_[e.type],e.aaAuthorizationList&&(r.authorizationList=C_(e.aaAuthorizationList),delete r.aaAuthorizationList),e.calls&&(r.calls=e.calls.map(n=>({to:n.to,value:n.value&&n.value!=="0x"?BigInt(n.value):void 0,data:n.input||n.data||"0x"}))),e.feeToken&&(r.feeToken=e.feeToken),e.nonceKey&&(r.nonceKey=BigInt(e.nonceKey)),e.signature&&(r.signature=Bl(e.signature)),e.validAfter&&(r.validAfter=Number(e.validAfter)),e.validBefore&&(r.validBefore=Number(e.validBefore)),e.keyAuthorization&&(r.keyAuthorization=By(e.keyAuthorization)),e.feePayerSignature&&(r.feePayerSignature=Df(e.feePayerSignature),r.feePayerSignature.v=Nf(r.feePayerSignature.yParity)),r}function L_(e){const t={};return typeof e.accessList<"u"&&(t.accessList=e.accessList),typeof e.authorizationList<"u"&&(t.authorizationList=$E(e.authorizationList)),typeof e.blobVersionedHashes<"u"&&(t.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(t.blobs=e.blobs),typeof e.chainId<"u"&&(t.chainId=X(e.chainId)),typeof e.data<"u"?(t.data=e.data,t.input=e.data):typeof e.input<"u"&&(t.data=e.input,t.input=e.input),typeof e.from<"u"&&(t.from=e.from),typeof e.gas<"u"&&(t.gas=X(e.gas)),typeof e.gasPrice<"u"&&(t.gasPrice=X(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(t.maxFeePerBlobGas=X(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(t.maxFeePerGas=X(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=X(e.maxPriorityFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=X(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(t.nonce=X(e.nonce)),typeof e.to<"u"&&(t.to=e.to),typeof e.type<"u"&&(t.type=_y[e.type]||e.type),typeof e.value<"u"&&(t.value=X(e.value)),t}function R_(e){const t=L_({...e,authorizationList:void 0});e.authorizationList&&(t.authorizationList=P_(e.authorizationList)),e.calls&&(t.calls=e.calls.map(n=>({to:n.to,value:n.value?X(n.value):"0x",data:n.data??"0x"}))),typeof e.feeToken<"u"&&(t.feeToken=My(e.feeToken)),e.keyAuthorization&&(t.keyAuthorization=__(e.keyAuthorization)),typeof e.validBefore<"u"&&(t.validBefore=X(e.validBefore)),typeof e.validAfter<"u"&&(t.validAfter=X(e.validAfter));const r=(()=>{if(e.nonceKey==="random")return v1(6);if(typeof e.nonceKey=="bigint")return X(e.nonceKey)})();return r&&(t.nonceKey=r),(typeof e.calls<"u"||typeof e.feeToken<"u"||typeof e.keyAuthorization<"u"||typeof e.nonceKey<"u"||typeof e.validBefore<"u"||typeof e.validAfter<"u"||e.type==="tempo")&&(t.type=Dy.tempo,delete t.data,delete t.input,delete t.to,delete t.value),t}function H_(e){const t=[];for(let r=0;r<e.length;r++){const[n,s]=e[r];n&&Or(n,{strict:!1}),t.push({address:n,storageKeys:s.map(a=>yk(a)?a:$d(a))})}return t}function $_(e){if(!e||e.length===0)return[];const t=[];for(const{address:r,storageKeys:n}of e){for(let s=0;s<n.length;s++)if(ft(n[s])!==32)throw new G_({storageKey:n[s]});r&&Or(r,{strict:!1}),t.push([r,n])}return t}class G_ extends ae{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${ft(t)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccessList.InvalidStorageKeySizeError"})}}const Fy={wei:0,gwei:9,szabo:12,finney:15,ether:18};function j_(e,t=0){let r=e.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[s,a]=[r.slice(0,r.length-t),r.slice(r.length-t)];return a=a.replace(/(0+)$/,""),`${n?"-":""}${s||"0"}${a?`.${a}`:""}`}function rp(e,t="wei"){return j_(e,Fy.gwei-Fy[t])}class V_ extends ae{constructor({feeCap:t}={}){super(`The fee cap (\`maxFeePerGas\`/\`maxPriorityFeePerGas\`${t?` = ${rp(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.FeeCapTooHighError"})}}class W_ extends ae{constructor({chainId:t}){super(typeof t<"u"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.InvalidChainIdError"})}}class q_ extends ae{constructor({attributes:t,serialized:r,type:n}){const s=Object.entries(t).map(([a,o])=>typeof o>"u"?a:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${n}" was provided.`,{metaMessages:[`Serialized Transaction: "${r}"`,s.length>0?`Missing Attributes: ${s.join(", ")}`:""].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.InvalidSerializedError"})}}class Y_ extends ae{constructor({maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${rp(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${rp(r)} gwei`:""}).`].join(`
|
|
46
|
+
`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.TipAboveFeeCapError"})}}const K_="0x78",Z_="0x76",Ny="tempo";function np(e){const{calls:t,chainId:r,maxFeePerGas:n,maxPriorityFeePerGas:s,validBefore:a,validAfter:o}=e;if(!t||t.length===0)throw new rU;if(typeof a=="number"&&typeof o=="number"&&a<=o)throw new nU({validBefore:a,validAfter:o});if(t)for(const i of t)i.to&&Or(i.to,{strict:!1});if(r<=0)throw new W_({chainId:r});if(n&&BigInt(n)>2n**256n-1n)throw new V_({feeCap:n});if(s&&n&&s>n)throw new Y_({maxFeePerGas:n,maxPriorityFeePerGas:s})}function X_(e){const t=eE(Pe(e,1)),[r,n,s,a,o,i,c,l,u,d,p,h,y,g,k]=t,v=Array.isArray(g)?g:void 0,w=v?k:g;if(!(t.length===13||t.length===14||t.length===15))throw new q_({attributes:{authorizationList:y,chainId:r,maxPriorityFeePerGas:n,maxFeePerGas:s,gas:a,calls:o,accessList:i,keyAuthorization:v,nonceKey:c,nonce:l,validBefore:u,validAfter:d,feeToken:p,feePayerSignatureOrSender:h,...t.length>12?{signature:w}:{}},serialized:e,type:Ny});let S={chainId:Number(r),type:Ny};if(Pr(a)&&a!=="0x"&&(S.gas=BigInt(a)),Pr(l)&&(S.nonce=l==="0x"?0n:BigInt(l)),Pr(s)&&s!=="0x"&&(S.maxFeePerGas=BigInt(s)),Pr(n)&&n!=="0x"&&(S.maxPriorityFeePerGas=BigInt(n)),Pr(c)&&(S.nonceKey=c==="0x"?0n:BigInt(c)),Pr(u)&&u!=="0x"&&(S.validBefore=Number(u)),Pr(d)&&d!=="0x"&&(S.validAfter=Number(d)),Pr(p)&&p!=="0x"&&(S.feeToken=p),o&&o!=="0x"){const U=o;S.calls=U.map(z=>{const[T,m,b]=z,x={};return T&&T!=="0x"&&(x.to=T),m&&m!=="0x"&&(x.value=BigInt(m)),b&&b!=="0x"&&(x.data=b),x})}(i==null?void 0:i.length)!==0&&i!=="0x"&&(S.accessList=H_(i)),(y==null?void 0:y.length)!==0&&y!=="0x"&&(S.authorizationList=S_(y)),h!=="0x"&&h!==void 0&&(h==="0x00"||Xc(h)?S.feePayerSignature=null:S.feePayerSignature=ME(h)),v&&(S.keyAuthorization=M_(v));const C=w?La(w):void 0;return C&&(S={...S,signature:C}),np(S),S}function Q_(e,t={}){const{feePayerSignature:r,signature:n}=t,s=typeof e=="string"?X_(e):e;return np(s),{...s,...n?{signature:vi(n)}:{},...r?{feePayerSignature:el(r)}:{},type:"tempo"}}function Ci(e,t={}){const{accessList:r,authorizationList:n,calls:s,chainId:a,feeToken:o,gas:i,keyAuthorization:c,nonce:l,nonceKey:u,maxFeePerGas:d,maxPriorityFeePerGas:p,validBefore:h,validAfter:y}=e;np(e);const g=$_(r),k=t.signature||e.signature,v=O_(n),w=s.map(U=>[U.to??"0x",U.value?X(U.value):"0x",U.data??"0x"]),S=(()=>{if(t.sender)return t.sender;const U=typeof t.feePayerSignature<"u"?t.feePayerSignature:e.feePayerSignature;return U===null?"0x00":U?UE(U):"0x"})(),C=[X(a),p?X(p):"0x",d?X(d):"0x",i?X(i):"0x",w,g,u?X(u):"0x",l?X(l):"0x",typeof h=="number"?X(h):"0x",typeof y=="number"?X(y):"0x",typeof o=="bigint"||typeof o=="string"?My(o):"0x",S,v,...c?[U_(c)]:[],...k?[Ml(vi(k))]:[]];return lt(t.format==="feePayer"?K_:Z_,sE(C))}function J_(e){return eU(e,{presign:!0})}function eU(e,t={}){const r=Ci({...e,...t.presign?{signature:void 0}:{}});return oi(r)}function tU(e,t){const{sender:r}=t,n=Ci({...e,signature:void 0},{sender:r,format:"feePayer"});return oi(n)}class rU extends ae{constructor(){super("Calls list cannot be empty."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TxEnvelopeTempo.CallsEmptyError"})}}class nU extends ae{constructor({validBefore:t,validAfter:r}){super(`validBefore (${t}) must be greater than validAfter (${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TxEnvelopeTempo.InvalidValidityWindowError"})}}function zy(e){const t=e.account;return t!=null&&t.keyType&&t.keyType!=="secp256k1"||typeof e.calls<"u"||typeof e.feePayer<"u"||typeof e.feeToken<"u"||typeof e.keyAuthorization<"u"||typeof e.nonceKey<"u"||typeof e.signature<"u"||typeof e.validBefore<"u"||typeof e.validAfter<"u"?"tempo":e.type?e.type:Ad(e)}function sp(e){try{return zy(e)==="tempo"}catch{return!1}}async function sU(e,t){if(!sp(e)){if(t&&"type"in t&&t.type!=="secp256k1")throw new Error("Unsupported signature type. Expected `secp256k1` but got `"+t.type+"`.");if(t&&"type"in t){const{r:n,s,yParity:a}=t==null?void 0:t.signature;return Yc(e,{r:X(n,{size:32}),s:X(s,{size:32}),yParity:a})}return Yc(e,t)}if(zy(e)==="tempo")return aU(e,t);throw new Error("Unsupported transaction type")}async function aU(e,t){var l;const r=(()=>{if(e.signature)return e.signature;if(t&&"type"in t)return t;if(t)return vi({r:BigInt(t.r),s:BigInt(t.s),yParity:Number(t.yParity)})})(),{chainId:n,feePayer:s,feePayerSignature:a,nonce:o,...i}=e,c={...i,calls:(l=i.calls)!=null&&l.length?i.calls:[{to:i.to||(!i.data||i.data==="0x"?"0x0000000000000000000000000000000000000000":void 0),value:i.value,data:i.data}],chainId:Number(n),feePayerSignature:a?{r:BigInt(a.r),s:BigInt(a.s),yParity:Number(a.yParity)}:s?null:void 0,type:"tempo",...o?{nonce:BigInt(o)}:{}};if(s===!0&&delete c.feeToken,r&&typeof e.feePayer=="object"){const u=Q_(c,{signature:r}),d=(()=>{if(e.from)return e.from;if(r.type==="secp256k1")return Qb({payload:J_(u),signature:r.signature});throw new Error("Unable to extract sender from transaction or signature.")})(),p=tU(u,{sender:d}),h=await e.feePayer.sign({hash:p});return Ci(u,{feePayerSignature:el(h)})}if(s===!0){const u=Ci(c,{feePayerSignature:null,signature:r});return e.from&&r?lt(u,e.from,"0xfeefeefeefee"):u}return Ci({...c,...s?{feeToken:void 0}:{}},{feePayerSignature:void 0,signature:r})}function oU(e){if(!sp(e))return Is(e);const{feePayerSignature:t,gasPrice:r,nonce:n,...s}=z_(e);return{...s,accessList:s.accessList,feePayerSignature:t?{r:X(t.r,{size:32}),s:X(t.s,{size:32}),v:BigInt(t.v??27),yParity:t.yParity}:void 0,nonce:Number(n),typeHex:Dy[s.type],type:s.type}}function iU(e){return jc(e)}function cU(e,t){const r=e,n=r.account?Ke(r.account):void 0;if(!sp(r))return Sr(e);t&&(r.calls=r.calls??[{to:e.to||(!e.data||e.data==="0x"?"0x0000000000000000000000000000000000000000":void 0),value:e.value,data:e.data}]),r.feePayer===!0&&delete r.feeToken;const s=R_({...r,type:"tempo"});t==="estimateGas"&&(s.maxFeePerGas=void 0,s.maxPriorityFeePerGas=void 0),s.to=void 0,s.data=void 0,s.value=void 0;const[a,o]=(()=>{const c=n&&"keyType"in n?n.keyType:n==null?void 0:n.source;return c?c==="webAuthn"?["webAuthn",`0x${"ff".repeat(1400)}`]:["p256","secp256k1"].includes(c)?[c,void 0]:[void 0,void 0]:[void 0,void 0]})(),i=n&&"accessKeyAddress"in n?n.accessKeyAddress:void 0;return{...s,...o?{keyData:o}:{},...i?{keyId:i}:{},...a?{keyType:a}:{},...r.feePayer?{feePayer:typeof r.feePayer=="object"?Ke(r.feePayer):r.feePayer}:{}}}const lU=uU();function uU(){return new Map}function dU(e){return`${e.address.toLowerCase()}-${e.chainId}`}function Ly(e,t){const r=dU(t);let n=e.get(r);return n||(n={counter:0,resetScheduled:!1},e.set(r,n)),n}function fU(e,t){const r=Ly(e,t);r.counter=0,r.resetScheduled=!1}function pU(e,t){const r=Ly(e,t);r.resetScheduled||(r.resetScheduled=!0,queueMicrotask(()=>fU(e,t)));const n=r.counter;return r.counter++,n===0?0n:pt(v1(6))}const ap={blockTime:1e3,extendSchema:ek(),formatters:{transaction:Ac({exclude:["aaAuthorizationList"],format:oU}),transactionReceipt:tf({format:iU}),transactionRequest:md({format:cU})},prepareTransactionRequest:[async(e,{phase:t})=>{var n;const r=e;return t==="afterFillParameters"?(typeof r.nonceKey=="bigint"&&r.nonceKey>0n&&(r.gas=(r.gas??0n)+40000n),r):(r.nonceKey=(()=>{var o;if(typeof r.nonceKey<"u"&&r.nonceKey!=="random")return r.nonceKey;const s=((o=r.account)==null?void 0:o.address)??r.from;if(!s||!r.chain)return;const a=pU(lU,{address:s,chainId:r.chain.id});if(a!==0n)return a})(),r.nonce=(()=>{if(typeof r.nonce=="number")return r.nonce;if(r.nonceKey)return 0})(),!r.feeToken&&((n=r.chain)!=null&&n.feeToken)&&(r.feeToken=r.chain.feeToken),r)},{runAt:["beforeFillTransaction","afterFillParameters"]}],serializers:{transaction:((e,t)=>sU(e,t))},async verifyHash(e,t){const{address:r,hash:n,signature:s}=t;if(typeof s=="string"&&s.endsWith(Ns.slice(2))){const a=La(s);if(a.type!=="keychain"){const o=await qc(e,{address:r,blockNumber:t.blockNumber,blockTag:t.blockTag});if(!o||o==="0xef01007702c00000000000000000000000000000000000")return v_(a,{address:r,payload:n})}}return await ne(e,li,"verifyHash")({...t,chain:null})}},hU=f({...ap,id:42429,name:"Tempo Devnet",nativeCurrency:{name:"USD",symbol:"USD",decimals:6},rpcUrls:{default:{http:["https://rpc.devnet.tempoxyz.dev"],webSocket:["wss://rpc.devnet.tempoxyz.dev"]}}}),mU=f({...ap,id:1337,name:"Tempo",nativeCurrency:{name:"USD",symbol:"USD",decimals:6},rpcUrls:{default:{http:["http://localhost:8545"]}}}),bU=f({...ap,id:42429,blockExplorers:{default:{name:"Tempo Explorer",url:"https://explore.tempo.xyz"}},name:"Tempo Testnet",nativeCurrency:{name:"USD",symbol:"USD",decimals:6},rpcUrls:{default:{http:["https://rpc.testnet.tempo.xyz"],webSocket:["wss://rpc.testnet.tempo.xyz"]}}}),yU=f({id:1559,name:"Tenet",network:"tenet-mainnet",nativeCurrency:{name:"TENET",symbol:"TENET",decimals:18},rpcUrls:{default:{http:["https://rpc.tenet.org"]}},blockExplorers:{default:{name:"TenetScan Mainnet",url:"https://tenetscan.io",apiUrl:"https://tenetscan.io/api"}},testnet:!1}),gU=f({id:752025,name:"Ternoa",nativeCurrency:{name:"Capsule Coin",symbol:"CAPS",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.zkevm.ternoa.network"]}},blockExplorers:{default:{name:"Ternoa Explorer",url:"https://explorer-mainnet.zkevm.ternoa.network"}},testnet:!1}),xU=f({id:7,name:"ThaiChain",nativeCurrency:{name:"TCH",symbol:"TCH",decimals:18},rpcUrls:{default:{http:["https://rpc.thaichain.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp.thaichain.org",apiUrl:"https://exp.thaichain.org/api"}},contracts:{multicall3:{address:"0x0DaD6130e832c21719C5CE3bae93454E16A84826",blockCreated:4806386}},testnet:!1}),wU=f({id:8428,name:"THAT Mainnet",nativeCurrency:{name:"THAT",symbol:"THAT",decimals:18},rpcUrls:{default:{http:["https://api.thatchain.io/mainnet"]}},blockExplorers:{default:{name:"Blockscout",url:"https://that.blockscout.com"}},testnet:!1}),vU=f({id:361,name:"Theta Mainnet",nativeCurrency:{name:"TFUEL",symbol:"TFUEL",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-api.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"Theta Explorer",url:"https://explorer.thetatoken.org"}},testnet:!1}),kU=f({id:365,name:"Theta Testnet",nativeCurrency:{name:"TFUEL",symbol:"TFUEL",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-api-testnet.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"Theta Explorer",url:"https://testnet-explorer.thetatoken.org"}},testnet:!0}),EU=f({id:108,name:"ThunderCore Mainnet",nativeCurrency:{name:"TT",symbol:"TT",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.thundercore.com"]}},blockExplorers:{default:{name:"ThunderCore Explorer",url:"https://explorer-mainnet.thundercore.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!1}),CU=f({id:997,name:"5ireChain Thunder Testnet",nativeCurrency:{name:"5ire Token",symbol:"5IRE",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.5ire.network"]}},blockExplorers:{default:{name:"5ireChain Thunder Explorer",url:"https://testnet.5irescan.io/"}},testnet:!0}),TU=f({id:62092,name:"TikTrix Testnet",nativeCurrency:{name:"tTTX",symbol:"tTTX",decimals:18},rpcUrls:{default:{http:["https://tiktrix-rpc.xyz"]}},blockExplorers:{default:{name:"TikTrix Testnet Explorer",url:"https://tiktrix.xyz"}},testnet:!0}),SU=f({id:6969,name:"Tomb Mainnet",nativeCurrency:{name:"TOMB",symbol:"TOMB",decimals:18},rpcUrls:{default:{http:["https://rpc.tombchain.com"]}},blockExplorers:{default:{name:"Tomb Explorer",url:"https://tombscout.com"}},testnet:!1}),AU=f({...ar,id:61166,name:"Treasure",nativeCurrency:{decimals:18,name:"MAGIC",symbol:"MAGIC"},rpcUrls:{default:{http:["https://rpc.treasure.lol"],webSocket:["wss://rpc.treasure.lol/ws"]}},blockExplorers:{default:{name:"Treasure Block Explorer",url:"https://treasurescan.io"}},contracts:{multicall3:{address:"0x2e29fe39496a56856D8698bD43e1dF4D0CE6266a",blockCreated:101}},testnet:!1}),PU=f({...ar,id:978658,name:"Treasure Topaz Testnet",nativeCurrency:{decimals:18,name:"MAGIC",symbol:"MAGIC"},rpcUrls:{default:{http:["https://rpc.topaz.treasure.lol"],webSocket:["wss://rpc.topaz.treasure.lol/ws"]}},blockExplorers:{default:{name:"Treasure Topaz Block Explorer",url:"https://topaz.treasurescan.io"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963",blockCreated:108112}},testnet:!0}),IU=f({id:728126428,name:"Tron",nativeCurrency:{name:"TRON",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://api.trongrid.io/jsonrpc"]}},blockExplorers:{default:{name:"Tronscan",url:"https://tronscan.org",apiUrl:"https://apilist.tronscanapi.com/api"}}}),OU=f({id:3448148188,name:"Tron Nile",nativeCurrency:{name:"TRON",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://nile.trongrid.io/jsonrpc"]}},blockExplorers:{default:{name:"Tronscan",url:"https://nile.tronscan.org"}},testnet:!0}),BU=f({id:2494104990,name:"Tron Shasta",nativeCurrency:{name:"TRON",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://api.shasta.trongrid.io/jsonrpc"]}},blockExplorers:{default:{name:"Tronscan",url:"https://shasta.tronscan.org"}},testnet:!0}),MU=f({id:8,name:"Ubiq Mainnet",nativeCurrency:{name:"UBQ",symbol:"UBQ",decimals:18},rpcUrls:{default:{http:["https://pyrus2.ubiqscan.io"]}},blockExplorers:{default:{name:"Ubiq Scan",url:"https://ubiqscan.io"}},testnet:!1}),_U=f({id:19991,name:"Ultra EVM",nativeCurrency:{decimals:18,name:"Ultra Token",symbol:"UOS"},rpcUrls:{default:{http:["https://evm.ultra.eosusa.io"]}},blockExplorers:{default:{name:"Ultra EVM Explorer",url:"https://evmexplorer.ultra.io"}}}),UU=f({id:18881,name:"Ultra EVM Testnet",nativeCurrency:{decimals:18,name:"Ultra Token",symbol:"UOS"},rpcUrls:{default:{http:["https://evm.test.ultra.eosusa.io"]}},blockExplorers:{default:{name:"Ultra EVM Testnet Explorer",url:"https://evmexplorer.testnet.ultra.io"}},testnet:!0}),DU=f({id:1231,name:"Ultron Mainnet",nativeCurrency:{name:"ULX",symbol:"ULX",decimals:18},rpcUrls:{default:{http:["https://ultron-rpc.net"]}},blockExplorers:{default:{name:"Ultron Scan",url:"https://ulxscan.com"}},testnet:!1}),FU=f({id:1230,name:"Ultron Testnet",nativeCurrency:{name:"ULX",symbol:"ULX",decimals:18},rpcUrls:{default:{http:["https://ultron-dev.io"]}},blockExplorers:{default:{name:"Ultron Scan",url:"https://explorer.ultron-dev.io"}},testnet:!0}),_l=1,NU=f({...j,id:130,name:"Unichain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://mainnet.unichain.org/"]}},blockExplorers:{default:{name:"Uniscan",url:"https://uniscan.xyz",apiUrl:"https://api.uniscan.xyz/api"}},contracts:{...j.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[_l]:{address:"0x2F12d621a16e2d3285929C9996f478508951dFe4"}},portal:{[_l]:{address:"0x0bd48f6B86a26D3a217d0Fa6FfE2B491B956A7a2"}},l1StandardBridge:{[_l]:{address:"0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA"}}},sourceId:_l}),Ul=11155111,zU=f({...j,id:1301,name:"Unichain Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://sepolia.unichain.org"]}},blockExplorers:{default:{name:"Uniscan",url:"https://sepolia.uniscan.xyz",apiUrl:"https://api-sepolia.uniscan.xyz/api"}},contracts:{...j.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},portal:{[Ul]:{address:"0x0d83dab629f0e0F9d36c0Cbc89B69a489f0751bD"}},l1StandardBridge:{[Ul]:{address:"0xea58fcA6849d79EAd1f26608855c2D6407d54Ce2"}},disputeGameFactory:{[Ul]:{address:"0xeff73e5aa3B9AEC32c659Aa3E00444d20a84394b"}}},testnet:!0,sourceId:Ul}),LU=f({id:8880,name:"Unique Mainnet",nativeCurrency:{decimals:18,name:"UNQ",symbol:"UNQ"},rpcUrls:{default:{http:["https://rpc.unique.network"]}},blockExplorers:{default:{name:"Unique Subscan",url:"https://unique.subscan.io/"}}}),RU=f({id:8882,name:"Opal Testnet",nativeCurrency:{decimals:18,name:"OPL",symbol:"OPL"},rpcUrls:{default:{http:["https://rpc-opal.unique.network"]}},blockExplorers:{default:{name:"Opal Subscan",url:"https://opal.subscan.io/"}},testnet:!0}),HU=f({id:8881,name:"Quartz Mainnet",nativeCurrency:{decimals:18,name:"QTZ",symbol:"QTZ"},rpcUrls:{default:{http:["https://rpc-quartz.unique.network"]}},blockExplorers:{default:{name:"Quartz Subscan",url:"https://quartz.subscan.io/"}}}),$U=f({id:18233,name:"Unreal",nativeCurrency:{name:"reETH",decimals:18,symbol:"reETH"},rpcUrls:{default:{http:["https://rpc.unreal-orbit.gelato.digital"]}},blockExplorers:{default:{name:"Unreal Explorer",url:"https://unreal.blockscout.com",apiUrl:"https://unreal.blockscout.com/api/v2"}},testnet:!0,contracts:{multicall3:{address:"0x8b6B0e60D8CD84898Ea8b981065A12F876eA5677",blockCreated:1745}}}),GU=f({id:1480,name:"Vana",blockTime:6e3,nativeCurrency:{decimals:18,name:"Vana",symbol:"VANA"},rpcUrls:{default:{http:["https://rpc.vana.org/"]}},blockExplorers:{default:{name:"Vana Block Explorer",url:"https://vanascan.io",apiUrl:"https://vanascan.io/api"}},contracts:{multicall3:{address:"0xD8d2dFca27E8797fd779F8547166A2d3B29d360E",blockCreated:716763}}}),jU=f({id:14800,name:"Vana Moksha Testnet",blockTime:6e3,nativeCurrency:{decimals:18,name:"Vana",symbol:"VANA"},rpcUrls:{default:{http:["https://rpc.moksha.vana.org"]}},blockExplorers:{default:{name:"Vana Moksha Testnet",url:"https://moksha.vanascan.io",apiUrl:"https://moksha.vanascan.io/api"}},contracts:{multicall3:{address:"0xD8d2dFca27E8797fd779F8547166A2d3B29d360E",blockCreated:732283}},testnet:!0}),VU=f({id:2040,name:"Vanar Mainnet",nativeCurrency:{name:"VANRY",symbol:"VANRY",decimals:18},rpcUrls:{default:{http:["https://rpc.vanarchain.com"]}},blockExplorers:{default:{name:"Vanar Mainnet Explorer",url:"https://explorer.vanarchain.com/"}},testnet:!1}),WU=f({id:100009,name:"Vechain",nativeCurrency:{name:"VeChain",symbol:"VET",decimals:18},rpcUrls:{default:{http:["https://mainnet.vechain.org"]}},blockExplorers:{default:{name:"Vechain Explorer",url:"https://explore.vechain.org"},vechainStats:{name:"Vechain Stats",url:"https://vechainstats.com"}}}),qU=f({id:106,name:"Velas EVM Mainnet",nativeCurrency:{name:"VLX",symbol:"VLX",decimals:18},rpcUrls:{default:{http:["https://evmexplorer.velas.com/rpc"]}},blockExplorers:{default:{name:"Velas Explorer",url:"https://evmexplorer.velas.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:55883577}},testnet:!1}),YU=f({id:88,name:"Viction",nativeCurrency:{name:"Viction",symbol:"VIC",decimals:18},rpcUrls:{default:{http:["https://rpc.viction.xyz"]}},blockExplorers:{default:{name:"VIC Scan",url:"https://vicscan.xyz"}},testnet:!1}),KU=f({id:89,name:"Viction Testnet",nativeCurrency:{name:"Viction",symbol:"VIC",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.viction.xyz"]}},blockExplorers:{default:{name:"VIC Scan",url:"https://testnet.vicscan.xyz"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:12170179}},testnet:!0}),ZU=f({id:888888,name:"Vision",nativeCurrency:{name:"VISION",symbol:"VS",decimals:18},rpcUrls:{default:{http:["https://infragrid.v.network/ethereum/compatible"]}},blockExplorers:{default:{name:"Vision Scan",url:"https://visionscan.org"}},testnet:!1}),XU=f({id:666666,name:"Vision Testnet",nativeCurrency:{name:"VISION",symbol:"VS",decimals:18},rpcUrls:{default:{http:["https://vpioneer.infragrid.v.network/ethereum/compatible"]}},blockExplorers:{default:{name:"Vision Scan",url:"https://visionscan.org/?chain=vpioneer"}},testnet:!0}),QU=f({id:888,name:"Wanchain",nativeCurrency:{name:"WANCHAIN",symbol:"WAN",decimals:18},rpcUrls:{default:{http:["https://gwan-ssl.wandevs.org:56891","https://gwan2-ssl.wandevs.org"]}},blockExplorers:{default:{name:"WanScan",url:"https://wanscan.org"}},contracts:{multicall3:{address:"0xcDF6A1566e78EB4594c86Fe73Fcdc82429e97fbB",blockCreated:25312390}}}),JU=f({id:999,name:"Wanchain Testnet",nativeCurrency:{name:"WANCHAIN",symbol:"WANt",decimals:18},rpcUrls:{default:{http:["https://gwan-ssl.wandevs.org:46891"]}},blockExplorers:{default:{name:"WanScanTest",url:"https://wanscan.org"}},contracts:{multicall3:{address:"0x11c89bF4496c39FB80535Ffb4c92715839CC5324",blockCreated:24743448}},testnet:!0}),eD=f({id:9496,name:"WeaveVM Alphanet",nativeCurrency:{name:"Testnet WeaveVM",symbol:"tWVM",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.wvm.dev"]}},blockExplorers:{default:{name:"WeaveVM Alphanet Explorer",url:"https://explorer.wvm.dev"}},testnet:!0}),tD=f({id:1111,name:"WEMIX",network:"wemix-mainnet",nativeCurrency:{name:"WEMIX",symbol:"WEMIX",decimals:18},rpcUrls:{default:{http:["https://api.wemix.com"]}},blockExplorers:{default:{name:"wemixExplorer",url:"https://explorer.wemix.com"}}}),rD=f({id:1112,name:"WEMIX Testnet",network:"wemix-testnet",nativeCurrency:{name:"WEMIX",symbol:"tWEMIX",decimals:18},rpcUrls:{default:{http:["https://api.test.wemix.com"]}},blockExplorers:{default:{name:"wemixExplorer",url:"https://testnet.wemixscan.com",apiUrl:"https://testnet.wemixscan.com/api"}},testnet:!0}),nD=f({id:420420421,name:"Westend Asset Hub",nativeCurrency:{decimals:18,name:"Westies",symbol:"WND"},rpcUrls:{default:{http:["https://westend-asset-hub-eth-rpc.polkadot.io"]}},blockExplorers:{default:{name:"subscan",url:"https://westend-asset-hub-eth-explorer.parity.io"}},testnet:!0}),sD=f({testnet:!1,name:"Whitechain",blockExplorers:{default:{name:"Whitechain Explorer",url:"https://explorer.whitechain.io"}},id:1875,rpcUrls:{default:{http:["https://rpc.whitechain.io"]}},nativeCurrency:{decimals:18,name:"WhiteBIT Coin",symbol:"WBT"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:25212237}}}),aD=f({testnet:!0,name:"Whitechain Testnet",blockExplorers:{default:{name:"Whitechain Explorer",url:"https://testnet.whitechain.io"}},id:2625,rpcUrls:{default:{http:["https://rpc-testnet.whitechain.io"]}},nativeCurrency:{decimals:18,name:"WhiteBIT Coin",symbol:"WBT"}}),oD=f({id:42070,name:"WMC Testnet",nativeCurrency:{name:"WMTx",symbol:"WMTx",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet-base.worldmobile.net"]}},blockExplorers:{default:{name:"WMC Explorer",url:"https://explorer2-base-testnet.worldmobile.net"}},testnet:!0}),Ti=1,iD=f({...j,id:480,name:"World Chain",network:"worldchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://worldchain-mainnet.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Worldscan",url:"https://worldscan.org",apiUrl:"https://api.worldscan.org/api"},blockscout:{name:"Blockscout",url:"https://worldchain-mainnet.explorer.alchemy.com",apiUrl:"https://worldchain-mainnet.explorer.alchemy.com/api"}},contracts:{...j.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[Ti]:{address:"0x069c4c579671f8c120b1327a73217D01Ea2EC5ea"}},l2OutputOracle:{[Ti]:{address:"0x19A6d1E9034596196295CF148509796978343c5D"}},portal:{[Ti]:{address:"0xd5ec14a83B7d95BE1E2Ac12523e2dEE12Cbeea6C"}},l1StandardBridge:{[Ti]:{address:"0x470458C91978D2d929704489Ad730DC3E3001113"}}},testnet:!1,sourceId:Ti}),Si=11155111,cD=f({...j,id:4801,name:"World Chain Sepolia",network:"worldchain-sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://worldchain-sepolia.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Worldscan Sepolia",url:"https://sepolia.worldscan.org",apiUrl:"https://api-sepolia.worldscan.org/api"},blockscout:{name:"Blockscout",url:"https://worldchain-sepolia.explorer.alchemy.com",apiUrl:"https://worldchain-sepolia.explorer.alchemy.com/api"}},contracts:{...j.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[Si]:{address:"0x8Ec1111f67Dad6b6A93B3F42DfBC92D81c98449A"}},l2OutputOracle:{[Si]:{address:"0xc8886f8BAb6Eaeb215aDB5f1c686BF699248300e"}},portal:{[Si]:{address:"0xFf6EBa109271fe6d4237EeeD4bAb1dD9A77dD1A4"}},l1StandardBridge:{[Si]:{address:"0xd7DF54b3989855eb66497301a4aAEc33Dbb3F8DE"}}},testnet:!0,sourceId:Si}),lD=f({id:103,name:"WorldLand Mainnet",nativeCurrency:{decimals:18,name:"WLC",symbol:"WLC"},rpcUrls:{default:{http:["https://seoul.worldland.foundation"]}},blockExplorers:{default:{name:"WorldLand Scan",url:"https://scan.worldland.foundation"}},testnet:!1}),uD=f({id:660279,name:"Xai Mainnet",nativeCurrency:{name:"Xai",symbol:"XAI",decimals:18},rpcUrls:{default:{http:["https://xai-chain.net/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.xai-chain.net"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:222549}},testnet:!1}),dD=f({id:37714555429,name:"Xai Testnet",nativeCurrency:{name:"sXai",symbol:"sXAI",decimals:18},rpcUrls:{default:{http:["https://testnet-v2.xai-chain.net/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer-v2.xai-chain.net"}},testnet:!0}),fD=f({id:50,name:"XDC Network",nativeCurrency:{decimals:18,name:"XDC",symbol:"XDC"},rpcUrls:{default:{http:["https://rpc.xdcrpc.com"]}},blockExplorers:{default:{name:"XDCScan",url:"https://xdcscan.com"}},contracts:{multicall3:{address:"0x0B1795ccA8E4eC4df02346a082df54D437F8D9aF",blockCreated:75884020}}}),pD=f({id:51,name:"Apothem Network",nativeCurrency:{decimals:18,name:"TXDC",symbol:"TXDC"},rpcUrls:{default:{http:["https://erpc.apothem.network"]}},blockExplorers:{default:{name:"XDCScan",url:"https://testnet.xdcscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:59765389}}}),hD=f({id:196,name:"X Layer Mainnet",nativeCurrency:{decimals:18,name:"OKB",symbol:"OKB"},rpcUrls:{default:{http:["https://rpc.xlayer.tech"]}},blockExplorers:{default:{name:"OKLink",url:"https://www.oklink.com/xlayer",apiUrl:"https://www.oklink.com/api/v5/explorer/xlayer/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:47416}}}),Ry=f({id:195,name:"X1 Testnet",nativeCurrency:{decimals:18,name:"OKB",symbol:"OKB"},rpcUrls:{default:{http:["https://xlayertestrpc.okx.com"]}},blockExplorers:{default:{name:"OKLink",url:"https://www.oklink.com/xlayer-test"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:624344}},testnet:!0}),mD=f({id:3721,name:"Xone Chain Mainnet",nativeCurrency:{decimals:18,name:"XOC",symbol:"XOC"},rpcUrls:{default:{http:["https://rpc.xone.org"]}},blockExplorers:{default:{name:"Xone Mainnet Explorer",url:"https://xonescan.com",apiUrl:"http://api.xonescan.com/api"}},testnet:!1}),bD=f({id:33772211,name:"Xone Chain Testnet",nativeCurrency:{decimals:18,name:"XOC",symbol:"XOC"},rpcUrls:{default:{http:["https://rpc-testnet.xone.org","https://rpc-testnet.xone.plus","https://rpc-testnet.knight.center"]}},blockExplorers:{default:{name:"Xone Testnet Explorer",url:"https://testnet.xonescan.com",apiUrl:"http://api.testnet.xonescan.com/api"}},testnet:!0}),yD=f({id:20250217,name:"Xphere Mainnet",nativeCurrency:{decimals:18,name:"XP",symbol:"XP"},rpcUrls:{default:{http:["https://en-bkk.x-phere.com"]}},blockExplorers:{default:{name:"Xphere Tamsa Explorer",url:"https://xp.tamsa.io"}},testnet:!1}),gD=f({id:1998991,name:"Xphere Testnet",nativeCurrency:{decimals:18,name:"XPT",symbol:"XPT"},rpcUrls:{default:{http:["http://testnet.x-phere.com"]}},blockExplorers:{default:{name:"Xphere Tamsa Explorer",url:"https://xpt.tamsa.io"}},testnet:!0}),xD=f({id:273,name:"XR One",nativeCurrency:{decimals:18,name:"XR1",symbol:"XR1"},rpcUrls:{default:{http:["https://xr1.calderachain.xyz/http"],webSocket:["wss://xr1.calderachain.xyz/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://xr1.calderaexplorer.xyz"}},testnet:!1}),wD=f({id:144e4,name:"XRPL EVM",nativeCurrency:{name:"XRP",symbol:"XRP",decimals:18},rpcUrls:{default:{http:["https://rpc.xrplevm.org"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.xrplevm.org",apiUrl:"https://explorer.xrplevm.org/api/v2"}},testnet:!1}),vD=f({id:1440002,name:"XRPL EVM Devnet",nativeCurrency:{name:"XRP",symbol:"XRP",decimals:18},rpcUrls:{default:{http:["https://rpc.xrplevm.org/"]},public:{http:["https://rpc.xrplevm.org/"]}},blockExplorers:{default:{name:"XRPLEVM Devnet Explorer",url:"https://explorer.xrplevm.org/"}},contracts:{multicall3:{address:"0x82Cc144D7d0AD4B1c27cb41420e82b82Ad6e9B31",blockCreated:15237286}},testnet:!0}),kD=f({id:1449e3,name:"XRPL EVM Testnet",nativeCurrency:{name:"XRP",symbol:"XRP",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.xrplevm.org"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.testnet.xrplevm.org",apiUrl:"https://explorer.testnet.xrplevm.org/api/v2"}},contracts:{multicall3:{address:"0x82Cc144D7d0AD4B1c27cb41420e82b82Ad6e9B31",blockCreated:492302}},testnet:!0}),ED=f({id:2730,name:"XR Sepolia",nativeCurrency:{decimals:18,name:"tXR",symbol:"tXR"},rpcUrls:{default:{http:["https://xr-sepolia-testnet.rpc.caldera.xyz/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://xr-sepolia-testnet.explorer.caldera.xyz"}},testnet:!0}),CD=f({id:50005,name:"Yooldo Verse",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.yooldo-verse.xyz"]}},blockExplorers:{default:{name:"Yooldo Verse Explorer",url:"https://explorer.yooldo-verse.xyz"}}}),TD=f({id:50006,name:"Yooldo Verse Testnet",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.yooldo-verse.xyz"]}},blockExplorers:{default:{name:"Yooldo Verse Testnet Explorer",url:"https://explorer.testnet.yooldo-verse.xyz"}},testnet:!0}),SD=f({id:8408,name:"ZenChain Testnet",nativeCurrency:{decimals:18,name:"ZTC",symbol:"ZTC"},rpcUrls:{default:{http:["https://zenchain-testnet.api.onfinality.io/public"],webSocket:["wss://zenchain-testnet.api.onfinality.io/public-ws"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:230019}},blockExplorers:{default:{name:"Zentrace",url:"https://zentrace.io"}},testnet:!0}),AD=f({id:383414847825,name:"Zeniq Mainnet",nativeCurrency:{name:"ZENIQ",symbol:"ZENIQ",decimals:18},rpcUrls:{default:{http:["https://api.zeniq.network"]}},blockExplorers:{default:{name:"Zeniq Explorer",url:"https://zeniqscan.com"}},testnet:!1}),PD=f({id:543210,name:"Zero Network",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.zerion.io/v1/zero"]}},blockExplorers:{default:{name:"Zero Network Explorer",url:"https://explorer.zero.network"}},testnet:!1}),ID=f({id:7e3,name:"ZetaChain",nativeCurrency:{decimals:18,name:"Zeta",symbol:"ZETA"},rpcUrls:{default:{http:["https://zetachain-evm.blockpi.network/v1/rpc/public"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1632781}},blockExplorers:{default:{name:"ZetaScan",url:"https://zetascan.com"}},testnet:!1}),OD=f({id:7001,name:"ZetaChain Athens Testnet",nativeCurrency:{decimals:18,name:"Zeta",symbol:"aZETA"},rpcUrls:{default:{http:["https://zetachain-athens-evm.blockpi.network/v1/rpc/public"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2715217}},blockExplorers:{default:{name:"ZetaScan",url:"https://testnet.zetascan.com"}},testnet:!0}),BD=f({id:1337803,name:"Zhejiang",nativeCurrency:{name:"Zhejiang Ether",symbol:"ZhejETH",decimals:18},rpcUrls:{default:{http:["https://rpc.zhejiang.ethpandaops.io"]}},blockExplorers:{default:{name:"Beaconchain",url:"https://zhejiang.beaconcha.in"}},testnet:!0}),MD=f({id:32769,name:"Zilliqa",network:"zilliqa",nativeCurrency:{name:"Zilliqa",symbol:"ZIL",decimals:18},rpcUrls:{default:{http:["https://api.zilliqa.com"]}},blockExplorers:{default:{name:"Ethernal",url:"https://evmx.zilliqa.com"}},testnet:!1}),_D=f({id:33101,name:"Zilliqa Testnet",network:"zilliqa-testnet",nativeCurrency:{name:"Zilliqa",symbol:"ZIL",decimals:18},rpcUrls:{default:{http:["https://dev-api.zilliqa.com"]}},blockExplorers:{default:{name:"Ethernal",url:"https://evmx.testnet.zilliqa.com"}},testnet:!0}),op=1,UD=f({...j,id:48900,name:"Zircuit Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.zircuit.com","https://zircuit1-mainnet.liquify.com","https://zircuit1-mainnet.p2pify.com","https://zircuit-mainnet.drpc.org"]}},blockExplorers:{default:{name:"Zircuit Explorer",url:"https://explorer.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"},l2OutputOracle:{[op]:{address:"0x92Ef6Af472b39F1b363da45E35530c24619245A4"}},portal:{[op]:{address:"0x17bfAfA932d2e23Bd9B909Fd5B4D2e2a27043fb1"}},l1StandardBridge:{[op]:{address:"0x386B76D9cA5F5Fb150B6BFB35CF5379B22B26dd8"}}},testnet:!1}),ip=11155111,DD=f({...j,id:48898,name:"Zircuit Garfield Testnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://garfield-testnet.zircuit.com/"]}},blockExplorers:{default:{name:"Zircuit Garfield Testnet Explorer",url:"https://explorer.garfield-testnet.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"},l2OutputOracle:{[ip]:{address:"0xd69D3AC5CA686cCF94b258291772bc520FEAf211"}},portal:{[ip]:{address:"0x4E21A71Ac3F7607Da5c06153A17B1DD20E702c21"}},l1StandardBridge:{[ip]:{address:"0x87a7E2bCA9E35BA49282E832a28A6023904460D8"}}},testnet:!0}),cp=11155111,FD=f({...j,id:48899,name:"Zircuit Testnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.zircuit.com","https://zircuit1-testnet.p2pify.com","https://zircuit1-testnet.liquify.com"]}},blockExplorers:{default:{name:"Zircuit Testnet Explorer",url:"https://explorer.testnet.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:6040287},l2OutputOracle:{[cp]:{address:"0x740C2dac453aEf7140809F80b72bf0e647af8148"}},portal:{[cp]:{address:"0x787f1C8c5924178689E0560a43D848bF8E54b23e"}},l1StandardBridge:{[cp]:{address:"0x0545c5fe980098C16fcD0eCB5E79753afa6d9af9"}}},testnet:!0}),ND=f({id:42766,name:"ZKFair Mainnet",network:"zkfair-mainnet",nativeCurrency:{decimals:18,name:"USD Coin",symbol:"USDC"},rpcUrls:{default:{http:["https://rpc.zkfair.io"]}},blockExplorers:{default:{name:"zkFair Explorer",url:"https://scan.zkfair.io",apiUrl:"https://scan.zkfair.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6090959}},testnet:!1}),zD=f({id:43851,name:"ZKFair Testnet",network:"zkfair-testnet",nativeCurrency:{decimals:18,name:"USD Coin",symbol:"USDC"},rpcUrls:{default:{http:["https://testnet-rpc.zkfair.io"]}},blockExplorers:{default:{name:"zkFair Explorer",url:"https://testnet-scan.zkfair.io"}},testnet:!0}),LD=f({id:810180,name:"zkLink Nova",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zklink.io"]}},blockExplorers:{default:{name:"zkLink Nova Block Explorer",url:"https://explorer.zklink.io"}}}),RD=f({id:810181,name:"zkLink Nova Sepolia Testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zklink.io"]}},blockExplorers:{default:{name:"zkLink Nova Block Explorer",url:"https://sepolia.explorer.zklink.io"}}}),Hy=f({...ar,blockTime:200,id:324,name:"ZKsync Era",network:"zksync-era",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.era.zksync.io"],webSocket:["wss://mainnet.era.zksync.io/ws"]}},blockExplorers:{default:{name:"Etherscan",url:"https://era.zksync.network/",apiUrl:"https://api-era.zksync.network/api"},native:{name:"ZKsync Explorer",url:"https://explorer.zksync.io/",apiUrl:"https://block-explorer-api.mainnet.zksync.io/api"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:45659388}}}),$y=f({...ar,id:260,name:"ZKsync InMemory Node",network:"zksync-in-memory-node",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:8011"]}},testnet:!0}),HD=f({...ar,id:272,name:"ZKsync CLI Local Custom Hyperchain",nativeCurrency:{name:"BAT",symbol:"BAT",decimals:18},rpcUrls:{default:{http:["http://localhost:15200"],webSocket:["ws://localhost:15201"]}},blockExplorers:{default:{name:"ZKsync explorer",url:"http://localhost:15005/",apiUrl:"http://localhost:15005/api"}},testnet:!0}),$D=f({...ar,id:270,name:"ZKsync CLI Local Hyperchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:15100"],webSocket:["ws://localhost:15101"]}},blockExplorers:{default:{name:"ZKsync explorer",url:"http://localhost:15005/",apiUrl:"http://localhost:15005/api"}},testnet:!0}),GD=f({id:9,name:"ZKsync CLI Local Hyperchain L1",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:15045"]}},blockExplorers:{default:{name:"Blockscout",url:"http://localhost:15001/",apiUrl:"http://localhost:15001/api/v2"}},testnet:!0}),Gy=f({...ar,id:270,name:"ZKsync CLI Local Node",network:"zksync-cli-local-node",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:3050"]}},testnet:!0}),jy=f({...ar,blockTime:200,id:300,name:"ZKsync Sepolia Testnet",network:"zksync-sepolia-testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.era.zksync.dev"],webSocket:["wss://sepolia.era.zksync.dev/ws"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia-era.zksync.network/",apiUrl:"https://api-sepolia-era.zksync.network/api"},native:{name:"ZKsync Explorer",url:"https://sepolia.explorer.zksync.io/",blockExplorerApi:"https://block-explorer-api.sepolia.zksync.dev/api"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:3855712}},testnet:!0}),Dl=1,jD=f({...j,id:7777777,name:"Zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy",apiUrl:"https://explorer.zora.energy/api"}},contracts:{...j.contracts,l2OutputOracle:{[Dl]:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:5882},portal:{[Dl]:{address:"0x1a0ad011913A150f69f6A19DF447A0CfD9551054"}},l1StandardBridge:{[Dl]:{address:"0x3e2Ea9B92B7E48A52296fD261dc26fd995284631"}}},sourceId:Dl}),Fl=11155111,VD=f({...j,id:999999999,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/",apiUrl:"https://sepolia.explorer.zora.energy/api"}},contracts:{...j.contracts,l2OutputOracle:{[Fl]:{address:"0x2615B481Bd3E5A1C0C7Ca3Da1bdc663E8615Ade9"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83160},portal:{[Fl]:{address:"0xeffE2C6cA9Ab797D418f0D91eA60807713f3536f"}},l1StandardBridge:{[Fl]:{address:"0x5376f1D543dcbB5BD416c56C189e4cB7399fCcCB"}}},sourceId:Fl,testnet:!0}),Vy=5,WD=f({...j,id:999,name:"Zora Goerli Testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy",apiUrl:"https://testnet.explorer.zora.energy/api"}},contracts:{...j.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:189123},portal:{[Vy]:{address:"0xDb9F51790365e7dc196e7D072728df39Be958ACe"}}},sourceId:Vy,testnet:!0}),qD=Object.freeze(Object.defineProperty({__proto__:null,abey:a7,abstract:b7,abstractTestnet:y7,acala:g7,acria:x7,adf:w7,agungTestnet:v7,aioz:k7,alephZero:E7,alephZeroTestnet:C7,alienx:T7,alienxHalTestnet:S7,ancient8:B7,ancient8Sepolia:M7,anvil:_7,apeChain:U7,apexTestnet:D7,apollo:F7,arbitrum:N7,arbitrumGoerli:z7,arbitrumNova:L7,arbitrumSepolia:R7,arcTestnet:H7,arenaz:$7,areonNetwork:G7,areonNetworkTestnet:j7,areum:V7,artelaTestnet:W7,arthera:q7,artheraTestnet:Y7,assetChain:K7,assetChainTestnet:Z7,astar:X7,astarZkEVM:Q7,astarZkyoto:J7,atletaOlympia:eT,aurora:tT,auroraTestnet:rT,auroria:nT,autheoTestnet:sT,avalanche:aT,avalancheFuji:oT,b3:iT,b3Sepolia:cT,bahamut:lT,base:by,baseGoerli:fT,basePreconf:uT,baseSepolia:yy,baseSepoliaPreconf:pT,basecampTestnet:dT,beam:hT,beamTestnet:mT,bearNetworkChainMainnet:bT,bearNetworkChainTestnet:yT,berachain:gT,berachainBepolia:xT,berachainTestnet:wT,berachainTestnetbArtio:vT,bevmMainnet:kT,bifrost:ET,birdlayer:CT,bitTorrent:BT,bitTorrentTestnet:MT,bitgert:TT,bitkub:ST,bitkubTestnet:AT,bitlayer:PT,bitlayerTestnet:IT,bitrock:OT,blast:_T,blastSepolia:UT,bob:DT,bobSepolia:zT,boba:FT,bobaSepolia:NT,boolBetaMainnet:LT,botanix:RT,botanixTestnet:HT,bounceBit:$T,bounceBitTestnet:GT,bronos:jT,bronosTestnet:VT,bsc:WT,bscGreenfield:qT,bscTestnet:YT,bsquared:KT,bsquaredTestnet:ZT,btr:XT,btrTestnet:QT,bxn:JT,bxnTestnet:e9,cannon:t9,canto:r9,celo:p9,celoAlfajores:h9,celoSepolia:m9,chang:b9,chiliz:y9,chips:g9,citreaTestnet:x9,classic:w9,coinbit:v9,coinex:k9,confluxESpace:E9,confluxESpaceTestnet:C9,coreDao:T9,coreTestnet1:S9,coreTestnet2:A9,corn:P9,cornTestnet:I9,crab:O9,creatorTestnet:B9,creditCoin3Devnet:M9,creditCoin3Mainnet:_9,creditCoin3Testnet:U9,cronos:D9,cronosTestnet:F9,cronoszkEVM:N9,cronoszkEVMTestnet:z9,crossbell:L9,crossfi:R9,curtis:H9,cyber:$9,cyberTestnet:G9,dailyNetwork:j9,dailyNetworkTestnet:V9,darwinia:W9,datahavenTestnet:q9,dbkchain:Y9,dchain:K9,dchainTestnet:Z9,defichainEvm:X9,defichainEvmTestnet:Q9,degen:J9,dfk:eS,diode:tS,disChain:rS,dodochainTestnet:nS,dogechain:sS,domaTestnet:aS,donatuz:oS,dosChain:iS,dosChainTestnet:cS,dreyerxMainnet:lS,dreyerxTestnet:uS,dustboyIoT:dS,dymension:fS,edexa:pS,edexaTestnet:hS,edgeless:mS,edgelessTestnet:bS,edgeware:yS,edgewareTestnet:gS,eduChain:xS,eduChainTestnet:wS,ekta:vS,ektaTestnet:kS,elastos:ES,elastosTestnet:CS,electroneum:TS,electroneumTestnet:SS,elysiumTestnet:AS,energy:PS,eni:IS,eniTestnet:OS,enuls:BS,eon:MS,eos:_S,eosTestnet:US,eteria:DS,etherlink:FS,etherlinkShadownetTestnet:NS,etherlinkTestnet:zS,ethernity:LS,etp:RS,evmos:HS,evmosTestnet:$S,excelonMainnet:GS,expanse:jS,exsat:VS,exsatTestnet:WS,fantom:qS,fantomSonicTestnet:YS,fantomTestnet:KS,fibo:ZS,filecoin:XS,filecoinCalibration:QS,filecoinHyperspace:JS,fireChain:s7,flame:e4,flare:t4,flareTestnet:r4,flowMainnet:n4,flowPreviewnet:s4,flowTestnet:a4,fluence:o4,fluenceStage:i4,fluenceTestnet:c4,fluentTestnet:l4,form:u4,formTestnet:f4,forma:d4,formicarium:uI,forta:p4,foundry:h4,fraxtal:m4,fraxtalTestnet:b4,funkiMainnet:y4,funkiSepolia:g4,fuse:x4,fuseSparknet:w4,fusion:v4,fusionTestnet:k4,garnet:E4,gatechain:C4,geist:T4,genesys:S4,giwaSepolia:wy,giwaSepoliaPreconf:A4,glideL1Protocol:P4,glideL2Protocol:I4,gnosis:O4,gnosisChiado:B4,goChain:U4,goat:M4,gobi:_4,godwoken:D4,goerli:F4,graphite:N4,graphiteTestnet:z4,gravity:L4,gunz:R4,guruNetwork:H4,guruTestnet:$4,ham:G4,happychainTestnet:j4,haqqMainnet:V4,haqqTestedge2:W4,hardhat:q4,harmonyOne:Y4,hashkey:K4,hashkeyTestnet:Z4,haustTestnet:X4,hedera:Q4,hederaPreviewnet:J4,hederaTestnet:eA,hela:tA,heliosTestnet:rA,hemi:nA,hemiSepolia:sA,henesys:aA,holesky:oA,hoodi:iA,hpb:cA,hpp:lA,hppSepolia:uA,huddle01Mainnet:dA,huddle01Testnet:fA,humanity:pA,humanityTestnet:hA,humanode:mA,humanodeTestnet5:bA,hychain:yA,hychainTestnet:gA,hyperEvm:vy,hyperliquid:vy,hyperliquidEvmTestnet:xA,iSunCoin:DA,icbNetwork:wA,idchain:vA,immutableZkEvm:kA,immutableZkEvmTestnet:EA,inEVM:CA,initVerse:TA,initVerseGenesis:SA,injective:AA,injectiveTestnet:PA,ink:IA,inkSepolia:OA,iota:BA,iotaTestnet:MA,iotex:_A,iotexTestnet:UA,jasmyChain:FA,jasmyChainTestnet:NA,jbc:zA,jbcTestnet:LA,jocMainnet:RA,jocTestnet:HA,jovay:$A,jovaySepolia:GA,juneo:jA,juneoBCH1Chain:VA,juneoDAI1Chain:WA,juneoDOGE1Chain:qA,juneoEUR1Chain:YA,juneoGLD1Chain:KA,juneoLINK1Chain:ZA,juneoLTC1Chain:XA,juneoSGD1Chain:JA,juneoSocotraTestnet:eP,juneoUSD1Chain:tP,juneoUSDT1Chain:rP,juneomBTC1Chain:QA,kaia:nP,kairos:sP,kakarotSepolia:aP,kakarotStarknetSepolia:oP,kardiaChain:iP,karura:cP,katana:lP,kava:uP,kavaTestnet:dP,kcc:fP,kiiTestnetOro:pP,kinto:hP,klaytn:mP,klaytnBaobab:bP,koi:yP,kroma:gP,kromaSepolia:xP,l3x:wP,l3xTestnet:vP,lavita:kP,lens:EP,lensTestnet:CP,lestnet:TP,lightlinkPegasus:SP,lightlinkPhoenix:AP,linea:IP,lineaGoerli:OP,lineaSepolia:BP,lineaTestnet:MP,lisk:_P,liskSepolia:UP,loadAlphanet:DP,localhost:FP,loop:NP,lukso:zP,luksoTestnet:LP,lumiaMainnet:RP,lumiaTestnet:HP,lumoz:$P,lumozTestnet:GP,lycan:jP,lyra:VP,mainnet:WP,mandala:qP,manta:YP,mantaSepoliaTestnet:KP,mantaTestnet:ZP,mantle:XP,mantleSepoliaTestnet:QP,mantleTestnet:JP,mantraDuKongEVMTestnet:eI,mantraEVM:tI,mapProtocol:rI,matchain:nI,matchainTestnet:sI,mchVerse:aI,megaethTestnet:oI,mekong:iI,meld:cI,memecore:lI,merlin:dI,merlinErigonTestnet:fI,metachain:pI,metachainIstanbul:hI,metadium:mI,metalL2:bI,meter:yI,meterTestnet:gI,metis:xI,metisGoerli:wI,metisSepolia:vI,mev:kI,mevTestnet:EI,mint:CI,mintSepoliaTestnet:TI,mitosisTestnet:SI,mode:AI,modeTestnet:PI,monad:II,monadTestnet:OI,moonbaseAlpha:BI,moonbeam:MI,moonbeamDev:_I,moonriver:UI,morph:DI,morphHolesky:FI,morphSepolia:NI,nahmii:zI,nautilus:LI,near:RI,nearTestnet:HI,neonDevnet:$I,neonMainnet:GI,neoxMainnet:jI,neoxT4:VI,newton:WI,nexi:qI,nexilix:YI,nibiru:KI,nitrographTestnet:ZI,nomina:XI,oasisTestnet:QI,oasys:JI,odysseyTestnet:eO,okc:tO,omax:rO,omni:nO,omniOmega:sO,oneWorld:aO,oortMainnetDev:oO,opBNB:iO,opBNBTestnet:cO,openledger:lO,optimism:uO,optimismGoerli:dO,optimismSepolia:fO,optopia:pO,optopiaTestnet:hO,orderly:mO,orderlySepolia:bO,otimDevnet:yO,palm:gO,palmTestnet:xO,peaq:wO,pgn:vO,pgnTestnet:kO,phoenix:EO,planq:CO,plasma:TO,plasmaDevnet:SO,plasmaTestnet:AO,playfiAlbireo:PO,plinga:IO,plume:OO,plumeDevnet:BO,plumeMainnet:MO,plumeSepolia:_O,plumeTestnet:UO,polterTestnet:DO,polygon:FO,polygonAmoy:NO,polygonMumbai:zO,polygonZkEvm:LO,polygonZkEvmCardona:RO,polygonZkEvmTestnet:HO,polynomial:$O,polynomialSepolia:GO,potos:jO,potosTestnet:VO,premiumBlockTestnet:WO,pulsechain:qO,pulsechainV4:YO,pumpfiTestnet:KO,pyrope:ZO,qMainnet:QO,qTestnet:JO,ql1:XO,quai:eB,quaiTestnet:tB,reactiveTestnet:rB,real:nB,redbellyMainnet:sB,redbellyTestnet:aB,reddio:oB,reddioSepolia:iB,redstone:cB,rei:lB,reyaNetwork:uB,riseTestnet:dB,rivalz:fB,rollux:pB,rolluxTestnet:hB,ronin:mB,root:bB,rootPorcini:yB,rootstock:gB,rootstockTestnet:xB,rss3:wB,rss3Sepolia:vB,saakuru:kB,saga:EB,saigon:CB,sanko:TB,sapphire:SB,sapphireTestnet:AB,satoshiVM:PB,satoshiVMTestnet:IB,scroll:OB,scrollSepolia:BB,sei:MB,seiDevnet:_B,seiTestnet:DB,seismicDevnet:UB,sepolia:FB,shape:NB,shapeSepolia:zB,shardeum:LB,shardeumSphinx:RB,shibarium:HB,shibariumTestnet:$B,shiden:GB,shimmer:jB,shimmerTestnet:VB,sidraChain:WB,silentData:qB,silicon:YB,siliconSepolia:KB,sixProtocol:ZB,skaleBase:lM,skaleBaseSepoliaTestnet:uM,skaleBlockBrawlers:XB,skaleCalypso:QB,skaleCalypsoTestnet:JB,skaleCryptoBlades:eM,skaleCryptoColosseum:tM,skaleEuropa:rM,skaleEuropaTestnet:nM,skaleExorde:sM,skaleHumanProtocol:aM,skaleNebula:oM,skaleNebulaTestnet:iM,skaleRazor:cM,skaleTitan:dM,skaleTitanTestnet:fM,sketchpad:pM,snax:hM,snaxTestnet:mM,somnia:bM,somniaTestnet:yM,soneium:gM,soneiumMinato:xM,songbird:wM,songbirdTestnet:vM,sonic:kM,sonicBlazeTestnet:EM,sonicTestnet:CM,sophon:TM,sophonTestnet:SM,sova:AM,sovaSepolia:PM,spicy:IM,stableTestnet:OM,statusNetworkSepolia:Cy,statusSepolia:Cy,step:BM,story:MM,storyAeneid:_M,storyOdyssey:UM,storyTestnet:DM,stratis:FM,superlumio:NM,superposition:zM,superseed:LM,superseedSepolia:RM,surgeTestnet:HM,swan:$M,swanProximaTestnet:GM,swanSaturnTestnet:jM,swellchain:VM,swellchainTestnet:WM,swissdlt:qM,syscoin:YM,syscoinTestnet:KM,tac:ZM,tacSPB:XM,taiko:QM,taikoHekla:JM,taikoHoodi:e_,taikoJolnir:t_,taikoKatla:r_,taikoTestnetSepolia:n_,taraxa:s_,taraxaTestnet:a_,teaSepolia:o_,telcoinTestnet:i_,telos:c_,telosTestnet:l_,tempoDevnet:hU,tempoLocalnet:mU,tempoTestnet:bU,tenet:yU,ternoa:gU,thaiChain:xU,that:wU,theta:vU,thetaTestnet:kU,thunderCore:EU,thunderTestnet:CU,tiktrixTestnet:TU,tomb:SU,treasure:AU,treasureTopaz:PU,tron:IU,tronNile:OU,tronShasta:BU,ubiq:MU,ultra:_U,ultraTestnet:UU,ultron:DU,ultronTestnet:FU,unichain:NU,unichainSepolia:zU,unique:LU,uniqueOpal:RU,uniqueQuartz:HU,unreal:$U,vana:GU,vanaMoksha:jU,vanar:VU,vechain:WU,velas:qU,viction:YU,victionTestnet:KU,vision:ZU,visionTestnet:XU,wanchain:QU,wanchainTestnet:JU,weaveVMAlphanet:eD,wemix:tD,wemixTestnet:rD,westendAssetHub:nD,whitechain:sD,whitechainTestnet:aD,wmcTestnet:oD,worldLand:lD,worldchain:iD,worldchainSepolia:cD,x1Testnet:Ry,xLayer:hD,xLayerTestnet:Ry,xai:uD,xaiTestnet:dD,xdc:fD,xdcTestnet:pD,xoneMainnet:mD,xoneTestnet:bD,xphereMainnet:yD,xphereTestnet:gD,xrOne:xD,xrSepolia:ED,xrplevm:wD,xrplevmDevnet:vD,xrplevmTestnet:kD,yooldoVerse:CD,yooldoVerseTestnet:TD,zenchainTestnet:SD,zeniq:AD,zeroG:e7,zeroGGalileoTestnet:t7,zeroGMainnet:r7,zeroGTestnet:n7,zeroNetwork:PD,zetachain:ID,zetachainAthensTestnet:OD,zhejiang:BD,zilliqa:MD,zilliqaTestnet:_D,zircuit:UD,zircuitGarfieldTestnet:DD,zircuitTestnet:FD,zkFair:ND,zkFairTestnet:zD,zkLinkNova:LD,zkLinkNovaSepoliaTestnet:RD,zkSync:Hy,zkSyncInMemoryNode:$y,zkSyncLocalNode:Gy,zkSyncSepoliaTestnet:jy,zksync:Hy,zksyncInMemoryNode:$y,zksyncLocalCustomHyperchain:HD,zksyncLocalHyperchain:$D,zksyncLocalHyperchainL1:GD,zksyncLocalNode:Gy,zksyncSepoliaTestnet:jy,zora:jD,zoraSepolia:VD,zoraTestnet:WD},Symbol.toStringTag,{value:"Module"})),Wy=f({id:747474,name:"Katana",network:"katana",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.katana.network"]}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),qy=f({id:143,name:"Monad",blockTime:400,nativeCurrency:{name:"Monad",symbol:"MON",decimals:18},rpcUrls:{default:{http:["https://rpc.monad.xyz","https://rpc1.monad.xyz"],webSocket:["wss://rpc.monad.xyz","wss://rpc1.monad.xyz"]}},blockExplorers:{default:{name:"MonadVision",url:"https://monadvision.com"},monadscan:{name:"Monadscan",url:"https://monadscan.com",apiUrl:"https://api.monadscan.com/api"}},testnet:!1,contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:9248132}}}),YD={...qD,[Wy.name]:Wy,[qy.name]:qy},KD=(e,t)=>{const r=Object.values(YD).find(o=>o.id===e);if(!r)return{walletClient:void 0,publicClient:void 0};const n=t?ZC(t):void 0,s=n?KC({chain:r,transport:n}):void 0,a=BC({chain:r,transport:n||QC()});return{walletClient:s,publicClient:a}},ZD=F.createContext(null),lp={didCatch:!1,error:null};class XD extends F.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=lp}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var r,n,s=arguments.length,a=new Array(s),o=0;o<s;o++)a[o]=arguments[o];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:a,reason:"imperative-api"}),this.setState(lp)}}componentDidCatch(t,r){var n,s;(n=(s=this.props).onError)===null||n===void 0||n.call(s,t,r)}componentDidUpdate(t,r){const{didCatch:n}=this.state,{resetKeys:s}=this.props;if(n&&r.error!==null&&QD(t.resetKeys,s)){var a,o;(a=(o=this.props).onReset)===null||a===void 0||a.call(o,{next:s,prev:t.resetKeys,reason:"keys"}),this.setState(lp)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:s}=this.props,{didCatch:a,error:o}=this.state;let i=t;if(a){const c={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")i=r(c);else if(n)i=F.createElement(n,c);else if(s!==void 0)i=s;else throw o}return F.createElement(ZD.Provider,{value:{didCatch:a,error:o,resetErrorBoundary:this.resetErrorBoundary}},i)}}function QD(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((r,n)=>!Object.is(r,t[n]))}var JD=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,up=Math.ceil,pr=Math.floor,qt="[BigNumber Error] ",Yy=qt+"Number primitive has more than 15 significant digits: ",Br=1e14,xe=14,dp=9007199254740991,fp=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Zn=1e7,Tt=1e9;function Ky(e){var t,r,n,s=w.prototype={constructor:w,toString:null,valueOf:null},a=new w(1),o=20,i=4,c=-7,l=21,u=-1e7,d=1e7,p=!1,h=1,y=0,g={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},k="0123456789abcdefghijklmnopqrstuvwxyz",v=!0;function w(m,b){var x,A,I,O,D,E,P,_,M=this;if(!(M instanceof w))return new w(m,b);if(b==null){if(m&&m._isBigNumber===!0){M.s=m.s,!m.c||m.e>d?M.c=M.e=null:m.e<u?M.c=[M.e=0]:(M.e=m.e,M.c=m.c.slice());return}if((E=typeof m=="number")&&m*0==0){if(M.s=1/m<0?(m=-m,-1):1,m===~~m){for(O=0,D=m;D>=10;D/=10,O++);O>d?M.c=M.e=null:(M.e=O,M.c=[m]);return}_=String(m)}else{if(!JD.test(_=String(m)))return n(M,_,E);M.s=_.charCodeAt(0)==45?(_=_.slice(1),-1):1}(O=_.indexOf("."))>-1&&(_=_.replace(".","")),(D=_.search(/e/i))>0?(O<0&&(O=D),O+=+_.slice(D+1),_=_.substring(0,D)):O<0&&(O=_.length)}else{if(ct(b,2,k.length,"Base"),b==10&&v)return M=new w(m),z(M,o+M.e+1,i);if(_=String(m),E=typeof m=="number"){if(m*0!=0)return n(M,_,E,b);if(M.s=1/m<0?(_=_.slice(1),-1):1,w.DEBUG&&_.replace(/^0\.0*|\./,"").length>15)throw Error(Yy+m)}else M.s=_.charCodeAt(0)===45?(_=_.slice(1),-1):1;for(x=k.slice(0,b),O=D=0,P=_.length;D<P;D++)if(x.indexOf(A=_.charAt(D))<0){if(A=="."){if(D>O){O=P;continue}}else if(!I&&(_==_.toUpperCase()&&(_=_.toLowerCase())||_==_.toLowerCase()&&(_=_.toUpperCase()))){I=!0,D=-1,O=0;continue}return n(M,String(m),E,b)}E=!1,_=r(_,b,10,M.s),(O=_.indexOf("."))>-1?_=_.replace(".",""):O=_.length}for(D=0;_.charCodeAt(D)===48;D++);for(P=_.length;_.charCodeAt(--P)===48;);if(_=_.slice(D,++P)){if(P-=D,E&&w.DEBUG&&P>15&&(m>dp||m!==pr(m)))throw Error(Yy+M.s*m);if((O=O-D-1)>d)M.c=M.e=null;else if(O<u)M.c=[M.e=0];else{if(M.e=O,M.c=[],D=(O+1)%xe,O<0&&(D+=xe),D<P){for(D&&M.c.push(+_.slice(0,D)),P-=xe;D<P;)M.c.push(+_.slice(D,D+=xe));D=xe-(_=_.slice(D)).length}else D-=P;for(;D--;_+="0");M.c.push(+_)}}else M.c=[M.e=0]}w.clone=Ky,w.ROUND_UP=0,w.ROUND_DOWN=1,w.ROUND_CEIL=2,w.ROUND_FLOOR=3,w.ROUND_HALF_UP=4,w.ROUND_HALF_DOWN=5,w.ROUND_HALF_EVEN=6,w.ROUND_HALF_CEIL=7,w.ROUND_HALF_FLOOR=8,w.EUCLID=9,w.config=w.set=function(m){var b,x;if(m!=null)if(typeof m=="object"){if(m.hasOwnProperty(b="DECIMAL_PLACES")&&(x=m[b],ct(x,0,Tt,b),o=x),m.hasOwnProperty(b="ROUNDING_MODE")&&(x=m[b],ct(x,0,8,b),i=x),m.hasOwnProperty(b="EXPONENTIAL_AT")&&(x=m[b],x&&x.pop?(ct(x[0],-Tt,0,b),ct(x[1],0,Tt,b),c=x[0],l=x[1]):(ct(x,-Tt,Tt,b),c=-(l=x<0?-x:x))),m.hasOwnProperty(b="RANGE"))if(x=m[b],x&&x.pop)ct(x[0],-Tt,-1,b),ct(x[1],1,Tt,b),u=x[0],d=x[1];else if(ct(x,-Tt,Tt,b),x)u=-(d=x<0?-x:x);else throw Error(qt+b+" cannot be zero: "+x);if(m.hasOwnProperty(b="CRYPTO"))if(x=m[b],x===!!x)if(x)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))p=x;else throw p=!x,Error(qt+"crypto unavailable");else p=x;else throw Error(qt+b+" not true or false: "+x);if(m.hasOwnProperty(b="MODULO_MODE")&&(x=m[b],ct(x,0,9,b),h=x),m.hasOwnProperty(b="POW_PRECISION")&&(x=m[b],ct(x,0,Tt,b),y=x),m.hasOwnProperty(b="FORMAT"))if(x=m[b],typeof x=="object")g=x;else throw Error(qt+b+" not an object: "+x);if(m.hasOwnProperty(b="ALPHABET"))if(x=m[b],typeof x=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(x))v=x.slice(0,10)=="0123456789",k=x;else throw Error(qt+b+" invalid: "+x)}else throw Error(qt+"Object expected: "+m);return{DECIMAL_PLACES:o,ROUNDING_MODE:i,EXPONENTIAL_AT:[c,l],RANGE:[u,d],CRYPTO:p,MODULO_MODE:h,POW_PRECISION:y,FORMAT:g,ALPHABET:k}},w.isBigNumber=function(m){if(!m||m._isBigNumber!==!0)return!1;if(!w.DEBUG)return!0;var b,x,A=m.c,I=m.e,O=m.s;e:if({}.toString.call(A)=="[object Array]"){if((O===1||O===-1)&&I>=-Tt&&I<=Tt&&I===pr(I)){if(A[0]===0){if(I===0&&A.length===1)return!0;break e}if(b=(I+1)%xe,b<1&&(b+=xe),String(A[0]).length==b){for(b=0;b<A.length;b++)if(x=A[b],x<0||x>=Br||x!==pr(x))break e;if(x!==0)return!0}}}else if(A===null&&I===null&&(O===null||O===1||O===-1))return!0;throw Error(qt+"Invalid BigNumber: "+m)},w.maximum=w.max=function(){return C(arguments,-1)},w.minimum=w.min=function(){return C(arguments,1)},w.random=(function(){var m=9007199254740992,b=Math.random()*m&2097151?function(){return pr(Math.random()*m)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(x){var A,I,O,D,E,P=0,_=[],M=new w(a);if(x==null?x=o:ct(x,0,Tt),D=up(x/xe),p)if(crypto.getRandomValues){for(A=crypto.getRandomValues(new Uint32Array(D*=2));P<D;)E=A[P]*131072+(A[P+1]>>>11),E>=9e15?(I=crypto.getRandomValues(new Uint32Array(2)),A[P]=I[0],A[P+1]=I[1]):(_.push(E%1e14),P+=2);P=D/2}else if(crypto.randomBytes){for(A=crypto.randomBytes(D*=7);P<D;)E=(A[P]&31)*281474976710656+A[P+1]*1099511627776+A[P+2]*4294967296+A[P+3]*16777216+(A[P+4]<<16)+(A[P+5]<<8)+A[P+6],E>=9e15?crypto.randomBytes(7).copy(A,P):(_.push(E%1e14),P+=7);P=D/7}else throw p=!1,Error(qt+"crypto unavailable");if(!p)for(;P<D;)E=b(),E<9e15&&(_[P++]=E%1e14);for(D=_[--P],x%=xe,D&&x&&(E=fp[xe-x],_[P]=pr(D/E)*E);_[P]===0;_.pop(),P--);if(P<0)_=[O=0];else{for(O=-1;_[0]===0;_.splice(0,1),O-=xe);for(P=1,E=_[0];E>=10;E/=10,P++);P<xe&&(O-=xe-P)}return M.e=O,M.c=_,M}})(),w.sum=function(){for(var m=1,b=arguments,x=new w(b[0]);m<b.length;)x=x.plus(b[m++]);return x},r=(function(){var m="0123456789";function b(x,A,I,O){for(var D,E=[0],P,_=0,M=x.length;_<M;){for(P=E.length;P--;E[P]*=A);for(E[0]+=O.indexOf(x.charAt(_++)),D=0;D<E.length;D++)E[D]>I-1&&(E[D+1]==null&&(E[D+1]=0),E[D+1]+=E[D]/I|0,E[D]%=I)}return E.reverse()}return function(x,A,I,O,D){var E,P,_,M,L,H,G,J,pe=x.indexOf("."),be=o,ie=i;for(pe>=0&&(M=y,y=0,x=x.replace(".",""),J=new w(A),H=J.pow(x.length-pe),y=M,J.c=b(vn(mr(H.c),H.e,"0"),10,I,m),J.e=J.c.length),G=b(x,A,I,D?(E=k,m):(E=m,k)),_=M=G.length;G[--M]==0;G.pop());if(!G[0])return E.charAt(0);if(pe<0?--_:(H.c=G,H.e=_,H.s=O,H=t(H,J,be,ie,I),G=H.c,L=H.r,_=H.e),P=_+be+1,pe=G[P],M=I/2,L=L||P<0||G[P+1]!=null,L=ie<4?(pe!=null||L)&&(ie==0||ie==(H.s<0?3:2)):pe>M||pe==M&&(ie==4||L||ie==6&&G[P-1]&1||ie==(H.s<0?8:7)),P<1||!G[0])x=L?vn(E.charAt(1),-be,E.charAt(0)):E.charAt(0);else{if(G.length=P,L)for(--I;++G[--P]>I;)G[P]=0,P||(++_,G=[1].concat(G));for(M=G.length;!G[--M];);for(pe=0,x="";pe<=M;x+=E.charAt(G[pe++]));x=vn(x,_,E.charAt(0))}return x}})(),t=(function(){function m(A,I,O){var D,E,P,_,M=0,L=A.length,H=I%Zn,G=I/Zn|0;for(A=A.slice();L--;)P=A[L]%Zn,_=A[L]/Zn|0,D=G*P+_*H,E=H*P+D%Zn*Zn+M,M=(E/O|0)+(D/Zn|0)+G*_,A[L]=E%O;return M&&(A=[M].concat(A)),A}function b(A,I,O,D){var E,P;if(O!=D)P=O>D?1:-1;else for(E=P=0;E<O;E++)if(A[E]!=I[E]){P=A[E]>I[E]?1:-1;break}return P}function x(A,I,O,D){for(var E=0;O--;)A[O]-=E,E=A[O]<I[O]?1:0,A[O]=E*D+A[O]-I[O];for(;!A[0]&&A.length>1;A.splice(0,1));}return function(A,I,O,D,E){var P,_,M,L,H,G,J,pe,be,ie,fe,Oe,Q,ve,Ue,$e,ot,Se=A.s==I.s?1:-1,ke=A.c,ye=I.c;if(!ke||!ke[0]||!ye||!ye[0])return new w(!A.s||!I.s||(ke?ye&&ke[0]==ye[0]:!ye)?NaN:ke&&ke[0]==0||!ye?Se*0:Se/0);for(pe=new w(Se),be=pe.c=[],_=A.e-I.e,Se=O+_+1,E||(E=Br,_=hr(A.e/xe)-hr(I.e/xe),Se=Se/xe|0),M=0;ye[M]==(ke[M]||0);M++);if(ye[M]>(ke[M]||0)&&_--,Se<0)be.push(1),L=!0;else{for(ve=ke.length,$e=ye.length,M=0,Se+=2,H=pr(E/(ye[0]+1)),H>1&&(ye=m(ye,H,E),ke=m(ke,H,E),$e=ye.length,ve=ke.length),Q=$e,ie=ke.slice(0,$e),fe=ie.length;fe<$e;ie[fe++]=0);ot=ye.slice(),ot=[0].concat(ot),Ue=ye[0],ye[1]>=E/2&&Ue++;do{if(H=0,P=b(ye,ie,$e,fe),P<0){if(Oe=ie[0],$e!=fe&&(Oe=Oe*E+(ie[1]||0)),H=pr(Oe/Ue),H>1)for(H>=E&&(H=E-1),G=m(ye,H,E),J=G.length,fe=ie.length;b(G,ie,J,fe)==1;)H--,x(G,$e<J?ot:ye,J,E),J=G.length,P=1;else H==0&&(P=H=1),G=ye.slice(),J=G.length;if(J<fe&&(G=[0].concat(G)),x(ie,G,fe,E),fe=ie.length,P==-1)for(;b(ye,ie,$e,fe)<1;)H++,x(ie,$e<fe?ot:ye,fe,E),fe=ie.length}else P===0&&(H++,ie=[0]);be[M++]=H,ie[0]?ie[fe++]=ke[Q]||0:(ie=[ke[Q]],fe=1)}while((Q++<ve||ie[0]!=null)&&Se--);L=ie[0]!=null,be[0]||be.splice(0,1)}if(E==Br){for(M=1,Se=be[0];Se>=10;Se/=10,M++);z(pe,O+(pe.e=M+_*xe-1)+1,D,L)}else pe.e=_,pe.r=+L;return pe}})();function S(m,b,x,A){var I,O,D,E,P;if(x==null?x=i:ct(x,0,8),!m.c)return m.toString();if(I=m.c[0],D=m.e,b==null)P=mr(m.c),P=A==1||A==2&&(D<=c||D>=l)?zl(P,D):vn(P,D,"0");else if(m=z(new w(m),b,x),O=m.e,P=mr(m.c),E=P.length,A==1||A==2&&(b<=O||O<=c)){for(;E<b;P+="0",E++);P=zl(P,O)}else if(b-=D+(A===2&&O>D),P=vn(P,O,"0"),O+1>E){if(--b>0)for(P+=".";b--;P+="0");}else if(b+=O-E,b>0)for(O+1==E&&(P+=".");b--;P+="0");return m.s<0&&I?"-"+P:P}function C(m,b){for(var x,A,I=1,O=new w(m[0]);I<m.length;I++)A=new w(m[I]),(!A.s||(x=zs(O,A))===b||x===0&&O.s===b)&&(O=A);return O}function U(m,b,x){for(var A=1,I=b.length;!b[--I];b.pop());for(I=b[0];I>=10;I/=10,A++);return(x=A+x*xe-1)>d?m.c=m.e=null:x<u?m.c=[m.e=0]:(m.e=x,m.c=b),m}n=(function(){var m=/^(-?)0([xbo])(?=\w[\w.]*$)/i,b=/^([^.]+)\.$/,x=/^\.([^.]+)$/,A=/^-?(Infinity|NaN)$/,I=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(O,D,E,P){var _,M=E?D:D.replace(I,"");if(A.test(M))O.s=isNaN(M)?null:M<0?-1:1;else{if(!E&&(M=M.replace(m,function(L,H,G){return _=(G=G.toLowerCase())=="x"?16:G=="b"?2:8,!P||P==_?H:L}),P&&(_=P,M=M.replace(b,"$1").replace(x,"0.$1")),D!=M))return new w(M,_);if(w.DEBUG)throw Error(qt+"Not a"+(P?" base "+P:"")+" number: "+D);O.s=null}O.c=O.e=null}})();function z(m,b,x,A){var I,O,D,E,P,_,M,L=m.c,H=fp;if(L){e:{for(I=1,E=L[0];E>=10;E/=10,I++);if(O=b-I,O<0)O+=xe,D=b,P=L[_=0],M=pr(P/H[I-D-1]%10);else if(_=up((O+1)/xe),_>=L.length)if(A){for(;L.length<=_;L.push(0));P=M=0,I=1,O%=xe,D=O-xe+1}else break e;else{for(P=E=L[_],I=1;E>=10;E/=10,I++);O%=xe,D=O-xe+I,M=D<0?0:pr(P/H[I-D-1]%10)}if(A=A||b<0||L[_+1]!=null||(D<0?P:P%H[I-D-1]),A=x<4?(M||A)&&(x==0||x==(m.s<0?3:2)):M>5||M==5&&(x==4||A||x==6&&(O>0?D>0?P/H[I-D]:0:L[_-1])%10&1||x==(m.s<0?8:7)),b<1||!L[0])return L.length=0,A?(b-=m.e+1,L[0]=H[(xe-b%xe)%xe],m.e=-b||0):L[0]=m.e=0,m;if(O==0?(L.length=_,E=1,_--):(L.length=_+1,E=H[xe-O],L[_]=D>0?pr(P/H[I-D]%H[D])*E:0),A)for(;;)if(_==0){for(O=1,D=L[0];D>=10;D/=10,O++);for(D=L[0]+=E,E=1;D>=10;D/=10,E++);O!=E&&(m.e++,L[0]==Br&&(L[0]=1));break}else{if(L[_]+=E,L[_]!=Br)break;L[_--]=0,E=1}for(O=L.length;L[--O]===0;L.pop());}m.e>d?m.c=m.e=null:m.e<u&&(m.c=[m.e=0])}return m}function T(m){var b,x=m.e;return x===null?m.toString():(b=mr(m.c),b=x<=c||x>=l?zl(b,x):vn(b,x,"0"),m.s<0?"-"+b:b)}return s.absoluteValue=s.abs=function(){var m=new w(this);return m.s<0&&(m.s=1),m},s.comparedTo=function(m,b){return zs(this,new w(m,b))},s.decimalPlaces=s.dp=function(m,b){var x,A,I,O=this;if(m!=null)return ct(m,0,Tt),b==null?b=i:ct(b,0,8),z(new w(O),m+O.e+1,b);if(!(x=O.c))return null;if(A=((I=x.length-1)-hr(this.e/xe))*xe,I=x[I])for(;I%10==0;I/=10,A--);return A<0&&(A=0),A},s.dividedBy=s.div=function(m,b){return t(this,new w(m,b),o,i)},s.dividedToIntegerBy=s.idiv=function(m,b){return t(this,new w(m,b),0,1)},s.exponentiatedBy=s.pow=function(m,b){var x,A,I,O,D,E,P,_,M,L=this;if(m=new w(m),m.c&&!m.isInteger())throw Error(qt+"Exponent not an integer: "+T(m));if(b!=null&&(b=new w(b)),E=m.e>14,!L.c||!L.c[0]||L.c[0]==1&&!L.e&&L.c.length==1||!m.c||!m.c[0])return M=new w(Math.pow(+T(L),E?m.s*(2-Nl(m)):+T(m))),b?M.mod(b):M;if(P=m.s<0,b){if(b.c?!b.c[0]:!b.s)return new w(NaN);A=!P&&L.isInteger()&&b.isInteger(),A&&(L=L.mod(b))}else{if(m.e>9&&(L.e>0||L.e<-1||(L.e==0?L.c[0]>1||E&&L.c[1]>=24e7:L.c[0]<8e13||E&&L.c[0]<=9999975e7)))return O=L.s<0&&Nl(m)?-0:0,L.e>-1&&(O=1/O),new w(P?1/O:O);y&&(O=up(y/xe+2))}for(E?(x=new w(.5),P&&(m.s=1),_=Nl(m)):(I=Math.abs(+T(m)),_=I%2),M=new w(a);;){if(_){if(M=M.times(L),!M.c)break;O?M.c.length>O&&(M.c.length=O):A&&(M=M.mod(b))}if(I){if(I=pr(I/2),I===0)break;_=I%2}else if(m=m.times(x),z(m,m.e+1,1),m.e>14)_=Nl(m);else{if(I=+T(m),I===0)break;_=I%2}L=L.times(L),O?L.c&&L.c.length>O&&(L.c.length=O):A&&(L=L.mod(b))}return A?M:(P&&(M=a.div(M)),b?M.mod(b):O?z(M,y,i,D):M)},s.integerValue=function(m){var b=new w(this);return m==null?m=i:ct(m,0,8),z(b,b.e+1,m)},s.isEqualTo=s.eq=function(m,b){return zs(this,new w(m,b))===0},s.isFinite=function(){return!!this.c},s.isGreaterThan=s.gt=function(m,b){return zs(this,new w(m,b))>0},s.isGreaterThanOrEqualTo=s.gte=function(m,b){return(b=zs(this,new w(m,b)))===1||b===0},s.isInteger=function(){return!!this.c&&hr(this.e/xe)>this.c.length-2},s.isLessThan=s.lt=function(m,b){return zs(this,new w(m,b))<0},s.isLessThanOrEqualTo=s.lte=function(m,b){return(b=zs(this,new w(m,b)))===-1||b===0},s.isNaN=function(){return!this.s},s.isNegative=function(){return this.s<0},s.isPositive=function(){return this.s>0},s.isZero=function(){return!!this.c&&this.c[0]==0},s.minus=function(m,b){var x,A,I,O,D=this,E=D.s;if(m=new w(m,b),b=m.s,!E||!b)return new w(NaN);if(E!=b)return m.s=-b,D.plus(m);var P=D.e/xe,_=m.e/xe,M=D.c,L=m.c;if(!P||!_){if(!M||!L)return M?(m.s=-b,m):new w(L?D:NaN);if(!M[0]||!L[0])return L[0]?(m.s=-b,m):new w(M[0]?D:i==3?-0:0)}if(P=hr(P),_=hr(_),M=M.slice(),E=P-_){for((O=E<0)?(E=-E,I=M):(_=P,I=L),I.reverse(),b=E;b--;I.push(0));I.reverse()}else for(A=(O=(E=M.length)<(b=L.length))?E:b,E=b=0;b<A;b++)if(M[b]!=L[b]){O=M[b]<L[b];break}if(O&&(I=M,M=L,L=I,m.s=-m.s),b=(A=L.length)-(x=M.length),b>0)for(;b--;M[x++]=0);for(b=Br-1;A>E;){if(M[--A]<L[A]){for(x=A;x&&!M[--x];M[x]=b);--M[x],M[A]+=Br}M[A]-=L[A]}for(;M[0]==0;M.splice(0,1),--_);return M[0]?U(m,M,_):(m.s=i==3?-1:1,m.c=[m.e=0],m)},s.modulo=s.mod=function(m,b){var x,A,I=this;return m=new w(m,b),!I.c||!m.s||m.c&&!m.c[0]?new w(NaN):!m.c||I.c&&!I.c[0]?new w(I):(h==9?(A=m.s,m.s=1,x=t(I,m,0,3),m.s=A,x.s*=A):x=t(I,m,0,h),m=I.minus(x.times(m)),!m.c[0]&&h==1&&(m.s=I.s),m)},s.multipliedBy=s.times=function(m,b){var x,A,I,O,D,E,P,_,M,L,H,G,J,pe,be,ie=this,fe=ie.c,Oe=(m=new w(m,b)).c;if(!fe||!Oe||!fe[0]||!Oe[0])return!ie.s||!m.s||fe&&!fe[0]&&!Oe||Oe&&!Oe[0]&&!fe?m.c=m.e=m.s=null:(m.s*=ie.s,!fe||!Oe?m.c=m.e=null:(m.c=[0],m.e=0)),m;for(A=hr(ie.e/xe)+hr(m.e/xe),m.s*=ie.s,P=fe.length,L=Oe.length,P<L&&(J=fe,fe=Oe,Oe=J,I=P,P=L,L=I),I=P+L,J=[];I--;J.push(0));for(pe=Br,be=Zn,I=L;--I>=0;){for(x=0,H=Oe[I]%be,G=Oe[I]/be|0,D=P,O=I+D;O>I;)_=fe[--D]%be,M=fe[D]/be|0,E=G*_+M*H,_=H*_+E%be*be+J[O]+x,x=(_/pe|0)+(E/be|0)+G*M,J[O--]=_%pe;J[O]=x}return x?++A:J.splice(0,1),U(m,J,A)},s.negated=function(){var m=new w(this);return m.s=-m.s||null,m},s.plus=function(m,b){var x,A=this,I=A.s;if(m=new w(m,b),b=m.s,!I||!b)return new w(NaN);if(I!=b)return m.s=-b,A.minus(m);var O=A.e/xe,D=m.e/xe,E=A.c,P=m.c;if(!O||!D){if(!E||!P)return new w(I/0);if(!E[0]||!P[0])return P[0]?m:new w(E[0]?A:I*0)}if(O=hr(O),D=hr(D),E=E.slice(),I=O-D){for(I>0?(D=O,x=P):(I=-I,x=E),x.reverse();I--;x.push(0));x.reverse()}for(I=E.length,b=P.length,I-b<0&&(x=P,P=E,E=x,b=I),I=0;b;)I=(E[--b]=E[b]+P[b]+I)/Br|0,E[b]=Br===E[b]?0:E[b]%Br;return I&&(E=[I].concat(E),++D),U(m,E,D)},s.precision=s.sd=function(m,b){var x,A,I,O=this;if(m!=null&&m!==!!m)return ct(m,1,Tt),b==null?b=i:ct(b,0,8),z(new w(O),m,b);if(!(x=O.c))return null;if(I=x.length-1,A=I*xe+1,I=x[I]){for(;I%10==0;I/=10,A--);for(I=x[0];I>=10;I/=10,A++);}return m&&O.e+1>A&&(A=O.e+1),A},s.shiftedBy=function(m){return ct(m,-dp,dp),this.times("1e"+m)},s.squareRoot=s.sqrt=function(){var m,b,x,A,I,O=this,D=O.c,E=O.s,P=O.e,_=o+4,M=new w("0.5");if(E!==1||!D||!D[0])return new w(!E||E<0&&(!D||D[0])?NaN:D?O:1/0);if(E=Math.sqrt(+T(O)),E==0||E==1/0?(b=mr(D),(b.length+P)%2==0&&(b+="0"),E=Math.sqrt(+b),P=hr((P+1)/2)-(P<0||P%2),E==1/0?b="5e"+P:(b=E.toExponential(),b=b.slice(0,b.indexOf("e")+1)+P),x=new w(b)):x=new w(E+""),x.c[0]){for(P=x.e,E=P+_,E<3&&(E=0);;)if(I=x,x=M.times(I.plus(t(O,I,_,1))),mr(I.c).slice(0,E)===(b=mr(x.c)).slice(0,E))if(x.e<P&&--E,b=b.slice(E-3,E+1),b=="9999"||!A&&b=="4999"){if(!A&&(z(I,I.e+o+2,0),I.times(I).eq(O))){x=I;break}_+=4,E+=4,A=1}else{(!+b||!+b.slice(1)&&b.charAt(0)=="5")&&(z(x,x.e+o+2,1),m=!x.times(x).eq(O));break}}return z(x,x.e+o+1,i,m)},s.toExponential=function(m,b){return m!=null&&(ct(m,0,Tt),m++),S(this,m,b,1)},s.toFixed=function(m,b){return m!=null&&(ct(m,0,Tt),m=m+this.e+1),S(this,m,b)},s.toFormat=function(m,b,x){var A,I=this;if(x==null)m!=null&&b&&typeof b=="object"?(x=b,b=null):m&&typeof m=="object"?(x=m,m=b=null):x=g;else if(typeof x!="object")throw Error(qt+"Argument not an object: "+x);if(A=I.toFixed(m,b),I.c){var O,D=A.split("."),E=+x.groupSize,P=+x.secondaryGroupSize,_=x.groupSeparator||"",M=D[0],L=D[1],H=I.s<0,G=H?M.slice(1):M,J=G.length;if(P&&(O=E,E=P,P=O,J-=O),E>0&&J>0){for(O=J%E||E,M=G.substr(0,O);O<J;O+=E)M+=_+G.substr(O,E);P>0&&(M+=_+G.slice(O)),H&&(M="-"+M)}A=L?M+(x.decimalSeparator||"")+((P=+x.fractionGroupSize)?L.replace(new RegExp("\\d{"+P+"}\\B","g"),"$&"+(x.fractionGroupSeparator||"")):L):M}return(x.prefix||"")+A+(x.suffix||"")},s.toFraction=function(m){var b,x,A,I,O,D,E,P,_,M,L,H,G=this,J=G.c;if(m!=null&&(E=new w(m),!E.isInteger()&&(E.c||E.s!==1)||E.lt(a)))throw Error(qt+"Argument "+(E.isInteger()?"out of range: ":"not an integer: ")+T(E));if(!J)return new w(G);for(b=new w(a),_=x=new w(a),A=P=new w(a),H=mr(J),O=b.e=H.length-G.e-1,b.c[0]=fp[(D=O%xe)<0?xe+D:D],m=!m||E.comparedTo(b)>0?O>0?b:_:E,D=d,d=1/0,E=new w(H),P.c[0]=0;M=t(E,b,0,1),I=x.plus(M.times(A)),I.comparedTo(m)!=1;)x=A,A=I,_=P.plus(M.times(I=_)),P=I,b=E.minus(M.times(I=b)),E=I;return I=t(m.minus(x),A,0,1),P=P.plus(I.times(_)),x=x.plus(I.times(A)),P.s=_.s=G.s,O=O*2,L=t(_,A,O,i).minus(G).abs().comparedTo(t(P,x,O,i).minus(G).abs())<1?[_,A]:[P,x],d=D,L},s.toNumber=function(){return+T(this)},s.toPrecision=function(m,b){return m!=null&&ct(m,1,Tt),S(this,m,b,2)},s.toString=function(m){var b,x=this,A=x.s,I=x.e;return I===null?A?(b="Infinity",A<0&&(b="-"+b)):b="NaN":(m==null?b=I<=c||I>=l?zl(mr(x.c),I):vn(mr(x.c),I,"0"):m===10&&v?(x=z(new w(x),o+I+1,i),b=vn(mr(x.c),x.e,"0")):(ct(m,2,k.length,"Base"),b=r(vn(mr(x.c),I,"0"),10,m,A,!0)),A<0&&x.c[0]&&(b="-"+b)),b},s.valueOf=s.toJSON=function(){return T(this)},s._isBigNumber=!0,s[Symbol.toStringTag]="BigNumber",s[Symbol.for("nodejs.util.inspect.custom")]=s.valueOf,e!=null&&w.set(e),w}function hr(e){var t=e|0;return e>0||e===t?t:t-1}function mr(e){for(var t,r,n=1,s=e.length,a=e[0]+"";n<s;){for(t=e[n++]+"",r=xe-t.length;r--;t="0"+t);a+=t}for(s=a.length;a.charCodeAt(--s)===48;);return a.slice(0,s+1||1)}function zs(e,t){var r,n,s=e.c,a=t.c,o=e.s,i=t.s,c=e.e,l=t.e;if(!o||!i)return null;if(r=s&&!s[0],n=a&&!a[0],r||n)return r?n?0:-i:o;if(o!=i)return o;if(r=o<0,n=c==l,!s||!a)return n?0:!s^r?1:-1;if(!n)return c>l^r?1:-1;for(i=(c=s.length)<(l=a.length)?c:l,o=0;o<i;o++)if(s[o]!=a[o])return s[o]>a[o]^r?1:-1;return c==l?0:c>l^r?1:-1}function ct(e,t,r,n){if(e<t||e>r||e!==pr(e))throw Error(qt+(n||"Argument")+(typeof e=="number"?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Nl(e){var t=e.c.length-1;return hr(e.e/xe)==t&&e.c[t]%2!=0}function zl(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function vn(e,t,r){var n,s;if(t<0){for(s=r+".";++t;s+=r);e=s+e}else if(n=e.length,++t>n){for(s=r,t-=n;--t;s+=r);e+=s}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var ue=Ky();(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".orbs_OrbsLogo{object-fit:contain;display:inline}.orbs_PoweredBy{border-radius:8px;margin-left:auto;margin-right:auto}.orbs_PoweredBy a{display:flex;align-items:center;justify-content:center;text-decoration:none;color:inherit}.orbs_PoweredBy span{font-size:14px}.orbs_PoweredBy .orbs_OrbsLogo{margin-left:6px;margin-right:6px;width:18px;height:18px}.orbs_Text{margin:0;padding:0}.orbs_Spinner{width:var(--size, 38px);height:var(--size, 38px);border:var(--border-width, 3px) solid var(--border-color, white);border-bottom-color:var(--bottom-border-color, rgba(255, 255, 255, .2));border-radius:50%;display:inline-block;box-sizing:border-box;animation:orbs_rotation 1s linear infinite}@keyframes orbs_rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.orbs_TradeStepLayout{--layout-min-height: 220px;--layout-width: 100%;--layout-display: flex;--layout-direction: column;--layout-align: center;--layout-overflow: visible;display:var(--layout-display);flex-direction:var(--layout-direction);align-items:var(--layout-align);width:var(--layout-width);min-height:var(--layout-min-height);overflow:var(--layout-overflow)}.orbs_TradeStepLayoutBody{--body-gap: 20px;--body-margin-top: 30px;--body-width: 100%;--body-display: flex;--body-direction: column;--body-align: center;--body-overflow: visible;gap:var(--body-gap);align-items:var(--body-align);display:var(--body-display);flex-direction:var(--body-direction);width:var(--body-width);margin-top:var(--body-margin-top);overflow:var(--body-overflow)}.orbs_TradeStepLayoutHeader{--header-gap: 30px;--header-display: flex;--header-direction: column;--header-align: center;--header-justify: center;--header-overflow: visible;display:var(--header-display);flex-direction:var(--header-direction);align-items:var(--header-align);justify-content:var(--header-justify);gap:var(--header-gap);overflow:var(--header-overflow)}.orbs_TradeStepLayoutTitle{--title-font-size: 18px;--title-font-weight: 500;--title-line-height: normal;--title-color: inherit;--title-text-align: center;--title-margin: 0;--title-padding: 0;font-size:var(--title-font-size);font-weight:var(--title-font-weight);line-height:var(--title-line-height);color:var(--title-color);text-align:var(--title-text-align);margin:var(--title-margin);padding:var(--title-padding)}.orbs_StepIndicator{--indicator-display: flex;--indicator-align: center;--indicator-justify: flex-start;--indicator-height: 7px;--indicator-width: 120px;--indicator-border-radius: 999px;--indicator-bg-color: white;--indicator-margin-bottom: 20px;--indicator-position: relative;--indicator-overflow: hidden;--indicator-border: none;--indicator-box-shadow: none;display:var(--indicator-display);align-items:var(--indicator-align);justify-content:var(--indicator-justify);height:var(--indicator-height);width:var(--indicator-width);border-radius:var(--indicator-border-radius);overflow:var(--indicator-overflow);background-color:var(--indicator-bg-color);margin-bottom:var(--indicator-margin-bottom);position:var(--indicator-position);border:var(--indicator-border);box-shadow:var(--indicator-box-shadow)}.orbs_StepIndicatorLine{--line-height: 100%;--line-bg-color: black;--line-position: absolute;--line-top: 0;--line-left: 0;--line-right: 0;--line-bottom: 0;--line-transition: all .3s ease;--line-border-radius: inherit;--line-box-shadow: none;height:var(--line-height);background-color:var(--line-bg-color);position:var(--line-position);top:var(--line-top);left:var(--line-left);right:var(--line-right);bottom:var(--line-bottom);transition:var(--line-transition);border-radius:var(--line-border-radius);box-shadow:var(--line-box-shadow)}.orbs_TradeStepLayoutFooter{--footer-display: flex;--footer-align: center;--footer-justify: center;--footer-direction: column;--footer-margin-top: auto;--footer-padding-top: 30px;--footer-width: 100%;--footer-overflow: visible;--footer-border-top: none;display:var(--footer-display);align-items:var(--footer-align);justify-content:var(--footer-justify);flex-direction:var(--footer-direction);margin-top:var(--footer-margin-top);padding-top:var(--footer-padding-top);width:var(--footer-width);overflow:var(--footer-overflow);border-top:var(--footer-border-top)}.orbs_TradeStepLayoutFooter p{--footer-text-font-size: 15px;--footer-text-line-height: normal;--footer-text-color: inherit;--footer-text-margin: 0;--footer-text-padding: 0;font-size:var(--footer-text-font-size);line-height:var(--footer-text-line-height);color:var(--footer-text-color);margin:var(--footer-text-margin);padding:var(--footer-text-padding)}.orbs_TradeStepLayoutFooterLink{--link-color: inherit;--link-text-decoration: none;--link-font-size: 15px;--link-text-align: center;--link-margin: auto;--link-outline: none;--link-line-height: normal;--link-padding: 0;--link-transition: color .2s ease;--link-hover-color: inherit;--link-hover-text-decoration: underline;color:var(--link-color);text-decoration:var(--link-text-decoration);font-size:var(--link-font-size);text-align:var(--link-text-align);margin-left:var(--link-margin);margin-right:var(--link-margin);outline:var(--link-outline);line-height:var(--link-line-height);padding:var(--link-padding);transition:var(--link-transition)}.orbs_TradeStepLayoutFooterLink:hover{color:var(--link-hover-color);text-decoration:var(--link-hover-text-decoration)}.orbs_TradeStepLayoutSuccessIcon{--success-icon-display: flex;--success-icon-justify: center;--success-icon-align: center;--success-icon-width: 60px;--success-icon-height: 60px;--success-icon-border-radius: 50%;--success-icon-overflow: visible;--success-icon-bg-color: transparent;--success-icon-border: none;--success-icon-box-shadow: none;display:var(--success-icon-display);justify-content:var(--success-icon-justify);align-items:var(--success-icon-align);width:var(--success-icon-width);height:var(--success-icon-height);border-radius:var(--success-icon-border-radius);overflow:var(--success-icon-overflow);background-color:var(--success-icon-bg-color);border:var(--success-icon-border);box-shadow:var(--success-icon-box-shadow)}.orbs_TradeStepLayoutErrorIcon{--error-icon-width: 80px;--error-icon-height: 80px;--error-icon-display: flex;--error-icon-justify: center;--error-icon-align: center;--error-icon-overflow: visible;--error-icon-bg-color: transparent;--error-icon-border: none;--error-icon-box-shadow: none;width:var(--error-icon-width);height:var(--error-icon-height);display:var(--error-icon-display);justify-content:var(--error-icon-justify);align-items:var(--error-icon-align);overflow:var(--error-icon-overflow);background-color:var(--error-icon-bg-color);border:var(--error-icon-border);box-shadow:var(--error-icon-box-shadow)}.orbs_FailedContentMsg{font-size:22px;font-weight:500}.orbs_TradePreview{display:flex;align-items:center;justify-content:center;gap:8px;width:100%}.orbs_TradePreviewToken{display:flex;align-items:center;gap:6px;max-width:calc(50% - 30px)}.orbs_TradePreviewToken p{--token-font-size: 15px;--token-white-space: nowrap;--token-overflow: hidden;--token-text-overflow: ellipsis;--token-flex: 1;--token-margin: 0;--token-padding: 0;font-size:var(--token-font-size);white-space:var(--token-white-space);overflow:var(--token-overflow);text-overflow:var(--token-text-overflow);flex:var(--token-flex);margin:var(--token-margin)}.orbs_TradepPreviewIcon{width:22px;height:22px}.orbs_TradepPreviewLogo{width:24px;height:24px;border-radius:50%;overflow:hidden}.orbs_FlexRow{display:flex;flex-direction:row}.orbs_FlexColumn{display:flex;flex-direction:column}@keyframes orbs_skeletonAnimation{0%{opacity:.2}to{opacity:.4}}.orbs_SkeletonLoader{animation:orbs_skeletonAnimation 1s linear infinite alternate;background-color:#fff}.orbs_Main-wrapper{width:100%}.orbs_Main{width:100%;display:flex;flex-direction:column;gap:28px}.orbs_MainToken{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;gap:8px}.orbs_MainTokenLeft{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.orbs_MainTokenUsd{display:flex;align-items:center;gap:5px}.orbs_MainTokenUsd small{font-size:12px;opacity:.6}.orbs_MainContentLoader{width:100%;display:flex;gap:15px;align-items:center;margin-top:20px}.orbs_MainContentRectengularLoader{flex:1;height:20px;max-width:250px;border-radius:20px}.orbs_MainContentCircleLoader{width:30px;height:30px;border-radius:50%}.orbs_MainTokenLogo{--width: 40px;--height: 40px;width:var(--width);height:var(--height)}.orbs_MainTokenLogo img{width:100%;height:100%;object-fit:cover}.orbs_SwapFlow{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%}.orbs_SwapFlow *{box-sizing:border-box}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();const ze=e=>`orbs_${e}`;function Ai({children:e,className:t=""}){return B.jsx("p",{className:`${t} ${ze("Text")}`,children:e})}const Zy=F.createContext({});function eF({children:e,...t}){return B.jsx(Zy.Provider,{value:t,children:e})}const qr=()=>F.useContext(Zy);var wt=(e=>(e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILED=3]="FAILED",e))(wt||{});const tF=({className:e="",size:t=38,borderWidth:r=3,borderColor:n="white",bottomBorderColor:s="rgba(255, 255, 255, 0.2)"})=>{const a={"--size":`${t}px`,"--border-width":`${r}px`,"--border-color":n,"--bottom-border-color":s};return B.jsx("div",{className:`${ze("Spinner")} ${e}`,style:a})};function Ll({className:e="",body:t,footerLink:r,footerText:n,title:s,children:a}){return B.jsxs("div",{className:`${ze("TradeStepLayout")} ${e}`,children:[B.jsxs("div",{className:ze("TradeStepLayoutHeader"),children:[B.jsx(oF,{}),s&&B.jsx(Ai,{className:ze("TradeStepLayoutTitle"),children:s})]}),t&&B.jsx("div",{className:ze("TradeStepLayoutBody"),children:t}),B.jsx(rF,{link:r,text:n}),a]})}const rF=({link:e,text:t})=>{const{swapStatus:r}=qr();return!e&&!t?null:B.jsxs("div",{className:ze("TradeStepLayoutFooter"),children:[B.jsx(cF,{}),e?B.jsx(nF,{link:e,text:t}):r===wt.FAILED?void 0:B.jsx(Ai,{children:t})]})},nF=({link:e,text:t})=>B.jsx("a",{target:"_blank",className:ze("TradeStepLayoutFooterLink"),href:e,children:t});function sF(){const{components:e}=qr();return e.SuccessIcon?e.SuccessIcon:B.jsxs("svg",{fill:"none",viewBox:"0 0 16 16",className:ze("TradeStepLayoutSuccessIcon"),children:[B.jsx("circle",{cx:"8",cy:"8",r:"7",strokeWidth:"1.5",stroke:"#00C853"}),B.jsx("path",{strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",stroke:"#00C853",d:"M5 8l2 2 4-4"})]})}function aF(){const{components:e}=qr();return e.FailedIcon?e.FailedIcon:B.jsxs("svg",{className:ze("TradeStepLayoutErrorIcon"),viewBox:"0 0 16 16",fill:"none",children:[B.jsx("circle",{cx:"8",cy:"8",r:"7",strokeWidth:"1.5",stroke:"#FF3D00"}),B.jsx("path",{strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",stroke:"#FF3D00",d:"M8 4v5M8 11h.01"})]})}const oF=()=>{const{swapStatus:e}=qr();return e===wt.SUCCESS?B.jsx(sF,{}):e===wt.FAILED?B.jsx(aF,{}):B.jsx(iF,{})},iF=()=>{const{components:e}=qr();return e.Loader?e.Loader:B.jsx(tF,{size:60,borderWidth:5,className:ze("TradeStepLayoutSpinner")})},cF=()=>{const{totalSteps:e,currentStepIndex:t=0,swapStatus:r}=qr();return r!==wt.LOADING||e===1?null:B.jsx("div",{className:ze("StepIndicator"),children:B.jsx("div",{style:{width:`${100/(e||0)}%`,left:`${t*100/(e||0)}%`},className:ze("StepIndicatorLine")})})},lF=({error:e,footerLink:t,footerText:r})=>B.jsx(Ll,{footerLink:t,footerText:r,body:e||B.jsx("p",{className:ze("FailedContentMsg"),children:"Something went wrong"}),className:ze("FailedContent")});function uF(){return B.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",className:ze("TradepPreviewIcon"),children:B.jsx("path",{fillRule:"evenodd",d:"M4 8a.5.5 0 01.5-.5h5.793L8.146 5.354a.5.5 0 11.708-.708l3 3a.5.5 0 010 .708l-3 3a.5.5 0 01-.708-.708L10.293 8.5H4.5A.5.5 0 014 8z"})})}const Xy=({inTokenOnly:e})=>{const{inToken:t,outToken:r,inAmount:n,outAmount:s,components:a}=qr();return B.jsxs("div",{className:ze("TradePreview"),children:[B.jsx(Qy,{token:t,amount:n,Logo:a==null?void 0:a.SrcTokenLogo}),!e&&B.jsxs(B.Fragment,{children:[B.jsx(uF,{}),B.jsx(Qy,{token:r,amount:s,Logo:a==null?void 0:a.DstTokenLogo})]})]})},Qy=({token:e,amount:t,Logo:r})=>B.jsxs("div",{className:ze("TradePreviewToken"),children:[r||B.jsx("img",{src:e==null?void 0:e.logoUrl,className:ze("TradepPreviewLogo"),alt:`${e==null?void 0:e.symbol} logo`}),B.jsxs(Ai,{children:[t," ",e==null?void 0:e.symbol]})]});function dF({title:e,footerLink:t,footerText:r,hideTokens:n}){return B.jsx(Ll,{title:e,className:ze("Success"),body:!n&&B.jsx(Xy,{}),footerLink:t,footerText:r})}const Jy=({$gap:e=10,$alignItems:t="flex-start",children:r,className:n="",customStyles:s={}})=>{const a={gap:`${e}px`,alignItems:t,width:"100%",...s};return B.jsx("div",{className:`${ze("FlexColumn")} ${n}`,style:a,children:r})};function eg({styles:e={},className:t=""}){return B.jsx("div",{style:e,className:`${ze("SkeletonLoader")} ${t}`})}const fF=()=>B.jsxs("div",{className:`${ze("MainContentLoader")}`,children:[B.jsx(eg,{className:`${ze("MainContentCircleLoader")}`}),B.jsx(eg,{className:`${ze("MainContentRectengularLoader")}`})]}),pF=({fromTitle:e,toTitle:t,inUsd:r,outUsd:n})=>{const{swapStatus:s,outAmount:a,inAmount:o,inToken:i,outToken:c,components:l,totalSteps:u}=qr(),d=B.jsx(rg,{fromTitle:e,inUsd:r,inToken:i,toTitle:t,outUsd:n,outToken:c,inAmount:o,outAmount:a,SrcTokenLogo:l.SrcTokenLogo,DstTokenLogo:l.DstTokenLogo});return s?u?B.jsx(hF,{}):B.jsxs(Jy,{children:[d,B.jsx(fF,{})]}):B.jsx(Jy,{children:d})},tg=({amount:e,token:t,usd:r,title:n,Logo:s})=>B.jsxs("div",{className:`${ze("MainToken")}`,children:[B.jsxs("div",{className:`${ze("MainTokenLeft")}`,children:[B.jsx(Ai,{className:`${ze("MainTokenTitle")}`,children:n}),B.jsx(Ai,{className:` ${ze("MainTokenAmount")}`,children:`${e&&Number(e)>0?e:""} ${(t==null?void 0:t.symbol)||""}`}),r&&B.jsx("div",{className:` ${ze("MainTokenUsd")}`,children:r})]}),s||B.jsx("div",{className:` ${ze("MainTokenLogo")}`,children:t!=null&&t.logoUrl?B.jsx("img",{src:t==null?void 0:t.logoUrl,alt:"Token logo"}):null})]});function hF(){const{currentStep:e}=qr();return e?B.jsx(Ll,{footerLink:e.footerLink,footerText:e.footerText,title:e.title,body:e.hideTokens?void 0:B.jsx(Xy,{inTokenOnly:e==null?void 0:e.inTokenOnly})}):null}const rg=({fromTitle:e,inUsd:t,inToken:r,toTitle:n,outUsd:s,outToken:a,inAmount:o,outAmount:i,SrcTokenLogo:c,DstTokenLogo:l})=>B.jsxs("div",{className:`${ze("Main")}`,children:[B.jsx(tg,{title:e||"Swap from",usd:t,token:r,amount:o,Logo:c}),B.jsx(tg,{title:n||"Swap to",usd:s,token:a,amount:i,Logo:l})]}),Xn=e=>B.jsx(eF,{...e,children:B.jsx(mF,{})}),mF=()=>{const{swapStatus:e,components:t,className:r}=qr();return B.jsx("div",{className:`${ze("SwapFlow")} ${r}`,children:e===wt.SUCCESS?t==null?void 0:t.Success:e===wt.FAILED?t==null?void 0:t.Failed:t==null?void 0:t.Main})};Xn.Success=dF,Xn.Failed=lF,Xn.Main=pF,Xn.StepLayout=Ll;var Bt=(e=>(e[e.EMPTY_LIMIT_PRICE=0]="EMPTY_LIMIT_PRICE",e[e.MAX_CHUNKS=1]="MAX_CHUNKS",e[e.MIN_CHUNKS=2]="MIN_CHUNKS",e[e.MIN_TRADE_SIZE=3]="MIN_TRADE_SIZE",e[e.MAX_FILL_DELAY=4]="MAX_FILL_DELAY",e[e.MIN_FILL_DELAY=5]="MIN_FILL_DELAY",e[e.MAX_ORDER_DURATION=6]="MAX_ORDER_DURATION",e[e.MIN_ORDER_DURATION=7]="MIN_ORDER_DURATION",e[e.MISSING_LIMIT_PRICE=8]="MISSING_LIMIT_PRICE",e[e.STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE=9]="STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE",e[e.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE=10]="TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE",e[e.TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE=11]="TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE",e[e.EMPTY_TRIGGER_PRICE=12]="EMPTY_TRIGGER_PRICE",e[e.INSUFFICIENT_BALANCE=13]="INSUFFICIENT_BALANCE",e[e.MAX_ORDER_SIZE=14]="MAX_ORDER_SIZE",e))(Bt||{}),Ls=(e=>(e.WRAP="wrap",e.APPROVE="approve",e.CREATE="create",e))(Ls||{});const bF=e=>e.replace(/,/g,""),yF=async e=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.warn("Copy failed",t),!1}},ng=e=>{if(!e)return"";const t=Math.floor(e/1e3),r=Math.floor(t/(1440*60)),n=Math.floor(t%(1440*60)/3600),s=Math.floor(t%3600/60),a=t%60,o=[];return r&&o.push(`${r} days `),n&&o.push(`${n} hours `),s&&o.push(`${s} minutes`),a&&o.push(`${a} seconds`),o.join(" ")},pp=(e,t)=>e?`${e.substring(0,(t==null?void 0:t.start)||6)}...${e.substring(e.length-((t==null?void 0:t.end)||5))}`:"",gF=e=>{const t="An error occurred.";if(!e||!e.message)return t;try{return e.message.toLowerCase().indexOf("rejected")?"Transaction Rejected":t}catch{return t}};function Pi(e,t=6,r=8){if(!e)return"";const n=e.startsWith("-")?"-":"",s=n?e.slice(1):e,[a,o=""]=s.split(".");if(!o||Number(o)===0)return n+a;if(a!=="0"){const p=o.slice(0,t).replace(/0+$/,""),h=p?"."+p:"";return n+a+h}const i=o.search(/[^0]/);if(i===-1||i+1>r)return"0";const c=o.slice(0,i),u=o.slice(i).slice(0,t).replace(/0+$/,"");return u?n+"0."+c+u:"0"}const hp=e=>{var t,r,n,s;if(e!=null&&e.message)return((r=(t=e.message)==null?void 0:t.toLowerCase())==null?void 0:r.includes("rejected"))||((s=(n=e.message)==null?void 0:n.toLowerCase())==null?void 0:s.includes("denied"))},xF=e=>{switch(e){case R.networks.base.id:return 1e-4;default:return .01}},sg=(e,t,r)=>{if(!ue(e.srcAmountFilled||0).gt(0)||!ue(e.dstAmountFilled||0).gt(0))return"";const n=R.amountUi(t,e.srcAmountFilled),s=R.amountUi(r,e.dstAmountFilled);return ue(s).div(n).toFixed()},ag=(e,t,r)=>{if(e.type===R.OrderType.TWAP_MARKET)return"";const n=R.amountUi(t,e.srcAmountPerTrade),s=R.amountUi(r,e.dstMinAmountPerTrade);return ue(s).div(n).toFixed()},og=(e,t)=>{const r=R.getNetwork(t);return r&&R.isNativeAddress(e.address)?r.wToken:e};function ig(e){return e?e/864e5:0}function mp(e){return e?e/6e4:0}const wF=(e,t)=>e?R.OrderType.TWAP_MARKET:t===1?R.OrderType.LIMIT:R.OrderType.TWAP_LIMIT,bp=(e,t,r)=>{const n=R.getNetwork(r);return R.isNativeAddress((e==null?void 0:e.address)||"")&&R.eqIgnoreCase((t==null?void 0:t.address)||"",(n==null?void 0:n.wToken.address)||"")},yp=(e,t,r)=>{const n=R.getNetwork(r);return R.eqIgnoreCase((e==null?void 0:e.address)||"",(n==null?void 0:n.wToken.address)||"")&&R.isNativeAddress((t==null?void 0:t.address)||"")},Ii=(e,t)=>{if(!t)return"";const r=R.getNetwork(t);return`${r==null?void 0:r.explorer}/tx/${e}`},vF=()=>B.jsx("div",{className:"twap-error-fallback",children:B.jsx("p",{style:{fontSize:20,fontWeight:600,textAlign:"center",width:"100%",marginTop:40},children:"Something went wrong"})});function kF({children:e}){return B.jsx(XD,{FallbackComponent:vF,children:B.jsx(B.Fragment,{children:e})})}const gp=F.createContext({}),EF=new M2({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),CF=e=>{var n,s,a;const t=K(o=>o.updateState),r=K(o=>o.state.isMarketOrder);return F.useEffect(()=>{setInterval(()=>{t({currentTime:Date.now()})},6e4)},[t]),F.useEffect(()=>{var o,i,c,l,u,d,p,h,y,g,k,v;t({isMarketOrder:e.module!==R.Module.LIMIT?!1:(i=(o=e.overrides)==null?void 0:o.state)==null?void 0:i.isMarketOrder,typedChunks:(l=(c=e.overrides)==null?void 0:c.state)==null?void 0:l.chunks,typedFillDelay:(d=(u=e.overrides)==null?void 0:u.state)==null?void 0:d.fillDelay,typedDuration:(h=(p=e.overrides)==null?void 0:p.state)==null?void 0:h.duration,typedLimitPrice:(g=(y=e.overrides)==null?void 0:y.state)==null?void 0:g.limitPrice,typedTriggerPrice:(v=(k=e.overrides)==null?void 0:k.state)==null?void 0:v.triggerPrice,triggerPricePercent:void 0,limitPricePercent:void 0})},[(n=e.overrides)==null?void 0:n.state,e.module]),F.useEffect(()=>{var o,i,c,l;t({typedLimitPrice:(i=(o=e.overrides)==null?void 0:o.state)==null?void 0:i.limitPrice,typedTriggerPrice:(l=(c=e.overrides)==null?void 0:c.state)==null?void 0:l.triggerPrice,triggerPricePercent:void 0,limitPricePercent:void 0})},[(s=e.srcToken)==null?void 0:s.address,(a=e.dstToken)==null?void 0:a.address]),F.useEffect(()=>{e.module===R.Module.LIMIT&&t({isMarketOrder:!1})},[e.module]),F.useEffect(()=>{r&&t({isInvertedTrade:!1})},[r]),null},TF=({marketReferencePrice:e,srcToken:t,dstToken:r,chainId:n})=>{const s=K(a=>a.state.typedSrcAmount);return F.useMemo(()=>{if(bp(t,r,n)||yp(t,r,n))return{isLoading:!1,noLiquidity:!1,value:R.amountBN((t==null?void 0:t.decimals)||18,s||"0")};if(ue(e.value||0).isZero()||ue(s||0).isZero())return e;const a=ue(e.value||0).dividedBy(s||0).toFixed();return{...e,value:a}},[e,s,t,r,n])},SF=e=>{const t=R.getQueryParam(R.QUERY_PARAMS.MIN_CHUNK_SIZE_USD);return t?parseInt(t):e},AF=e=>{const t=K(i=>i.state.acceptedMarketPrice),{walletClient:r,publicClient:n}=F.useMemo(()=>KD(e.chainId,e.provider),[e.chainId,e.provider]),s=F.useMemo(()=>R.getConfig(e.chainId,e.partner),[e.chainId,e.partner]),a=TF(e),o=F.useMemo(()=>SF(e.minChunkSizeUsd),[e.minChunkSizeUsd]);return F.useEffect(()=>{R.analytics.onLoad(),s&&e.chainId&&R.analytics.init(s,o,e.chainId)},[s,e.chainId,o]),B.jsxs(gp.Provider,{value:{...e,minChunkSizeUsd:o,account:e.account,walletClient:r,publicClient:n,marketPrice:t||a.value,marketPriceLoading:!t&&a.isLoading,noLiquidity:!t&&a.noLiquidity,config:s,slippage:e.priceProtection},children:[B.jsx(CF,{...e}),B.jsx(kF,{children:e.children})]})},PF=e=>B.jsx(_2,{client:EF,children:B.jsx(AF,{...e})}),oe=()=>{if(!gp)throw new Error("useTwapContext must be used within a WidgetProvider");return F.useContext(gp)},IF=2e4,OF=[{text:"Minutes",value:R.TimeUnit.Minutes},{text:"Hours",value:R.TimeUnit.Hours},{text:"Days",value:R.TimeUnit.Days}],BF="The protocol uses an oracle price to help protect users from unfavorable executions. If the execution price is worse than the oracle price by more than the allowed percentage, the transaction will not be executed.";function MF(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),r}var xp={},_F=[{id:"fa",name:"Font Awesome",projectUrl:"https://fontawesome.com/",license:"CC BY 4.0 License",licenseUrl:"https://creativecommons.org/licenses/by/4.0/"},{id:"io",name:"Ionicons 4",projectUrl:"https://ionicons.com/",license:"MIT",licenseUrl:"https://github.com/ionic-team/ionicons/blob/master/LICENSE"},{id:"io5",name:"Ionicons 5",projectUrl:"https://ionicons.com/",license:"MIT",licenseUrl:"https://github.com/ionic-team/ionicons/blob/master/LICENSE"},{id:"md",name:"Material Design icons",projectUrl:"http://google.github.io/material-design-icons/",license:"Apache License Version 2.0",licenseUrl:"https://github.com/google/material-design-icons/blob/master/LICENSE"},{id:"ti",name:"Typicons",projectUrl:"http://s-ings.com/typicons/",license:"CC BY-SA 3.0",licenseUrl:"https://creativecommons.org/licenses/by-sa/3.0/"},{id:"go",name:"Github Octicons icons",projectUrl:"https://octicons.github.com/",license:"MIT",licenseUrl:"https://github.com/primer/octicons/blob/master/LICENSE"},{id:"fi",name:"Feather",projectUrl:"https://feathericons.com/",license:"MIT",licenseUrl:"https://github.com/feathericons/feather/blob/master/LICENSE"},{id:"gi",name:"Game Icons",projectUrl:"https://game-icons.net/",license:"CC BY 3.0",licenseUrl:"https://creativecommons.org/licenses/by/3.0/"},{id:"wi",name:"Weather Icons",projectUrl:"https://erikflowers.github.io/weather-icons/",license:"SIL OFL 1.1",licenseUrl:"http://scripts.sil.org/OFL"},{id:"di",name:"Devicons",projectUrl:"https://vorillaz.github.io/devicons/",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"ai",name:"Ant Design Icons",projectUrl:"https://github.com/ant-design/ant-design-icons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"bs",name:"Bootstrap Icons",projectUrl:"https://github.com/twbs/icons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"ri",name:"Remix Icon",projectUrl:"https://github.com/Remix-Design/RemixIcon",license:"Apache License Version 2.0",licenseUrl:"http://www.apache.org/licenses/"},{id:"fc",name:"Flat Color Icons",projectUrl:"https://github.com/icons8/flat-color-icons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"gr",name:"Grommet-Icons",projectUrl:"https://github.com/grommet/grommet-icons",license:"Apache License Version 2.0",licenseUrl:"http://www.apache.org/licenses/"},{id:"hi",name:"Heroicons",projectUrl:"https://github.com/refactoringui/heroicons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"si",name:"Simple Icons",projectUrl:"https://simpleicons.org/",license:"CC0 1.0 Universal",licenseUrl:"https://creativecommons.org/publicdomain/zero/1.0/"},{id:"im",name:"IcoMoon Free",projectUrl:"https://github.com/Keyamoon/IcoMoon-Free",license:"CC BY 4.0 License"},{id:"bi",name:"BoxIcons",projectUrl:"https://github.com/atisawd/boxicons",license:"CC BY 4.0 License"},{id:"cg",name:"css.gg",projectUrl:"https://github.com/astrit/css.gg",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"vsc",name:"VS Code Icons",projectUrl:"https://github.com/microsoft/vscode-codicons",license:"CC BY 4.0",licenseUrl:"https://creativecommons.org/licenses/by/4.0/"}],wp={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},vp=F.createContext&&F.createContext(wp),Qn=function(){return Qn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},Qn.apply(this,arguments)},UF=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r};function cg(e){return e&&e.map(function(t,r){return F.createElement(t.tag,Qn({key:r},t.attr),cg(t.child))})}function DF(e){return function(t){return F.createElement(lg,Qn({attr:Qn({},e.attr)},t),cg(e.child))}}function lg(e){var t=function(r){var n=e.attr,s=e.size,a=e.title,o=UF(e,["attr","size","title"]),i=s||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),F.createElement("svg",Qn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,o,{className:c,style:Qn(Qn({color:e.color||r.color},r.style),e.style),height:i,width:i,xmlns:"http://www.w3.org/2000/svg"}),a&&F.createElement("title",null,a),e.children)};return vp!==void 0?F.createElement(vp.Consumer,null,function(r){return t(r)}):t(wp)}const Rl=MF(Object.freeze(Object.defineProperty({__proto__:null,DefaultContext:wp,GenIcon:DF,IconBase:lg,IconContext:vp,IconsManifest:_F},Symbol.toStringTag,{value:"Module"})));var ug;function FF(){if(ug)return xp;ug=1;var e=Rl.GenIcon;return xp.IoIosArrowDown=function(r){return e({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"}}]})(r)},xp}var NF=FF(),kp={},dg;function zF(){if(dg)return kp;dg=1;var e=Rl.GenIcon;return kp.AiOutlineCopy=function(r){return e({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]})(r)},kp}var LF=zF();//! moment.js
|
|
47
47
|
//! version : 2.30.1
|
|
48
48
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
49
49
|
//! license : MIT
|
|
50
50
|
//! momentjs.com
|
|
51
|
-
var
|
|
52
|
-
[`+a+"] ";for(o in arguments[0])Le(arguments[0],o)&&(s+=o+": "+arguments[0][o]+", ");s=s.slice(0,-2)}else s=arguments[a];n.push(s)}
|
|
51
|
+
var fg;function te(){return fg.apply(null,arguments)}function RF(e){fg=e}function Mr(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Rs(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function Le(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ep(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(Le(e,t))return!1;return!0}function Yt(e){return e===void 0}function kn(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Oi(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function pg(e,t){var r=[],n,s=e.length;for(n=0;n<s;++n)r.push(t(e[n],n));return r}function Jn(e,t){for(var r in t)Le(t,r)&&(e[r]=t[r]);return Le(t,"toString")&&(e.toString=t.toString),Le(t,"valueOf")&&(e.valueOf=t.valueOf),e}function Yr(e,t,r,n){return Rg(e,t,r,n,!0).utc()}function HF(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Ee(e){return e._pf==null&&(e._pf=HF()),e._pf}var Cp;Array.prototype.some?Cp=Array.prototype.some:Cp=function(e){var t=Object(this),r=t.length>>>0,n;for(n=0;n<r;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};function Tp(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=Ee(e),r=Cp.call(t.parsedDateParts,function(s){return s!=null}),n=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=n;else return n;return e._isValid}function Hl(e){var t=Yr(NaN);return e!=null?Jn(Ee(t),e):Ee(t).userInvalidated=!0,t}var hg=te.momentProperties=[],Sp=!1;function Ap(e,t){var r,n,s,a=hg.length;if(Yt(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),Yt(t._i)||(e._i=t._i),Yt(t._f)||(e._f=t._f),Yt(t._l)||(e._l=t._l),Yt(t._strict)||(e._strict=t._strict),Yt(t._tzm)||(e._tzm=t._tzm),Yt(t._isUTC)||(e._isUTC=t._isUTC),Yt(t._offset)||(e._offset=t._offset),Yt(t._pf)||(e._pf=Ee(t)),Yt(t._locale)||(e._locale=t._locale),a>0)for(r=0;r<a;r++)n=hg[r],s=t[n],Yt(s)||(e[n]=s);return e}function Bi(e){Ap(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Sp===!1&&(Sp=!0,te.updateOffset(this),Sp=!1)}function _r(e){return e instanceof Bi||e!=null&&e._isAMomentObject!=null}function mg(e){te.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function br(e,t){var r=!0;return Jn(function(){if(te.deprecationHandler!=null&&te.deprecationHandler(null,e),r){var n=[],s,a,o,i=arguments.length;for(a=0;a<i;a++){if(s="",typeof arguments[a]=="object"){s+=`
|
|
52
|
+
[`+a+"] ";for(o in arguments[0])Le(arguments[0],o)&&(s+=o+": "+arguments[0][o]+", ");s=s.slice(0,-2)}else s=arguments[a];n.push(s)}mg(e+`
|
|
53
53
|
Arguments: `+Array.prototype.slice.call(n).join("")+`
|
|
54
|
-
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var fg={};function pg(e,t){te.deprecationHandler!=null&&te.deprecationHandler(e,t),fg[e]||(dg(t),fg[e]=!0)}te.suppressDeprecationWarnings=!1,te.deprecationHandler=null;function Kr(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function OF(e){var t,r;for(r in e)Le(e,r)&&(t=e[r],Kr(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Cp(e,t){var r=Qn({},e),n;for(n in t)Le(t,n)&&(Rs(e[n])&&Rs(t[n])?(r[n]={},Qn(r[n],e[n]),Qn(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)Le(e,n)&&!Le(t,n)&&Rs(e[n])&&(r[n]=Qn({},r[n]));return r}function Tp(e){e!=null&&this.set(e)}var Sp;Object.keys?Sp=Object.keys:Sp=function(e){var t,r=[];for(t in e)Le(e,t)&&r.push(t);return r};var BF={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function MF(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return Kr(n)?n.call(t,r):n}function Zr(e,t,r){var n=""+Math.abs(e),s=t-n.length,a=e>=0;return(a?r?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var Ap=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Hl=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Pp={},Ra={};function de(e,t,r,n){var s=n;typeof n=="string"&&(s=function(){return this[n]()}),e&&(Ra[e]=s),t&&(Ra[t[0]]=function(){return Zr(s.apply(this,arguments),t[1],t[2])}),r&&(Ra[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function _F(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function DF(e){var t=e.match(Ap),r,n;for(r=0,n=t.length;r<n;r++)Ra[t[r]]?t[r]=Ra[t[r]]:t[r]=_F(t[r]);return function(s){var a="",o;for(o=0;o<n;o++)a+=Kr(t[o])?t[o].call(s,e):t[o];return a}}function $l(e,t){return e.isValid()?(t=hg(t,e.localeData()),Pp[t]=Pp[t]||DF(t),Pp[t](e)):e.localeData().invalidDate()}function hg(e,t){var r=5;function n(s){return t.longDateFormat(s)||s}for(Hl.lastIndex=0;r>=0&&Hl.test(e);)e=e.replace(Hl,n),Hl.lastIndex=0,r-=1;return e}var FF={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function NF(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(Ap).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var zF="Invalid date";function LF(){return this._invalidDate}var RF="%d",HF=/\d{1,2}/;function $F(e){return this._ordinal.replace("%d",e)}var GF={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function jF(e,t,r,n){var s=this._relativeTime[r];return Kr(s)?s(e,t,r,n):s.replace(/%d/i,e)}function VF(e,t){var r=this._relativeTime[e>0?"future":"past"];return Kr(r)?r(t):r.replace(/%s/i,t)}var mg={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function yr(e){return typeof e=="string"?mg[e]||mg[e.toLowerCase()]:void 0}function Ip(e){var t={},r,n;for(n in e)Le(e,n)&&(r=yr(n),r&&(t[r]=e[n]));return t}var WF={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function qF(e){var t=[],r;for(r in e)Le(e,r)&&t.push({unit:r,priority:WF[r]});return t.sort(function(n,s){return n.priority-s.priority}),t}var bg=/\d/,or=/\d\d/,yg=/\d{3}/,Up=/\d{4}/,Gl=/[+-]?\d{6}/,Qe=/\d\d?/,gg=/\d\d\d\d?/,xg=/\d\d\d\d\d\d?/,jl=/\d{1,3}/,Op=/\d{1,4}/,Vl=/[+-]?\d{1,6}/,Ha=/\d+/,Wl=/[+-]?\d+/,YF=/Z|[+-]\d\d:?\d\d/gi,ql=/Z|[+-]\d\d(?::?\d\d)?/gi,KF=/[+-]?\d+(\.\d{1,3})?/,Bi=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,$a=/^[1-9]\d?/,Bp=/^([1-9]\d|\d)/,Yl;Yl={};function se(e,t,r){Yl[e]=Kr(t)?t:function(n,s){return n&&r?r:t}}function ZF(e,t){return Le(Yl,e)?Yl[e](t._strict,t._locale):new RegExp(XF(e))}function XF(e){return En(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,s,a){return r||n||s||a}))}function En(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function gr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Ie(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=gr(t)),r}var Mp={};function We(e,t){var r,n=t,s;for(typeof e=="string"&&(e=[e]),kn(t)&&(n=function(a,o){o[t]=Ie(a)}),s=e.length,r=0;r<s;r++)Mp[e[r]]=n}function Mi(e,t){We(e,function(r,n,s,a){s._w=s._w||{},t(r,s._w,s,a)})}function QF(e,t,r){t!=null&&Le(Mp,e)&&Mp[e](t,r._a,r,e)}function Kl(e){return e%4===0&&e%100!==0||e%400===0}var Bt=0,Cn=1,Xr=2,vt=3,_r=4,Tn=5,Hs=6,JF=7,eN=8;de("Y",0,0,function(){var e=this.year();return e<=9999?Zr(e,4):"+"+e}),de(0,["YY",2],0,function(){return this.year()%100}),de(0,["YYYY",4],0,"year"),de(0,["YYYYY",5],0,"year"),de(0,["YYYYYY",6,!0],0,"year"),se("Y",Wl),se("YY",Qe,or),se("YYYY",Op,Up),se("YYYYY",Vl,Gl),se("YYYYYY",Vl,Gl),We(["YYYYY","YYYYYY"],Bt),We("YYYY",function(e,t){t[Bt]=e.length===2?te.parseTwoDigitYear(e):Ie(e)}),We("YY",function(e,t){t[Bt]=te.parseTwoDigitYear(e)}),We("Y",function(e,t){t[Bt]=parseInt(e,10)});function _i(e){return Kl(e)?366:365}te.parseTwoDigitYear=function(e){return Ie(e)+(Ie(e)>68?1900:2e3)};var wg=Ga("FullYear",!0);function tN(){return Kl(this.year())}function Ga(e,t){return function(r){return r!=null?(vg(this,e,r),te.updateOffset(this,t),this):Di(this,e)}}function Di(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function vg(e,t,r){var n,s,a,o,i;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(s?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(s?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(s?n.setUTCHours(r):n.setHours(r));case"Date":return void(s?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}a=r,o=e.month(),i=e.date(),i=i===29&&o===1&&!Kl(a)?28:i,s?n.setUTCFullYear(a,o,i):n.setFullYear(a,o,i)}}function rN(e){return e=yr(e),Kr(this[e])?this[e]():this}function nN(e,t){if(typeof e=="object"){e=Ip(e);var r=qF(e),n,s=r.length;for(n=0;n<s;n++)this[r[n].unit](e[r[n].unit])}else if(e=yr(e),Kr(this[e]))return this[e](t);return this}function sN(e,t){return(e%t+t)%t}var ht;Array.prototype.indexOf?ht=Array.prototype.indexOf:ht=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function _p(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=sN(t,12);return e+=(t-r)/12,r===1?Kl(e)?29:28:31-r%7%2}de("M",["MM",2],"Mo",function(){return this.month()+1}),de("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),de("MMMM",0,0,function(e){return this.localeData().months(this,e)}),se("M",Qe,$a),se("MM",Qe,or),se("MMM",function(e,t){return t.monthsShortRegex(e)}),se("MMMM",function(e,t){return t.monthsRegex(e)}),We(["M","MM"],function(e,t){t[Cn]=Ie(e)-1}),We(["MMM","MMMM"],function(e,t,r,n){var s=r._locale.monthsParse(e,n,r._strict);s!=null?t[Cn]=s:Ee(r).invalidMonth=e});var aN="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),kg="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Eg=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,oN=Bi,iN=Bi;function cN(e,t){return e?Br(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Eg).test(t)?"format":"standalone"][e.month()]:Br(this._months)?this._months:this._months.standalone}function lN(e,t){return e?Br(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Eg.test(t)?"format":"standalone"][e.month()]:Br(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function uN(e,t,r){var n,s,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)a=Yr([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(a,"").toLocaleLowerCase();return r?t==="MMM"?(s=ht.call(this._shortMonthsParse,o),s!==-1?s:null):(s=ht.call(this._longMonthsParse,o),s!==-1?s:null):t==="MMM"?(s=ht.call(this._shortMonthsParse,o),s!==-1?s:(s=ht.call(this._longMonthsParse,o),s!==-1?s:null)):(s=ht.call(this._longMonthsParse,o),s!==-1?s:(s=ht.call(this._shortMonthsParse,o),s!==-1?s:null))}function dN(e,t,r){var n,s,a;if(this._monthsParseExact)return uN.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(s=Yr([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(a="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[n]=new RegExp(a.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function Cg(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Ie(t);else if(t=e.localeData().monthsParse(t),!kn(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,_p(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function Tg(e){return e!=null?(Cg(this,e),te.updateOffset(this,!0),this):Di(this,"Month")}function fN(){return _p(this.year(),this.month())}function pN(e){return this._monthsParseExact?(Le(this,"_monthsRegex")||Sg.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(Le(this,"_monthsShortRegex")||(this._monthsShortRegex=oN),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function hN(e){return this._monthsParseExact?(Le(this,"_monthsRegex")||Sg.call(this),e?this._monthsStrictRegex:this._monthsRegex):(Le(this,"_monthsRegex")||(this._monthsRegex=iN),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Sg(){function e(c,l){return l.length-c.length}var t=[],r=[],n=[],s,a,o,i;for(s=0;s<12;s++)a=Yr([2e3,s]),o=En(this.monthsShort(a,"")),i=En(this.months(a,"")),t.push(o),r.push(i),n.push(i),n.push(o);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function mN(e,t,r,n,s,a,o){var i;return e<100&&e>=0?(i=new Date(e+400,t,r,n,s,a,o),isFinite(i.getFullYear())&&i.setFullYear(e)):i=new Date(e,t,r,n,s,a,o),i}function Fi(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Zl(e,t,r){var n=7+t-r,s=(7+Fi(e,0,n).getUTCDay()-t)%7;return-s+n-1}function Ag(e,t,r,n,s){var a=(7+r-n)%7,o=Zl(e,n,s),i=1+7*(t-1)+a+o,c,l;return i<=0?(c=e-1,l=_i(c)+i):i>_i(e)?(c=e+1,l=i-_i(e)):(c=e,l=i),{year:c,dayOfYear:l}}function Ni(e,t,r){var n=Zl(e.year(),t,r),s=Math.floor((e.dayOfYear()-n-1)/7)+1,a,o;return s<1?(o=e.year()-1,a=s+Sn(o,t,r)):s>Sn(e.year(),t,r)?(a=s-Sn(e.year(),t,r),o=e.year()+1):(o=e.year(),a=s),{week:a,year:o}}function Sn(e,t,r){var n=Zl(e,t,r),s=Zl(e+1,t,r);return(_i(e)-n+s)/7}de("w",["ww",2],"wo","week"),de("W",["WW",2],"Wo","isoWeek"),se("w",Qe,$a),se("ww",Qe,or),se("W",Qe,$a),se("WW",Qe,or),Mi(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=Ie(e)});function bN(e){return Ni(e,this._week.dow,this._week.doy).week}var yN={dow:0,doy:6};function gN(){return this._week.dow}function xN(){return this._week.doy}function wN(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function vN(e){var t=Ni(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}de("d",0,"do","day"),de("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),de("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),de("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),de("e",0,0,"weekday"),de("E",0,0,"isoWeekday"),se("d",Qe),se("e",Qe),se("E",Qe),se("dd",function(e,t){return t.weekdaysMinRegex(e)}),se("ddd",function(e,t){return t.weekdaysShortRegex(e)}),se("dddd",function(e,t){return t.weekdaysRegex(e)}),Mi(["dd","ddd","dddd"],function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);s!=null?t.d=s:Ee(r).invalidWeekday=e}),Mi(["d","e","E"],function(e,t,r,n){t[n]=Ie(e)});function kN(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function EN(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Dp(e,t){return e.slice(t,7).concat(e.slice(0,t))}var CN="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Pg="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),TN="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),SN=Bi,AN=Bi,PN=Bi;function IN(e,t){var r=Br(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Dp(r,this._week.dow):e?r[e.day()]:r}function UN(e){return e===!0?Dp(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ON(e){return e===!0?Dp(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function BN(e,t,r){var n,s,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)a=Yr([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(a,"").toLocaleLowerCase();return r?t==="dddd"?(s=ht.call(this._weekdaysParse,o),s!==-1?s:null):t==="ddd"?(s=ht.call(this._shortWeekdaysParse,o),s!==-1?s:null):(s=ht.call(this._minWeekdaysParse,o),s!==-1?s:null):t==="dddd"?(s=ht.call(this._weekdaysParse,o),s!==-1||(s=ht.call(this._shortWeekdaysParse,o),s!==-1)?s:(s=ht.call(this._minWeekdaysParse,o),s!==-1?s:null)):t==="ddd"?(s=ht.call(this._shortWeekdaysParse,o),s!==-1||(s=ht.call(this._weekdaysParse,o),s!==-1)?s:(s=ht.call(this._minWeekdaysParse,o),s!==-1?s:null)):(s=ht.call(this._minWeekdaysParse,o),s!==-1||(s=ht.call(this._weekdaysParse,o),s!==-1)?s:(s=ht.call(this._shortWeekdaysParse,o),s!==-1?s:null))}function MN(e,t,r){var n,s,a;if(this._weekdaysParseExact)return BN.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=Yr([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(a="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(a.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function _N(e){if(!this.isValid())return e!=null?this:NaN;var t=Di(this,"Day");return e!=null?(e=kN(e,this.localeData()),this.add(e-t,"d")):t}function DN(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function FN(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=EN(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function NN(e){return this._weekdaysParseExact?(Le(this,"_weekdaysRegex")||Fp.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Le(this,"_weekdaysRegex")||(this._weekdaysRegex=SN),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function zN(e){return this._weekdaysParseExact?(Le(this,"_weekdaysRegex")||Fp.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Le(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=AN),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function LN(e){return this._weekdaysParseExact?(Le(this,"_weekdaysRegex")||Fp.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Le(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=PN),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Fp(){function e(u,d){return d.length-u.length}var t=[],r=[],n=[],s=[],a,o,i,c,l;for(a=0;a<7;a++)o=Yr([2e3,1]).day(a),i=En(this.weekdaysMin(o,"")),c=En(this.weekdaysShort(o,"")),l=En(this.weekdays(o,"")),t.push(i),r.push(c),n.push(l),s.push(i),s.push(c),s.push(l);t.sort(e),r.sort(e),n.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Np(){return this.hours()%12||12}function RN(){return this.hours()||24}de("H",["HH",2],0,"hour"),de("h",["hh",2],0,Np),de("k",["kk",2],0,RN),de("hmm",0,0,function(){return""+Np.apply(this)+Zr(this.minutes(),2)}),de("hmmss",0,0,function(){return""+Np.apply(this)+Zr(this.minutes(),2)+Zr(this.seconds(),2)}),de("Hmm",0,0,function(){return""+this.hours()+Zr(this.minutes(),2)}),de("Hmmss",0,0,function(){return""+this.hours()+Zr(this.minutes(),2)+Zr(this.seconds(),2)});function Ig(e,t){de(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Ig("a",!0),Ig("A",!1);function Ug(e,t){return t._meridiemParse}se("a",Ug),se("A",Ug),se("H",Qe,Bp),se("h",Qe,$a),se("k",Qe,$a),se("HH",Qe,or),se("hh",Qe,or),se("kk",Qe,or),se("hmm",gg),se("hmmss",xg),se("Hmm",gg),se("Hmmss",xg),We(["H","HH"],vt),We(["k","kk"],function(e,t,r){var n=Ie(e);t[vt]=n===24?0:n}),We(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),We(["h","hh"],function(e,t,r){t[vt]=Ie(e),Ee(r).bigHour=!0}),We("hmm",function(e,t,r){var n=e.length-2;t[vt]=Ie(e.substr(0,n)),t[_r]=Ie(e.substr(n)),Ee(r).bigHour=!0}),We("hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[vt]=Ie(e.substr(0,n)),t[_r]=Ie(e.substr(n,2)),t[Tn]=Ie(e.substr(s)),Ee(r).bigHour=!0}),We("Hmm",function(e,t,r){var n=e.length-2;t[vt]=Ie(e.substr(0,n)),t[_r]=Ie(e.substr(n))}),We("Hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[vt]=Ie(e.substr(0,n)),t[_r]=Ie(e.substr(n,2)),t[Tn]=Ie(e.substr(s))});function HN(e){return(e+"").toLowerCase().charAt(0)==="p"}var $N=/[ap]\.?m?\.?/i,GN=Ga("Hours",!0);function jN(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var Og={calendar:BF,longDateFormat:FF,invalidDate:zF,ordinal:RF,dayOfMonthOrdinalParse:HF,relativeTime:GF,months:aN,monthsShort:kg,week:yN,weekdays:CN,weekdaysMin:TN,weekdaysShort:Pg,meridiemParse:$N},nt={},zi={},Li;function VN(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function Bg(e){return e&&e.toLowerCase().replace("_","-")}function WN(e){for(var t=0,r,n,s,a;t<e.length;){for(a=Bg(e[t]).split("-"),r=a.length,n=Bg(e[t+1]),n=n?n.split("-"):null;r>0;){if(s=Xl(a.slice(0,r).join("-")),s)return s;if(n&&n.length>=r&&VN(a,n)>=r-1)break;r--}t++}return Li}function qN(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Xl(e){var t=null,r;if(nt[e]===void 0&&typeof module<"u"&&module&&module.exports&&qN(e))try{t=Li._abbr,r=require,r("./locale/"+e),Jn(t)}catch{nt[e]=null}return nt[e]}function Jn(e,t){var r;return e&&(Yt(t)?r=An(e):r=zp(e,t),r?Li=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Li._abbr}function zp(e,t){if(t!==null){var r,n=Og;if(t.abbr=e,nt[e]!=null)pg("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=nt[e]._config;else if(t.parentLocale!=null)if(nt[t.parentLocale]!=null)n=nt[t.parentLocale]._config;else if(r=Xl(t.parentLocale),r!=null)n=r._config;else return zi[t.parentLocale]||(zi[t.parentLocale]=[]),zi[t.parentLocale].push({name:e,config:t}),null;return nt[e]=new Tp(Cp(n,t)),zi[e]&&zi[e].forEach(function(s){zp(s.name,s.config)}),Jn(e),nt[e]}else return delete nt[e],null}function YN(e,t){if(t!=null){var r,n,s=Og;nt[e]!=null&&nt[e].parentLocale!=null?nt[e].set(Cp(nt[e]._config,t)):(n=Xl(e),n!=null&&(s=n._config),t=Cp(s,t),n==null&&(t.abbr=e),r=new Tp(t),r.parentLocale=nt[e],nt[e]=r),Jn(e)}else nt[e]!=null&&(nt[e].parentLocale!=null?(nt[e]=nt[e].parentLocale,e===Jn()&&Jn(e)):nt[e]!=null&&delete nt[e]);return nt[e]}function An(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Li;if(!Br(e)){if(t=Xl(e),t)return t;e=[e]}return WN(e)}function KN(){return Sp(nt)}function Lp(e){var t,r=e._a;return r&&Ee(e).overflow===-2&&(t=r[Cn]<0||r[Cn]>11?Cn:r[Xr]<1||r[Xr]>_p(r[Bt],r[Cn])?Xr:r[vt]<0||r[vt]>24||r[vt]===24&&(r[_r]!==0||r[Tn]!==0||r[Hs]!==0)?vt:r[_r]<0||r[_r]>59?_r:r[Tn]<0||r[Tn]>59?Tn:r[Hs]<0||r[Hs]>999?Hs:-1,Ee(e)._overflowDayOfYear&&(t<Bt||t>Xr)&&(t=Xr),Ee(e)._overflowWeeks&&t===-1&&(t=JF),Ee(e)._overflowWeekday&&t===-1&&(t=eN),Ee(e).overflow=t),e}var ZN=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,XN=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,QN=/Z|[+-]\d\d(?::?\d\d)?/,Ql=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Rp=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],JN=/^\/?Date\((-?\d+)/i,ez=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,tz={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Mg(e){var t,r,n=e._i,s=ZN.exec(n)||XN.exec(n),a,o,i,c,l=Ql.length,u=Rp.length;if(s){for(Ee(e).iso=!0,t=0,r=l;t<r;t++)if(Ql[t][1].exec(s[1])){o=Ql[t][0],a=Ql[t][2]!==!1;break}if(o==null){e._isValid=!1;return}if(s[3]){for(t=0,r=u;t<r;t++)if(Rp[t][1].exec(s[3])){i=(s[2]||" ")+Rp[t][0];break}if(i==null){e._isValid=!1;return}}if(!a&&i!=null){e._isValid=!1;return}if(s[4])if(QN.exec(s[4]))c="Z";else{e._isValid=!1;return}e._f=o+(i||"")+(c||""),$p(e)}else e._isValid=!1}function rz(e,t,r,n,s,a){var o=[nz(e),kg.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(s,10)];return a&&o.push(parseInt(a,10)),o}function nz(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function sz(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function az(e,t,r){if(e){var n=Pg.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(n!==s)return Ee(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function oz(e,t,r){if(e)return tz[e];if(t)return 0;var n=parseInt(r,10),s=n%100,a=(n-s)/100;return a*60+s}function _g(e){var t=ez.exec(sz(e._i)),r;if(t){if(r=rz(t[4],t[3],t[2],t[5],t[6],t[7]),!az(t[1],r,e))return;e._a=r,e._tzm=oz(t[8],t[9],t[10]),e._d=Fi.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Ee(e).rfc2822=!0}else e._isValid=!1}function iz(e){var t=JN.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Mg(e),e._isValid===!1)delete e._isValid;else return;if(_g(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:te.createFromInputFallback(e)}te.createFromInputFallback=br("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function ja(e,t,r){return e??t??r}function cz(e){var t=new Date(te.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Hp(e){var t,r,n=[],s,a,o;if(!e._d){for(s=cz(e),e._w&&e._a[Xr]==null&&e._a[Cn]==null&&lz(e),e._dayOfYear!=null&&(o=ja(e._a[Bt],s[Bt]),(e._dayOfYear>_i(o)||e._dayOfYear===0)&&(Ee(e)._overflowDayOfYear=!0),r=Fi(o,0,e._dayOfYear),e._a[Cn]=r.getUTCMonth(),e._a[Xr]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=s[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[vt]===24&&e._a[_r]===0&&e._a[Tn]===0&&e._a[Hs]===0&&(e._nextDay=!0,e._a[vt]=0),e._d=(e._useUTC?Fi:mN).apply(null,n),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[vt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(Ee(e).weekdayMismatch=!0)}}function lz(e){var t,r,n,s,a,o,i,c,l;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,o=4,r=ja(t.GG,e._a[Bt],Ni(Je(),1,4).year),n=ja(t.W,1),s=ja(t.E,1),(s<1||s>7)&&(c=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,l=Ni(Je(),a,o),r=ja(t.gg,e._a[Bt],l.year),n=ja(t.w,l.week),t.d!=null?(s=t.d,(s<0||s>6)&&(c=!0)):t.e!=null?(s=t.e+a,(t.e<0||t.e>6)&&(c=!0)):s=a),n<1||n>Sn(r,a,o)?Ee(e)._overflowWeeks=!0:c!=null?Ee(e)._overflowWeekday=!0:(i=Ag(r,n,s,a,o),e._a[Bt]=i.year,e._dayOfYear=i.dayOfYear)}te.ISO_8601=function(){},te.RFC_2822=function(){};function $p(e){if(e._f===te.ISO_8601){Mg(e);return}if(e._f===te.RFC_2822){_g(e);return}e._a=[],Ee(e).empty=!0;var t=""+e._i,r,n,s,a,o,i=t.length,c=0,l,u;for(s=hg(e._f,e._locale).match(Ap)||[],u=s.length,r=0;r<u;r++)a=s[r],n=(t.match(ZF(a,e))||[])[0],n&&(o=t.substr(0,t.indexOf(n)),o.length>0&&Ee(e).unusedInput.push(o),t=t.slice(t.indexOf(n)+n.length),c+=n.length),Ra[a]?(n?Ee(e).empty=!1:Ee(e).unusedTokens.push(a),QF(a,n,e)):e._strict&&!n&&Ee(e).unusedTokens.push(a);Ee(e).charsLeftOver=i-c,t.length>0&&Ee(e).unusedInput.push(t),e._a[vt]<=12&&Ee(e).bigHour===!0&&e._a[vt]>0&&(Ee(e).bigHour=void 0),Ee(e).parsedDateParts=e._a.slice(0),Ee(e).meridiem=e._meridiem,e._a[vt]=uz(e._locale,e._a[vt],e._meridiem),l=Ee(e).era,l!==null&&(e._a[Bt]=e._locale.erasConvertYear(l,e._a[Bt])),Hp(e),Lp(e)}function uz(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function dz(e){var t,r,n,s,a,o,i=!1,c=e._f.length;if(c===0){Ee(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<c;s++)a=0,o=!1,t=Ep({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],$p(t),vp(t)&&(o=!0),a+=Ee(t).charsLeftOver,a+=Ee(t).unusedTokens.length*10,Ee(t).score=a,i?a<n&&(n=a,r=t):(n==null||a<n||o)&&(n=a,r=t,o&&(i=!0));Qn(e,r||t)}function fz(e){if(!e._d){var t=Ip(e._i),r=t.day===void 0?t.date:t.day;e._a=lg([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),Hp(e)}}function pz(e){var t=new Oi(Lp(Dg(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Dg(e){var t=e._i,r=e._f;return e._locale=e._locale||An(e._l),t===null||r===void 0&&t===""?Rl({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),Mr(t)?new Oi(Lp(t)):(Ui(t)?e._d=t:Br(r)?dz(e):r?$p(e):hz(e),vp(e)||(e._d=null),e))}function hz(e){var t=e._i;Yt(t)?e._d=new Date(te.now()):Ui(t)?e._d=new Date(t.valueOf()):typeof t=="string"?iz(e):Br(t)?(e._a=lg(t.slice(0),function(r){return parseInt(r,10)}),Hp(e)):Rs(t)?fz(e):kn(t)?e._d=new Date(t):te.createFromInputFallback(e)}function Fg(e,t,r,n,s){var a={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(Rs(e)&&xp(e)||Br(e)&&e.length===0)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=s,a._l=r,a._i=e,a._f=t,a._strict=n,pz(a)}function Je(e,t,r,n){return Fg(e,t,r,n,!1)}var mz=br("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Je.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Rl()}),bz=br("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Je.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Rl()});function Ng(e,t){var r,n;if(t.length===1&&Br(t[0])&&(t=t[0]),!t.length)return Je();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function yz(){var e=[].slice.call(arguments,0);return Ng("isBefore",e)}function gz(){var e=[].slice.call(arguments,0);return Ng("isAfter",e)}var xz=function(){return Date.now?Date.now():+new Date},Ri=["year","quarter","month","week","day","hour","minute","second","millisecond"];function wz(e){var t,r=!1,n,s=Ri.length;for(t in e)if(Le(e,t)&&!(ht.call(Ri,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<s;++n)if(e[Ri[n]]){if(r)return!1;parseFloat(e[Ri[n]])!==Ie(e[Ri[n]])&&(r=!0)}return!0}function vz(){return this._isValid}function kz(){return Dr(NaN)}function Jl(e){var t=Ip(e),r=t.year||0,n=t.quarter||0,s=t.month||0,a=t.week||t.isoWeek||0,o=t.day||0,i=t.hour||0,c=t.minute||0,l=t.second||0,u=t.millisecond||0;this._isValid=wz(t),this._milliseconds=+u+l*1e3+c*6e4+i*1e3*60*60,this._days=+o+a*7,this._months=+s+n*3+r*12,this._data={},this._locale=An(),this._bubble()}function eu(e){return e instanceof Jl}function Gp(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Ez(e,t,r){var n=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),a=0,o;for(o=0;o<n;o++)Ie(e[o])!==Ie(t[o])&&a++;return a+s}function zg(e,t){de(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+Zr(~~(r/60),2)+t+Zr(~~r%60,2)})}zg("Z",":"),zg("ZZ",""),se("Z",ql),se("ZZ",ql),We(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=jp(ql,e)});var Cz=/([\+\-]|\d\d)/gi;function jp(e,t){var r=(t||"").match(e),n,s,a;return r===null?null:(n=r[r.length-1]||[],s=(n+"").match(Cz)||["-",0,0],a=+(s[1]*60)+Ie(s[2]),a===0?0:s[0]==="+"?a:-a)}function Vp(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(Mr(e)||Ui(e)?e.valueOf():Je(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),te.updateOffset(r,!1),r):Je(e).local()}function Wp(e){return-Math.round(e._d.getTimezoneOffset())}te.updateOffset=function(){};function Tz(e,t,r){var n=this._offset||0,s;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=jp(ql,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(s=Wp(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),n!==e&&(!t||this._changeInProgress?$g(this,Dr(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,te.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:Wp(this)}function Sz(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Az(e){return this.utcOffset(0,e)}function Pz(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Wp(this),"m")),this}function Iz(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=jp(YF,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Uz(e){return this.isValid()?(e=e?Je(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function Oz(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Bz(){if(!Yt(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Ep(e,this),e=Dg(e),e._a?(t=e._isUTC?Yr(e._a):Je(e._a),this._isDSTShifted=this.isValid()&&Ez(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Mz(){return this.isValid()?!this._isUTC:!1}function _z(){return this.isValid()?this._isUTC:!1}function Lg(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Dz=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Fz=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Dr(e,t){var r=e,n=null,s,a,o;return eu(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:kn(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=Dz.exec(e))?(s=n[1]==="-"?-1:1,r={y:0,d:Ie(n[Xr])*s,h:Ie(n[vt])*s,m:Ie(n[_r])*s,s:Ie(n[Tn])*s,ms:Ie(Gp(n[Hs]*1e3))*s}):(n=Fz.exec(e))?(s=n[1]==="-"?-1:1,r={y:$s(n[2],s),M:$s(n[3],s),w:$s(n[4],s),d:$s(n[5],s),h:$s(n[6],s),m:$s(n[7],s),s:$s(n[8],s)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(o=Nz(Je(r.from),Je(r.to)),r={},r.ms=o.milliseconds,r.M=o.months),a=new Jl(r),eu(e)&&Le(e,"_locale")&&(a._locale=e._locale),eu(e)&&Le(e,"_isValid")&&(a._isValid=e._isValid),a}Dr.fn=Jl.prototype,Dr.invalid=kz;function $s(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Rg(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function Nz(e,t){var r;return e.isValid()&&t.isValid()?(t=Vp(t,e),e.isBefore(t)?r=Rg(e,t):(r=Rg(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Hg(e,t){return function(r,n){var s,a;return n!==null&&!isNaN(+n)&&(pg(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=r,r=n,n=a),s=Dr(r,n),$g(this,s,e),this}}function $g(e,t,r,n){var s=t._milliseconds,a=Gp(t._days),o=Gp(t._months);e.isValid()&&(n=n??!0,o&&Cg(e,Di(e,"Month")+o*r),a&&vg(e,"Date",Di(e,"Date")+a*r),s&&e._d.setTime(e._d.valueOf()+s*r),n&&te.updateOffset(e,a||o))}var zz=Hg(1,"add"),Lz=Hg(-1,"subtract");function Gg(e){return typeof e=="string"||e instanceof String}function Rz(e){return Mr(e)||Ui(e)||Gg(e)||kn(e)||$z(e)||Hz(e)||e===null||e===void 0}function Hz(e){var t=Rs(e)&&!xp(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,a,o=n.length;for(s=0;s<o;s+=1)a=n[s],r=r||Le(e,a);return t&&r}function $z(e){var t=Br(e),r=!1;return t&&(r=e.filter(function(n){return!kn(n)&&Gg(e)}).length===0),t&&r}function Gz(e){var t=Rs(e)&&!xp(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,a;for(s=0;s<n.length;s+=1)a=n[s],r=r||Le(e,a);return t&&r}function jz(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function Vz(e,t){arguments.length===1&&(arguments[0]?Rz(arguments[0])?(e=arguments[0],t=void 0):Gz(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Je(),n=Vp(r,this).startOf("day"),s=te.calendarFormat(this,n)||"sameElse",a=t&&(Kr(t[s])?t[s].call(this,r):t[s]);return this.format(a||this.localeData().calendar(s,this,Je(r)))}function Wz(){return new Oi(this)}function qz(e,t){var r=Mr(e)?e:Je(e);return this.isValid()&&r.isValid()?(t=yr(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function Yz(e,t){var r=Mr(e)?e:Je(e);return this.isValid()&&r.isValid()?(t=yr(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function Kz(e,t,r,n){var s=Mr(e)?e:Je(e),a=Mr(t)?t:Je(t);return this.isValid()&&s.isValid()&&a.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(s,r):!this.isBefore(s,r))&&(n[1]===")"?this.isBefore(a,r):!this.isAfter(a,r))):!1}function Zz(e,t){var r=Mr(e)?e:Je(e),n;return this.isValid()&&r.isValid()?(t=yr(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function Xz(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Qz(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Jz(e,t,r){var n,s,a;if(!this.isValid())return NaN;if(n=Vp(e,this),!n.isValid())return NaN;switch(s=(n.utcOffset()-this.utcOffset())*6e4,t=yr(t),t){case"year":a=tu(this,n)/12;break;case"month":a=tu(this,n);break;case"quarter":a=tu(this,n)/3;break;case"second":a=(this-n)/1e3;break;case"minute":a=(this-n)/6e4;break;case"hour":a=(this-n)/36e5;break;case"day":a=(this-n-s)/864e5;break;case"week":a=(this-n-s)/6048e5;break;default:a=this-n}return r?a:gr(a)}function tu(e,t){if(e.date()<t.date())return-tu(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),s,a;return t-n<0?(s=e.clone().add(r-1,"months"),a=(t-n)/(n-s)):(s=e.clone().add(r+1,"months"),a=(t-n)/(s-n)),-(r+a)||0}te.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",te.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function eL(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function tL(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?$l(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Kr(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",$l(r,"Z")):$l(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function rL(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,s,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(r+n+s+a)}function nL(e){e||(e=this.isUtc()?te.defaultFormatUtc:te.defaultFormat);var t=$l(this,e);return this.localeData().postformat(t)}function sL(e,t){return this.isValid()&&(Mr(e)&&e.isValid()||Je(e).isValid())?Dr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function aL(e){return this.from(Je(),e)}function oL(e,t){return this.isValid()&&(Mr(e)&&e.isValid()||Je(e).isValid())?Dr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function iL(e){return this.to(Je(),e)}function jg(e){var t;return e===void 0?this._locale._abbr:(t=An(e),t!=null&&(this._locale=t),this)}var Vg=br("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Wg(){return this._locale}var ru=1e3,Va=60*ru,nu=60*Va,qg=(365*400+97)*24*nu;function Wa(e,t){return(e%t+t)%t}function Yg(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-qg:new Date(e,t,r).valueOf()}function Kg(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-qg:Date.UTC(e,t,r)}function cL(e){var t,r;if(e=yr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Kg:Yg,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Wa(t+(this._isUTC?0:this.utcOffset()*Va),nu);break;case"minute":t=this._d.valueOf(),t-=Wa(t,Va);break;case"second":t=this._d.valueOf(),t-=Wa(t,ru);break}return this._d.setTime(t),te.updateOffset(this,!0),this}function lL(e){var t,r;if(e=yr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Kg:Yg,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=nu-Wa(t+(this._isUTC?0:this.utcOffset()*Va),nu)-1;break;case"minute":t=this._d.valueOf(),t+=Va-Wa(t,Va)-1;break;case"second":t=this._d.valueOf(),t+=ru-Wa(t,ru)-1;break}return this._d.setTime(t),te.updateOffset(this,!0),this}function uL(){return this._d.valueOf()-(this._offset||0)*6e4}function dL(){return Math.floor(this.valueOf()/1e3)}function fL(){return new Date(this.valueOf())}function pL(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function hL(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function mL(){return this.isValid()?this.toISOString():null}function bL(){return vp(this)}function yL(){return Qn({},Ee(this))}function gL(){return Ee(this).overflow}function xL(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}de("N",0,0,"eraAbbr"),de("NN",0,0,"eraAbbr"),de("NNN",0,0,"eraAbbr"),de("NNNN",0,0,"eraName"),de("NNNNN",0,0,"eraNarrow"),de("y",["y",1],"yo","eraYear"),de("y",["yy",2],0,"eraYear"),de("y",["yyy",3],0,"eraYear"),de("y",["yyyy",4],0,"eraYear"),se("N",qp),se("NN",qp),se("NNN",qp),se("NNNN",UL),se("NNNNN",OL),We(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?Ee(r).era=s:Ee(r).invalidEra=e}),se("y",Ha),se("yy",Ha),se("yyy",Ha),se("yyyy",Ha),se("yo",BL),We(["y","yy","yyy","yyyy"],Bt),We(["yo"],function(e,t,r,n){var s;r._locale._eraYearOrdinalRegex&&(s=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Bt]=r._locale.eraYearOrdinalParse(e,s):t[Bt]=parseInt(e,10)});function wL(e,t){var r,n,s,a=this._eras||An("en")._eras;for(r=0,n=a.length;r<n;++r){switch(typeof a[r].since){case"string":s=te(a[r].since).startOf("day"),a[r].since=s.valueOf();break}switch(typeof a[r].until){case"undefined":a[r].until=1/0;break;case"string":s=te(a[r].until).startOf("day").valueOf(),a[r].until=s.valueOf();break}}return a}function vL(e,t,r){var n,s,a=this.eras(),o,i,c;for(e=e.toUpperCase(),n=0,s=a.length;n<s;++n)if(o=a[n].name.toUpperCase(),i=a[n].abbr.toUpperCase(),c=a[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(i===e)return a[n];break;case"NNNN":if(o===e)return a[n];break;case"NNNNN":if(c===e)return a[n];break}else if([o,i,c].indexOf(e)>=0)return a[n]}function kL(e,t){var r=e.since<=e.until?1:-1;return t===void 0?te(e.since).year():te(e.since).year()+(t-e.offset)*r}function EL(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function CL(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function TL(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function SL(){var e,t,r,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(r=s[e].since<=s[e].until?1:-1,n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until||s[e].until<=n&&n<=s[e].since)return(this.year()-te(s[e].since).year())*r+s[e].offset;return this.year()}function AL(e){return Le(this,"_erasNameRegex")||Yp.call(this),e?this._erasNameRegex:this._erasRegex}function PL(e){return Le(this,"_erasAbbrRegex")||Yp.call(this),e?this._erasAbbrRegex:this._erasRegex}function IL(e){return Le(this,"_erasNarrowRegex")||Yp.call(this),e?this._erasNarrowRegex:this._erasRegex}function qp(e,t){return t.erasAbbrRegex(e)}function UL(e,t){return t.erasNameRegex(e)}function OL(e,t){return t.erasNarrowRegex(e)}function BL(e,t){return t._eraYearOrdinalRegex||Ha}function Yp(){var e=[],t=[],r=[],n=[],s,a,o,i,c,l=this.eras();for(s=0,a=l.length;s<a;++s)o=En(l[s].name),i=En(l[s].abbr),c=En(l[s].narrow),t.push(o),e.push(i),r.push(c),n.push(o),n.push(i),n.push(c);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}de(0,["gg",2],0,function(){return this.weekYear()%100}),de(0,["GG",2],0,function(){return this.isoWeekYear()%100});function su(e,t){de(0,[e,e.length],0,t)}su("gggg","weekYear"),su("ggggg","weekYear"),su("GGGG","isoWeekYear"),su("GGGGG","isoWeekYear"),se("G",Wl),se("g",Wl),se("GG",Qe,or),se("gg",Qe,or),se("GGGG",Op,Up),se("gggg",Op,Up),se("GGGGG",Vl,Gl),se("ggggg",Vl,Gl),Mi(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=Ie(e)}),Mi(["gg","GG"],function(e,t,r,n){t[n]=te.parseTwoDigitYear(e)});function ML(e){return Zg.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function _L(e){return Zg.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function DL(){return Sn(this.year(),1,4)}function FL(){return Sn(this.isoWeekYear(),1,4)}function NL(){var e=this.localeData()._week;return Sn(this.year(),e.dow,e.doy)}function zL(){var e=this.localeData()._week;return Sn(this.weekYear(),e.dow,e.doy)}function Zg(e,t,r,n,s){var a;return e==null?Ni(this,n,s).year:(a=Sn(e,n,s),t>a&&(t=a),LL.call(this,e,t,r,n,s))}function LL(e,t,r,n,s){var a=Ag(e,t,r,n,s),o=Fi(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}de("Q",0,"Qo","quarter"),se("Q",bg),We("Q",function(e,t){t[Cn]=(Ie(e)-1)*3});function RL(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}de("D",["DD",2],"Do","date"),se("D",Qe,$a),se("DD",Qe,or),se("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),We(["D","DD"],Xr),We("Do",function(e,t){t[Xr]=Ie(e.match(Qe)[0])});var Xg=Ga("Date",!0);de("DDD",["DDDD",3],"DDDo","dayOfYear"),se("DDD",jl),se("DDDD",yg),We(["DDD","DDDD"],function(e,t,r){r._dayOfYear=Ie(e)});function HL(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}de("m",["mm",2],0,"minute"),se("m",Qe,Bp),se("mm",Qe,or),We(["m","mm"],_r);var $L=Ga("Minutes",!1);de("s",["ss",2],0,"second"),se("s",Qe,Bp),se("ss",Qe,or),We(["s","ss"],Tn);var GL=Ga("Seconds",!1);de("S",0,0,function(){return~~(this.millisecond()/100)}),de(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),de(0,["SSS",3],0,"millisecond"),de(0,["SSSS",4],0,function(){return this.millisecond()*10}),de(0,["SSSSS",5],0,function(){return this.millisecond()*100}),de(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),de(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),de(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),de(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),se("S",jl,bg),se("SS",jl,or),se("SSS",jl,yg);var es,Qg;for(es="SSSS";es.length<=9;es+="S")se(es,Ha);function jL(e,t){t[Hs]=Ie(("0."+e)*1e3)}for(es="S";es.length<=9;es+="S")We(es,jL);Qg=Ga("Milliseconds",!1),de("z",0,0,"zoneAbbr"),de("zz",0,0,"zoneName");function VL(){return this._isUTC?"UTC":""}function WL(){return this._isUTC?"Coordinated Universal Time":""}var q=Oi.prototype;q.add=zz,q.calendar=Vz,q.clone=Wz,q.diff=Jz,q.endOf=lL,q.format=nL,q.from=sL,q.fromNow=aL,q.to=oL,q.toNow=iL,q.get=rN,q.invalidAt=gL,q.isAfter=qz,q.isBefore=Yz,q.isBetween=Kz,q.isSame=Zz,q.isSameOrAfter=Xz,q.isSameOrBefore=Qz,q.isValid=bL,q.lang=Vg,q.locale=jg,q.localeData=Wg,q.max=bz,q.min=mz,q.parsingFlags=yL,q.set=nN,q.startOf=cL,q.subtract=Lz,q.toArray=pL,q.toObject=hL,q.toDate=fL,q.toISOString=tL,q.inspect=rL,typeof Symbol<"u"&&Symbol.for!=null&&(q[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),q.toJSON=mL,q.toString=eL,q.unix=dL,q.valueOf=uL,q.creationData=xL,q.eraName=EL,q.eraNarrow=CL,q.eraAbbr=TL,q.eraYear=SL,q.year=wg,q.isLeapYear=tN,q.weekYear=ML,q.isoWeekYear=_L,q.quarter=q.quarters=RL,q.month=Tg,q.daysInMonth=fN,q.week=q.weeks=wN,q.isoWeek=q.isoWeeks=vN,q.weeksInYear=NL,q.weeksInWeekYear=zL,q.isoWeeksInYear=DL,q.isoWeeksInISOWeekYear=FL,q.date=Xg,q.day=q.days=_N,q.weekday=DN,q.isoWeekday=FN,q.dayOfYear=HL,q.hour=q.hours=GN,q.minute=q.minutes=$L,q.second=q.seconds=GL,q.millisecond=q.milliseconds=Qg,q.utcOffset=Tz,q.utc=Az,q.local=Pz,q.parseZone=Iz,q.hasAlignedHourOffset=Uz,q.isDST=Oz,q.isLocal=Mz,q.isUtcOffset=_z,q.isUtc=Lg,q.isUTC=Lg,q.zoneAbbr=VL,q.zoneName=WL,q.dates=br("dates accessor is deprecated. Use date instead.",Xg),q.months=br("months accessor is deprecated. Use month instead",Tg),q.years=br("years accessor is deprecated. Use year instead",wg),q.zone=br("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Sz),q.isDSTShifted=br("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Bz);function qL(e){return Je(e*1e3)}function YL(){return Je.apply(null,arguments).parseZone()}function Jg(e){return e}var Re=Tp.prototype;Re.calendar=MF,Re.longDateFormat=NF,Re.invalidDate=LF,Re.ordinal=$F,Re.preparse=Jg,Re.postformat=Jg,Re.relativeTime=jF,Re.pastFuture=VF,Re.set=OF,Re.eras=wL,Re.erasParse=vL,Re.erasConvertYear=kL,Re.erasAbbrRegex=PL,Re.erasNameRegex=AL,Re.erasNarrowRegex=IL,Re.months=cN,Re.monthsShort=lN,Re.monthsParse=dN,Re.monthsRegex=hN,Re.monthsShortRegex=pN,Re.week=bN,Re.firstDayOfYear=xN,Re.firstDayOfWeek=gN,Re.weekdays=IN,Re.weekdaysMin=ON,Re.weekdaysShort=UN,Re.weekdaysParse=MN,Re.weekdaysRegex=NN,Re.weekdaysShortRegex=zN,Re.weekdaysMinRegex=LN,Re.isPM=HN,Re.meridiem=jN;function au(e,t,r,n){var s=An(),a=Yr().set(n,t);return s[r](a,e)}function e6(e,t,r){if(kn(e)&&(t=e,e=void 0),e=e||"",t!=null)return au(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=au(e,n,r,"month");return s}function Kp(e,t,r,n){typeof e=="boolean"?(kn(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,kn(t)&&(r=t,t=void 0),t=t||"");var s=An(),a=e?s._week.dow:0,o,i=[];if(r!=null)return au(t,(r+a)%7,n,"day");for(o=0;o<7;o++)i[o]=au(t,(o+a)%7,n,"day");return i}function KL(e,t){return e6(e,t,"months")}function ZL(e,t){return e6(e,t,"monthsShort")}function XL(e,t,r){return Kp(e,t,r,"weekdays")}function QL(e,t,r){return Kp(e,t,r,"weekdaysShort")}function JL(e,t,r){return Kp(e,t,r,"weekdaysMin")}Jn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=Ie(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}}),te.lang=br("moment.lang is deprecated. Use moment.locale instead.",Jn),te.langData=br("moment.langData is deprecated. Use moment.localeData instead.",An);var Pn=Math.abs;function eR(){var e=this._data;return this._milliseconds=Pn(this._milliseconds),this._days=Pn(this._days),this._months=Pn(this._months),e.milliseconds=Pn(e.milliseconds),e.seconds=Pn(e.seconds),e.minutes=Pn(e.minutes),e.hours=Pn(e.hours),e.months=Pn(e.months),e.years=Pn(e.years),this}function t6(e,t,r,n){var s=Dr(t,r);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function tR(e,t){return t6(this,e,t,1)}function rR(e,t){return t6(this,e,t,-1)}function r6(e){return e<0?Math.floor(e):Math.ceil(e)}function nR(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,s,a,o,i,c;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=r6(Zp(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,s=gr(e/1e3),n.seconds=s%60,a=gr(s/60),n.minutes=a%60,o=gr(a/60),n.hours=o%24,t+=gr(o/24),c=gr(n6(t)),r+=c,t-=r6(Zp(c)),i=gr(r/12),r%=12,n.days=t,n.months=r,n.years=i,this}function n6(e){return e*4800/146097}function Zp(e){return e*146097/4800}function sR(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=yr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+n6(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Zp(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function In(e){return function(){return this.as(e)}}var s6=In("ms"),aR=In("s"),oR=In("m"),iR=In("h"),cR=In("d"),lR=In("w"),uR=In("M"),dR=In("Q"),fR=In("y"),pR=s6;function hR(){return Dr(this)}function mR(e){return e=yr(e),this.isValid()?this[e+"s"]():NaN}function Gs(e){return function(){return this.isValid()?this._data[e]:NaN}}var bR=Gs("milliseconds"),yR=Gs("seconds"),gR=Gs("minutes"),xR=Gs("hours"),wR=Gs("days"),vR=Gs("months"),kR=Gs("years");function ER(){return gr(this.days()/7)}var Un=Math.round,qa={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function CR(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}function TR(e,t,r,n){var s=Dr(e).abs(),a=Un(s.as("s")),o=Un(s.as("m")),i=Un(s.as("h")),c=Un(s.as("d")),l=Un(s.as("M")),u=Un(s.as("w")),d=Un(s.as("y")),p=a<=r.ss&&["s",a]||a<r.s&&["ss",a]||o<=1&&["m"]||o<r.m&&["mm",o]||i<=1&&["h"]||i<r.h&&["hh",i]||c<=1&&["d"]||c<r.d&&["dd",c];return r.w!=null&&(p=p||u<=1&&["w"]||u<r.w&&["ww",u]),p=p||l<=1&&["M"]||l<r.M&&["MM",l]||d<=1&&["y"]||["yy",d],p[2]=t,p[3]=+e>0,p[4]=n,CR.apply(null,p)}function SR(e){return e===void 0?Un:typeof e=="function"?(Un=e,!0):!1}function AR(e,t){return qa[e]===void 0?!1:t===void 0?qa[e]:(qa[e]=t,e==="s"&&(qa.ss=t-1),!0)}function PR(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=qa,s,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},qa,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),s=this.localeData(),a=TR(this,!r,n,s),r&&(a=s.pastFuture(+this,a)),s.postformat(a)}var Xp=Math.abs;function Ya(e){return(e>0)-(e<0)||+e}function ou(){if(!this.isValid())return this.localeData().invalidDate();var e=Xp(this._milliseconds)/1e3,t=Xp(this._days),r=Xp(this._months),n,s,a,o,i=this.asSeconds(),c,l,u,d;return i?(n=gr(e/60),s=gr(n/60),e%=60,n%=60,a=gr(r/12),r%=12,o=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=i<0?"-":"",l=Ya(this._months)!==Ya(i)?"-":"",u=Ya(this._days)!==Ya(i)?"-":"",d=Ya(this._milliseconds)!==Ya(i)?"-":"",c+"P"+(a?l+a+"Y":"")+(r?l+r+"M":"")+(t?u+t+"D":"")+(s||n||e?"T":"")+(s?d+s+"H":"")+(n?d+n+"M":"")+(e?d+o+"S":"")):"P0D"}var De=Jl.prototype;De.isValid=vz,De.abs=eR,De.add=tR,De.subtract=rR,De.as=sR,De.asMilliseconds=s6,De.asSeconds=aR,De.asMinutes=oR,De.asHours=iR,De.asDays=cR,De.asWeeks=lR,De.asMonths=uR,De.asQuarters=dR,De.asYears=fR,De.valueOf=pR,De._bubble=nR,De.clone=hR,De.get=mR,De.milliseconds=bR,De.seconds=yR,De.minutes=gR,De.hours=xR,De.days=wR,De.weeks=ER,De.months=vR,De.years=kR,De.humanize=PR,De.toISOString=ou,De.toString=ou,De.toJSON=ou,De.locale=jg,De.localeData=Wg,De.toIsoString=br("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ou),De.lang=Vg,de("X",0,0,"unix"),de("x",0,0,"valueOf"),se("x",Wl),se("X",KF),We("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)}),We("x",function(e,t,r){r._d=new Date(Ie(e))});//! moment.js
|
|
55
|
-
te.version="2.30.1",
|
|
54
|
+
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var bg={};function yg(e,t){te.deprecationHandler!=null&&te.deprecationHandler(e,t),bg[e]||(mg(t),bg[e]=!0)}te.suppressDeprecationWarnings=!1,te.deprecationHandler=null;function Kr(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function $F(e){var t,r;for(r in e)Le(e,r)&&(t=e[r],Kr(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Pp(e,t){var r=Jn({},e),n;for(n in t)Le(t,n)&&(Rs(e[n])&&Rs(t[n])?(r[n]={},Jn(r[n],e[n]),Jn(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)Le(e,n)&&!Le(t,n)&&Rs(e[n])&&(r[n]=Jn({},r[n]));return r}function Ip(e){e!=null&&this.set(e)}var Op;Object.keys?Op=Object.keys:Op=function(e){var t,r=[];for(t in e)Le(e,t)&&r.push(t);return r};var GF={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function jF(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return Kr(n)?n.call(t,r):n}function Zr(e,t,r){var n=""+Math.abs(e),s=t-n.length,a=e>=0;return(a?r?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var Bp=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,$l=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Mp={},Ra={};function de(e,t,r,n){var s=n;typeof n=="string"&&(s=function(){return this[n]()}),e&&(Ra[e]=s),t&&(Ra[t[0]]=function(){return Zr(s.apply(this,arguments),t[1],t[2])}),r&&(Ra[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function VF(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function WF(e){var t=e.match(Bp),r,n;for(r=0,n=t.length;r<n;r++)Ra[t[r]]?t[r]=Ra[t[r]]:t[r]=VF(t[r]);return function(s){var a="",o;for(o=0;o<n;o++)a+=Kr(t[o])?t[o].call(s,e):t[o];return a}}function Gl(e,t){return e.isValid()?(t=gg(t,e.localeData()),Mp[t]=Mp[t]||WF(t),Mp[t](e)):e.localeData().invalidDate()}function gg(e,t){var r=5;function n(s){return t.longDateFormat(s)||s}for($l.lastIndex=0;r>=0&&$l.test(e);)e=e.replace($l,n),$l.lastIndex=0,r-=1;return e}var qF={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function YF(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(Bp).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var KF="Invalid date";function ZF(){return this._invalidDate}var XF="%d",QF=/\d{1,2}/;function JF(e){return this._ordinal.replace("%d",e)}var eN={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function tN(e,t,r,n){var s=this._relativeTime[r];return Kr(s)?s(e,t,r,n):s.replace(/%d/i,e)}function rN(e,t){var r=this._relativeTime[e>0?"future":"past"];return Kr(r)?r(t):r.replace(/%s/i,t)}var xg={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function yr(e){return typeof e=="string"?xg[e]||xg[e.toLowerCase()]:void 0}function _p(e){var t={},r,n;for(n in e)Le(e,n)&&(r=yr(n),r&&(t[r]=e[n]));return t}var nN={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function sN(e){var t=[],r;for(r in e)Le(e,r)&&t.push({unit:r,priority:nN[r]});return t.sort(function(n,s){return n.priority-s.priority}),t}var wg=/\d/,or=/\d\d/,vg=/\d{3}/,Up=/\d{4}/,jl=/[+-]?\d{6}/,Qe=/\d\d?/,kg=/\d\d\d\d?/,Eg=/\d\d\d\d\d\d?/,Vl=/\d{1,3}/,Dp=/\d{1,4}/,Wl=/[+-]?\d{1,6}/,Ha=/\d+/,ql=/[+-]?\d+/,aN=/Z|[+-]\d\d:?\d\d/gi,Yl=/Z|[+-]\d\d(?::?\d\d)?/gi,oN=/[+-]?\d+(\.\d{1,3})?/,Mi=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,$a=/^[1-9]\d?/,Fp=/^([1-9]\d|\d)/,Kl;Kl={};function se(e,t,r){Kl[e]=Kr(t)?t:function(n,s){return n&&r?r:t}}function iN(e,t){return Le(Kl,e)?Kl[e](t._strict,t._locale):new RegExp(cN(e))}function cN(e){return En(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,s,a){return r||n||s||a}))}function En(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function gr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Ie(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=gr(t)),r}var Np={};function We(e,t){var r,n=t,s;for(typeof e=="string"&&(e=[e]),kn(t)&&(n=function(a,o){o[t]=Ie(a)}),s=e.length,r=0;r<s;r++)Np[e[r]]=n}function _i(e,t){We(e,function(r,n,s,a){s._w=s._w||{},t(r,s._w,s,a)})}function lN(e,t,r){t!=null&&Le(Np,e)&&Np[e](t,r._a,r,e)}function Zl(e){return e%4===0&&e%100!==0||e%400===0}var Mt=0,Cn=1,Xr=2,vt=3,Ur=4,Tn=5,Hs=6,uN=7,dN=8;de("Y",0,0,function(){var e=this.year();return e<=9999?Zr(e,4):"+"+e}),de(0,["YY",2],0,function(){return this.year()%100}),de(0,["YYYY",4],0,"year"),de(0,["YYYYY",5],0,"year"),de(0,["YYYYYY",6,!0],0,"year"),se("Y",ql),se("YY",Qe,or),se("YYYY",Dp,Up),se("YYYYY",Wl,jl),se("YYYYYY",Wl,jl),We(["YYYYY","YYYYYY"],Mt),We("YYYY",function(e,t){t[Mt]=e.length===2?te.parseTwoDigitYear(e):Ie(e)}),We("YY",function(e,t){t[Mt]=te.parseTwoDigitYear(e)}),We("Y",function(e,t){t[Mt]=parseInt(e,10)});function Ui(e){return Zl(e)?366:365}te.parseTwoDigitYear=function(e){return Ie(e)+(Ie(e)>68?1900:2e3)};var Cg=Ga("FullYear",!0);function fN(){return Zl(this.year())}function Ga(e,t){return function(r){return r!=null?(Tg(this,e,r),te.updateOffset(this,t),this):Di(this,e)}}function Di(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function Tg(e,t,r){var n,s,a,o,i;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(s?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(s?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(s?n.setUTCHours(r):n.setHours(r));case"Date":return void(s?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}a=r,o=e.month(),i=e.date(),i=i===29&&o===1&&!Zl(a)?28:i,s?n.setUTCFullYear(a,o,i):n.setFullYear(a,o,i)}}function pN(e){return e=yr(e),Kr(this[e])?this[e]():this}function hN(e,t){if(typeof e=="object"){e=_p(e);var r=sN(e),n,s=r.length;for(n=0;n<s;n++)this[r[n].unit](e[r[n].unit])}else if(e=yr(e),Kr(this[e]))return this[e](t);return this}function mN(e,t){return(e%t+t)%t}var ht;Array.prototype.indexOf?ht=Array.prototype.indexOf:ht=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function zp(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=mN(t,12);return e+=(t-r)/12,r===1?Zl(e)?29:28:31-r%7%2}de("M",["MM",2],"Mo",function(){return this.month()+1}),de("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),de("MMMM",0,0,function(e){return this.localeData().months(this,e)}),se("M",Qe,$a),se("MM",Qe,or),se("MMM",function(e,t){return t.monthsShortRegex(e)}),se("MMMM",function(e,t){return t.monthsRegex(e)}),We(["M","MM"],function(e,t){t[Cn]=Ie(e)-1}),We(["MMM","MMMM"],function(e,t,r,n){var s=r._locale.monthsParse(e,n,r._strict);s!=null?t[Cn]=s:Ee(r).invalidMonth=e});var bN="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Sg="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ag=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,yN=Mi,gN=Mi;function xN(e,t){return e?Mr(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ag).test(t)?"format":"standalone"][e.month()]:Mr(this._months)?this._months:this._months.standalone}function wN(e,t){return e?Mr(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ag.test(t)?"format":"standalone"][e.month()]:Mr(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function vN(e,t,r){var n,s,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)a=Yr([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(a,"").toLocaleLowerCase();return r?t==="MMM"?(s=ht.call(this._shortMonthsParse,o),s!==-1?s:null):(s=ht.call(this._longMonthsParse,o),s!==-1?s:null):t==="MMM"?(s=ht.call(this._shortMonthsParse,o),s!==-1?s:(s=ht.call(this._longMonthsParse,o),s!==-1?s:null)):(s=ht.call(this._longMonthsParse,o),s!==-1?s:(s=ht.call(this._shortMonthsParse,o),s!==-1?s:null))}function kN(e,t,r){var n,s,a;if(this._monthsParseExact)return vN.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(s=Yr([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(a="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[n]=new RegExp(a.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function Pg(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Ie(t);else if(t=e.localeData().monthsParse(t),!kn(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,zp(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function Ig(e){return e!=null?(Pg(this,e),te.updateOffset(this,!0),this):Di(this,"Month")}function EN(){return zp(this.year(),this.month())}function CN(e){return this._monthsParseExact?(Le(this,"_monthsRegex")||Og.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(Le(this,"_monthsShortRegex")||(this._monthsShortRegex=yN),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function TN(e){return this._monthsParseExact?(Le(this,"_monthsRegex")||Og.call(this),e?this._monthsStrictRegex:this._monthsRegex):(Le(this,"_monthsRegex")||(this._monthsRegex=gN),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Og(){function e(c,l){return l.length-c.length}var t=[],r=[],n=[],s,a,o,i;for(s=0;s<12;s++)a=Yr([2e3,s]),o=En(this.monthsShort(a,"")),i=En(this.months(a,"")),t.push(o),r.push(i),n.push(i),n.push(o);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function SN(e,t,r,n,s,a,o){var i;return e<100&&e>=0?(i=new Date(e+400,t,r,n,s,a,o),isFinite(i.getFullYear())&&i.setFullYear(e)):i=new Date(e,t,r,n,s,a,o),i}function Fi(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Xl(e,t,r){var n=7+t-r,s=(7+Fi(e,0,n).getUTCDay()-t)%7;return-s+n-1}function Bg(e,t,r,n,s){var a=(7+r-n)%7,o=Xl(e,n,s),i=1+7*(t-1)+a+o,c,l;return i<=0?(c=e-1,l=Ui(c)+i):i>Ui(e)?(c=e+1,l=i-Ui(e)):(c=e,l=i),{year:c,dayOfYear:l}}function Ni(e,t,r){var n=Xl(e.year(),t,r),s=Math.floor((e.dayOfYear()-n-1)/7)+1,a,o;return s<1?(o=e.year()-1,a=s+Sn(o,t,r)):s>Sn(e.year(),t,r)?(a=s-Sn(e.year(),t,r),o=e.year()+1):(o=e.year(),a=s),{week:a,year:o}}function Sn(e,t,r){var n=Xl(e,t,r),s=Xl(e+1,t,r);return(Ui(e)-n+s)/7}de("w",["ww",2],"wo","week"),de("W",["WW",2],"Wo","isoWeek"),se("w",Qe,$a),se("ww",Qe,or),se("W",Qe,$a),se("WW",Qe,or),_i(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=Ie(e)});function AN(e){return Ni(e,this._week.dow,this._week.doy).week}var PN={dow:0,doy:6};function IN(){return this._week.dow}function ON(){return this._week.doy}function BN(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function MN(e){var t=Ni(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}de("d",0,"do","day"),de("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),de("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),de("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),de("e",0,0,"weekday"),de("E",0,0,"isoWeekday"),se("d",Qe),se("e",Qe),se("E",Qe),se("dd",function(e,t){return t.weekdaysMinRegex(e)}),se("ddd",function(e,t){return t.weekdaysShortRegex(e)}),se("dddd",function(e,t){return t.weekdaysRegex(e)}),_i(["dd","ddd","dddd"],function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);s!=null?t.d=s:Ee(r).invalidWeekday=e}),_i(["d","e","E"],function(e,t,r,n){t[n]=Ie(e)});function _N(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function UN(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Lp(e,t){return e.slice(t,7).concat(e.slice(0,t))}var DN="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Mg="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),FN="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),NN=Mi,zN=Mi,LN=Mi;function RN(e,t){var r=Mr(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Lp(r,this._week.dow):e?r[e.day()]:r}function HN(e){return e===!0?Lp(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function $N(e){return e===!0?Lp(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function GN(e,t,r){var n,s,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)a=Yr([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(a,"").toLocaleLowerCase();return r?t==="dddd"?(s=ht.call(this._weekdaysParse,o),s!==-1?s:null):t==="ddd"?(s=ht.call(this._shortWeekdaysParse,o),s!==-1?s:null):(s=ht.call(this._minWeekdaysParse,o),s!==-1?s:null):t==="dddd"?(s=ht.call(this._weekdaysParse,o),s!==-1||(s=ht.call(this._shortWeekdaysParse,o),s!==-1)?s:(s=ht.call(this._minWeekdaysParse,o),s!==-1?s:null)):t==="ddd"?(s=ht.call(this._shortWeekdaysParse,o),s!==-1||(s=ht.call(this._weekdaysParse,o),s!==-1)?s:(s=ht.call(this._minWeekdaysParse,o),s!==-1?s:null)):(s=ht.call(this._minWeekdaysParse,o),s!==-1||(s=ht.call(this._weekdaysParse,o),s!==-1)?s:(s=ht.call(this._shortWeekdaysParse,o),s!==-1?s:null))}function jN(e,t,r){var n,s,a;if(this._weekdaysParseExact)return GN.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=Yr([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(a="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(a.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function VN(e){if(!this.isValid())return e!=null?this:NaN;var t=Di(this,"Day");return e!=null?(e=_N(e,this.localeData()),this.add(e-t,"d")):t}function WN(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function qN(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=UN(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function YN(e){return this._weekdaysParseExact?(Le(this,"_weekdaysRegex")||Rp.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Le(this,"_weekdaysRegex")||(this._weekdaysRegex=NN),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function KN(e){return this._weekdaysParseExact?(Le(this,"_weekdaysRegex")||Rp.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Le(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=zN),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ZN(e){return this._weekdaysParseExact?(Le(this,"_weekdaysRegex")||Rp.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Le(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=LN),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Rp(){function e(u,d){return d.length-u.length}var t=[],r=[],n=[],s=[],a,o,i,c,l;for(a=0;a<7;a++)o=Yr([2e3,1]).day(a),i=En(this.weekdaysMin(o,"")),c=En(this.weekdaysShort(o,"")),l=En(this.weekdays(o,"")),t.push(i),r.push(c),n.push(l),s.push(i),s.push(c),s.push(l);t.sort(e),r.sort(e),n.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Hp(){return this.hours()%12||12}function XN(){return this.hours()||24}de("H",["HH",2],0,"hour"),de("h",["hh",2],0,Hp),de("k",["kk",2],0,XN),de("hmm",0,0,function(){return""+Hp.apply(this)+Zr(this.minutes(),2)}),de("hmmss",0,0,function(){return""+Hp.apply(this)+Zr(this.minutes(),2)+Zr(this.seconds(),2)}),de("Hmm",0,0,function(){return""+this.hours()+Zr(this.minutes(),2)}),de("Hmmss",0,0,function(){return""+this.hours()+Zr(this.minutes(),2)+Zr(this.seconds(),2)});function _g(e,t){de(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}_g("a",!0),_g("A",!1);function Ug(e,t){return t._meridiemParse}se("a",Ug),se("A",Ug),se("H",Qe,Fp),se("h",Qe,$a),se("k",Qe,$a),se("HH",Qe,or),se("hh",Qe,or),se("kk",Qe,or),se("hmm",kg),se("hmmss",Eg),se("Hmm",kg),se("Hmmss",Eg),We(["H","HH"],vt),We(["k","kk"],function(e,t,r){var n=Ie(e);t[vt]=n===24?0:n}),We(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),We(["h","hh"],function(e,t,r){t[vt]=Ie(e),Ee(r).bigHour=!0}),We("hmm",function(e,t,r){var n=e.length-2;t[vt]=Ie(e.substr(0,n)),t[Ur]=Ie(e.substr(n)),Ee(r).bigHour=!0}),We("hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[vt]=Ie(e.substr(0,n)),t[Ur]=Ie(e.substr(n,2)),t[Tn]=Ie(e.substr(s)),Ee(r).bigHour=!0}),We("Hmm",function(e,t,r){var n=e.length-2;t[vt]=Ie(e.substr(0,n)),t[Ur]=Ie(e.substr(n))}),We("Hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[vt]=Ie(e.substr(0,n)),t[Ur]=Ie(e.substr(n,2)),t[Tn]=Ie(e.substr(s))});function QN(e){return(e+"").toLowerCase().charAt(0)==="p"}var JN=/[ap]\.?m?\.?/i,ez=Ga("Hours",!0);function tz(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var Dg={calendar:GF,longDateFormat:qF,invalidDate:KF,ordinal:XF,dayOfMonthOrdinalParse:QF,relativeTime:eN,months:bN,monthsShort:Sg,week:PN,weekdays:DN,weekdaysMin:FN,weekdaysShort:Mg,meridiemParse:JN},nt={},zi={},Li;function rz(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function Fg(e){return e&&e.toLowerCase().replace("_","-")}function nz(e){for(var t=0,r,n,s,a;t<e.length;){for(a=Fg(e[t]).split("-"),r=a.length,n=Fg(e[t+1]),n=n?n.split("-"):null;r>0;){if(s=Ql(a.slice(0,r).join("-")),s)return s;if(n&&n.length>=r&&rz(a,n)>=r-1)break;r--}t++}return Li}function sz(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Ql(e){var t=null,r;if(nt[e]===void 0&&typeof module<"u"&&module&&module.exports&&sz(e))try{t=Li._abbr,r=require,r("./locale/"+e),es(t)}catch{nt[e]=null}return nt[e]}function es(e,t){var r;return e&&(Yt(t)?r=An(e):r=$p(e,t),r?Li=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Li._abbr}function $p(e,t){if(t!==null){var r,n=Dg;if(t.abbr=e,nt[e]!=null)yg("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=nt[e]._config;else if(t.parentLocale!=null)if(nt[t.parentLocale]!=null)n=nt[t.parentLocale]._config;else if(r=Ql(t.parentLocale),r!=null)n=r._config;else return zi[t.parentLocale]||(zi[t.parentLocale]=[]),zi[t.parentLocale].push({name:e,config:t}),null;return nt[e]=new Ip(Pp(n,t)),zi[e]&&zi[e].forEach(function(s){$p(s.name,s.config)}),es(e),nt[e]}else return delete nt[e],null}function az(e,t){if(t!=null){var r,n,s=Dg;nt[e]!=null&&nt[e].parentLocale!=null?nt[e].set(Pp(nt[e]._config,t)):(n=Ql(e),n!=null&&(s=n._config),t=Pp(s,t),n==null&&(t.abbr=e),r=new Ip(t),r.parentLocale=nt[e],nt[e]=r),es(e)}else nt[e]!=null&&(nt[e].parentLocale!=null?(nt[e]=nt[e].parentLocale,e===es()&&es(e)):nt[e]!=null&&delete nt[e]);return nt[e]}function An(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Li;if(!Mr(e)){if(t=Ql(e),t)return t;e=[e]}return nz(e)}function oz(){return Op(nt)}function Gp(e){var t,r=e._a;return r&&Ee(e).overflow===-2&&(t=r[Cn]<0||r[Cn]>11?Cn:r[Xr]<1||r[Xr]>zp(r[Mt],r[Cn])?Xr:r[vt]<0||r[vt]>24||r[vt]===24&&(r[Ur]!==0||r[Tn]!==0||r[Hs]!==0)?vt:r[Ur]<0||r[Ur]>59?Ur:r[Tn]<0||r[Tn]>59?Tn:r[Hs]<0||r[Hs]>999?Hs:-1,Ee(e)._overflowDayOfYear&&(t<Mt||t>Xr)&&(t=Xr),Ee(e)._overflowWeeks&&t===-1&&(t=uN),Ee(e)._overflowWeekday&&t===-1&&(t=dN),Ee(e).overflow=t),e}var iz=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,cz=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,lz=/Z|[+-]\d\d(?::?\d\d)?/,Jl=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],jp=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],uz=/^\/?Date\((-?\d+)/i,dz=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,fz={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ng(e){var t,r,n=e._i,s=iz.exec(n)||cz.exec(n),a,o,i,c,l=Jl.length,u=jp.length;if(s){for(Ee(e).iso=!0,t=0,r=l;t<r;t++)if(Jl[t][1].exec(s[1])){o=Jl[t][0],a=Jl[t][2]!==!1;break}if(o==null){e._isValid=!1;return}if(s[3]){for(t=0,r=u;t<r;t++)if(jp[t][1].exec(s[3])){i=(s[2]||" ")+jp[t][0];break}if(i==null){e._isValid=!1;return}}if(!a&&i!=null){e._isValid=!1;return}if(s[4])if(lz.exec(s[4]))c="Z";else{e._isValid=!1;return}e._f=o+(i||"")+(c||""),Wp(e)}else e._isValid=!1}function pz(e,t,r,n,s,a){var o=[hz(e),Sg.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(s,10)];return a&&o.push(parseInt(a,10)),o}function hz(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function mz(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function bz(e,t,r){if(e){var n=Mg.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(n!==s)return Ee(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function yz(e,t,r){if(e)return fz[e];if(t)return 0;var n=parseInt(r,10),s=n%100,a=(n-s)/100;return a*60+s}function zg(e){var t=dz.exec(mz(e._i)),r;if(t){if(r=pz(t[4],t[3],t[2],t[5],t[6],t[7]),!bz(t[1],r,e))return;e._a=r,e._tzm=yz(t[8],t[9],t[10]),e._d=Fi.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Ee(e).rfc2822=!0}else e._isValid=!1}function gz(e){var t=uz.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Ng(e),e._isValid===!1)delete e._isValid;else return;if(zg(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:te.createFromInputFallback(e)}te.createFromInputFallback=br("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function ja(e,t,r){return e??t??r}function xz(e){var t=new Date(te.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Vp(e){var t,r,n=[],s,a,o;if(!e._d){for(s=xz(e),e._w&&e._a[Xr]==null&&e._a[Cn]==null&&wz(e),e._dayOfYear!=null&&(o=ja(e._a[Mt],s[Mt]),(e._dayOfYear>Ui(o)||e._dayOfYear===0)&&(Ee(e)._overflowDayOfYear=!0),r=Fi(o,0,e._dayOfYear),e._a[Cn]=r.getUTCMonth(),e._a[Xr]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=s[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[vt]===24&&e._a[Ur]===0&&e._a[Tn]===0&&e._a[Hs]===0&&(e._nextDay=!0,e._a[vt]=0),e._d=(e._useUTC?Fi:SN).apply(null,n),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[vt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(Ee(e).weekdayMismatch=!0)}}function wz(e){var t,r,n,s,a,o,i,c,l;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,o=4,r=ja(t.GG,e._a[Mt],Ni(Je(),1,4).year),n=ja(t.W,1),s=ja(t.E,1),(s<1||s>7)&&(c=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,l=Ni(Je(),a,o),r=ja(t.gg,e._a[Mt],l.year),n=ja(t.w,l.week),t.d!=null?(s=t.d,(s<0||s>6)&&(c=!0)):t.e!=null?(s=t.e+a,(t.e<0||t.e>6)&&(c=!0)):s=a),n<1||n>Sn(r,a,o)?Ee(e)._overflowWeeks=!0:c!=null?Ee(e)._overflowWeekday=!0:(i=Bg(r,n,s,a,o),e._a[Mt]=i.year,e._dayOfYear=i.dayOfYear)}te.ISO_8601=function(){},te.RFC_2822=function(){};function Wp(e){if(e._f===te.ISO_8601){Ng(e);return}if(e._f===te.RFC_2822){zg(e);return}e._a=[],Ee(e).empty=!0;var t=""+e._i,r,n,s,a,o,i=t.length,c=0,l,u;for(s=gg(e._f,e._locale).match(Bp)||[],u=s.length,r=0;r<u;r++)a=s[r],n=(t.match(iN(a,e))||[])[0],n&&(o=t.substr(0,t.indexOf(n)),o.length>0&&Ee(e).unusedInput.push(o),t=t.slice(t.indexOf(n)+n.length),c+=n.length),Ra[a]?(n?Ee(e).empty=!1:Ee(e).unusedTokens.push(a),lN(a,n,e)):e._strict&&!n&&Ee(e).unusedTokens.push(a);Ee(e).charsLeftOver=i-c,t.length>0&&Ee(e).unusedInput.push(t),e._a[vt]<=12&&Ee(e).bigHour===!0&&e._a[vt]>0&&(Ee(e).bigHour=void 0),Ee(e).parsedDateParts=e._a.slice(0),Ee(e).meridiem=e._meridiem,e._a[vt]=vz(e._locale,e._a[vt],e._meridiem),l=Ee(e).era,l!==null&&(e._a[Mt]=e._locale.erasConvertYear(l,e._a[Mt])),Vp(e),Gp(e)}function vz(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function kz(e){var t,r,n,s,a,o,i=!1,c=e._f.length;if(c===0){Ee(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<c;s++)a=0,o=!1,t=Ap({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],Wp(t),Tp(t)&&(o=!0),a+=Ee(t).charsLeftOver,a+=Ee(t).unusedTokens.length*10,Ee(t).score=a,i?a<n&&(n=a,r=t):(n==null||a<n||o)&&(n=a,r=t,o&&(i=!0));Jn(e,r||t)}function Ez(e){if(!e._d){var t=_p(e._i),r=t.day===void 0?t.date:t.day;e._a=pg([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),Vp(e)}}function Cz(e){var t=new Bi(Gp(Lg(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Lg(e){var t=e._i,r=e._f;return e._locale=e._locale||An(e._l),t===null||r===void 0&&t===""?Hl({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),_r(t)?new Bi(Gp(t)):(Oi(t)?e._d=t:Mr(r)?kz(e):r?Wp(e):Tz(e),Tp(e)||(e._d=null),e))}function Tz(e){var t=e._i;Yt(t)?e._d=new Date(te.now()):Oi(t)?e._d=new Date(t.valueOf()):typeof t=="string"?gz(e):Mr(t)?(e._a=pg(t.slice(0),function(r){return parseInt(r,10)}),Vp(e)):Rs(t)?Ez(e):kn(t)?e._d=new Date(t):te.createFromInputFallback(e)}function Rg(e,t,r,n,s){var a={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(Rs(e)&&Ep(e)||Mr(e)&&e.length===0)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=s,a._l=r,a._i=e,a._f=t,a._strict=n,Cz(a)}function Je(e,t,r,n){return Rg(e,t,r,n,!1)}var Sz=br("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Je.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Hl()}),Az=br("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Je.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Hl()});function Hg(e,t){var r,n;if(t.length===1&&Mr(t[0])&&(t=t[0]),!t.length)return Je();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function Pz(){var e=[].slice.call(arguments,0);return Hg("isBefore",e)}function Iz(){var e=[].slice.call(arguments,0);return Hg("isAfter",e)}var Oz=function(){return Date.now?Date.now():+new Date},Ri=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Bz(e){var t,r=!1,n,s=Ri.length;for(t in e)if(Le(e,t)&&!(ht.call(Ri,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<s;++n)if(e[Ri[n]]){if(r)return!1;parseFloat(e[Ri[n]])!==Ie(e[Ri[n]])&&(r=!0)}return!0}function Mz(){return this._isValid}function _z(){return Dr(NaN)}function eu(e){var t=_p(e),r=t.year||0,n=t.quarter||0,s=t.month||0,a=t.week||t.isoWeek||0,o=t.day||0,i=t.hour||0,c=t.minute||0,l=t.second||0,u=t.millisecond||0;this._isValid=Bz(t),this._milliseconds=+u+l*1e3+c*6e4+i*1e3*60*60,this._days=+o+a*7,this._months=+s+n*3+r*12,this._data={},this._locale=An(),this._bubble()}function tu(e){return e instanceof eu}function qp(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Uz(e,t,r){var n=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),a=0,o;for(o=0;o<n;o++)Ie(e[o])!==Ie(t[o])&&a++;return a+s}function $g(e,t){de(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+Zr(~~(r/60),2)+t+Zr(~~r%60,2)})}$g("Z",":"),$g("ZZ",""),se("Z",Yl),se("ZZ",Yl),We(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=Yp(Yl,e)});var Dz=/([\+\-]|\d\d)/gi;function Yp(e,t){var r=(t||"").match(e),n,s,a;return r===null?null:(n=r[r.length-1]||[],s=(n+"").match(Dz)||["-",0,0],a=+(s[1]*60)+Ie(s[2]),a===0?0:s[0]==="+"?a:-a)}function Kp(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(_r(e)||Oi(e)?e.valueOf():Je(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),te.updateOffset(r,!1),r):Je(e).local()}function Zp(e){return-Math.round(e._d.getTimezoneOffset())}te.updateOffset=function(){};function Fz(e,t,r){var n=this._offset||0,s;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Yp(Yl,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(s=Zp(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),n!==e&&(!t||this._changeInProgress?Wg(this,Dr(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,te.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:Zp(this)}function Nz(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function zz(e){return this.utcOffset(0,e)}function Lz(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Zp(this),"m")),this}function Rz(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Yp(aN,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Hz(e){return this.isValid()?(e=e?Je(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function $z(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Gz(){if(!Yt(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Ap(e,this),e=Lg(e),e._a?(t=e._isUTC?Yr(e._a):Je(e._a),this._isDSTShifted=this.isValid()&&Uz(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function jz(){return this.isValid()?!this._isUTC:!1}function Vz(){return this.isValid()?this._isUTC:!1}function Gg(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Wz=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,qz=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Dr(e,t){var r=e,n=null,s,a,o;return tu(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:kn(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=Wz.exec(e))?(s=n[1]==="-"?-1:1,r={y:0,d:Ie(n[Xr])*s,h:Ie(n[vt])*s,m:Ie(n[Ur])*s,s:Ie(n[Tn])*s,ms:Ie(qp(n[Hs]*1e3))*s}):(n=qz.exec(e))?(s=n[1]==="-"?-1:1,r={y:$s(n[2],s),M:$s(n[3],s),w:$s(n[4],s),d:$s(n[5],s),h:$s(n[6],s),m:$s(n[7],s),s:$s(n[8],s)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(o=Yz(Je(r.from),Je(r.to)),r={},r.ms=o.milliseconds,r.M=o.months),a=new eu(r),tu(e)&&Le(e,"_locale")&&(a._locale=e._locale),tu(e)&&Le(e,"_isValid")&&(a._isValid=e._isValid),a}Dr.fn=eu.prototype,Dr.invalid=_z;function $s(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function jg(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function Yz(e,t){var r;return e.isValid()&&t.isValid()?(t=Kp(t,e),e.isBefore(t)?r=jg(e,t):(r=jg(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Vg(e,t){return function(r,n){var s,a;return n!==null&&!isNaN(+n)&&(yg(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=r,r=n,n=a),s=Dr(r,n),Wg(this,s,e),this}}function Wg(e,t,r,n){var s=t._milliseconds,a=qp(t._days),o=qp(t._months);e.isValid()&&(n=n??!0,o&&Pg(e,Di(e,"Month")+o*r),a&&Tg(e,"Date",Di(e,"Date")+a*r),s&&e._d.setTime(e._d.valueOf()+s*r),n&&te.updateOffset(e,a||o))}var Kz=Vg(1,"add"),Zz=Vg(-1,"subtract");function qg(e){return typeof e=="string"||e instanceof String}function Xz(e){return _r(e)||Oi(e)||qg(e)||kn(e)||Jz(e)||Qz(e)||e===null||e===void 0}function Qz(e){var t=Rs(e)&&!Ep(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,a,o=n.length;for(s=0;s<o;s+=1)a=n[s],r=r||Le(e,a);return t&&r}function Jz(e){var t=Mr(e),r=!1;return t&&(r=e.filter(function(n){return!kn(n)&&qg(e)}).length===0),t&&r}function eL(e){var t=Rs(e)&&!Ep(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,a;for(s=0;s<n.length;s+=1)a=n[s],r=r||Le(e,a);return t&&r}function tL(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function rL(e,t){arguments.length===1&&(arguments[0]?Xz(arguments[0])?(e=arguments[0],t=void 0):eL(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Je(),n=Kp(r,this).startOf("day"),s=te.calendarFormat(this,n)||"sameElse",a=t&&(Kr(t[s])?t[s].call(this,r):t[s]);return this.format(a||this.localeData().calendar(s,this,Je(r)))}function nL(){return new Bi(this)}function sL(e,t){var r=_r(e)?e:Je(e);return this.isValid()&&r.isValid()?(t=yr(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function aL(e,t){var r=_r(e)?e:Je(e);return this.isValid()&&r.isValid()?(t=yr(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function oL(e,t,r,n){var s=_r(e)?e:Je(e),a=_r(t)?t:Je(t);return this.isValid()&&s.isValid()&&a.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(s,r):!this.isBefore(s,r))&&(n[1]===")"?this.isBefore(a,r):!this.isAfter(a,r))):!1}function iL(e,t){var r=_r(e)?e:Je(e),n;return this.isValid()&&r.isValid()?(t=yr(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function cL(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function lL(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function uL(e,t,r){var n,s,a;if(!this.isValid())return NaN;if(n=Kp(e,this),!n.isValid())return NaN;switch(s=(n.utcOffset()-this.utcOffset())*6e4,t=yr(t),t){case"year":a=ru(this,n)/12;break;case"month":a=ru(this,n);break;case"quarter":a=ru(this,n)/3;break;case"second":a=(this-n)/1e3;break;case"minute":a=(this-n)/6e4;break;case"hour":a=(this-n)/36e5;break;case"day":a=(this-n-s)/864e5;break;case"week":a=(this-n-s)/6048e5;break;default:a=this-n}return r?a:gr(a)}function ru(e,t){if(e.date()<t.date())return-ru(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),s,a;return t-n<0?(s=e.clone().add(r-1,"months"),a=(t-n)/(n-s)):(s=e.clone().add(r+1,"months"),a=(t-n)/(s-n)),-(r+a)||0}te.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",te.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function dL(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function fL(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?Gl(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Kr(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Gl(r,"Z")):Gl(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function pL(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,s,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(r+n+s+a)}function hL(e){e||(e=this.isUtc()?te.defaultFormatUtc:te.defaultFormat);var t=Gl(this,e);return this.localeData().postformat(t)}function mL(e,t){return this.isValid()&&(_r(e)&&e.isValid()||Je(e).isValid())?Dr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function bL(e){return this.from(Je(),e)}function yL(e,t){return this.isValid()&&(_r(e)&&e.isValid()||Je(e).isValid())?Dr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function gL(e){return this.to(Je(),e)}function Yg(e){var t;return e===void 0?this._locale._abbr:(t=An(e),t!=null&&(this._locale=t),this)}var Kg=br("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Zg(){return this._locale}var nu=1e3,Va=60*nu,su=60*Va,Xg=(365*400+97)*24*su;function Wa(e,t){return(e%t+t)%t}function Qg(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-Xg:new Date(e,t,r).valueOf()}function Jg(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-Xg:Date.UTC(e,t,r)}function xL(e){var t,r;if(e=yr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Jg:Qg,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Wa(t+(this._isUTC?0:this.utcOffset()*Va),su);break;case"minute":t=this._d.valueOf(),t-=Wa(t,Va);break;case"second":t=this._d.valueOf(),t-=Wa(t,nu);break}return this._d.setTime(t),te.updateOffset(this,!0),this}function wL(e){var t,r;if(e=yr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Jg:Qg,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=su-Wa(t+(this._isUTC?0:this.utcOffset()*Va),su)-1;break;case"minute":t=this._d.valueOf(),t+=Va-Wa(t,Va)-1;break;case"second":t=this._d.valueOf(),t+=nu-Wa(t,nu)-1;break}return this._d.setTime(t),te.updateOffset(this,!0),this}function vL(){return this._d.valueOf()-(this._offset||0)*6e4}function kL(){return Math.floor(this.valueOf()/1e3)}function EL(){return new Date(this.valueOf())}function CL(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function TL(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function SL(){return this.isValid()?this.toISOString():null}function AL(){return Tp(this)}function PL(){return Jn({},Ee(this))}function IL(){return Ee(this).overflow}function OL(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}de("N",0,0,"eraAbbr"),de("NN",0,0,"eraAbbr"),de("NNN",0,0,"eraAbbr"),de("NNNN",0,0,"eraName"),de("NNNNN",0,0,"eraNarrow"),de("y",["y",1],"yo","eraYear"),de("y",["yy",2],0,"eraYear"),de("y",["yyy",3],0,"eraYear"),de("y",["yyyy",4],0,"eraYear"),se("N",Xp),se("NN",Xp),se("NNN",Xp),se("NNNN",HL),se("NNNNN",$L),We(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?Ee(r).era=s:Ee(r).invalidEra=e}),se("y",Ha),se("yy",Ha),se("yyy",Ha),se("yyyy",Ha),se("yo",GL),We(["y","yy","yyy","yyyy"],Mt),We(["yo"],function(e,t,r,n){var s;r._locale._eraYearOrdinalRegex&&(s=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Mt]=r._locale.eraYearOrdinalParse(e,s):t[Mt]=parseInt(e,10)});function BL(e,t){var r,n,s,a=this._eras||An("en")._eras;for(r=0,n=a.length;r<n;++r){switch(typeof a[r].since){case"string":s=te(a[r].since).startOf("day"),a[r].since=s.valueOf();break}switch(typeof a[r].until){case"undefined":a[r].until=1/0;break;case"string":s=te(a[r].until).startOf("day").valueOf(),a[r].until=s.valueOf();break}}return a}function ML(e,t,r){var n,s,a=this.eras(),o,i,c;for(e=e.toUpperCase(),n=0,s=a.length;n<s;++n)if(o=a[n].name.toUpperCase(),i=a[n].abbr.toUpperCase(),c=a[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(i===e)return a[n];break;case"NNNN":if(o===e)return a[n];break;case"NNNNN":if(c===e)return a[n];break}else if([o,i,c].indexOf(e)>=0)return a[n]}function _L(e,t){var r=e.since<=e.until?1:-1;return t===void 0?te(e.since).year():te(e.since).year()+(t-e.offset)*r}function UL(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function DL(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function FL(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function NL(){var e,t,r,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(r=s[e].since<=s[e].until?1:-1,n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until||s[e].until<=n&&n<=s[e].since)return(this.year()-te(s[e].since).year())*r+s[e].offset;return this.year()}function zL(e){return Le(this,"_erasNameRegex")||Qp.call(this),e?this._erasNameRegex:this._erasRegex}function LL(e){return Le(this,"_erasAbbrRegex")||Qp.call(this),e?this._erasAbbrRegex:this._erasRegex}function RL(e){return Le(this,"_erasNarrowRegex")||Qp.call(this),e?this._erasNarrowRegex:this._erasRegex}function Xp(e,t){return t.erasAbbrRegex(e)}function HL(e,t){return t.erasNameRegex(e)}function $L(e,t){return t.erasNarrowRegex(e)}function GL(e,t){return t._eraYearOrdinalRegex||Ha}function Qp(){var e=[],t=[],r=[],n=[],s,a,o,i,c,l=this.eras();for(s=0,a=l.length;s<a;++s)o=En(l[s].name),i=En(l[s].abbr),c=En(l[s].narrow),t.push(o),e.push(i),r.push(c),n.push(o),n.push(i),n.push(c);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}de(0,["gg",2],0,function(){return this.weekYear()%100}),de(0,["GG",2],0,function(){return this.isoWeekYear()%100});function au(e,t){de(0,[e,e.length],0,t)}au("gggg","weekYear"),au("ggggg","weekYear"),au("GGGG","isoWeekYear"),au("GGGGG","isoWeekYear"),se("G",ql),se("g",ql),se("GG",Qe,or),se("gg",Qe,or),se("GGGG",Dp,Up),se("gggg",Dp,Up),se("GGGGG",Wl,jl),se("ggggg",Wl,jl),_i(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=Ie(e)}),_i(["gg","GG"],function(e,t,r,n){t[n]=te.parseTwoDigitYear(e)});function jL(e){return e6.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function VL(e){return e6.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function WL(){return Sn(this.year(),1,4)}function qL(){return Sn(this.isoWeekYear(),1,4)}function YL(){var e=this.localeData()._week;return Sn(this.year(),e.dow,e.doy)}function KL(){var e=this.localeData()._week;return Sn(this.weekYear(),e.dow,e.doy)}function e6(e,t,r,n,s){var a;return e==null?Ni(this,n,s).year:(a=Sn(e,n,s),t>a&&(t=a),ZL.call(this,e,t,r,n,s))}function ZL(e,t,r,n,s){var a=Bg(e,t,r,n,s),o=Fi(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}de("Q",0,"Qo","quarter"),se("Q",wg),We("Q",function(e,t){t[Cn]=(Ie(e)-1)*3});function XL(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}de("D",["DD",2],"Do","date"),se("D",Qe,$a),se("DD",Qe,or),se("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),We(["D","DD"],Xr),We("Do",function(e,t){t[Xr]=Ie(e.match(Qe)[0])});var t6=Ga("Date",!0);de("DDD",["DDDD",3],"DDDo","dayOfYear"),se("DDD",Vl),se("DDDD",vg),We(["DDD","DDDD"],function(e,t,r){r._dayOfYear=Ie(e)});function QL(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}de("m",["mm",2],0,"minute"),se("m",Qe,Fp),se("mm",Qe,or),We(["m","mm"],Ur);var JL=Ga("Minutes",!1);de("s",["ss",2],0,"second"),se("s",Qe,Fp),se("ss",Qe,or),We(["s","ss"],Tn);var eR=Ga("Seconds",!1);de("S",0,0,function(){return~~(this.millisecond()/100)}),de(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),de(0,["SSS",3],0,"millisecond"),de(0,["SSSS",4],0,function(){return this.millisecond()*10}),de(0,["SSSSS",5],0,function(){return this.millisecond()*100}),de(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),de(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),de(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),de(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),se("S",Vl,wg),se("SS",Vl,or),se("SSS",Vl,vg);var ts,r6;for(ts="SSSS";ts.length<=9;ts+="S")se(ts,Ha);function tR(e,t){t[Hs]=Ie(("0."+e)*1e3)}for(ts="S";ts.length<=9;ts+="S")We(ts,tR);r6=Ga("Milliseconds",!1),de("z",0,0,"zoneAbbr"),de("zz",0,0,"zoneName");function rR(){return this._isUTC?"UTC":""}function nR(){return this._isUTC?"Coordinated Universal Time":""}var q=Bi.prototype;q.add=Kz,q.calendar=rL,q.clone=nL,q.diff=uL,q.endOf=wL,q.format=hL,q.from=mL,q.fromNow=bL,q.to=yL,q.toNow=gL,q.get=pN,q.invalidAt=IL,q.isAfter=sL,q.isBefore=aL,q.isBetween=oL,q.isSame=iL,q.isSameOrAfter=cL,q.isSameOrBefore=lL,q.isValid=AL,q.lang=Kg,q.locale=Yg,q.localeData=Zg,q.max=Az,q.min=Sz,q.parsingFlags=PL,q.set=hN,q.startOf=xL,q.subtract=Zz,q.toArray=CL,q.toObject=TL,q.toDate=EL,q.toISOString=fL,q.inspect=pL,typeof Symbol<"u"&&Symbol.for!=null&&(q[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),q.toJSON=SL,q.toString=dL,q.unix=kL,q.valueOf=vL,q.creationData=OL,q.eraName=UL,q.eraNarrow=DL,q.eraAbbr=FL,q.eraYear=NL,q.year=Cg,q.isLeapYear=fN,q.weekYear=jL,q.isoWeekYear=VL,q.quarter=q.quarters=XL,q.month=Ig,q.daysInMonth=EN,q.week=q.weeks=BN,q.isoWeek=q.isoWeeks=MN,q.weeksInYear=YL,q.weeksInWeekYear=KL,q.isoWeeksInYear=WL,q.isoWeeksInISOWeekYear=qL,q.date=t6,q.day=q.days=VN,q.weekday=WN,q.isoWeekday=qN,q.dayOfYear=QL,q.hour=q.hours=ez,q.minute=q.minutes=JL,q.second=q.seconds=eR,q.millisecond=q.milliseconds=r6,q.utcOffset=Fz,q.utc=zz,q.local=Lz,q.parseZone=Rz,q.hasAlignedHourOffset=Hz,q.isDST=$z,q.isLocal=jz,q.isUtcOffset=Vz,q.isUtc=Gg,q.isUTC=Gg,q.zoneAbbr=rR,q.zoneName=nR,q.dates=br("dates accessor is deprecated. Use date instead.",t6),q.months=br("months accessor is deprecated. Use month instead",Ig),q.years=br("years accessor is deprecated. Use year instead",Cg),q.zone=br("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Nz),q.isDSTShifted=br("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Gz);function sR(e){return Je(e*1e3)}function aR(){return Je.apply(null,arguments).parseZone()}function n6(e){return e}var Re=Ip.prototype;Re.calendar=jF,Re.longDateFormat=YF,Re.invalidDate=ZF,Re.ordinal=JF,Re.preparse=n6,Re.postformat=n6,Re.relativeTime=tN,Re.pastFuture=rN,Re.set=$F,Re.eras=BL,Re.erasParse=ML,Re.erasConvertYear=_L,Re.erasAbbrRegex=LL,Re.erasNameRegex=zL,Re.erasNarrowRegex=RL,Re.months=xN,Re.monthsShort=wN,Re.monthsParse=kN,Re.monthsRegex=TN,Re.monthsShortRegex=CN,Re.week=AN,Re.firstDayOfYear=ON,Re.firstDayOfWeek=IN,Re.weekdays=RN,Re.weekdaysMin=$N,Re.weekdaysShort=HN,Re.weekdaysParse=jN,Re.weekdaysRegex=YN,Re.weekdaysShortRegex=KN,Re.weekdaysMinRegex=ZN,Re.isPM=QN,Re.meridiem=tz;function ou(e,t,r,n){var s=An(),a=Yr().set(n,t);return s[r](a,e)}function s6(e,t,r){if(kn(e)&&(t=e,e=void 0),e=e||"",t!=null)return ou(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=ou(e,n,r,"month");return s}function Jp(e,t,r,n){typeof e=="boolean"?(kn(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,kn(t)&&(r=t,t=void 0),t=t||"");var s=An(),a=e?s._week.dow:0,o,i=[];if(r!=null)return ou(t,(r+a)%7,n,"day");for(o=0;o<7;o++)i[o]=ou(t,(o+a)%7,n,"day");return i}function oR(e,t){return s6(e,t,"months")}function iR(e,t){return s6(e,t,"monthsShort")}function cR(e,t,r){return Jp(e,t,r,"weekdays")}function lR(e,t,r){return Jp(e,t,r,"weekdaysShort")}function uR(e,t,r){return Jp(e,t,r,"weekdaysMin")}es("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=Ie(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}}),te.lang=br("moment.lang is deprecated. Use moment.locale instead.",es),te.langData=br("moment.langData is deprecated. Use moment.localeData instead.",An);var Pn=Math.abs;function dR(){var e=this._data;return this._milliseconds=Pn(this._milliseconds),this._days=Pn(this._days),this._months=Pn(this._months),e.milliseconds=Pn(e.milliseconds),e.seconds=Pn(e.seconds),e.minutes=Pn(e.minutes),e.hours=Pn(e.hours),e.months=Pn(e.months),e.years=Pn(e.years),this}function a6(e,t,r,n){var s=Dr(t,r);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function fR(e,t){return a6(this,e,t,1)}function pR(e,t){return a6(this,e,t,-1)}function o6(e){return e<0?Math.floor(e):Math.ceil(e)}function hR(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,s,a,o,i,c;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=o6(e0(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,s=gr(e/1e3),n.seconds=s%60,a=gr(s/60),n.minutes=a%60,o=gr(a/60),n.hours=o%24,t+=gr(o/24),c=gr(i6(t)),r+=c,t-=o6(e0(c)),i=gr(r/12),r%=12,n.days=t,n.months=r,n.years=i,this}function i6(e){return e*4800/146097}function e0(e){return e*146097/4800}function mR(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=yr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+i6(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(e0(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function In(e){return function(){return this.as(e)}}var c6=In("ms"),bR=In("s"),yR=In("m"),gR=In("h"),xR=In("d"),wR=In("w"),vR=In("M"),kR=In("Q"),ER=In("y"),CR=c6;function TR(){return Dr(this)}function SR(e){return e=yr(e),this.isValid()?this[e+"s"]():NaN}function Gs(e){return function(){return this.isValid()?this._data[e]:NaN}}var AR=Gs("milliseconds"),PR=Gs("seconds"),IR=Gs("minutes"),OR=Gs("hours"),BR=Gs("days"),MR=Gs("months"),_R=Gs("years");function UR(){return gr(this.days()/7)}var On=Math.round,qa={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function DR(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}function FR(e,t,r,n){var s=Dr(e).abs(),a=On(s.as("s")),o=On(s.as("m")),i=On(s.as("h")),c=On(s.as("d")),l=On(s.as("M")),u=On(s.as("w")),d=On(s.as("y")),p=a<=r.ss&&["s",a]||a<r.s&&["ss",a]||o<=1&&["m"]||o<r.m&&["mm",o]||i<=1&&["h"]||i<r.h&&["hh",i]||c<=1&&["d"]||c<r.d&&["dd",c];return r.w!=null&&(p=p||u<=1&&["w"]||u<r.w&&["ww",u]),p=p||l<=1&&["M"]||l<r.M&&["MM",l]||d<=1&&["y"]||["yy",d],p[2]=t,p[3]=+e>0,p[4]=n,DR.apply(null,p)}function NR(e){return e===void 0?On:typeof e=="function"?(On=e,!0):!1}function zR(e,t){return qa[e]===void 0?!1:t===void 0?qa[e]:(qa[e]=t,e==="s"&&(qa.ss=t-1),!0)}function LR(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=qa,s,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},qa,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),s=this.localeData(),a=FR(this,!r,n,s),r&&(a=s.pastFuture(+this,a)),s.postformat(a)}var t0=Math.abs;function Ya(e){return(e>0)-(e<0)||+e}function iu(){if(!this.isValid())return this.localeData().invalidDate();var e=t0(this._milliseconds)/1e3,t=t0(this._days),r=t0(this._months),n,s,a,o,i=this.asSeconds(),c,l,u,d;return i?(n=gr(e/60),s=gr(n/60),e%=60,n%=60,a=gr(r/12),r%=12,o=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=i<0?"-":"",l=Ya(this._months)!==Ya(i)?"-":"",u=Ya(this._days)!==Ya(i)?"-":"",d=Ya(this._milliseconds)!==Ya(i)?"-":"",c+"P"+(a?l+a+"Y":"")+(r?l+r+"M":"")+(t?u+t+"D":"")+(s||n||e?"T":"")+(s?d+s+"H":"")+(n?d+n+"M":"")+(e?d+o+"S":"")):"P0D"}var De=eu.prototype;De.isValid=Mz,De.abs=dR,De.add=fR,De.subtract=pR,De.as=mR,De.asMilliseconds=c6,De.asSeconds=bR,De.asMinutes=yR,De.asHours=gR,De.asDays=xR,De.asWeeks=wR,De.asMonths=vR,De.asQuarters=kR,De.asYears=ER,De.valueOf=CR,De._bubble=hR,De.clone=TR,De.get=SR,De.milliseconds=AR,De.seconds=PR,De.minutes=IR,De.hours=OR,De.days=BR,De.weeks=UR,De.months=MR,De.years=_R,De.humanize=LR,De.toISOString=iu,De.toString=iu,De.toJSON=iu,De.locale=Yg,De.localeData=Zg,De.toIsoString=br("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",iu),De.lang=Kg,de("X",0,0,"unix"),de("x",0,0,"valueOf"),se("x",ql),se("X",oN),We("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)}),We("x",function(e,t,r){r._d=new Date(Ie(e))});//! moment.js
|
|
55
|
+
te.version="2.30.1",RF(Je),te.fn=q,te.min=Pz,te.max=Iz,te.now=Oz,te.utc=Yr,te.unix=sR,te.months=oR,te.isDate=Oi,te.locale=es,te.invalid=Hl,te.duration=Dr,te.isMoment=_r,te.weekdays=cR,te.parseZone=aR,te.localeData=An,te.isDuration=tu,te.monthsShort=iR,te.weekdaysMin=uR,te.defineLocale=$p,te.updateLocale=az,te.locales=oz,te.weekdaysShort=lR,te.normalizeUnits=yr,te.relativeTimeRounding=NR,te.relativeTimeThreshold=zR,te.calendarFormat=tL,te.prototype=q,te.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function RR(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}var r0;(function(e){e.event="event",e.props="prop"})(r0||(r0={}));function n0(){}function HR(e){var t,r=void 0;return function(){for(var n=[],s=arguments.length;s--;)n[s]=arguments[s];return t&&n.length===t.length&&n.every(function(a,o){return a===t[o]})||(t=n,r=e.apply(void 0,n)),r}}function l6(e){return!!(e||"").match(/\d/)}function Ka(e){return e==null}function $R(e){return typeof e=="number"&&isNaN(e)}function u6(e){return Ka(e)||$R(e)||typeof e=="number"&&!isFinite(e)}function d6(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function GR(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function jR(e,t,r){var n=GR(r),s=e.search(/[1-9]/);return s=s===-1?e.length:s,e.substring(0,s)+e.substring(s,e.length).replace(n,"$1"+t)}function VR(e){var t=F.useRef(e);t.current=e;var r=F.useRef(function(){for(var n=[],s=arguments.length;s--;)n[s]=arguments[s];return t.current.apply(t,n)});return r.current}function s0(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var s=e.split("."),a=s[0],o=s[1]||"";return{beforeDecimal:a,afterDecimal:o,hasNegation:r,addNegation:n}}function WR(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",s=r[1]||"";return(t?"-":"")+n+(s?"."+s:"")}function f6(e,t,r){for(var n="",s=r?"0":"",a=0;a<=t-1;a++)n+=e[a]||s;return n}function p6(e,t){return Array(t+1).join(e)}function h6(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),s=n[0],a=n[1];if(a=Number(a),!a)return r+s;s=s.replace(".","");var o=1+a,i=s.length;return o<0?s="0."+p6("0",Math.abs(o))+s:o>=i?s=s+p6("0",o-i):s=(s.substring(0,o)||"0")+"."+s.substring(o),r+s}function m6(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,s=s0(e),a=s.beforeDecimal,o=s.afterDecimal,i=s.hasNegation,c=parseFloat("0."+(o||"0")),l=o.length<=t?"0."+o:c.toFixed(t),u=l.split("."),d=a;a&&Number(u[0])&&(d=a.split("").reverse().reduce(function(g,k,v){return g.length>v?(Number(g[0])+Number(k)).toString()+g.substring(1,g.length):k+g},u[0]));var p=f6(u[1]||"",t,r),h=i?"-":"",y=n?".":"";return""+h+d+y+p}function Hi(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var qR=HR(function(e,t){for(var r=0,n=0,s=e.length,a=t.length;e[r]===t[r]&&r<s;)r++;for(;e[s-1-n]===t[a-1-n]&&a-n>r&&s-n>r;)n++;return{from:{start:r,end:s-n},to:{start:r,end:a-n}}});function YR(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function KR(e,t,r,n,s,a){a===void 0&&(a=n0);var o=VR(function(y,g){var k,v;return u6(y)?(v="",k=""):typeof y=="number"||g?(v=typeof y=="number"?h6(y):y,k=n(v)):(v=s(y,void 0),k=n(v)),{formattedValue:k,numAsString:v}}),i=F.useState(function(){return o(Ka(e)?t:e,r)}),c=i[0],l=i[1],u=function(y,g){y.formattedValue!==c.formattedValue&&l({formattedValue:y.formattedValue,numAsString:y.value}),a(y,g)},d=e,p=r;Ka(e)&&(d=c.numAsString,p=!0);var h=o(d,p);return F.useMemo(function(){l(h)},[h.formattedValue]),[c,u]}function b6(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,s=t.prefix;s===void 0&&(s="");var a=t.suffix;a===void 0&&(a="");var o=t.allowNegative,i=t.thousandsGroupStyle;if(i===void 0&&(i="thousand"),e===""||e==="-")return e;var c=cu(t),l=c.thousandSeparator,u=c.decimalSeparator,d=r!==0&&e.indexOf(".")!==-1||r&&n,p=s0(e,o),h=p.beforeDecimal,y=p.afterDecimal,g=p.addNegation;return r!==void 0&&(y=f6(y,r,!!n)),l&&(h=jR(h,l,i)),s&&(h=s+h),a&&(y=y+a),g&&(h="-"+h),e=h+(d&&u||"")+y,e}function cu(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function ZR(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),s=r.test(e),a=n.test(e);return e=e.replace(/-/g,""),s&&!a&&t&&(e="-"+e),e}function XR(e,t){return new RegExp("(^-)|[0-9]|"+d6(e),"g")}function QR(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function JR(e,t,r){var n;t===void 0&&(t=YR(e));var s=r.allowNegative,a=r.prefix;a===void 0&&(a="");var o=r.suffix;o===void 0&&(o="");var i=r.decimalScale,c=t.from,l=t.to,u=l.start,d=l.end,p=cu(r),h=p.allowedDecimalSeparators,y=p.decimalSeparator,g=e[d]===y;if(l6(e)&&(e===a||e===o)&&t.lastValue==="")return e;if(d-u===1&&h.indexOf(e[u])!==-1){var k=i===0?"":y;e=e.substring(0,u)+k+e.substring(u+1,e.length)}var v=function(_,M,L){var H=!1,G=!1;a.startsWith("-")?H=!1:_.startsWith("--")?(H=!1,G=!0):o.startsWith("-")&&_.length===o.length?H=!1:_[0]==="-"&&(H=!0);var J=H?1:0;return G&&(J=2),J&&(_=_.substring(J),M-=J,L-=J),{value:_,start:M,end:L,hasNegation:H}},w=v(e,u,d),S=w.hasNegation;n=w,e=n.value,u=n.start,d=n.end;var C=v(t.lastValue,c.start,c.end),U=C.start,z=C.end,T=C.value,m=e.substring(u,d);e.length&&T.length&&(U>T.length-o.length||z<a.length)&&!(m&&o.startsWith(m))&&(e=T);var b=0;e.startsWith(a)?b+=a.length:u<a.length&&(b=u),e=e.substring(b),d-=b;var x=e.length,A=e.length-o.length;e.endsWith(o)?x=A:(d>A||d>e.length-o.length)&&(x=d),e=e.substring(0,x),e=ZR(S?"-"+e:e,s),e=(e.match(XR(y))||[]).join("");var I=e.indexOf(y);e=e.replace(new RegExp(d6(y),"g"),function(_,M){return M===I?".":""});var O=s0(e,s),D=O.beforeDecimal,E=O.afterDecimal,P=O.addNegation;return l.end-l.start<c.end-c.start&&D===""&&g&&!parseFloat(E)&&(e=P?"-":""),e}function eH(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var s=Array.from({length:e.length+1}).map(function(){return!0}),a=e[0]==="-";s.fill(!1,0,r.length+(a?1:0));var o=e.length;return s.fill(!1,o-n.length+1,o+1),s}function tH(e){var t=cu(e),r=t.thousandSeparator,n=t.decimalSeparator,s=e.prefix;s===void 0&&(s="");var a=e.allowNegative;if(a===void 0&&(a=!0),r===n)throw new Error(`
|
|
56
56
|
Decimal separator can't be same as thousand separator.
|
|
57
57
|
thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
58
58
|
decimalSeparator: `+n+` (default value for decimalSeparator is .)
|
|
@@ -60,4 +60,4 @@ te.version="2.30.1",IF(Je),te.fn=q,te.min=yz,te.max=gz,te.now=xz,te.utc=Yr,te.un
|
|
|
60
60
|
Prefix can't start with '-' when allowNegative is true.
|
|
61
61
|
prefix: `+s+`
|
|
62
62
|
allowNegative: `+a+`
|
|
63
|
-
`),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function VR(e){e=jR(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,r=e.allowNegative,n=e.allowLeadingZeros,s=e.onKeyDown;s===void 0&&(s=Jp);var a=e.onBlur;a===void 0&&(a=Jp);var o=e.thousandSeparator,i=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l="");var u=e.defaultValue,d=e.value,p=e.valueIsNumericString,h=e.onValueChange,y=IR(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),g=iu(e),k=g.decimalSeparator,v=g.allowedDecimalSeparators,w=function(P){return f6(P,e)},S=function(P,M){return $R(P,M,e)},C=Ka(d)?u:d,_=p??HR(C,l,t);Ka(d)?Ka(u)||(_=_||typeof u=="number"):_=_||typeof d=="number";var z=function(P){return o6(P)?P:(typeof P=="number"&&(P=u6(P)),_&&typeof i=="number"?d6(P,i,!!c):P)},T=zR(z(d),z(u),!!_,w,S,h),m=T[0],b=m.numAsString,x=m.formattedValue,A=T[1],I=function(P){var M=P.target,B=P.key,L=M.selectionStart,H=M.selectionEnd,G=M.value;if(G===void 0&&(G=""),(B==="Backspace"||B==="Delete")&&H<l.length){P.preventDefault();return}if(L!==H){s(P);return}B==="Backspace"&&G[0]==="-"&&L===l.length+1&&r&&Hi(M,1),i&&c&&(B==="Backspace"&&G[L-1]===k?(Hi(M,L-1),P.preventDefault()):B==="Delete"&&G[L]===k&&P.preventDefault()),v!=null&&v.includes(B)&&G[L]===k&&Hi(M,L+1);var J=o===!0?",":o;B==="Backspace"&&G[L-1]===J&&Hi(M,L-1),B==="Delete"&&G[L]===J&&Hi(M,L+1),s(P)},U=function(P){var M=b;if(M.match(/\d/g)||(M=""),n||(M=DR(M)),c&&i&&(M=d6(M,i,c)),M!==b){var B=f6(M,e);A({formattedValue:B,value:M,floatValue:parseFloat(M)},{event:P,source:Qp.event})}a(P)},D=function(P){return P===k?!0:a6(P)},E=function(P){var M=P.currentValue,B=P.lastValue,L=P.formattedValue,H=P.currentValueIndex,G=P.formattedValueIndex,J=M[H],pe=L[G],be=FR(B,M),ie=be.to,fe=function(Ue){return S(Ue).indexOf(".")+l.length};return d===0&&c&&i&&M[ie.start]===k&&fe(M)<H&&fe(L)>G?!1:H>=ie.start&&H<ie.end&&v&&v.includes(J)&&pe===k?!0:J===pe};return Object.assign(Object.assign({},y),{value:x,valueIsNumericString:!1,isValidInputCharacter:D,isCharacterSame:E,onValueChange:A,format:w,removeFormatting:S,getCaretBoundary:function(P){return GR(P,e)},onKeyDown:I,onBlur:U})}const cu=(e,t)=>F.useMemo(()=>R.amountBN(e,t),[e,t]),Fr=(e,t)=>F.useMemo(()=>R.amountUi(e,t),[e,t]),$i=()=>{const{chainId:e}=oe();return F.useMemo(()=>R.getNetwork(e),[e])},t0=e=>{const t=$i();return F.useMemo(()=>{if(!(!e||!t))return Ii(e,t.id)},[e,t])},js=(e,t)=>F.useMemo(()=>!e||!t||ue(e||"0").isZero()||ue(t||"0").isZero()?"":ue(e||"0").times(t).toFixed(),[e,t]),WR=()=>{const{srcToken:e,dstToken:t,chainId:r}=oe();return F.useMemo(()=>bp(e,t,r),[e,t,r])},qR=()=>{const{srcToken:e,dstToken:t,chainId:r}=oe();return F.useMemo(()=>yp(e,t,r),[e,t,r])},YR=()=>{const e=WR(),t=qR();return e||t},r0=e=>{const{overrides:t}=oe();return F.useMemo(()=>t!=null&&t.dateFormat?t.dateFormat(e||0):te(e).format("DD/MM/YYYY HH:mm"),[e,t==null?void 0:t.dateFormat])};function KR(){const{callbacks:e}=oe();return F.useCallback(async t=>{var r;try{await navigator.clipboard.writeText(t),(r=e==null?void 0:e.onCopy)==null||r.call(e)}catch(n){console.error("Copy failed:",n)}},[e==null?void 0:e.onCopy])}const ZR=(e,t)=>F.useMemo(()=>Pi(e==null?void 0:e.toString(),t),[e,t]),Ge=({value:e,decimalScale:t=3,prefix:r,suffix:n})=>{var c;const s=ZR(e,t),{overrides:a}=oe(),o=a==null?void 0:a.numberFormat,i=VR({allowLeadingZeros:!0,thousandSeparator:",",displayType:"text",value:s||"",decimalScale:18,prefix:r,suffix:n});return o?o(e||""):(c=i.value)==null?void 0:c.toString()},XR={deadlineTooltip:"This is the date and time marking the end of the period which you have selected for your order to be executed.",tradeSizeTooltip:"The number of input tokens that will be removed from your balance and swapped for the output token in each individual trade.",totalTradesTooltip:"The total number of individual trades that will be scheduled as part of your order. Note that in limit orders, not all trades that are scheduled will be executed.",minDstAmountTooltip:" This is the minimum number of tokens that may be received. NOTE: This minimum only refers to executed trades. Some trades may not be executed if the limit price is higher than the available market prices and your order may only be partially filled.",marketPriceTooltip:"You have the option to set a “limit price” for your order. If you do not select this option, each trade in your order will execute at the available market price.",limitPriceTooltip:"Trades will only execute if the available market price is better than the limit price, potentially resulting in partial fills or orders remaining unfilled upon expiration.",outAmountLoading:"Fetching Quote...",maxDurationTooltip:"This is the time period during which the order will be active. Please note that orders may be completed earlier than this time, partially filled, or remain unfilled based on the specified parameters.",tradeIntervalTootlip:"The estimated time that will elapse between each trade in your order. Note that as this time includes an allowance of two minutes for bidder auction and block settlement, which cannot be predicted exactly, actual time may vary.",triggerPriceTooltip:"The price at which the order will be executed. If the market price is higher than the trigger price, the order will be executed at the market price.",placeOrder:"Place order",enterAmount:"Enter an amount",emptyLimitPrice:"Limit price is required",insufficientFunds:"Insufficient Balance",every:"Every",over:"Over",tradeInterval:"Trade interval",deadline:"Deadline",limitPrice:"Limit Price",finalExcecutionPrice:"Final execution price",marketPrice:"Market price",from:"From",to:"To (estimated)",Open:"Open",Completed:"Completed",Expired:"Expired",Canceled:"Canceled",minReceivedPerTrade:"Min. received per trade",triggerPricePerChunk:"Trigger Price per trade",maxChunksError:"Max. trades amount is {maxChunks}",minChunksError:"Min. trades amount is",minTradeSizeError:"Min. trade size is ${minTradeSize}",allOrders:"All",minFillDelayError:"Min. trade interval is {fillDelay}",maxFillDelayError:"Max. trade interval is {fillDelay}",recipient:"Recipient",marketOrderWarning:"Each individual trade in this order will be filled at the current market price at the time of execution.",limitPriceMessage:"Limit orders may not execute when the token's price is equal or close to the limit price, due to gas and standard swap fees.",limit:"Limit",maxDurationError:"Max. expiry is {duration}",minDurationError:"Min. expiry is {duration}",expiry:"Expiry",individualTradeSize:"Individual trade size",numberOfTrades:"No. of trades",AverageExecutionPrice:"Avg. execution price",twapMarket:"TWAP-market",twapLimit:"TWAP-limit",stopLoss:"Stop-loss",triggerPriceMarket:"Trigger Market Price ",triggerPriceLimit:"Trigger Limit Price ",takeProfit:"Take-profit",minReceived:"Min. received",minReceivedPerChunk:"Min. received per trade",noOrders:"No {status} Orders",noLiquidity:"No liquidity for this pair",excecutionSummary:"Execution summary",orderInfo:"Order info",wrapAction:"Wrap {symbol}",approveAction:"Approve {symbol}",createOrderAction:"Create {name} order",amountReceived:"Amount received",createdAt:"Created at",amountOut:"Amount out",status:"Status",progress:"Progress",minutes:"minutes",days:"days",tradeIntervalTitle:"Every",tradesAmountTitle:"Over",stopLossTooltip:"The trigger price at which your stop-loss order will be activated.",takeProfitTooltip:"The trigger price at which your take-profit order will be activated.",stopLossLabel:"Trigger Price",StopLossTriggerPriceError:"Trigger price must be less than market price",TakeProfitTriggerPriceError:"Trigger price must be greater than market price",triggerLimitPriceError:"Limit price must be less than trigger price",triggerPrice:"Trigger Price",tradePrice:"Trade Price",triggerMarketPriceDisclaimer:" In extreme market movements, slippage may occur and the executed price of the market order may be worse than the specified trigger price.",stopLossLimitPriceTooltip:"The stop loss order will execute at the specified limit price or better, once the stop price is triggered.",stopLossDurationTooltip:"This is the time period during which the order will be active. Please note that orders may be completed earlier than this time, or remain unfilled based on the specified parameters.",emptyTriggerPrice:"Trigger price is required",id:"ID",fees:"Fees {value}",version:"Version",maxOrderSizeError:"Max. trade size is {maxOrderSize} USD",viewOnExplorer:"View on explorer",proceedInWallet:"Proceed in wallet",wrapMsg:"Note: {symbol} was wrapped to {wSymbol}",createOrderActionSuccess:"{name} order placed"};function QR(e){let t=e;const r=/\{[^{}]*\}/g;for(;r.test(t);)t=t.replace(r,"");return t}const Fe=()=>{const e=oe();return F.useCallback((r,n)=>{var o,i;const s=(o=e.getTranslation)==null?void 0:o.call(e,r,n);if(s&&s!==r)return s;const a=((i=e.translations)==null?void 0:i[r])||XR[r];return QR(a.replace(/{(\w+)}/g,(c,l)=>(n==null?void 0:n[l])||c))},[e.getTranslation,e.translations])},JR=e=>{const t=Fe(),{marketPrice:r}=oe(),n=K(a=>a.state.typedSrcAmount);return F.useMemo(()=>{const{isError:a,value:o}=R.getMinFillDelayError(e);if(!(!a||ue(n||"0").isZero()||!r))return{type:Ot.MIN_FILL_DELAY,value:o,message:t("minFillDelayError",{fillDelay:`${mp(o)} ${t("minutes")}`})}},[e,t,n,r])},Vs=()=>{const e=K(s=>s.state.typedFillDelay),t=K(s=>s.updateState),r=F.useMemo(()=>e||R.DEFAULT_FILL_DELAY,[e]),n=JR(r);return{fillDelay:r,onChange:F.useCallback(s=>t({typedFillDelay:s}),[t]),error:n}},eH=()=>{const{onChange:e,fillDelay:t,error:r}=Vs(),n=Fe(),s=F.useCallback(o=>e({unit:t.unit,value:Number(o)}),[e,t]),a=F.useCallback(o=>e({unit:o,value:t.value}),[e,t]);return{onInputChange:s,onUnitSelect:a,onChange:e,milliseconds:t.unit*t.value,fillDelay:t,error:r,label:n("tradeIntervalTitle"),tooltip:n("tradeIntervalTootlip")}},Nr=()=>{const{srcToken:e}=oe(),t=Fe(),r=K(a=>a.state.typedSrcAmount),s=K(a=>a.state.acceptedSrcAmount)||r;return{amountWei:cu(e==null?void 0:e.decimals,s),amountUI:s,error:ue(s||0).isZero()?t("enterAmount"):void 0}},tH=(e,t)=>{const{module:r,srcUsd1Token:n,marketPrice:s,minChunkSizeUsd:a}=oe(),o=Fe(),i=K(c=>c.state.typedSrcAmount);return F.useMemo(()=>{if(ue(i||"0").isZero()||!s)return;if(!e)return{type:Ot.MIN_CHUNKS,value:1,message:`${o("minChunksError")} 1`};const{isError:c}=R.getMaxChunksError(e,t,r);if(c)return{type:Ot.MAX_CHUNKS,value:t,message:o("maxChunksError",{maxChunks:`${t}`})};const{isError:l,value:u}=R.getMinTradeSizeError(i||"",n||"",a||0);if(l)return{type:Ot.MIN_TRADE_SIZE,value:u,message:o("minTradeSizeError",{minTradeSize:`${u}`})}},[e,t,r,i,n,a,o,s])},Qr=()=>{const{srcToken:e,srcUsd1Token:t,module:r,minChunkSizeUsd:n}=oe(),s=K(g=>g.state.typedChunks),a=Vs().fillDelay,o=K(g=>g.updateState),{amountWei:i,amountUI:c}=Nr(),l=F.useMemo(()=>R.getMaxPossibleChunks(a,c||"",t||"",n||0),[c,t,n,a]),u=F.useMemo(()=>R.getChunks(l,r,s),[l,s,r]),d=F.useCallback(g=>o({typedChunks:g}),[o]),p=F.useMemo(()=>R.getSrcTokenChunkAmount(i||"",u),[i,u]),h=Fr(e==null?void 0:e.decimals,p),y=F.useMemo(()=>t?ue(h||"0").times(t||0).toString():"0",[h,t]);return{totalTrades:u,maxTrades:l,amountPerTradeUI:h,amountPerTradeWei:p,amountPerTradeUsd:y,onChange:d,error:tH(u,l)}},rH=()=>{const{srcToken:e,dstToken:t}=oe(),r=Fe(),{onChange:n,totalTrades:s,amountPerTradeUsd:a,amountPerTradeUI:o,error:i,maxTrades:c,amountPerTradeWei:l}=Qr(),u=Ge({value:o}),d=Ge({value:a});return{error:i,maxTrades:c,totalTrades:s,amountPerTrade:u,amountPerTradeWei:l,onChange:n,label:r("tradesAmountTitle"),tooltip:r("totalTradesTooltip"),amountPerTradeUsd:d,fromToken:e,toToken:t}},lu=()=>{const{srcToken:e,dstToken:t,marketPriceLoading:r}=oe(),n=K(l=>l.updateState),s=K(l=>l.state.isInvertedTrade),a=K(l=>l.state.typedTriggerPrice),o=K(l=>l.state.typedLimitPrice),i=K(l=>l.state.isMarketOrder);return{onInvert:F.useCallback(()=>{r||(a!==void 0&&n({typedTriggerPrice:ue(1).div(a).toFixed()}),o!==void 0&&n({typedLimitPrice:ue(1).div(o).toFixed()}),n({isInvertedTrade:!s}))},[n,s,a,o,r]),isInverted:s,fromToken:s?t:e,toToken:s?e:t,isMarketPrice:i}},p6=({typedValue:e,tokenDecimals:t=18,initialPrice:r="0",percentage:n,setValue:s,setPercentage:a})=>{const{srcUsd1Token:o,dstUsd1Token:i}=oe(),{isInverted:c}=lu(),l=F.useMemo(()=>{if(e!==void 0){const g=c?ue(e).isZero()?ue(0):ue(1).div(e):ue(e);return R.amountBN(t,g.toFixed())}if(n!==void 0&&ue(r||"0").gt(0)&&!ue(r||"0").isNaN()){const g=ue(r||"0"),k=ue(n||0).div(100);return g.plus(g.multipliedBy(k)).decimalPlaces(0).toFixed()}return ue(r).gt(0)?r:""},[e,n,t,r,c]),u=F.useCallback(g=>{s(g),a(null)},[s,a]),d=F.useCallback(g=>{s(void 0),a(g)},[s,a]),p=F.useMemo(()=>{if(!r||ue(r).isZero())return"";if(n!=null)return n;if(l){const g=ue(r),v=ue(l).minus(g).div(g).multipliedBy(100).decimalPlaces(2).toString();return ue(v||"0").isZero()?"":v}return""},[l,r,n]),h=F.useMemo(()=>{let g="";if(e!==void 0)g=e;else{const k=R.amountUi(t,l);if(ue(k||"0").isZero())return"";g=c?ue(1).div(k).toFixed():k}return Pi(g,6,t)},[e,t,l,c]),y=js(c?o:i,h||"0");return{amountWei:ue(l).isNaN()?"":l,amountUI:ue(h).isNaN()?"":h,selectedPercentage:p,onChange:u,onPercentageChange:d,isInverted:c,usd:ue(y).isNaN()?"":y}},nH=()=>{const{module:e}=oe();return F.useMemo(()=>e===R.Module.STOP_LOSS?R.DEFAULT_STOP_LOSS_PERCENTAGE:R.DEFAULT_TAKE_PROFIT_PERCENTAGE,[e])},n0=()=>{const{module:e}=oe(),t=K(r=>r.state.isMarketOrder);return F.useMemo(()=>e!==R.Module.STOP_LOSS&&e!==R.Module.TAKE_PROFIT||t?void 0:e===R.Module.STOP_LOSS?R.DEFAULT_STOP_LOSS_LIMIT_PERCENTAGE:R.DEFAULT_TAKE_PROFIT_LIMIT_PERCENTAGE,[e,t])},sH=(e="")=>{const{module:t,marketPrice:r}=oe(),n=Fe(),s=K(a=>a.state.typedSrcAmount);return F.useMemo(()=>{if(ue(s||"0").isZero()||!r||t!==R.Module.STOP_LOSS&&t!==R.Module.TAKE_PROFIT)return;const a=R.getStopLossPriceError(r||"",e||"",t);if(a!=null&&a.isError)return{type:Ot.STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE,value:a.value,message:n("StopLossTriggerPriceError")||""};const o=R.getTakeProfitPriceError(r||"",e||"",t);if(o!=null&&o.isError)return{type:Ot.TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE,value:o.value,message:n("TakeProfitTriggerPriceError")||""};if(!e||ue(e||0).isZero())return{type:Ot.EMPTY_TRIGGER_PRICE,value:e,message:n("emptyTriggerPrice")||""}},[r,e,t,n,s])},aH=e=>{const{srcToken:t,dstToken:r,module:n}=oe(),s=Qr().amountPerTradeWei,a=K(i=>i.state.isMarketOrder),o=F.useMemo(()=>R.getTriggerPricePerChunk(n,s,e,(t==null?void 0:t.decimals)||0),[e,s,a,t==null?void 0:t.decimals,n]);return{amountWei:o,amountUI:Fr((r==null?void 0:r.decimals)||0,o)}},Ws=()=>{const{dstToken:e,marketPrice:t,module:r}=oe(),n=K(h=>h.updateState),s=nH(),a=K(h=>h.state.triggerPricePercent),o=F.useCallback(h=>{n({triggerPricePercent:h})},[n]),i=a===void 0?s:a,c=r===R.Module.STOP_LOSS||r===R.Module.TAKE_PROFIT,l=p6({typedValue:K(h=>h.state.typedTriggerPrice),percentage:i,tokenDecimals:e==null?void 0:e.decimals,initialPrice:c?t:void 0,setValue:F.useCallback(h=>n({typedTriggerPrice:h}),[n]),setPercentage:o}),u=sH(l.amountWei),{amountWei:d,amountUI:p}=aH(l.amountWei);return F.useMemo(()=>({...l,error:u,pricePerChunkWei:d,pricePerChunkUI:p}),[l,u,d,p])},oH=()=>{const{module:e,marketPrice:t,marketPriceLoading:r}=oe(),n=Fe(),{amountUI:s,onChange:a,onPercentageChange:o,usd:i,selectedPercentage:c,error:l}=Ws(),u=K(w=>w.state.isMarketOrder),d=K(w=>w.updateState),{isInverted:p,onInvert:h,fromToken:y,toToken:g}=lu(),k=F.useCallback(()=>{d({triggerPricePercent:void 0,typedTriggerPrice:void 0})},[d]),v=e!==R.Module.STOP_LOSS&&e!==R.Module.TAKE_PROFIT;return{price:s,error:l,label:n("stopLossLabel"),tooltip:e===R.Module.STOP_LOSS?n("stopLossTooltip"):n("takeProfitTooltip"),onChange:a,onPercentageChange:o,percentage:c,isActive:!u,onReset:k,usd:i,fromToken:y,toToken:g,prefix:"",isLoading:r||!t,isInverted:p,hide:v,onInvert:h}},iH=e=>{const{module:t,marketPrice:r}=oe(),n=Fe(),{amountWei:s}=Ws(),a=K(i=>i.state.isMarketOrder),o=K(i=>i.state.typedSrcAmount);return F.useMemo(()=>{if(ue(o||"0").isZero()||!s||!r)return;const i=R.getStopLossLimitPriceError(s,e,a,t),c=R.getTakeProfitLimitPriceError(s,e,a,t);if(i!=null&&i.isError)return{type:Ot.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE,message:n("triggerLimitPriceError")||"",value:i.value};if(c!=null&&c.isError)return{type:Ot.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE,message:n("triggerLimitPriceError")||"",value:c.value};if(e&&ue(e||0).isZero())return{type:Ot.MISSING_LIMIT_PRICE,message:n("emptyLimitPrice")||"",value:e||""}},[e,n,s,t,a,o,r])},uu=()=>{const{dstToken:e,marketPrice:t,module:r}=oe(),n=K(l=>l.updateState),s=n0(),a=K(l=>l.state.limitPricePercent),o=a===void 0?s:a,i=p6({typedValue:K(l=>l.state.typedLimitPrice),percentage:o,tokenDecimals:e==null?void 0:e.decimals,initialPrice:t,setValue:F.useCallback(l=>n({typedLimitPrice:l}),[n]),setPercentage:F.useCallback(l=>{n({limitPricePercent:l})},[n,r])}),c=iH(i.amountWei);return F.useMemo(()=>({...i,error:c}),[i,c])},cH=()=>{const{module:e}=oe(),t=K(i=>i.updateState),r=K(i=>i.state.isMarketOrder),n=n0(),s=K(i=>i.state.triggerPricePercent)||0,a=e===R.Module.LIMIT,o=F.useCallback(()=>{!r&&e===R.Module.STOP_LOSS&&t({limitPricePercent:n}),t({isMarketOrder:!r})},[t,s,e,r,n]);return{isLimitPrice:!r,toggleLimitPrice:o,hide:a}},lH=()=>{const{module:e,marketPriceLoading:t}=oe(),r=Fe(),{amountUI:n,onChange:s,onPercentageChange:a,usd:o,selectedPercentage:i,error:c}=uu(),l=K(z=>z.state.isMarketOrder),u=K(z=>z.updateState),d=n0(),{isLimitPrice:p,toggleLimitPrice:h}=cH(),{triggerPricePercent:y}=K(z=>z.state),{isInverted:g,onInvert:k,fromToken:v,toToken:w}=lu(),S=F.useMemo(()=>{if(!(e!==R.Module.STOP_LOSS&&e!==R.Module.TAKE_PROFIT||!l))return{text:r("triggerMarketPriceDisclaimer"),url:R.ORBS_TWAP_FAQ_URL}},[y,r,e,l]),C=F.useCallback(()=>{u({typedLimitPrice:void 0}),u({limitPricePercent:d})},[u,e,d]),_=F.useMemo(()=>e===R.Module.STOP_LOSS?r("stopLossLimitPriceTooltip"):r("limitPriceTooltip"),[r,e]);return{price:n,error:c,warning:S,label:r("limitPrice"),tooltip:_,onChange:s,onPercentageChange:a,onReset:C,usd:o,fromToken:v,toToken:w,percentage:i,isInverted:g,isLoading:t,isLimitPrice:p,toggleLimitPrice:h,onInvert:k}},h6=()=>{const{module:e,marketPrice:t}=oe(),r=uu().amountWei,n=Ws().amountWei,s=K(a=>a.state.isMarketOrder);return e===R.Module.LIMIT||!s?r||"":e===R.Module.STOP_LOSS||e===R.Module.TAKE_PROFIT?n||"":t||""},Gi=()=>{const{srcToken:e,dstToken:t}=oe(),r=h6(),n=Nr().amountWei,s=F.useMemo(()=>R.getDestTokenAmount(n||"",r,(e==null?void 0:e.decimals)||0),[n,r,e==null?void 0:e.decimals]);return{amountWei:s,amountUI:Fr(t==null?void 0:t.decimals,s)}},s0=()=>{const{srcToken:e,dstToken:t,dstUsd1Token:r}=oe(),n=h6(),s=Qr().amountPerTradeWei,a=K(c=>c.state.isMarketOrder),o=F.useMemo(()=>R.getDestTokenMinAmountPerChunk(s,n,!!a,(e==null?void 0:e.decimals)||0),[s,n,a,e==null?void 0:e.decimals]),i=Fr(t==null?void 0:t.decimals,o);return{amountWei:o,amountUI:i,usd:js(i,r)}};function uH(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),r}var a0={},dH=[{id:"fa",name:"Font Awesome",projectUrl:"https://fontawesome.com/",license:"CC BY 4.0 License",licenseUrl:"https://creativecommons.org/licenses/by/4.0/"},{id:"io",name:"Ionicons 4",projectUrl:"https://ionicons.com/",license:"MIT",licenseUrl:"https://github.com/ionic-team/ionicons/blob/master/LICENSE"},{id:"io5",name:"Ionicons 5",projectUrl:"https://ionicons.com/",license:"MIT",licenseUrl:"https://github.com/ionic-team/ionicons/blob/master/LICENSE"},{id:"md",name:"Material Design icons",projectUrl:"http://google.github.io/material-design-icons/",license:"Apache License Version 2.0",licenseUrl:"https://github.com/google/material-design-icons/blob/master/LICENSE"},{id:"ti",name:"Typicons",projectUrl:"http://s-ings.com/typicons/",license:"CC BY-SA 3.0",licenseUrl:"https://creativecommons.org/licenses/by-sa/3.0/"},{id:"go",name:"Github Octicons icons",projectUrl:"https://octicons.github.com/",license:"MIT",licenseUrl:"https://github.com/primer/octicons/blob/master/LICENSE"},{id:"fi",name:"Feather",projectUrl:"https://feathericons.com/",license:"MIT",licenseUrl:"https://github.com/feathericons/feather/blob/master/LICENSE"},{id:"gi",name:"Game Icons",projectUrl:"https://game-icons.net/",license:"CC BY 3.0",licenseUrl:"https://creativecommons.org/licenses/by/3.0/"},{id:"wi",name:"Weather Icons",projectUrl:"https://erikflowers.github.io/weather-icons/",license:"SIL OFL 1.1",licenseUrl:"http://scripts.sil.org/OFL"},{id:"di",name:"Devicons",projectUrl:"https://vorillaz.github.io/devicons/",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"ai",name:"Ant Design Icons",projectUrl:"https://github.com/ant-design/ant-design-icons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"bs",name:"Bootstrap Icons",projectUrl:"https://github.com/twbs/icons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"ri",name:"Remix Icon",projectUrl:"https://github.com/Remix-Design/RemixIcon",license:"Apache License Version 2.0",licenseUrl:"http://www.apache.org/licenses/"},{id:"fc",name:"Flat Color Icons",projectUrl:"https://github.com/icons8/flat-color-icons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"gr",name:"Grommet-Icons",projectUrl:"https://github.com/grommet/grommet-icons",license:"Apache License Version 2.0",licenseUrl:"http://www.apache.org/licenses/"},{id:"hi",name:"Heroicons",projectUrl:"https://github.com/refactoringui/heroicons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"si",name:"Simple Icons",projectUrl:"https://simpleicons.org/",license:"CC0 1.0 Universal",licenseUrl:"https://creativecommons.org/publicdomain/zero/1.0/"},{id:"im",name:"IcoMoon Free",projectUrl:"https://github.com/Keyamoon/IcoMoon-Free",license:"CC BY 4.0 License"},{id:"bi",name:"BoxIcons",projectUrl:"https://github.com/atisawd/boxicons",license:"CC BY 4.0 License"},{id:"cg",name:"css.gg",projectUrl:"https://github.com/astrit/css.gg",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"vsc",name:"VS Code Icons",projectUrl:"https://github.com/microsoft/vscode-codicons",license:"CC BY 4.0",licenseUrl:"https://creativecommons.org/licenses/by/4.0/"}],o0={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},i0=F.createContext&&F.createContext(o0),ts=function(){return ts=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},ts.apply(this,arguments)},fH=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r};function m6(e){return e&&e.map(function(t,r){return F.createElement(t.tag,ts({key:r},t.attr),m6(t.child))})}function pH(e){return function(t){return F.createElement(b6,ts({attr:ts({},e.attr)},t),m6(e.child))}}function b6(e){var t=function(r){var n=e.attr,s=e.size,a=e.title,o=fH(e,["attr","size","title"]),i=s||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),F.createElement("svg",ts({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,o,{className:c,style:ts(ts({color:e.color||r.color},r.style),e.style),height:i,width:i,xmlns:"http://www.w3.org/2000/svg"}),a&&F.createElement("title",null,a),e.children)};return i0!==void 0?F.createElement(i0.Consumer,null,function(r){return t(r)}):t(o0)}const du=uH(Object.freeze(Object.defineProperty({__proto__:null,DefaultContext:o0,GenIcon:pH,IconBase:b6,IconContext:i0,IconsManifest:dH},Symbol.toStringTag,{value:"Module"})));var y6;function hH(){if(y6)return a0;y6=1;var e=du.GenIcon;return a0.AiOutlineCopy=function(r){return e({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]})(r)},a0}var mH=hH();const fu=({value:e})=>{const t=Ge({value:e,decimalScale:2});return t?O.jsx("small",{className:"twap-order-details__detail-row-value-usd",children:` ($${t})`}):null},bH=({deadline:e,label:t,tooltip:r})=>{const n=r0(e);return O.jsx(ir,{title:t,tooltip:r,children:n})},yH=({price:e,dstToken:t,label:r,tooltip:n,usd:s})=>{const a=Ge({value:e});return ue(e||0).isZero()?null:O.jsx(ir,{title:r,tooltip:n,children:O.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[`${a||"-"} ${t==null?void 0:t.symbol}`,O.jsx(fu,{value:s})]})})},gH=({price:e,dstToken:t,percentage:r,isMarketOrder:n})=>{const s=Ge({value:e}),a=Fe();return n?null:O.jsx(ir,{title:a("limitPrice")||"",tooltip:a("limitPriceTooltip")||"",children:O.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[`${s||"-"} ${t==null?void 0:t.symbol}`,r&&O.jsx("small",{children:`(${r}%)`})]})})},xH=({tradeSize:e,srcToken:t,trades:r,label:n,tooltip:s})=>r===1?null:O.jsx(ir,{title:n,tooltip:s,children:`${e||"-"} ${(t==null?void 0:t.symbol)||""}`}),wH=({dstToken:e,dstMinAmountOut:t,label:r,tooltip:n,usd:s})=>{const a=Ge({value:t});return ue(t||0).isZero()?null:O.jsxs(ir,{title:r,tooltip:n,children:[`${t?a:"-"} ${e==null?void 0:e.symbol}`,O.jsx(fu,{value:s})]})},vH=({trades:e,label:t,tooltip:r})=>e===1?null:O.jsx(ir,{title:t,tooltip:r,children:e}),kH=()=>{var s;const e=Fe(),{account:t}=oe(),r=(s=$i())==null?void 0:s.explorer,n=pp(t);return O.jsx(ir,{title:e("recipient")||"",children:r?O.jsx("a",{href:`${r}/address/${t}`,target:"_blank",children:n}):n})},EH=({fillDelayMillis:e,chunks:t=0,label:r,tooltip:n})=>{const s=F.useMemo(()=>ng(e),[e]);return t===1?null:O.jsx(ir,{title:r,tooltip:n,children:s})},ir=({title:e,tooltip:t,children:r,className:n="",onClick:s,style:a})=>{const{components:o}=oe(),i=o.Tooltip;return O.jsxs("div",{className:`${n} twap-order-details__detail-row`,onClick:s,style:a,children:[O.jsxs("div",{className:"twap-order-details__detail-row-label",children:[O.jsx("p",{className:"twap-order-details__detail-row-label-value",children:e}),t&&i&&O.jsx(i,{tooltipText:t})]}),O.jsx("div",{className:"twap-order-details__detail-row-value",children:r})]})},CH=({id:e})=>{const{components:t}=oe(),r=t==null?void 0:t.Tooltip,n=KR();return e.startsWith("0x")?O.jsx(ir,{title:"ID",onClick:()=>n(e),style:{cursor:"pointer"},children:r&&O.jsx(r,{tooltipText:e,children:O.jsxs("div",{className:"twap-order-details__detail-row-value-id",children:[O.jsx("p",{children:pp(e)}),O.jsx(mH.AiOutlineCopy,{})]})})}):O.jsx(ir,{title:"ID",children:e})},TH=({version:e})=>O.jsx(ir,{title:"Version",children:e});function we({children:e,className:t=""}){return O.jsx("div",{className:`${t} twap-order-details`,children:e})}const SH=({children:e})=>e,AH=({fees:e,label:t,usd:r,dstTokenSymbol:n})=>{const s=Ge({value:e});return O.jsxs(ir,{title:t,children:[`${e?s:"-"} ${n}`,O.jsx(fu,{value:r})]})};we.Deadline=bH,we.Fees=AH,we.TradeSize=xH,we.MinDestAmount=wH,we.TradesAmount=vH,we.Recipient=kH,we.TradeInterval=EH,we.DetailRow=ir,we.TriggerPrice=yH,we.LimitPrice=gH,we.OrderID=CH,we.Container=SH,we.OrderVersion=TH,we.USD=fu;const PH=e=>{const{module:t,marketPrice:r}=oe(),n=Fe();return F.useMemo(()=>{const s=R.getMaxOrderDurationError(t,e),a=R.getMinOrderDurationError(e);if(r){if(s.isError)return{type:Ot.MAX_ORDER_DURATION,value:s.value,message:n("maxDurationError",{duration:`${Math.floor(ig(s.value)).toFixed(0)} ${n("days")}`})};if(a.isError)return{type:Ot.MIN_ORDER_DURATION,value:a.value,message:n("minDurationError",{duration:`${Math.floor(mp(a.value)).toFixed(0)} ${n("minutes")}`})}}},[e,n,t,r])},c0=()=>{const{module:e}=oe(),t=K(i=>i.state.typedDuration),r=K(i=>i.updateState),n=Qr().totalTrades,s=Vs().fillDelay,a=F.useMemo(()=>R.getDuration(e,n,s,t),[n,s,t,e]),o=PH(a);return{duration:a,setDuration:F.useCallback(i=>r({typedDuration:i}),[r]),error:o}},IH=()=>{const{module:e}=oe(),t=Fe(),{duration:r,setDuration:n,error:s}=c0(),a=F.useCallback(c=>{n({unit:r.unit,value:Number(c)})},[n,r]),o=F.useCallback(c=>{n({unit:c,value:r.value})},[n,r]),i=F.useMemo(()=>e===R.Module.STOP_LOSS?t("stopLossDurationTooltip"):t("maxDurationTooltip"),[t,e]);return{duration:r,onChange:n,milliseconds:r.unit*r.value,onInputChange:a,onUnitSelect:o,label:t("expiry"),tooltip:i,error:s}},l0=()=>{const e=K(r=>r.state.currentTime),t=c0().duration;return F.useMemo(()=>R.getDeadline(e,t),[e,t])},g6=e=>{var c,l,u,d,p;const t=Fe(),r=Ge({value:Fr((c=e.srcToken)==null?void 0:c.decimals,e.srcAmount)}),n=Ge({value:Fr((l=e.srcToken)==null?void 0:l.decimals,e.srcAmountPerTrade)}),s=Ge({value:Fr((u=e.dstToken)==null?void 0:u.decimals,e.minDestAmountPerTrade&&ue(e.minDestAmountPerTrade).lte(1)?"":e.minDestAmountPerTrade)}),a=Ge({value:Fr((d=e.dstToken)==null?void 0:d.decimals,e.triggerPricePerTrade)}),o=cu((p=e.dstToken)==null?void 0:p.decimals,e.limitPrice),i=Ge({value:e.limitPrice});return F.useMemo(()=>({data:{srcToken:e.srcToken,dstToken:e.dstToken,limitPrice:o,deadline:e.deadline,srcAmount:e.srcAmount,srcAmountPerTrade:e.srcAmountPerTrade,totalTrades:e.totalTrades,minDestAmountPerTrade:e.minDestAmountPerTrade,tradeInterval:e.tradeInterval,triggerPricePerTrade:e.triggerPricePerTrade,maker:e.maker},display:{limitPrice:{label:t("limitPrice"),value:i||""},deadline:{tooltip:t("deadlineTooltip"),label:t("deadline"),value:e.deadline||0},srcAmount:{label:t("amountOut"),value:r||"",token:e.srcToken},tradeSize:{tooltip:t("tradeSizeTooltip"),label:t("individualTradeSize"),value:n||"",token:e.srcToken},totalTrades:{tooltip:t("totalTradesTooltip"),label:t("numberOfTrades"),value:e.totalTrades||0},minDestAmountPerTrade:{tooltip:t("minDstAmountTooltip"),label:e.totalTrades&&e.totalTrades>1?t("minReceivedPerTrade"):t("minReceived"),value:s||"",token:e.dstToken},tradeInterval:{tooltip:t("tradeIntervalTootlip"),label:t("tradeInterval"),value:e.tradeInterval||0},triggerPricePerTrade:{tooltip:t("triggerPriceTooltip"),label:e.totalTrades&&e.totalTrades>1?t("triggerPricePerChunk"):t("triggerPrice"),value:a||"",token:e.dstToken},recipient:{label:t("recipient"),value:e.maker||""}}}),[e,t,r,n,s,a,i])},UH=()=>{const{srcUsd1Token:e,dstUsd1Token:t}=oe(),r=Nr().amountUI,n=Gi().amountUI,s=js(r,e),a=js(n,t);return{srcAmountUsd:s,dstAmountUsd:a}},OH=()=>{const{fees:e,dstUsd1Token:t}=oe(),{amountUI:r}=Gi(),n=F.useMemo(()=>!e||!r?"":ue(r).multipliedBy(e).dividedBy(100).toFixed(),[r]);return{amount:Ge({value:n}),percent:Ge({value:e}),usd:js(n,t)}},BH=()=>{const e=Nr().amountUI,t=Gi().amountUI,r=F.useMemo(()=>ue(t||0).dividedBy(e||0).toString(),[t,e]);return Ge({value:r,decimalScale:4})},x6=()=>{const{srcToken:e,dstToken:t,account:r}=oe(),n=Fe(),{amountWei:s}=Nr(),{amountWei:a,usd:o}=s0(),{totalTrades:i,amountPerTradeWei:c}=Qr(),{amountWei:l,usd:u}=Ws(),{fillDelay:d}=Vs(),p=l0(),{amountUI:h,usd:y}=uu(),{amount:g,percent:k,usd:v}=OH(),w=Ge({value:BH(),decimalScale:4}),{srcAmountUsd:S,dstAmountUsd:C}=UH(),_=g6({srcToken:e,dstToken:t,srcAmount:s,minDestAmountPerTrade:a,totalTrades:i,triggerPricePerTrade:l,deadline:p,srcAmountPerTrade:c,maker:r,tradeInterval:d.unit*d.value,limitPrice:h});return F.useMemo(()=>({..._,srcAmountUsd:S,dstAmountUsd:C,fee:{label:n("fees",{value:`${k}%`}),value:g,usd:v},display:{..._.display,minDestAmountPerTrade:{..._.display.minDestAmountPerTrade,usd:o},triggerPricePerTrade:{..._.display.triggerPricePerTrade,usd:u},limitPrice:{..._.display.limitPrice,usd:y}}}),[_,k,g,n,w,e,t,S,C,o,u,v,y])},w6=F.createContext({}),MH=({children:e,...t})=>O.jsx(w6.Provider,{value:t,children:e}),_H=()=>F.useContext(w6),v6=()=>{var s,a;const e=Fe(),{wrapTxHash:t,srcToken:r}=K(o=>o.state.swapExecution),n=(a=(s=$i())==null?void 0:s.wToken)==null?void 0:a.symbol;return t?O.jsx("p",{className:"twap-error-wrap-msg",children:e("wrapMsg",{symbol:(r==null?void 0:r.symbol)||"",wSymbol:n||""})}):null},DH=(e=!1,t=1)=>{const{module:r}=oe(),n=Fe();return F.useMemo(()=>r===R.Module.STOP_LOSS?n("stopLoss"):r===R.Module.TAKE_PROFIT?n("takeProfit"):n(e?"twapMarket":t===1?"limit":"twapLimit"),[n,r,e,t])},FH=({price:e,dstTokenSymbol:t,label:r,usd:n})=>O.jsxs(we.DetailRow,{title:r,children:[`${e||"-"} ${t||""}`,O.jsx(we.USD,{value:n})]}),k6=()=>{const e=Fe(),t=K(a=>a.state.isMarketOrder),r=K(a=>a.state.swapExecution.status),{totalTrades:n}=Qr(),s=DH(t,n);return r===gt.SUCCESS?e("createOrderActionSuccess",{name:s}):e("createOrderAction",{name:s})},NH=()=>{const e=K(y=>y.state.swapExecution.srcToken),t=Fe(),{step:r,wrapTxHash:n,approveTxHash:s}=K(y=>y.state.swapExecution),a=$i(),o=t0(n),i=t0(n),c=t0(s),l=K(y=>y.state.swapExecution.status),d=R.isNativeAddress((e==null?void 0:e.address)||"")?(a==null?void 0:a.native.symbol)||"":(e==null?void 0:e.symbol)||"",p=a==null?void 0:a.wToken.symbol,h=k6();return F.useMemo(()=>r===Ls.WRAP?{title:t("wrapAction",{symbol:d}),footerLink:o,footerText:t(o?"viewOnExplorer":"proceedInWallet")}:r===Ls.APPROVE?{title:t("approveAction",{symbol:d}),footerLink:c,footerText:t(c?"viewOnExplorer":"proceedInWallet")}:{title:h,footerText:l===gt.LOADING?t("proceedInWallet"):void 0},[r,c,d,h,t,o,i,p,l])},zH=({error:e})=>O.jsxs("div",{className:"twap-error",children:[O.jsx("h2",{className:"twap-error-title",children:"Transaction failed"}),(e==null?void 0:e.code)&&O.jsxs("p",{className:"twap-error-code",children:["Error code: ",e==null?void 0:e.code]}),O.jsx(v6,{})]});function LH({error:e}){const{components:t}=oe(),r=Fe(),n=K(o=>{var i;return(i=o.state.swapExecution)==null?void 0:i.wrapTxHash}),s=t.SubmitOrderErrorView,a=O.jsx(zn.Failed,{error:O.jsx(zH,{error:e}),footerLink:R.ORBS_TWAP_FAQ_URL,footerText:r("viewOnExplorer")});return s?O.jsx(s,{wrapTxHash:n,error:e,children:a}):a}const RH=()=>{const{components:e}=oe(),t=K(p=>p.state.swapExecution.srcToken),r=K(p=>p.state.swapExecution.dstToken),{reviewDetails:n}=_H(),s=Fe(),a=K(p=>{var h;return!!((h=p.state.swapExecution)!=null&&h.status)}),o=x6(),i=Ge({value:o.srcAmountUsd,decimalScale:2}),c=Ge({value:o.dstAmountUsd,decimalScale:2}),l=e.USD,u=e.SubmitOrderMainView,d=O.jsxs(O.Fragment,{children:[O.jsx(zn.Main,{fromTitle:s("from"),toTitle:s("to"),inUsd:l?O.jsx(l,{value:o.srcAmountUsd,isLoading:!1}):`$${i}`,outUsd:l?O.jsx(l,{value:o.dstAmountUsd,isLoading:!1}):`$${c}`}),!a&&O.jsxs("div",{className:"twap-create-order-bottom",children:[O.jsx(we.Container,{children:O.jsxs("div",{className:"twap-create-order-details",children:[O.jsx(we.Deadline,{deadline:o.display.deadline.value,label:o.display.deadline.label,tooltip:o.display.deadline.tooltip||""}),O.jsx(we.TriggerPrice,{price:o.display.triggerPricePerTrade.value,dstToken:r,label:o.display.triggerPricePerTrade.label,tooltip:o.display.triggerPricePerTrade.tooltip||"",usd:o.display.triggerPricePerTrade.usd}),O.jsx(FH,{price:o.display.limitPrice.value,dstTokenSymbol:r==null?void 0:r.symbol,label:o.display.limitPrice.label,usd:o.display.limitPrice.usd}),O.jsx(we.MinDestAmount,{dstToken:r,dstMinAmountOut:o.display.minDestAmountPerTrade.value,label:o.display.minDestAmountPerTrade.label,tooltip:o.display.minDestAmountPerTrade.tooltip||"",usd:o.display.minDestAmountPerTrade.usd}),O.jsx(we.TradeSize,{tradeSize:o.display.tradeSize.value,trades:o.display.totalTrades.value,srcToken:t,label:o.display.tradeSize.label,tooltip:o.display.tradeSize.tooltip}),O.jsx(we.TradesAmount,{trades:o.display.totalTrades.value,label:o.display.totalTrades.label,tooltip:o.display.totalTrades.tooltip}),O.jsx(we.TradeInterval,{chunks:o.display.totalTrades.value,fillDelayMillis:o.display.tradeInterval.value,label:o.display.tradeInterval.label,tooltip:o.display.tradeInterval.tooltip}),O.jsx(we.Recipient,{}),o.fee.value&&O.jsx(we.Fees,{fees:o.fee.value,label:o.fee.label,usd:o.fee.usd,dstTokenSymbol:r==null?void 0:r.symbol})]})}),n]})]});return u?O.jsx(u,{children:d}):d},HH=e=>{const{status:t,stepIndex:r,totalSteps:n,error:s}=K(w=>w.state.swapExecution),{components:a}=oe(),o=a.Spinner,i=a.SuccessIcon,c=a.ErrorIcon,l=a.TokenLogo,{srcToken:u,dstToken:d}=oe(),p=Nr().amountUI,h=Gi().amountUI,y=Ge({value:p,decimalScale:2}),g=Ge({value:h,decimalScale:2}),k=F.useMemo(()=>({symbol:u==null?void 0:u.symbol,logoUrl:u==null?void 0:u.logoUrl}),[u]),v=F.useMemo(()=>({symbol:d==null?void 0:d.symbol,logoUrl:d==null?void 0:d.logoUrl}),[d]);return O.jsx(MH,{...e,children:O.jsx(zn,{inAmount:y,outAmount:g,swapStatus:t,totalSteps:n,currentStep:NH(),currentStepIndex:r,inToken:k,outToken:v,components:{SrcTokenLogo:l&&O.jsx(l,{token:u}),DstTokenLogo:l&&O.jsx(l,{token:d}),Failed:O.jsx(LH,{error:s}),Success:O.jsx($H,{}),Main:O.jsx(RH,{}),Loader:o,SuccessIcon:i,FailedIcon:c}})})},$H=()=>{const e=k6(),{components:t}=oe(),r=K(a=>a.state.swapExecution.orderId),n=t.SubmitOrderSuccessView,s=O.jsxs(O.Fragment,{children:[O.jsx(zn.Success,{title:e}),O.jsx(v6,{})]});return n?O.jsx(n,{newOrderId:r,children:s}):s},GH=2e4,jH=[{text:"Minutes",value:R.TimeUnit.Minutes},{text:"Hours",value:R.TimeUnit.Hours},{text:"Days",value:R.TimeUnit.Days}],VH="The protocol uses an oracle price to help protect users from unfavorable executions. If the execution price is worse than the oracle price by more than the allowed percentage, the transaction will not be executed.";var u0={},E6;function WH(){if(E6)return u0;E6=1;var e=du.GenIcon;return u0.IoIosArrowDown=function(r){return e({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"}}]})(r)},u0}var qH=WH();const d0=()=>{const{publicClient:e}=oe();return on({mutationFn:async t=>{if(!e)throw new Error("publicClient is not defined");const r=10;let n=0,s=1e3;for(;n<r;)try{return await e.waitForTransactionReceipt({hash:t,confirmations:2,retryDelay:s})}catch(a){if(n++,n>=r)throw new Error(`Failed after ${r} attempts: ${a}`);await new Promise(o=>setTimeout(o,s)),s*=2}}}).mutateAsync},C6=e=>{const{orders:t}=pu(),{config:r,useToken:n}=oe(),s=Fe(),a=F.useMemo(()=>t==null?void 0:t.all.find(g=>g.id===e),[t,e])||{},o=T6(a),i=n==null?void 0:n(a==null?void 0:a.srcTokenAddress),c=n==null?void 0:n(a==null?void 0:a.dstTokenAddress),l=QH(i,c,a),u=Ge({value:JH(i,c,a)}),d=Ge({value:Fr(i==null?void 0:i.decimals,a==null?void 0:a.srcAmountFilled)}),p=Ge({value:Fr(c==null?void 0:c.decimals,a==null?void 0:a.dstAmountFilled)}),h=Ge({value:a==null?void 0:a.progress,decimalScale:2}),y=g6({srcToken:i,dstToken:c,limitPrice:l,deadline:a==null?void 0:a.deadline,srcAmount:a==null?void 0:a.srcAmount,srcAmountPerTrade:a==null?void 0:a.srcAmountPerTrade,totalTrades:a==null?void 0:a.totalTradesAmount,minDestAmountPerTrade:a==null?void 0:a.dstMinAmountPerTrade,tradeInterval:(a==null?void 0:a.totalTradesAmount)===1||!a||!(r!=null&&r.twapConfig)?void 0:R.getOrderFillDelayMillis(a,r.twapConfig),triggerPricePerTrade:a==null?void 0:a.triggerPricePerTrade,maker:a==null?void 0:a.maker});return F.useMemo(()=>({original:a,...y,title:o,createdAt:{label:s("createdAt"),value:a==null?void 0:a.createdAt},id:{label:s("id"),value:a==null?void 0:a.id},amountInFilled:{label:s("amountOut"),value:d,token:i},amountOutFilled:{label:s("amountReceived"),value:p,token:c},progress:{label:s("progress"),value:h},excecutionPrice:{label:(a==null?void 0:a.totalTradesAmount)===1?s("finalExcecutionPrice"):s("AverageExecutionPrice"),value:u,sellToken:i,buyToken:c},version:{label:s("version"),value:a==null?void 0:a.version}}),[a,s,u,d,p,h,o,i,c,y])},T6=e=>{const t=Fe();return F.useMemo(()=>e?e.type===R.OrderType.TRIGGER_PRICE_MARKET?t("triggerPriceMarket"):e.type===R.OrderType.TRIGGER_PRICE_LIMIT?t("triggerPriceLimit"):e.type===R.OrderType.TWAP_MARKET?t("twapMarket"):e.type===R.OrderType.TWAP_LIMIT?t("twapLimit"):t("twapMarket"):t("twapMarket"),[t,e==null?void 0:e.type])},f0=()=>{const{account:e,config:t,chainId:r}=oe();return F.useMemo(()=>["useTwapOrderHistoryManager",e,t==null?void 0:t.partner,r],[e,t,r])},S6=()=>{const{account:e,config:t,chainId:r}=oe(),n=`cancelled-orders-${e}-${t==null?void 0:t.partner}-${r}`,s=F.useCallback(()=>{const i=localStorage.getItem(n);return i?JSON.parse(i):[]},[n]),a=F.useCallback(i=>{const c=s();c.includes(i)||(c.push(i),localStorage.setItem(n,JSON.stringify(c)))},[s,n]),o=F.useCallback(i=>{const c=s().filter(l=>l!==i);localStorage.setItem(n,JSON.stringify(c))},[s,n]);return{getCancelledOrderIds:s,addCancelledOrderId:a,deleteCancelledOrderId:o}},YH=()=>{const e=bo(),{account:t}=oe(),r=f0();return F.useCallback(n=>{e.setQueryData(r,s=>s?s!=null&&s.some(a=>a.id===n.id)?s:[n,...s]:[n])},[e,r,t])},KH=()=>{const e=bo(),t=f0(),r=S6();return F.useCallback(n=>{n.forEach(s=>{r.addCancelledOrderId(s)}),e.setQueryData(t,s=>s?s.map(a=>n.includes(a.id)?{...a,status:R.OrderStatus.Canceled}:a):[])},[e,t,r.addCancelledOrderId])},ZH=()=>{const{getCancelledOrderIds:e,deleteCancelledOrderId:t}=S6();return F.useCallback(r=>{const n=new Set(e());r.forEach((s,a)=>{n.has(s.id)&&(s.status!==R.OrderStatus.Canceled?(console.log(`Marking order as cancelled: ${s.id}`),r[a]={...s,status:R.OrderStatus.Canceled}):(console.log(`Removing cancelled ID for already-cancelled order: ${s.id}`),t(s.id)))})},[e,t])},XH=()=>{const{account:e,config:t,chainId:r,callbacks:n,refetchBalances:s}=oe(),a=f0(),o=bo(),i=ZH(),c=iw({enabled:!!(e&&r&&t),refetchInterval:GH,refetchOnWindowFocus:!0,retry:!1,staleTime:1/0,initialData:[],queryKey:a,queryFn:async({signal:l})=>{var y;const u=await R.getAccountOrders({signal:l,chainId:r,config:t==null?void 0:t.twapConfig,account:e});i(u);let d=!1;const p=o.getQueryData(a),h=[];return p&&p.forEach(g=>{var v;const k=u.find(w=>w.id===g.id);k&&k.progress!==g.progress&&(d=!0,h.push(k),k.status===R.OrderStatus.Completed&&((v=n==null?void 0:n.onOrderFilled)==null||v.call(n,k)))}),d&&((y=n==null?void 0:n.onOrdersProgressUpdate)==null||y.call(n,h),s==null||s()),u.map(g=>t!=null&&t.twapConfig?{...g,fillDelayMillis:R.getOrderFillDelayMillis(g,t.twapConfig)}:g)}});return{...c,isLoading:!!(e&&c.isLoading)}},pu=()=>{const{data:e,isLoading:t,error:r,refetch:n,isRefetching:s}=XH(),{mutateAsync:a}=p0();return F.useMemo(()=>({orders:{all:e??[],open:hu(e??[],R.OrderStatus.Open),completed:hu(e??[],R.OrderStatus.Completed),expired:hu(e??[],R.OrderStatus.Expired),canceled:hu(e??[],R.OrderStatus.Canceled)},isLoading:t,error:r,refetch:()=>n().then(o=>o.data),cancelOrder:a,isRefetching:s}),[e,t,r,n,a,s])},A6=()=>{const e=K(r=>r.state.orderHistoryStatusFilter),{orders:t}=pu();return F.useMemo(()=>e?t.all.filter(r=>r.status.toLowerCase()===e.toLowerCase())||[]:t.all,[e,t])},hu=(e,t)=>e.filter(r=>r.status===t).sort((r,n)=>n.createdAt-r.createdAt),QH=(e,t,r)=>F.useMemo(()=>{if(!(!e||!t||!r||r!=null&&r.isMarketPrice))return ag(r,e==null?void 0:e.decimals,t==null?void 0:t.decimals)},[r,e,t]),JH=(e,t,r)=>F.useMemo(()=>{if(!(!e||!t||!r))return sg(r,e.decimals,t.decimals)},[r,e,t]),P6=()=>{const e=K(r=>r.updateState),t=K(r=>r.state.orderIdsToCancel);return F.useCallback(r=>{t!=null&&t.includes(r)?e({orderIdsToCancel:t==null?void 0:t.filter(n=>n!==r)}):e({orderIdsToCancel:[...t||[],r]})},[e,t])},e$=()=>{var T,m;const e=Fe(),{orders:t,isLoading:r,refetch:n,isRefetching:s}=pu(),{mutateAsync:a,isPending:o}=p0(),i=A6(),c=K(b=>b.updateState),l=K(b=>b.state.orderHistoryStatusFilter),u=K(b=>b.state.cancelOrdersMode),d=K(b=>b.state.orderIdsToCancel),p=F.useCallback(b=>c({cancelOrdersMode:b,orderIdsToCancel:[]}),[c]),h=F.useCallback(()=>c({selectedOrderID:void 0}),[c]),y=F.useCallback(b=>a({orders:b}),[a]),g=F.useCallback(b=>c({orderHistoryStatusFilter:b}),[]),k=F.useMemo(()=>{const b=Object.keys(R.OrderStatus).map(x=>({text:x,value:x}));return[{text:e("allOrders"),value:""},...b]},[e]),v=P6(),w=K(b=>b.state.selectedOrderID),S=C6(w),C=F.useMemo(()=>t.all.filter(b=>d==null?void 0:d.includes(b.id)),[t,d]),_=F.useCallback(()=>c({orderIdsToCancel:t.open.map(b=>b.id)}),[c,t]),z=F.useCallback(b=>a({orders:[b]}).then(x=>(x==null?void 0:x[0])||""),[a]);return{refetch:n,onHideSelectedOrder:h,onCancelOrders:y,onCancelOrder:z,onSelectStatus:g,onToggleCancelOrdersMode:p,onSelectOrder:v,isRefetching:s,orders:t,ordersToDisplay:i,isLoading:r,selectedOrder:w?S:void 0,openOrdersCount:((T=t==null?void 0:t.open)==null?void 0:T.length)||0,isCancelOrdersLoading:o,selectedStatus:l||((m=k[0])==null?void 0:m.value)||"",statuses:k,cancelOrdersMode:u,ordersToCancel:C,onSelectAllOrdersToCancel:_}},p0=()=>{const{account:e,walletClient:t,publicClient:r,config:n,callbacks:s,chainId:a}=oe(),o=d0(),i=K(d=>d.updateState),c=KH(),l=async d=>{R.analytics.onCancelOrderRequest(d.map(p=>p.id.toString()),1);try{return(await Promise.all(d.map(h=>t.writeContract({account:e,address:h.twapAddress,abi:R.TWAP_ABI,functionName:"cancel",args:[h.id],chain:t.chain}))))[0]}catch(p){throw R.analytics.onCancelOrderError(p),p}},u=async d=>{var p;try{R.analytics.onCancelOrderRequest(d.map(g=>g.hash),2);const h=await t.writeContract({account:e,address:n.repermit,abi:R.REPERMIT_ABI,functionName:"cancel",args:[d.map(g=>g.hash)],chain:t.chain}),y=await o(h);if(!y)throw new Error("failed to get transaction receipt");if(y.status==="reverted")throw new Error("failed to cancel order");return R.analytics.onCancelOrderSuccess(h),(p=s==null?void 0:s.onCancelOrderSuccess)==null||p.call(s,{orders:d,txHash:h,explorerUrl:Ii(h,a)}),y.transactionHash}catch(h){throw R.analytics.onCancelOrderError(h),h}};return on({mutationFn:async({orders:d})=>{var p,h;if(!e||!t||!r||!n)throw new Error("missing required parameters");try{(p=s==null?void 0:s.onCancelOrderRequest)==null||p.call(s,d),i({cancelOrderStatus:gt.LOADING,cancelOrderTxHash:void 0,cancelOrderError:void 0});const y=d.filter(w=>w.version===1),g=d.filter(w=>w.version===2),[k,v]=await Promise.all([y.length?l(y):Promise.resolve(""),g.length?u(g):Promise.resolve("")]);return i({cancelOrderStatus:gt.SUCCESS,orderIdsToCancel:[]}),c(d.map(w=>w.id)),[...k||[],v]}catch(y){console.error("cancel order error",y),(h=s==null?void 0:s.onCancelOrderFailed)==null||h.call(s,y.message),hp(y)?i({cancelOrderStatus:void 0}):(i({cancelOrderStatus:gt.FAILED}),R.analytics.onCancelOrderError(y))}}})},I6=F.createContext({}),Mt=()=>F.useContext(I6),t$=()=>{const e=K(c=>c.state.selectedOrderID),t=C6(e),r=Fe(),[n,s]=F.useState("panel1"),{components:a}=oe(),o=a.TokenLogo;F.useEffect(()=>{s("panel1")},[t.id.value]);const i=c=>{s(n===c?!1:c)};return t?O.jsx(I6.Provider,{value:{order:t},children:O.jsxs("div",{className:"twap-orders__selected-order",children:[O.jsx(oh,{SrcTokenLogo:o&&O.jsx(o,{token:t.data.srcToken}),DstTokenLogo:o&&O.jsx(o,{token:t.data.dstToken}),fromTitle:r("from"),inToken:t.data.srcToken,toTitle:r("to"),outToken:t.data.dstToken}),O.jsx(we.Container,{children:O.jsxs("div",{className:"twap-orders__selected-order-bottom",children:[O.jsxs("div",{className:"twap-orders__selected-order-accordions",children:[O.jsx(U6,{title:r("excecutionSummary"),onClick:()=>i("panel1"),expanded:n==="panel1",children:O.jsx(u$,{})}),O.jsx(U6,{title:r("orderInfo"),expanded:n==="panel2",onClick:()=>i("panel2"),children:O.jsx(r$,{})})]}),O.jsx(f$,{})]})})]})}):null},U6=({expanded:e,onClick:t,children:r,title:n})=>O.jsxs("div",{className:"twap-orders__selected-order-accordion",children:[O.jsxs("div",{onClick:t,className:"twap-orders__selected-order-accordion-trigger",children:[O.jsx("p",{children:n}),O.jsx(qH.IoIosArrowDown,{style:{transform:e?"rotate(180deg)":"rotate(0deg)"}})]}),e&&O.jsx("div",{className:"twap-orders__selected-order-accordion-details",children:r})]}),r$=()=>O.jsxs(we,{children:[O.jsx(l$,{}),O.jsx(p$,{}),O.jsx(o$,{}),O.jsx(h$,{}),O.jsx(n$,{}),O.jsx(s$,{}),O.jsx(a$,{}),O.jsx(i$,{}),O.jsx(c$,{}),O.jsx(x$,{}),O.jsx(we.Recipient,{})]}),n$=()=>{const{order:e}=Mt();return O.jsx(we.TradeSize,{tradeSize:e.display.tradeSize.value,srcToken:e.data.srcToken,label:e.display.tradeSize.label,tooltip:e.display.tradeSize.tooltip,trades:e.display.totalTrades.value})},s$=()=>{const{order:e}=Mt();return O.jsx(we.TradesAmount,{trades:e.display.totalTrades.value,label:e.display.totalTrades.label,tooltip:e.display.totalTrades.tooltip})},a$=()=>{const{order:e}=Mt();return O.jsx(we.MinDestAmount,{dstToken:e.data.dstToken,dstMinAmountOut:e.display.minDestAmountPerTrade.value,label:e.display.minDestAmountPerTrade.label,tooltip:e.display.minDestAmountPerTrade.tooltip})},o$=()=>{const{order:e}=Mt();return O.jsx(we.Deadline,{deadline:e.display.deadline.value,label:e.display.deadline.label,tooltip:e.display.deadline.tooltip})},i$=()=>{const{order:e}=Mt();return O.jsx(we.TradeInterval,{fillDelayMillis:e.display.tradeInterval.value,chunks:e.display.totalTrades.value,label:e.display.tradeInterval.label,tooltip:e.display.tradeInterval.tooltip})},c$=()=>{const{order:e}=Mt();return O.jsx(we.TriggerPrice,{dstToken:e.data.dstToken,price:e.display.triggerPricePerTrade.value,label:e.display.triggerPricePerTrade.label,tooltip:e.display.triggerPricePerTrade.tooltip})},l$=()=>{const{order:e}=Mt();return O.jsx(we.OrderID,{id:e.id.value||""})},u$=()=>O.jsxs(we,{children:[O.jsx(y$,{}),O.jsx(m$,{}),O.jsx(d$,{}),O.jsx(g$,{}),O.jsx(w$,{})]}),d$=()=>{var r;const{order:e}=Mt(),t=Ge({value:e.amountOutFilled.value,decimalScale:3});return e.amountOutFilled.value?O.jsx(we.DetailRow,{title:e.amountOutFilled.label,children:O.jsxs("p",{children:[t||"-"," ",(r=e.data.dstToken)==null?void 0:r.symbol]})}):null},f$=()=>{const{order:e}=Mt(),{mutateAsync:t,isPending:r}=p0(),{components:n}=oe(),s=n.Button,a=F.useCallback(async()=>{},[t,e]);return!e||e.original.status!==R.OrderStatus.Open||!s?null:O.jsx(s,{loading:r,onClick:a,disabled:r,className:"twap-cancel-order",children:"Cancel"})},p$=()=>{const{order:e}=Mt(),t=Fe(),r=r0(e.createdAt.value);return O.jsx(we.DetailRow,{title:t("createdAt")||"",children:O.jsx("p",{children:r})})},h$=()=>{var n;const{order:e}=Mt(),t=Fe(),r=Ge({value:e.display.srcAmount.value,decimalScale:3});return O.jsx(we.DetailRow,{title:t("amountOut")||"",children:O.jsxs("p",{children:[r||0," ",(n=e.data.srcToken)==null?void 0:n.symbol]})})},m$=()=>{var r;const{order:e}=Mt(),t=Ge({value:e.amountInFilled.value,decimalScale:3});return O.jsx(we.DetailRow,{title:e.amountInFilled.label,children:O.jsxs("p",{children:[t||"-"," ",(r=e.data.srcToken)==null?void 0:r.symbol]})})},b$=()=>{const{order:e}=Mt(),t=Fe();return F.useMemo(()=>{switch(e.original.status){case R.OrderStatus.Open:return t("Open")||"";case R.OrderStatus.Completed:return t("Completed")||"";case R.OrderStatus.Expired:return t("Expired")||"";case R.OrderStatus.Canceled:return t("Canceled")||""}},[e.original.status,t])},y$=()=>{const e=Fe(),t=b$();return O.jsx(we.DetailRow,{title:e("status")||"",children:O.jsx("p",{children:t})})},g$=()=>{const{order:e}=Mt(),t=Ge({value:e.progress.value,decimalScale:2});return O.jsx(we.DetailRow,{title:e.progress.label,children:O.jsxs("p",{children:[t||0,"%"]})})},x$=()=>{const{order:e}=Mt(),t=Fe();return e.display.limitPrice.value?O.jsx(O6,{title:t("limitPrice")||"",price:e.display.limitPrice.value,srcToken:e.data.srcToken,dstToken:e.data.dstToken}):null},w$=()=>{const{order:e}=Mt();return e.excecutionPrice.value?O.jsx(O6,{title:e.excecutionPrice.label,price:e.excecutionPrice.value,srcToken:e.data.srcToken,dstToken:e.data.dstToken}):null},O6=({price:e,srcToken:t,dstToken:r,title:n})=>{const s=Ge({value:e,decimalScale:3});return O.jsx(we.DetailRow,{title:n,children:ue(e||0).isZero()?O.jsx("p",{children:"-"}):O.jsxs("p",{children:["1 ",t==null?void 0:t.symbol," = ",s," ",r==null?void 0:r.symbol]})})};var h0={},B6;function v$(){if(B6)return h0;B6=1;var e=du.GenIcon;return h0.HiArrowRight=function(r){return e({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z",clipRule:"evenodd"}}]})(r)},h0}var k$=v$();const mu=0,rs=1,Za=2,M6=4;function _6(e){return()=>e}function E$(e){e()}function D6(e,t){return r=>e(t(r))}function F6(e,t){return()=>e(t)}function C$(e,t){return r=>e(t,r)}function m0(e){return e!==void 0}function T$(...e){return()=>{e.map(E$)}}function Xa(){}function bu(e,t){return t(e),e}function S$(e,t){return t(e)}function et(...e){return e}function je(e,t){return e(rs,t)}function Ce(e,t){e(mu,t)}function b0(e){e(Za)}function st(e){return e(M6)}function ce(e,t){return je(e,C$(t,mu))}function zr(e,t){const r=e(rs,n=>{r(),t(n)});return r}function N6(e){let t,r;return n=>s=>{t=s,r&&clearTimeout(r),r=setTimeout(()=>{n(t)},e)}}function z6(e,t){return e===t}function tt(e=z6){let t;return r=>n=>{e(t,n)||(t=n,r(n))}}function he(e){return t=>r=>{e(r)&&t(r)}}function re(e){return t=>D6(t,e)}function Jr(e){return t=>()=>{t(e)}}function V(e,...t){const r=A$(...t);return(n,s)=>{switch(n){case Za:b0(e);return;case rs:return je(e,r(s))}}}function en(e,t){return r=>n=>{r(t=e(t,n))}}function qs(e){return t=>r=>{e>0?e--:t(r)}}function On(e){let t=null,r;return n=>s=>{t=s,!r&&(r=setTimeout(()=>{r=void 0,n(t)},e))}}function Te(...e){const t=new Array(e.length);let r=0,n=null;const s=Math.pow(2,e.length)-1;return e.forEach((a,o)=>{const i=Math.pow(2,o);je(a,c=>{const l=r;r=r|i,t[o]=c,l!==s&&r===s&&n&&(n(),n=null)})}),a=>o=>{const i=()=>{a([o].concat(t))};r===s?i():n=i}}function A$(...e){return t=>e.reduceRight(S$,t)}function P$(e){let t,r;const n=()=>t==null?void 0:t();return function(s,a){switch(s){case rs:return a?r===a?void 0:(n(),r=a,t=je(e,a),t):(n(),Xa);case Za:n(),r=null;return}}}function Y(e){let t=e;const r=Be();return(n,s)=>{switch(n){case mu:t=s;break;case rs:{s(t);break}case M6:return t}return r(n,s)}}function _t(e,t){return bu(Y(t),r=>ce(e,r))}function Be(){const e=[];return(t,r)=>{switch(t){case mu:e.slice().forEach(n=>{n(r)});return;case Za:e.splice(0,e.length);return;case rs:return e.push(r),()=>{const n=e.indexOf(r);n>-1&&e.splice(n,1)}}}}function cr(e){return bu(Be(),t=>ce(e,t))}function He(e,t=[],{singleton:r}={singleton:!0}){return{constructor:e,dependencies:t,id:I$(),singleton:r}}const I$=()=>Symbol();function U$(e){const t=new Map,r=({constructor:n,dependencies:s,id:a,singleton:o})=>{if(o&&t.has(a))return t.get(a);const i=n(s.map(c=>r(c)));return o&&t.set(a,i),i};return r(e)}function yt(...e){const t=Be(),r=new Array(e.length);let n=0;const s=Math.pow(2,e.length)-1;return e.forEach((a,o)=>{const i=Math.pow(2,o);je(a,c=>{r[o]=c,n=n|i,n===s&&Ce(t,r)})}),function(a,o){switch(a){case Za:{b0(t);return}case rs:return n===s&&o(r),je(t,o)}}}function me(e,t=z6){return V(e,tt(t))}function y0(...e){return function(t,r){switch(t){case Za:return;case rs:return T$(...e.map(n=>je(n,r)))}}}var Kt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Kt||{});const O$={0:"debug",3:"error",1:"log",2:"warn"},B$=()=>typeof globalThis>"u"?window:globalThis,ns=He(()=>{const e=Y(3);return{log:Y((t,r,n=1)=>{var s;const a=(s=B$().VIRTUOSO_LOG_LEVEL)!=null?s:st(e);n>=a&&console[O$[n]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,r)}),logLevel:e}},[],{singleton:!0});function Ys(e,t,r){return g0(e,t,r).callbackRef}function g0(e,t,r){const n=F.useRef(null);let s=o=>{};const a=F.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(o=>{const i=()=>{const c=o[0].target;c.offsetParent!==null&&e(c)};r?i():requestAnimationFrame(i)}):null,[e,r]);return s=o=>{o&&t?(a==null||a.observe(o),n.current=o):(n.current&&(a==null||a.unobserve(n.current)),n.current=null)},{callbackRef:s,ref:n}}function M$(e,t,r,n,s,a,o,i,c){const l=F.useCallback(u=>{const d=_$(u.children,t,i?"offsetWidth":"offsetHeight",s);let p=u.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const h=p.lastElementChild.dataset.viewportType==="window";let y;h&&(y=p.ownerDocument.defaultView);const g=o?i?o.scrollLeft:o.scrollTop:h?i?y.scrollX||y.document.documentElement.scrollLeft:y.scrollY||y.document.documentElement.scrollTop:i?p.scrollLeft:p.scrollTop,k=o?i?o.scrollWidth:o.scrollHeight:h?i?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight:i?p.scrollWidth:p.scrollHeight,v=o?i?o.offsetWidth:o.offsetHeight:h?i?y.innerWidth:y.innerHeight:i?p.offsetWidth:p.offsetHeight;n({scrollHeight:k,scrollTop:Math.max(g,0),viewportHeight:v}),a==null||a(i?L6("column-gap",getComputedStyle(u).columnGap,s):L6("row-gap",getComputedStyle(u).rowGap,s)),d!==null&&e(d)},[e,t,s,a,o,n,i]);return g0(l,r,c)}function _$(e,t,r,n){const s=e.length;if(s===0)return null;const a=[];for(let o=0;o<s;o++){const i=e.item(o);if(i.dataset.index===void 0)continue;const c=parseInt(i.dataset.index),l=parseFloat(i.dataset.knownSize),u=t(i,r);if(u===0&&n("Zero-sized element, this should not happen",{child:i},Kt.ERROR),u===l)continue;const d=a[a.length-1];a.length===0||d.size!==u||d.endIndex!==c-1?a.push({endIndex:c,size:u,startIndex:c}):a[a.length-1].endIndex++}return a}function L6(e,t,r){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&r(`${e} was not resolved to pixel value correctly`,t,Kt.WARN),t==="normal"?0:parseInt(t??"0",10)}function R6(e,t,r){const n=F.useRef(null),s=F.useCallback(c=>{if(!(c!=null&&c.offsetParent))return;const l=c.getBoundingClientRect(),u=l.width;let d,p;if(t){const h=t.getBoundingClientRect(),y=l.top-h.top;p=h.height-Math.max(0,y),d=y+t.scrollTop}else{const h=o.current.ownerDocument.defaultView;p=h.innerHeight-Math.max(0,l.top),d=l.top+h.scrollY}n.current={offsetTop:d,visibleHeight:p,visibleWidth:u},e(n.current)},[e,t]),{callbackRef:a,ref:o}=g0(s,!0,r),i=F.useCallback(()=>{s(o.current)},[s,o]);return F.useEffect(()=>{var c;if(t){t.addEventListener("scroll",i);const l=new ResizeObserver(()=>{requestAnimationFrame(i)});return l.observe(t),()=>{t.removeEventListener("scroll",i),l.unobserve(t)}}else{const l=(c=o.current)==null?void 0:c.ownerDocument.defaultView;return l==null||l.addEventListener("scroll",i),l==null||l.addEventListener("resize",i),()=>{l==null||l.removeEventListener("scroll",i),l==null||l.removeEventListener("resize",i)}}},[i,t,o]),a}const zt=He(()=>{const e=Be(),t=Be(),r=Y(0),n=Be(),s=Y(0),a=Be(),o=Be(),i=Y(0),c=Y(0),l=Y(0),u=Y(0),d=Be(),p=Be(),h=Y(!1),y=Y(!1),g=Y(!1);return ce(V(e,re(({scrollTop:k})=>k)),t),ce(V(e,re(({scrollHeight:k})=>k)),o),ce(t,s),{deviation:r,fixedFooterHeight:l,fixedHeaderHeight:c,footerHeight:u,headerHeight:i,horizontalDirection:y,scrollBy:p,scrollContainerState:e,scrollHeight:o,scrollingInProgress:h,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:n,statefulScrollTop:s,viewportHeight:a}},[],{singleton:!0}),ji={lvl:0};function H6(e,t){const r=e.length;if(r===0)return[];let{index:n,value:s}=t(e[0]);const a=[];for(let o=1;o<r;o++){const{index:i,value:c}=t(e[o]);a.push({end:i-1,start:n,value:s}),n=i,s=c}return a.push({end:1/0,start:n,value:s}),a}function qe(e){return e===ji}function Vi(e,t){if(!qe(e))return t===e.k?e.v:t<e.k?Vi(e.l,t):Vi(e.r,t)}function Lr(e,t,r="k"){if(qe(e))return[-1/0,void 0];if(Number(e[r])===t)return[e.k,e.v];if(Number(e[r])<t){const n=Lr(e.r,t,r);return n[0]===-1/0?[e.k,e.v]:n}return Lr(e.l,t,r)}function lr(e,t,r){return qe(e)?j6(t,r,1):t===e.k?kt(e,{k:t,v:r}):t<e.k?V6(kt(e,{l:lr(e.l,t,r)})):V6(kt(e,{r:lr(e.r,t,r)}))}function Qa(){return ji}function Ja(e,t,r){if(qe(e))return[];const n=Lr(e,t)[0];return D$(w0(e,n,r))}function x0(e,t){if(qe(e))return ji;const{k:r,l:n,r:s}=e;if(t===r){if(qe(n))return s;if(qe(s))return n;{const[a,o]=G6(n);return yu(kt(e,{k:a,l:$6(n),v:o}))}}else return t<r?yu(kt(e,{l:x0(n,t)})):yu(kt(e,{r:x0(s,t)}))}function Ks(e){return qe(e)?[]:[...Ks(e.l),{k:e.k,v:e.v},...Ks(e.r)]}function w0(e,t,r){if(qe(e))return[];const{k:n,l:s,r:a,v:o}=e;let i=[];return n>t&&(i=i.concat(w0(s,t,r))),n>=t&&n<=r&&i.push({k:n,v:o}),n<=r&&(i=i.concat(w0(a,t,r))),i}function yu(e){const{l:t,lvl:r,r:n}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(v0(t))return W6(kt(e,{lvl:r-1}));if(!qe(t)&&!qe(t.r))return kt(t.r,{l:kt(t,{r:t.r.l}),lvl:r,r:kt(e,{l:t.r.r,lvl:r-1})});throw new Error("Unexpected empty nodes")}else{if(v0(e))return k0(kt(e,{lvl:r-1}));if(!qe(n)&&!qe(n.l)){const s=n.l,a=v0(s)?n.lvl-1:n.lvl;return kt(s,{l:kt(e,{lvl:r-1,r:s.l}),lvl:s.lvl+1,r:k0(kt(n,{l:s.r,lvl:a}))})}else throw new Error("Unexpected empty nodes")}}function kt(e,t){return j6(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function $6(e){return qe(e.r)?e.l:yu(kt(e,{r:$6(e.r)}))}function v0(e){return qe(e)||e.lvl>e.r.lvl}function G6(e){return qe(e.r)?[e.k,e.v]:G6(e.r)}function j6(e,t,r,n=ji,s=ji){return{k:e,l:n,lvl:r,r:s,v:t}}function V6(e){return k0(W6(e))}function W6(e){const{l:t}=e;return!qe(t)&&t.lvl===e.lvl?kt(t,{r:kt(e,{l:t.r})}):e}function k0(e){const{lvl:t,r}=e;return!qe(r)&&!qe(r.r)&&r.lvl===t&&r.r.lvl===t?kt(r,{l:kt(e,{r:r.l}),lvl:t+1}):e}function D$(e){return H6(e,({k:t,v:r})=>({index:t,value:r}))}function q6(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Wi(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const E0=He(()=>({recalcInProgress:Y(!1)}),[],{singleton:!0});function Y6(e,t,r){return e[gu(e,t,r)]}function gu(e,t,r,n=0){let s=e.length-1;for(;n<=s;){const a=Math.floor((n+s)/2),o=e[a],i=r(o,t);if(i===0)return a;if(i===-1){if(s-n<2)return a-1;s=a-1}else{if(s===n)return a;n=a+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function F$(e,t,r,n){const s=gu(e,t,n),a=gu(e,r,n,s);return e.slice(s,a+1)}function ss(e,t){return Math.round(e.getBoundingClientRect()[t])}function xu(e){return!qe(e.groupOffsetTree)}function C0({index:e},t){return t===e?0:t<e?-1:1}function N$(){return{groupIndices:[],groupOffsetTree:Qa(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Qa()}}function z$(e,t){let r=qe(e)?0:1/0;for(const n of t){const{endIndex:s,size:a,startIndex:o}=n;if(r=Math.min(r,o),qe(e)){e=lr(e,0,a);continue}const i=Ja(e,o-1,s+1);if(i.some(V$(n)))continue;let c=!1,l=!1;for(const{end:u,start:d,value:p}of i)c?(s>=d||a===p)&&(e=x0(e,d)):(l=p!==a,c=!0),u>s&&s>=d&&p!==a&&(e=lr(e,s+1,p));l&&(e=lr(e,o,a))}return[e,r]}function L$(e){return typeof e.groupIndex<"u"}function R$({offset:e},t){return t===e?0:t<e?-1:1}function qi(e,t,r){if(t.length===0)return 0;const{index:n,offset:s,size:a}=Y6(t,e,C0),o=e-n,i=a*o+(o-1)*r+s;return i>0?i+r:i}function K6(e,t){if(!xu(t))return e;let r=0;for(;t.groupIndices[r]<=e+r;)r++;return e+r}function Z6(e,t,r){if(L$(e))return t.groupIndices[e.groupIndex]+1;{const n=e.index==="LAST"?r:e.index;let s=K6(n,t);return s=Math.max(0,s,Math.min(r,s)),s}}function H$(e,t,r,n=0){return n>0&&(t=Math.max(t,Y6(e,n,C0).offset)),H6(F$(e,t,r,R$),j$)}function $$(e,[t,r,n,s]){t.length>0&&n("received item sizes",t,Kt.DEBUG);const a=e.sizeTree;let o=a,i=0;if(r.length>0&&qe(a)&&t.length===2){const p=t[0].size,h=t[1].size;o=r.reduce((y,g)=>lr(lr(y,g,p),g+1,h),o)}else[o,i]=z$(o,t);if(o===a)return e;const{lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d}=T0(e.offsetTree,i,o,s);return{groupIndices:r,groupOffsetTree:r.reduce((p,h)=>lr(p,h,qi(h,d,s)),Qa()),lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d,sizeTree:o}}function G$(e){return Ks(e).map(({k:t,v:r},n,s)=>{const a=s[n+1];return{endIndex:a?a.k-1:1/0,size:r,startIndex:t}})}function X6(e,t){let r=0,n=0;for(;r<e;)r+=t[n+1]-t[n]-1,n++;return n-(r===e?0:1)}function T0(e,t,r,n){let s=e,a=0,o=0,i=0,c=0;if(t!==0){c=gu(s,t-1,C0),i=s[c].offset;const l=Lr(r,t-1);a=l[0],o=l[1],s.length&&s[c].size===Lr(r,t)[1]&&(c-=1),s=s.slice(0,c+1)}else s=[];for(const{start:l,value:u}of Ja(r,t,1/0)){const d=l-a,p=d*o+i+d*n;s.push({index:l,offset:p,size:u}),a=l,i=p,o=u}return{lastIndex:a,lastOffset:i,lastSize:o,offsetTree:s}}function j$(e){return{index:e.index,value:e}}function V$(e){const{endIndex:t,size:r,startIndex:n}=e;return s=>s.start===n&&(s.end===t||s.end===1/0)&&s.value===r}const W$={offsetHeight:"height",offsetWidth:"width"},tn=He(([{log:e},{recalcInProgress:t}])=>{const r=Be(),n=Be(),s=_t(n,0),a=Be(),o=Be(),i=Y(0),c=Y([]),l=Y(void 0),u=Y(void 0),d=Y(void 0),p=Y(void 0),h=Y((T,m)=>ss(T,W$[m])),y=Y(void 0),g=Y(0),k=N$(),v=_t(V(r,Te(c,e,g),en($$,k),tt()),k),w=_t(V(c,tt(),en((T,m)=>({current:m,prev:T.current}),{current:[],prev:[]}),re(({prev:T})=>T)),[]);ce(V(c,he(T=>T.length>0),Te(v,g),re(([T,m,b])=>{const x=T.reduce((A,I,U)=>lr(A,I,qi(I,m.offsetTree,b)||U),Qa());return{...m,groupIndices:T,groupOffsetTree:x}})),v),ce(V(n,Te(v),he(([T,{lastIndex:m}])=>T<m),re(([T,{lastIndex:m,lastSize:b}])=>[{endIndex:m,size:b,startIndex:T}])),r),ce(l,u);const S=_t(V(l,re(T=>T===void 0)),!0);ce(V(u,he(T=>T!==void 0&&qe(st(v).sizeTree)),re(T=>{const m=st(d),b=st(c).length>0;return m?b?[{endIndex:0,size:m,startIndex:0},{endIndex:1,size:T,startIndex:1}]:[]:[{endIndex:0,size:T,startIndex:0}]})),r),ce(V(p,he(T=>T!==void 0&&T.length>0&&qe(st(v).sizeTree)),re(T=>{const m=[];let b=T[0],x=0;for(let A=1;A<T.length;A++){const I=T[A];I!==b&&(m.push({endIndex:A-1,size:b,startIndex:x}),b=I,x=A)}return m.push({endIndex:T.length-1,size:b,startIndex:x}),m})),r),ce(V(c,Te(d,u),he(([,T,m])=>T!==void 0&&m!==void 0),re(([T,m,b])=>{const x=[];for(let A=0;A<T.length;A++){const I=T[A],U=T[A+1];x.push({startIndex:I,endIndex:I,size:m}),U!==void 0&&x.push({startIndex:I+1,endIndex:U-1,size:b})}return x})),r);const C=cr(V(r,Te(v),en(({sizes:T},[m,b])=>({changed:b!==T,sizes:b}),{changed:!1,sizes:k}),re(T=>T.changed)));je(V(i,en((T,m)=>({diff:T.prev-m,prev:m}),{diff:0,prev:0}),re(T=>T.diff)),T=>{const{groupIndices:m}=st(v);if(T>0)Ce(t,!0),Ce(a,T+X6(T,m));else if(T<0){const b=st(w);b.length>0&&(T-=X6(-T,b)),Ce(o,T)}}),je(V(i,Te(e)),([T,m])=>{T<0&&m("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:i},Kt.ERROR)});const _=cr(a);ce(V(a,Te(v),re(([T,m])=>{const b=m.groupIndices.length>0,x=[],A=m.lastSize;if(b){const I=Vi(m.sizeTree,0);let U=0,D=0;for(;U<T;){const P=m.groupIndices[D],M=m.groupIndices.length===D+1?1/0:m.groupIndices[D+1]-P-1;x.push({endIndex:P,size:I,startIndex:P}),x.push({endIndex:P+1+M-1,size:A,startIndex:P+1}),D++,U+=M+1}const E=Ks(m.sizeTree);return U!==T&&E.shift(),E.reduce((P,{k:M,v:B})=>{let L=P.ranges;return P.prevSize!==0&&(L=[...P.ranges,{endIndex:M+T-1,size:P.prevSize,startIndex:P.prevIndex}]),{prevIndex:M+T,prevSize:B,ranges:L}},{prevIndex:T,prevSize:0,ranges:x}).ranges}return Ks(m.sizeTree).reduce((I,{k:U,v:D})=>({prevIndex:U+T,prevSize:D,ranges:[...I.ranges,{endIndex:U+T-1,size:I.prevSize,startIndex:I.prevIndex}]}),{prevIndex:0,prevSize:A,ranges:[]}).ranges})),r);const z=cr(V(o,Te(v,g),re(([T,{offsetTree:m},b])=>{const x=-T;return qi(x,m,b)})));return ce(V(o,Te(v,g),re(([T,m,b])=>{if(m.groupIndices.length>0){if(qe(m.sizeTree))return m;let x=Qa();const A=st(w);let I=0,U=0,D=0;for(;I<-T;){D=A[U];const E=A[U+1]-D-1;U++,I+=E+1}if(x=Ks(m.sizeTree).reduce((E,{k:P,v:M})=>lr(E,Math.max(0,P+T),M),x),I!==-T){const E=Vi(m.sizeTree,D);x=lr(x,0,E);const P=Lr(m.sizeTree,-T+1)[1];x=lr(x,1,P)}return{...m,sizeTree:x,...T0(m.offsetTree,0,x,b)}}else{const x=Ks(m.sizeTree).reduce((A,{k:I,v:U})=>lr(A,Math.max(0,I+T),U),Qa());return{...m,sizeTree:x,...T0(m.offsetTree,0,x,b)}}})),v),{beforeUnshiftWith:_,data:y,defaultItemSize:u,firstItemIndex:i,fixedItemSize:l,fixedGroupSize:d,gap:g,groupIndices:c,heightEstimates:p,itemSize:h,listRefresh:C,shiftWith:o,shiftWithOffset:z,sizeRanges:r,sizes:v,statefulTotalCount:s,totalCount:n,trackItemSizes:S,unshiftWith:a}},et(ns,E0),{singleton:!0});function q$(e){return e.reduce((t,r)=>(t.groupIndices.push(t.totalCount),t.totalCount+=r+1,t),{groupIndices:[],totalCount:0})}const Q6=He(([{groupIndices:e,sizes:t,totalCount:r},{headerHeight:n,scrollTop:s}])=>{const a=Be(),o=Be(),i=cr(V(a,re(q$)));return ce(V(i,re(c=>c.totalCount)),r),ce(V(i,re(c=>c.groupIndices)),e),ce(V(yt(s,t,n),he(([c,l])=>xu(l)),re(([c,l,u])=>Lr(l.groupOffsetTree,Math.max(c-u,0),"v")[0]),tt(),re(c=>[c])),o),{groupCounts:a,topItemsIndexes:o}},et(tn,zt)),as=He(([{log:e}])=>{const t=Y(!1),r=cr(V(t,he(n=>n),tt()));return je(t,n=>{n&&st(e)("props updated",{},Kt.DEBUG)}),{didMount:r,propsReady:t}},et(ns),{singleton:!0}),Y$=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function J6(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!Y$)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Yi=He(([{gap:e,listRefresh:t,sizes:r,totalCount:n},{fixedFooterHeight:s,fixedHeaderHeight:a,footerHeight:o,headerHeight:i,scrollingInProgress:c,scrollTo:l,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const h=Be(),y=Be(),g=Y(0);let k=null,v=null,w=null;function S(){k&&(k(),k=null),w&&(w(),w=null),v&&(clearTimeout(v),v=null),Ce(c,!1)}return ce(V(h,Te(r,d,n,g,i,o,p),Te(e,a,s),re(([[C,_,z,T,m,b,x,A],I,U,D])=>{const E=J6(C),{align:P,behavior:M,offset:B}=E,L=T-1,H=Z6(E,_,L);let G=qi(H,_.offsetTree,I)+b;P==="end"?(G+=U+Lr(_.sizeTree,H)[1]-z+D,H===L&&(G+=x)):P==="center"?G+=(U+Lr(_.sizeTree,H)[1]-z+D)/2:G-=m,B&&(G+=B);const J=pe=>{S(),pe?(A("retrying to scroll to",{location:C},Kt.DEBUG),Ce(h,C)):(Ce(y,!0),A("list did not change, scroll successful",{},Kt.DEBUG))};if(S(),M==="smooth"){let pe=!1;w=je(t,be=>{pe=pe||be}),k=zr(u,()=>{J(pe)})}else k=zr(V(t,K$(150)),J);return v=setTimeout(()=>{S()},1200),Ce(c,!0),A("scrolling from index to",{behavior:M,index:H,top:G},Kt.DEBUG),{behavior:M,top:G}})),l),{scrollTargetReached:y,scrollToIndex:h,topListHeight:g}},et(tn,zt,ns),{singleton:!0});function K$(e){return t=>{const r=setTimeout(()=>{t(!1)},e);return n=>{n&&(t(!0),clearTimeout(r))}}}function S0(e,t){e==0?t():requestAnimationFrame(()=>{S0(e-1,t)})}function A0(e,t){const r=t-1;return typeof e=="number"?e:e.index==="LAST"?r:e.index}const Ki=He(([{defaultItemSize:e,listRefresh:t,sizes:r},{scrollTop:n},{scrollTargetReached:s,scrollToIndex:a},{didMount:o}])=>{const i=Y(!0),c=Y(0),l=Y(!0);return ce(V(o,Te(c),he(([u,d])=>!!d),Jr(!1)),i),ce(V(o,Te(c),he(([u,d])=>!!d),Jr(!1)),l),je(V(yt(t,o),Te(i,r,e,l),he(([[,u],d,{sizeTree:p},h,y])=>u&&(!qe(p)||m0(h))&&!d&&!y),Te(c)),([,u])=>{zr(s,()=>{Ce(l,!0)}),S0(4,()=>{zr(n,()=>{Ce(i,!0)}),Ce(a,u)})}),{initialItemFinalLocationReached:l,initialTopMostItemIndex:c,scrolledToInitialItem:i}},et(tn,zt,Yi,as),{singleton:!0});function ex(e,t){return Math.abs(e-t)<1.01}const Zi="up",Xi="down",Z$="none",X$={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},Q$=0,Qi=He(([{footerHeight:e,headerHeight:t,scrollBy:r,scrollContainerState:n,scrollTop:s,viewportHeight:a}])=>{const o=Y(!1),i=Y(!0),c=Be(),l=Be(),u=Y(4),d=Y(Q$),p=_t(V(y0(V(me(s),qs(1),Jr(!0)),V(me(s),qs(1),Jr(!1),N6(100))),tt()),!1),h=_t(V(y0(V(r,Jr(!0)),V(r,Jr(!1),N6(200))),tt()),!1);ce(V(yt(me(s),me(d)),re(([w,S])=>w<=S),tt()),i),ce(V(i,On(50)),l);const y=cr(V(yt(n,me(a),me(t),me(e),me(u)),en((w,[{scrollHeight:S,scrollTop:C},_,z,T,m])=>{const b=C+_-S>-m,x={scrollHeight:S,scrollTop:C,viewportHeight:_};if(b){let I,U;return C>w.state.scrollTop?(I="SCROLLED_DOWN",U=w.state.scrollTop-C):(I="SIZE_DECREASED",U=w.state.scrollTop-C||w.scrollTopDelta),{atBottom:!0,atBottomBecause:I,scrollTopDelta:U,state:x}}let A;return x.scrollHeight>w.state.scrollHeight?A="SIZE_INCREASED":_<w.state.viewportHeight?A="VIEWPORT_HEIGHT_DECREASING":C<w.state.scrollTop?A="SCROLLING_UPWARDS":A="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:A,state:x}},X$),tt((w,S)=>w&&w.atBottom===S.atBottom))),g=_t(V(n,en((w,{scrollHeight:S,scrollTop:C,viewportHeight:_})=>{if(ex(w.scrollHeight,S))return{changed:!1,jump:0,scrollHeight:S,scrollTop:C};{const z=S-(C+_)<1;return w.scrollTop!==C&&z?{changed:!0,jump:w.scrollTop-C,scrollHeight:S,scrollTop:C}:{changed:!0,jump:0,scrollHeight:S,scrollTop:C}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),he(w=>w.changed),re(w=>w.jump)),0);ce(V(y,re(w=>w.atBottom)),o),ce(V(o,On(50)),c);const k=Y(Xi);ce(V(n,re(({scrollTop:w})=>w),tt(),en((w,S)=>st(h)?{direction:w.direction,prevScrollTop:S}:{direction:S<w.prevScrollTop?Zi:Xi,prevScrollTop:S},{direction:Xi,prevScrollTop:0}),re(w=>w.direction)),k),ce(V(n,On(50),Jr(Z$)),k);const v=Y(0);return ce(V(p,he(w=>!w),Jr(0)),v),ce(V(s,On(100),Te(p),he(([w,S])=>!!S),en(([w,S],[C])=>[S,C],[0,0]),re(([w,S])=>S-w)),v),{atBottomState:y,atBottomStateChange:c,atBottomThreshold:u,atTopStateChange:l,atTopThreshold:d,isAtBottom:o,isAtTop:i,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:k,scrollVelocity:v}},et(zt)),Ji="top",ec="bottom",tx="none";function rx(e,t,r){return typeof e=="number"?r===Zi&&t===Ji||r===Xi&&t===ec?e:0:r===Zi?t===Ji?e.main:e.reverse:t===ec?e.main:e.reverse}function nx(e,t){var r;return typeof e=="number"?e:(r=e[t])!=null?r:0}const P0=He(([{deviation:e,fixedHeaderHeight:t,headerHeight:r,scrollTop:n,viewportHeight:s}])=>{const a=Be(),o=Y(0),i=Y(0),c=Y(0),l=_t(V(yt(me(n),me(s),me(r),me(a,Wi),me(c),me(o),me(t),me(e),me(i)),re(([u,d,p,[h,y],g,k,v,w,S])=>{const C=u-w,_=k+v,z=Math.max(p-C,0);let T=tx;const m=nx(S,Ji),b=nx(S,ec);return h-=w,h+=p+v,y+=p+v,y-=w,h>u+_-m&&(T=Zi),y<u-z+d+b&&(T=Xi),T!==tx?[Math.max(C-p-rx(g,Ji,T)-m,0),C-z-v+d+rx(g,ec,T)+b]:null}),he(u=>u!=null),tt(Wi)),[0,0]);return{increaseViewportBy:i,listBoundary:a,overscan:c,topListHeight:o,visibleRange:l}},et(zt),{singleton:!0});function J$(e,t,r){if(xu(t)){const n=K6(e,t);return[{index:Lr(t.groupOffsetTree,n)[0],offset:0,size:0},{data:r==null?void 0:r[0],index:n,offset:0,size:0}]}return[{data:r==null?void 0:r[0],index:e,offset:0,size:0}]}const I0={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function wu(e,t,r,n,s,a){const{lastIndex:o,lastOffset:i,lastSize:c}=s;let l=0,u=0;if(e.length>0){l=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=r-o,p=i+d*c+(d-1)*n,h=l,y=p-u;return{bottom:u,firstItemIndex:a,items:ax(e,s,a),offsetBottom:y,offsetTop:l,top:h,topItems:ax(t,s,a),topListHeight:t.reduce((g,k)=>k.size+g,0),totalCount:r}}function sx(e,t,r,n,s,a){let o=0;if(r.groupIndices.length>0)for(const u of r.groupIndices){if(u-o>=e)break;o++}const i=e+o,c=A0(t,i),l=Array.from({length:i}).map((u,d)=>({data:a[d+c],index:d+c,offset:0,size:0}));return wu(l,[],i,s,r,n)}function ax(e,t,r){if(e.length===0)return[];if(!xu(t))return e.map(l=>({...l,index:l.index+r,originalIndex:l.index}));const n=e[0].index,s=e[e.length-1].index,a=[],o=Ja(t.groupOffsetTree,n,s);let i,c=0;for(const l of e){(!i||i.end<l.index)&&(i=o.shift(),c=t.groupIndices.indexOf(i.start));let u;l.index===i.start?u={index:c,type:"group"}:u={groupIndex:c,index:l.index-(c+1)+r},a.push({...u,data:l.data,offset:l.offset,originalIndex:l.index,size:l.size})}return a}function ox(e,t){var r;return e===void 0?0:typeof e=="number"?e:(r=e[t])!=null?r:0}const Zs=He(([{data:e,firstItemIndex:t,gap:r,sizes:n,totalCount:s},a,{listBoundary:o,topListHeight:i,visibleRange:c},{initialTopMostItemIndex:l,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:h},{recalcInProgress:y}])=>{const g=Y([]),k=Y(0),v=Be(),w=Y(0);ce(a.topItemsIndexes,g);const S=_t(V(yt(h,y,me(c,Wi),me(s),me(n),me(l),u,me(g),me(t),me(r),me(w),e),he(([T,m,,b,,,,,,,,x])=>{const A=x&&x.length!==b;return T&&!m&&!A}),re(([,,[T,m],b,x,A,I,U,D,E,P,M])=>{var B,L,H,G;const J=x,{offsetTree:pe,sizeTree:be}=J,ie=st(k);if(b===0)return{...I0,totalCount:b};if(T===0&&m===0)return ie===0?{...I0,totalCount:b}:sx(ie,A,x,D,E,M||[]);if(qe(be))return ie>0?null:wu(J$(A0(A,b),J,M),[],b,E,J,D);const fe=[];if(U.length>0){const Se=U[0],ke=U[U.length-1];let ye=0;for(const Ze of Ja(be,Se,ke)){const Ye=Ze.value,Xe=Math.max(Ze.start,Se),kr=Math.min(Ze.end,ke);for(let Pt=Xe;Pt<=kr;Pt++)fe.push({data:M==null?void 0:M[Pt],index:Pt,offset:ye,size:Ye}),ye+=Ye}}if(!I)return wu([],fe,b,E,J,D);const Ue=U.length>0?U[U.length-1]+1:0,Q=H$(pe,T,m,Ue);if(Q.length===0)return null;const ve=b-1,_e=bu([],Se=>{for(const ke of Q){const ye=ke.value;let Ze=ye.offset,Ye=ke.start;const Xe=ye.size;if(ye.offset<T){Ye+=Math.floor((T-ye.offset+E)/(Xe+E));const Pt=Ye-ke.start;Ze+=Pt*Xe+Pt*E}Ye<Ue&&(Ze+=(Ue-Ye)*Xe,Ye=Ue);const kr=Math.min(ke.end,ve);for(let Pt=Ye;Pt<=kr&&!(Ze>=m);Pt++)Se.push({data:M==null?void 0:M[Pt],index:Pt,offset:Ze,size:Xe}),Ze+=Xe+E}}),$e=ox(P,Ji),ot=ox(P,ec);if(_e.length>0&&($e>0||ot>0)){const Se=_e[0],ke=_e[_e.length-1];if($e>0&&Se.index>Ue){const ye=Math.min($e,Se.index-Ue),Ze=[];let Ye=Se.offset;for(let Xe=Se.index-1;Xe>=Se.index-ye;Xe--){const kr=(L=(B=Ja(be,Xe,Xe)[0])==null?void 0:B.value)!=null?L:Se.size;Ye-=kr+E,Ze.unshift({data:M==null?void 0:M[Xe],index:Xe,offset:Ye,size:kr})}_e.unshift(...Ze)}if(ot>0&&ke.index<ve){const ye=Math.min(ot,ve-ke.index);let Ze=ke.offset+ke.size+E;for(let Ye=ke.index+1;Ye<=ke.index+ye;Ye++){const Xe=(G=(H=Ja(be,Ye,Ye)[0])==null?void 0:H.value)!=null?G:ke.size;_e.push({data:M==null?void 0:M[Ye],index:Ye,offset:Ze,size:Xe}),Ze+=Xe+E}}}return wu(_e,fe,b,E,J,D)}),he(T=>T!==null),tt()),I0);ce(V(e,he(m0),re(T=>T==null?void 0:T.length)),s),ce(V(S,re(T=>T.topListHeight)),d),ce(d,i),ce(V(S,re(T=>[T.top,T.bottom])),o),ce(V(S,re(T=>T.items)),v);const C=cr(V(S,he(({items:T})=>T.length>0),Te(s,e),he(([{items:T},m])=>T[T.length-1].originalIndex===m-1),re(([,T,m])=>[T-1,m]),tt(Wi),re(([T])=>T))),_=cr(V(S,On(200),he(({items:T,topItems:m})=>T.length>0&&T[0].originalIndex===m.length),re(({items:T})=>T[0].index),tt())),z=cr(V(S,he(({items:T})=>T.length>0),re(({items:T})=>{let m=0,b=T.length-1;for(;T[m].type==="group"&&m<b;)m++;for(;T[b].type==="group"&&b>m;)b--;return{endIndex:T[b].index,startIndex:T[m].index}}),tt(q6)));return{endReached:C,initialItemCount:k,itemsRendered:v,listState:S,minOverscanItemCount:w,rangeChanged:z,startReached:_,topItemsIndexes:g,...p}},et(tn,Q6,P0,Ki,Yi,Qi,as,E0),{singleton:!0}),ix=He(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:r,headerHeight:n},{listState:s}])=>{const a=Be(),o=_t(V(yt(r,e,n,t,s),re(([i,c,l,u,d])=>i+c+l+u+d.offsetBottom+d.bottom)),0);return ce(me(o),a),{totalListHeight:o,totalListHeightChanged:a}},et(zt,Zs),{singleton:!0}),eG=He(([{viewportHeight:e},{totalListHeight:t}])=>{const r=Y(!1),n=_t(V(yt(r,e,t),he(([s])=>s),re(([,s,a])=>Math.max(0,s-a)),On(0),tt()),0);return{alignToBottom:r,paddingTopAddition:n}},et(zt,ix),{singleton:!0}),cx=He(()=>({context:Y(null)})),tG=({itemBottom:e,itemTop:t,locationParams:{align:r,behavior:n,...s},viewportBottom:a,viewportTop:o})=>t<o?{...s,align:r??"start",behavior:n}:e>a?{...s,align:r??"end",behavior:n}:null,lx=He(([{gap:e,sizes:t,totalCount:r},{fixedFooterHeight:n,fixedHeaderHeight:s,headerHeight:a,scrollingInProgress:o,scrollTop:i,viewportHeight:c},{scrollToIndex:l}])=>{const u=Be();return ce(V(u,Te(t,c,r,a,s,n,i),Te(e),re(([[d,p,h,y,g,k,v,w],S])=>{const{align:C,behavior:_,calculateViewLocation:z=tG,done:T,...m}=d,b=Z6(d,p,y-1),x=qi(b,p.offsetTree,S)+g+k,A=x+Lr(p.sizeTree,b)[1],I=w+k,U=w+h-v,D=z({itemBottom:A,itemTop:x,locationParams:{align:C,behavior:_,...m},viewportBottom:U,viewportTop:I});return D?T&&zr(V(o,he(E=>!E),qs(st(o)?1:2)),T):T&&T(),D}),he(d=>d!==null)),l),{scrollIntoView:u}},et(tn,zt,Yi,Zs,ns),{singleton:!0});function ux(e){return e?e==="smooth"?"smooth":"auto":!1}const rG=(e,t)=>typeof e=="function"?ux(e(t)):t&&ux(e),nG=He(([{listRefresh:e,totalCount:t,fixedItemSize:r,data:n},{atBottomState:s,isAtBottom:a},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:c,propsReady:l},{log:u},{scrollingInProgress:d},{context:p},{scrollIntoView:h}])=>{const y=Y(!1),g=Be();let k=null;function v(_){Ce(o,{align:"end",behavior:_,index:"LAST"})}je(V(yt(V(me(t),qs(1)),c),Te(me(y),a,i,d),re(([[_,z],T,m,b,x])=>{let A=z&&b,I="auto";return A&&(I=rG(T,m||x),A=A&&!!I),{followOutputBehavior:I,shouldFollow:A,totalCount:_}}),he(({shouldFollow:_})=>_)),({followOutputBehavior:_,totalCount:z})=>{k&&(k(),k=null),st(r)?requestAnimationFrame(()=>{st(u)("following output to ",{totalCount:z},Kt.DEBUG),v(_)}):k=zr(e,()=>{st(u)("following output to ",{totalCount:z},Kt.DEBUG),v(_),k=null})});function w(_){const z=zr(s,T=>{_&&!T.atBottom&&T.notAtBottomBecause==="SIZE_INCREASED"&&!k&&(st(u)("scrolling to bottom due to increased size",{},Kt.DEBUG),v("auto"))});setTimeout(z,100)}je(V(yt(me(y),t,l),he(([_,,z])=>_&&z),en(({value:_},[,z])=>({refreshed:_===z,value:z}),{refreshed:!1,value:0}),he(({refreshed:_})=>_),Te(y,t)),([,_])=>{st(i)&&w(_!==!1)}),je(g,()=>{w(st(y)!==!1)}),je(yt(me(y),s),([_,z])=>{_&&!z.atBottom&&z.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&v("auto")});const S=Y(null),C=Be();return ce(y0(V(me(n),re(_=>{var z;return(z=_==null?void 0:_.length)!=null?z:0})),V(me(t))),C),je(V(yt(V(C,qs(1)),c),Te(me(S),i,d,p),re(([[_,z],T,m,b,x])=>z&&m&&(T==null?void 0:T({context:x,totalCount:_,scrollingInProgress:b}))),he(_=>!!_),On(0)),_=>{k&&(k(),k=null),st(r)?requestAnimationFrame(()=>{st(u)("scrolling into view",{}),Ce(h,_)}):k=zr(e,()=>{st(u)("scrolling into view",{}),Ce(h,_),k=null})}),{autoscrollToBottom:g,followOutput:y,scrollIntoViewOnChange:S}},et(tn,Qi,Yi,Ki,as,ns,zt,cx,lx)),sG=He(([{data:e,firstItemIndex:t,gap:r,sizes:n},{initialTopMostItemIndex:s},{initialItemCount:a,listState:o},{didMount:i}])=>(ce(V(i,Te(a),he(([,c])=>c!==0),Te(s,n,t,r,e),re(([[,c],l,u,d,p,h=[]])=>sx(c,l,u,d,p,h))),o),{}),et(tn,Ki,Zs,as),{singleton:!0}),aG=He(([{didMount:e},{scrollTo:t},{listState:r}])=>{const n=Y(0);return je(V(e,Te(n),he(([,s])=>s!==0),re(([,s])=>({top:s}))),s=>{zr(V(r,qs(1),he(a=>a.items.length>1)),()=>{requestAnimationFrame(()=>{Ce(t,s)})})}),{initialScrollTop:n}},et(as,zt,Zs),{singleton:!0}),dx=He(([{scrollVelocity:e}])=>{const t=Y(!1),r=Be(),n=Y(!1);return ce(V(e,Te(n,t,r),he(([s,a])=>!!a),re(([s,a,o,i])=>{const{enter:c,exit:l}=a;if(o){if(l(s,i))return!1}else if(c(s,i))return!0;return o}),tt()),t),je(V(yt(t,e,r),Te(n)),([[s,a,o],i])=>{s&&i&&i.change&&i.change(a,o)}),{isSeeking:t,scrollSeekConfiguration:n,scrollSeekRangeChanged:r,scrollVelocity:e}},et(Qi),{singleton:!0}),U0=He(([{scrollContainerState:e,scrollTo:t}])=>{const r=Be(),n=Be(),s=Be(),a=Y(!1),o=Y(void 0);return ce(V(yt(r,n),re(([{scrollHeight:i,scrollTop:c,viewportHeight:l},{offsetTop:u}])=>({scrollHeight:i,scrollTop:Math.max(0,c-u),viewportHeight:l}))),e),ce(V(t,Te(n),re(([i,{offsetTop:c}])=>({...i,top:i.top+c}))),s),{customScrollParent:o,useWindowScroll:a,windowScrollContainerState:r,windowScrollTo:s,windowViewportRect:n}},et(zt)),oG=He(([{sizeRanges:e,sizes:t},{headerHeight:r,scrollTop:n},{initialTopMostItemIndex:s},{didMount:a},{useWindowScroll:o,windowScrollContainerState:i,windowViewportRect:c}])=>{const l=Be(),u=Y(void 0),d=Y(null),p=Y(null);return ce(i,d),ce(c,p),je(V(l,Te(t,n,o,d,p,r)),([h,y,g,k,v,w,S])=>{const C=G$(y.sizeTree);k&&v!==null&&w!==null&&(g=v.scrollTop-w.offsetTop),g-=S,h({ranges:C,scrollTop:g})}),ce(V(u,he(m0),re(iG)),s),ce(V(a,Te(u),he(([,h])=>h!==void 0),tt(),re(([,h])=>h.ranges)),e),{getState:l,restoreStateFrom:u}},et(tn,zt,Ki,as,U0));function iG(e){return{align:"start",index:0,offset:e.scrollTop}}const cG=He(([{topItemsIndexes:e}])=>{const t=Y(0);return ce(V(t,he(r=>r>=0),re(r=>Array.from({length:r}).map((n,s)=>s))),e),{topItemCount:t}},et(Zs));function fx(e){let t=!1,r;return()=>(t||(t=!0,r=e()),r)}const lG=fx(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),uG=He(([{deviation:e,scrollBy:t,scrollingInProgress:r,scrollTop:n},{isAtBottom:s,isScrolling:a,lastJumpDueToItemResize:o,scrollDirection:i},{listState:c},{beforeUnshiftWith:l,gap:u,shiftWithOffset:d,sizes:p},{log:h},{recalcInProgress:y}])=>{const g=cr(V(c,Te(o),en(([,v,w,S],[{bottom:C,items:_,offsetBottom:z,totalCount:T},m])=>{const b=C+z;let x=0;return w===T&&v.length>0&&_.length>0&&(_[0].originalIndex===0&&v[0].originalIndex===0||(x=b-S,x!==0&&(x+=m))),[x,_,T,b]},[0,[],0,0]),he(([v])=>v!==0),Te(n,i,r,s,h,y),he(([,v,w,S,,,C])=>!C&&!S&&v!==0&&w===Zi),re(([[v],,,,,w])=>(w("Upward scrolling compensation",{amount:v},Kt.DEBUG),v))));function k(v){v>0?(Ce(t,{behavior:"auto",top:-v}),Ce(e,0)):(Ce(e,0),Ce(t,{behavior:"auto",top:-v}))}return je(V(g,Te(e,a)),([v,w,S])=>{S&&lG()?Ce(e,w-v):k(-v)}),je(V(yt(_t(a,!1),e,y),he(([v,w,S])=>!v&&!S&&w!==0),re(([v,w])=>w),On(1)),k),ce(V(d,re(v=>({top:-v}))),t),je(V(l,Te(p,u),re(([v,{groupIndices:w,lastSize:S,sizeTree:C},_])=>{function z(T){return T*(S+_)}if(w.length===0)return z(v);{let T=0;const m=Vi(C,0);let b=0,x=0;for(;b<v;){b++,T+=m;let A=w.length===x+1?1/0:w[x+1]-w[x]-1;b+A>v&&(T-=m,A=v-b+1),b+=A,T+=z(A),x++}return T}})),v=>{Ce(e,v),requestAnimationFrame(()=>{Ce(t,{top:v}),requestAnimationFrame(()=>{Ce(e,0),Ce(y,!1)})})}),{deviation:e}},et(zt,Qi,Zs,tn,ns,E0)),dG=He(([e,t,r,n,s,a,o,i,c,l,u])=>({...e,...t,...r,...n,...s,...a,...o,...i,...c,...l,...u}),et(P0,sG,as,dx,ix,aG,eG,U0,lx,ns,cx)),px=He(([{data:e,defaultItemSize:t,firstItemIndex:r,fixedItemSize:n,fixedGroupSize:s,gap:a,groupIndices:o,heightEstimates:i,itemSize:c,sizeRanges:l,sizes:u,statefulTotalCount:d,totalCount:p,trackItemSizes:h},{initialItemFinalLocationReached:y,initialTopMostItemIndex:g,scrolledToInitialItem:k},v,w,S,C,{scrollToIndex:_},z,{topItemCount:T},{groupCounts:m},b])=>{const{listState:x,minOverscanItemCount:A,topItemsIndexes:I,rangeChanged:U,...D}=C;return ce(U,b.scrollSeekRangeChanged),ce(V(b.windowViewportRect,re(E=>E.visibleHeight)),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:r,fixedItemHeight:n,fixedGroupHeight:s,gap:a,groupCounts:m,heightEstimates:i,initialItemFinalLocationReached:y,initialTopMostItemIndex:g,scrolledToInitialItem:k,sizeRanges:l,topItemCount:T,topItemsIndexes:I,totalCount:p,...S,groupIndices:o,itemSize:c,listState:x,minOverscanItemCount:A,scrollToIndex:_,statefulTotalCount:d,trackItemSizes:h,rangeChanged:U,...D,...b,...v,sizes:u,...w}},et(tn,Ki,zt,oG,nG,Zs,Yi,uG,cG,Q6,dG));function fG(e,t){const r={},n={};let s=0;const a=e.length;for(;s<a;)n[e[s]]=1,s+=1;for(const o in t)Object.hasOwn(n,o)||(r[o]=t[o]);return r}const vu=typeof document<"u"?F.useLayoutEffect:F.useEffect;function hx(e,t,r){const n=Object.keys(t.required||{}),s=Object.keys(t.optional||{}),a=Object.keys(t.methods||{}),o=Object.keys(t.events||{}),i=F.createContext({});function c(k,v){k.propsReady&&Ce(k.propsReady,!1);for(const w of n){const S=k[t.required[w]];Ce(S,v[w])}for(const w of s)if(w in v){const S=k[t.optional[w]];Ce(S,v[w])}k.propsReady&&Ce(k.propsReady,!0)}function l(k){return a.reduce((v,w)=>(v[w]=S=>{const C=k[t.methods[w]];Ce(C,S)},v),{})}function u(k){return o.reduce((v,w)=>(v[w]=P$(k[t.events[w]]),v),{})}const d=F.forwardRef((k,v)=>{const{children:w,...S}=k,[C]=F.useState(()=>bu(U$(e),T=>{c(T,S)})),[_]=F.useState(F6(u,C));vu(()=>{for(const T of o)T in S&&je(_[T],S[T]);return()=>{Object.values(_).map(b0)}},[S,_,C]),vu(()=>{c(C,S)}),F.useImperativeHandle(v,_6(l(C)));const z=r;return O.jsx(i.Provider,{value:C,children:r?O.jsx(z,{...fG([...n,...s,...o],S),children:w}):w})}),p=k=>{const v=F.useContext(i);return F.useCallback(w=>{Ce(v[k],w)},[v,k])},h=k=>{const v=F.useContext(i)[k],w=F.useCallback(S=>je(v,S),[v]);return F.useSyncExternalStore(w,()=>st(v),()=>st(v))},y=k=>{const v=F.useContext(i)[k],[w,S]=F.useState(F6(st,v));return vu(()=>je(v,C=>{C!==w&&S(_6(C))}),[v,w]),w},g=F.version.startsWith("18")?h:y;return{Component:d,useEmitter:(k,v)=>{const w=F.useContext(i)[k];vu(()=>je(w,v),[v,w])},useEmitterValue:g,usePublisher:p}}const mx=F.createContext(void 0),bx=F.createContext(void 0),yx=typeof document<"u"?F.useLayoutEffect:F.useEffect;function O0(e){return"self"in e}function pG(e){return"body"in e}function gx(e,t,r,n=Xa,s,a){const o=F.useRef(null),i=F.useRef(null),c=F.useRef(null),l=F.useCallback(p=>{let h,y,g;const k=p.target;if(pG(k)||O0(k)){const w=O0(k)?k:k.defaultView;g=a?w.scrollX:w.scrollY,h=a?w.document.documentElement.scrollWidth:w.document.documentElement.scrollHeight,y=a?w.innerWidth:w.innerHeight}else g=a?k.scrollLeft:k.scrollTop,h=a?k.scrollWidth:k.scrollHeight,y=a?k.offsetWidth:k.offsetHeight;const v=()=>{e({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:y})};p.suppressFlushSync?v():Pu.flushSync(v),i.current!==null&&(g===i.current||g<=0||g===h-y)&&(i.current=null,t(!0),c.current&&(clearTimeout(c.current),c.current=null))},[e,t,a]);F.useEffect(()=>{const p=s||o.current;return n(s||o.current),l({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",l,{passive:!0}),()=>{n(null),p.removeEventListener("scroll",l)}},[o,l,r,n,s]);function u(p){const h=o.current;if(!h||(a?"offsetWidth"in h&&h.offsetWidth===0:"offsetHeight"in h&&h.offsetHeight===0))return;const y=p.behavior==="smooth";let g,k,v;O0(h)?(k=Math.max(ss(h.document.documentElement,a?"width":"height"),a?h.document.documentElement.scrollWidth:h.document.documentElement.scrollHeight),g=a?h.innerWidth:h.innerHeight,v=a?window.scrollX:window.scrollY):(k=h[a?"scrollWidth":"scrollHeight"],g=ss(h,a?"width":"height"),v=h[a?"scrollLeft":"scrollTop"]);const w=k-g;if(p.top=Math.ceil(Math.max(Math.min(w,p.top),0)),ex(g,k)||p.top===v){e({scrollHeight:k,scrollTop:v,viewportHeight:g}),y&&t(!0);return}y?(i.current=p.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,i.current=null,t(!0)},1e3)):i.current=null,a&&(p={behavior:p.behavior,left:p.top}),h.scrollTo(p)}function d(p){a&&(p={behavior:p.behavior,left:p.top}),o.current.scrollBy(p)}return{scrollByCallback:d,scrollerRef:o,scrollToCallback:u}}const B0="-webkit-sticky",xx="sticky",M0=fx(()=>{if(typeof document>"u")return xx;const e=document.createElement("div");return e.style.position=B0,e.style.position===B0?B0:xx});function _0(e){return e}const hG=He(()=>{const e=Y(i=>`Item ${i}`),t=Y(i=>`Group ${i}`),r=Y({}),n=Y(_0),s=Y("div"),a=Y(Xa),o=(i,c=null)=>_t(V(r,re(l=>l[i]),tt()),c);return{components:r,computeItemKey:n,EmptyPlaceholder:o("EmptyPlaceholder"),FooterComponent:o("Footer"),GroupComponent:o("Group","div"),groupContent:t,HeaderComponent:o("Header"),HeaderFooterTag:s,ItemComponent:o("Item","div"),itemContent:e,ListComponent:o("List","div"),ScrollerComponent:o("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:o("ScrollSeekPlaceholder"),TopItemListComponent:o("TopItemList")}}),mG=He(([e,t])=>({...e,...t}),et(px,hG)),bG=({height:e})=>O.jsx("div",{style:{height:e}}),yG={overflowAnchor:"none",position:M0(),zIndex:1},wx={overflowAnchor:"none"},gG={...wx,display:"inline-block",height:"100%"},vx=F.memo(function({showTopList:e=!1}){const t=ge("listState"),r=xr("sizeRanges"),n=ge("useWindowScroll"),s=ge("customScrollParent"),a=xr("windowScrollContainerState"),o=xr("scrollContainerState"),i=s||n?a:o,c=ge("itemContent"),l=ge("context"),u=ge("groupContent"),d=ge("trackItemSizes"),p=ge("itemSize"),h=ge("log"),y=xr("gap"),g=ge("horizontalDirection"),{callbackRef:k}=M$(r,p,d,e?Xa:i,h,y,s,g,ge("skipAnimationFrameInResizeObserver")),[v,w]=F.useState(0);D0("deviation",D=>{v!==D&&w(D)});const S=ge("EmptyPlaceholder"),C=ge("ScrollSeekPlaceholder")||bG,_=ge("ListComponent"),z=ge("ItemComponent"),T=ge("GroupComponent"),m=ge("computeItemKey"),b=ge("isSeeking"),x=ge("groupIndices").length>0,A=ge("alignToBottom"),I=ge("initialItemFinalLocationReached"),U=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:A?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:A?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...I?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&S?O.jsx(S,{...Dt(S,l)}):O.jsx(_,{...Dt(_,l),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:k,style:U,children:(e?t.topItems:t.items).map(D=>{const E=D.originalIndex,P=m(E+t.firstItemIndex,D.data,l);return b?F.createElement(C,{...Dt(C,l),height:D.size,index:D.index,key:P,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?F.createElement(T,{...Dt(T,l),"data-index":E,"data-item-index":D.index,"data-known-size":D.size,key:P,style:yG},u(D.index,l)):F.createElement(z,{...Dt(z,l),...kG(z,D.data),"data-index":E,"data-item-group-index":D.groupIndex,"data-item-index":D.index,"data-known-size":D.size,key:P,style:g?gG:wx},x?c(D.index,D.groupIndex,D.data,l):c(D.index,D.data,l))})})}),xG={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},wG={outline:"none",overflowX:"auto",position:"relative"},ku=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),vG={position:M0(),top:0,width:"100%",zIndex:1};function Dt(e,t){if(typeof e!="string")return{context:t}}function kG(e,t){return{item:typeof e=="string"?void 0:t}}const EG=F.memo(function(){const e=ge("HeaderComponent"),t=xr("headerHeight"),r=ge("HeaderFooterTag"),n=Ys(F.useMemo(()=>a=>{t(ss(a,"height"))},[t]),!0,ge("skipAnimationFrameInResizeObserver")),s=ge("context");return e?O.jsx(r,{ref:n,children:O.jsx(e,{...Dt(e,s)})}):null}),CG=F.memo(function(){const e=ge("FooterComponent"),t=xr("footerHeight"),r=ge("HeaderFooterTag"),n=Ys(F.useMemo(()=>a=>{t(ss(a,"height"))},[t]),!0,ge("skipAnimationFrameInResizeObserver")),s=ge("context");return e?O.jsx(r,{ref:n,children:O.jsx(e,{...Dt(e,s)})}):null});function kx({useEmitter:e,useEmitterValue:t,usePublisher:r}){return F.memo(function({children:n,style:s,context:a,...o}){const i=r("scrollContainerState"),c=t("ScrollerComponent"),l=r("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:h,scrollToCallback:y}=gx(i,l,c,u,void 0,d);return e("scrollTo",y),e("scrollBy",p),O.jsx(c,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:h,style:{...d?wG:xG,...s},tabIndex:0,...o,...Dt(c,a),children:n})})}function Ex({useEmitter:e,useEmitterValue:t,usePublisher:r}){return F.memo(function({children:n,style:s,context:a,...o}){const i=r("windowScrollContainerState"),c=t("ScrollerComponent"),l=r("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),p=t("customScrollParent"),h=F.useRef(null),y=t("scrollerRef"),{scrollByCallback:g,scrollerRef:k,scrollToCallback:v}=gx(i,l,c,y,p);return yx(()=>{var w;return k.current=p||((w=h.current)==null?void 0:w.ownerDocument.defaultView),()=>{k.current=null}},[k,p]),e("windowScrollTo",v),e("scrollBy",g),O.jsx(c,{ref:h,"data-virtuoso-scroller":!0,style:{position:"relative",...s,...u!==0?{height:u+d}:{}},...o,...Dt(c,a),children:n})})}const TG=({children:e})=>{const t=F.useContext(mx),r=xr("viewportHeight"),n=xr("fixedItemHeight"),s=ge("alignToBottom"),a=ge("horizontalDirection"),o=F.useMemo(()=>D6(r,c=>ss(c,a?"width":"height")),[r,a]),i=Ys(o,!0,ge("skipAnimationFrameInResizeObserver"));return F.useEffect(()=>{t&&(r(t.viewportHeight),n(t.itemHeight))},[t,r,n]),O.jsx("div",{"data-viewport-type":"element",ref:i,style:ku(s),children:e})},SG=({children:e})=>{const t=F.useContext(mx),r=xr("windowViewportRect"),n=xr("fixedItemHeight"),s=ge("customScrollParent"),a=R6(r,s,ge("skipAnimationFrameInResizeObserver")),o=ge("alignToBottom");return F.useEffect(()=>{t&&(n(t.itemHeight),r({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,r,n]),O.jsx("div",{"data-viewport-type":"window",ref:a,style:ku(o),children:e})},AG=({children:e})=>{const t=ge("TopItemListComponent")||"div",r=ge("headerHeight"),n={...vG,marginTop:`${r}px`},s=ge("context");return O.jsx(t,{style:n,...Dt(t,s),children:e})},PG=F.memo(function(e){const t=ge("useWindowScroll"),r=ge("topItemsIndexes").length>0,n=ge("customScrollParent"),s=ge("context");return O.jsxs(n||t?OG:UG,{...e,context:s,children:[r&&O.jsx(AG,{children:O.jsx(vx,{showTopList:!0})}),O.jsxs(n||t?SG:TG,{children:[O.jsx(EG,{}),O.jsx(vx,{}),O.jsx(CG,{})]})]})}),{Component:IG,useEmitter:D0,useEmitterValue:ge,usePublisher:xr}=hx(mG,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},PG),UG=kx({useEmitter:D0,useEmitterValue:ge,usePublisher:xr}),OG=Ex({useEmitter:D0,useEmitterValue:ge,usePublisher:xr}),BG=IG;et(px,He(()=>{const e=Y(l=>O.jsxs("td",{children:["Item $",l]})),t=Y(null),r=Y(l=>O.jsxs("td",{colSpan:1e3,children:["Group ",l]})),n=Y(null),s=Y(null),a=Y({}),o=Y(_0),i=Y(Xa),c=(l,u=null)=>_t(V(a,re(d=>d[l]),tt()),u);return{components:a,computeItemKey:o,context:t,EmptyPlaceholder:c("EmptyPlaceholder"),FillerRow:c("FillerRow"),fixedFooterContent:s,fixedHeaderContent:n,itemContent:e,groupContent:r,ScrollerComponent:c("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder"),TableBodyComponent:c("TableBody","tbody"),TableComponent:c("Table","table"),TableFooterComponent:c("TableFoot","tfoot"),TableHeadComponent:c("TableHead","thead"),TableRowComponent:c("TableRow","tr"),GroupComponent:c("Group","tr")}})),M0();const Cx={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},MG={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:Tx,floor:Eu,max:tc,min:F0,round:Sx}=Math;function Ax(e,t,r){return Array.from({length:t-e+1}).map((n,s)=>({data:r===null?null:r[s+e],index:s+e}))}function _G(e){return{...MG,items:e}}function Cu(e,t){return e&&e.width===t.width&&e.height===t.height}function DG(e,t){return e&&e.column===t.column&&e.row===t.row}const FG=He(([{increaseViewportBy:e,listBoundary:t,overscan:r,visibleRange:n},{footerHeight:s,headerHeight:a,scrollBy:o,scrollContainerState:i,scrollTo:c,scrollTop:l,smoothScrollTargetReached:u,viewportHeight:d},p,h,{didMount:y,propsReady:g},{customScrollParent:k,useWindowScroll:v,windowScrollContainerState:w,windowScrollTo:S,windowViewportRect:C},_])=>{const z=Y(0),T=Y(0),m=Y(Cx),b=Y({height:0,width:0}),x=Y({height:0,width:0}),A=Be(),I=Be(),U=Y(0),D=Y(null),E=Y({column:0,row:0}),P=Be(),M=Be(),B=Y(!1),L=Y(0),H=Y(!0),G=Y(!1),J=Y(!1);je(V(y,Te(L),he(([Q,ve])=>!!ve)),()=>{Ce(H,!1)}),je(V(yt(y,H,x,b,L,G),he(([Q,ve,_e,$e,,ot])=>Q&&!ve&&_e.height!==0&&$e.height!==0&&!ot)),([,,,,Q])=>{Ce(G,!0),S0(1,()=>{Ce(A,Q)}),zr(V(l),()=>{Ce(t,[0,0]),Ce(H,!0)})}),ce(V(M,he(Q=>Q!=null&&Q.scrollTop>0),Jr(0)),T),je(V(y,Te(M),he(([,Q])=>Q!=null)),([,Q])=>{Q&&(Ce(b,Q.viewport),Ce(x,Q.item),Ce(E,Q.gap),Q.scrollTop>0&&(Ce(B,!0),zr(V(l,qs(1)),ve=>{Ce(B,!1)}),Ce(c,{top:Q.scrollTop})))}),ce(V(b,re(({height:Q})=>Q)),d),ce(V(yt(me(b,Cu),me(x,Cu),me(E,(Q,ve)=>Q&&Q.column===ve.column&&Q.row===ve.row),me(l)),re(([Q,ve,_e,$e])=>({gap:_e,item:ve,scrollTop:$e,viewport:Q}))),P),ce(V(yt(me(z),n,me(E,DG),me(x,Cu),me(b,Cu),me(D),me(T),me(B),me(H),me(L)),he(([,,,,,,,Q])=>!Q),re(([Q,[ve,_e],$e,ot,Se,ke,ye,,Ze,Ye])=>{const{column:Xe,row:kr}=$e,{height:Pt,width:L0}=ot,{width:Zx}=Se;if(ye===0&&(Q===0||Zx===0))return Cx;if(L0===0){const t2=A0(Ye,Q),gj=t2+Math.max(ye-1,0);return _G(Ax(t2,gj,ke))}const Tu=Px(Zx,L0,Xe);let po,ia;Ze?ve===0&&_e===0&&ye>0?(po=0,ia=ye-1):(po=Tu*Eu((ve+kr)/(Pt+kr)),ia=Tu*Tx((_e+kr)/(Pt+kr))-1,ia=F0(Q-1,tc(ia,Tu-1)),po=F0(ia,tc(0,po))):(po=0,ia=-1);const Xx=Ax(po,ia,ke),{bottom:Qx,top:Jx}=Ix(Se,$e,ot,Xx),e2=Tx(Q/Tu),yj=e2*Pt+(e2-1)*kr-Qx;return{bottom:Qx,itemHeight:Pt,items:Xx,itemWidth:L0,offsetBottom:yj,offsetTop:Jx,top:Jx}})),m),ce(V(D,he(Q=>Q!==null),re(Q=>Q.length)),z),ce(V(yt(b,x,m,E),he(([Q,ve,{items:_e}])=>_e.length>0&&ve.height!==0&&Q.height!==0),re(([Q,ve,{items:_e},$e])=>{const{bottom:ot,top:Se}=Ix(Q,$e,ve,_e);return[Se,ot]}),tt(Wi)),t);const pe=Y(!1);ce(V(l,Te(pe),re(([Q,ve])=>ve||Q!==0)),pe);const be=cr(V(yt(m,z),he(([{items:Q}])=>Q.length>0),Te(pe),he(([[Q,ve],_e])=>{const $e=Q.items[Q.items.length-1].index===ve-1;return(_e||Q.bottom>0&&Q.itemHeight>0&&Q.offsetBottom===0&&Q.items.length===ve)&&$e}),re(([[,Q]])=>Q-1),tt())),ie=cr(V(me(m),he(({items:Q})=>Q.length>0&&Q[0].index===0),Jr(0),tt())),fe=cr(V(me(m),Te(B),he(([{items:Q},ve])=>Q.length>0&&!ve),re(([{items:Q}])=>({endIndex:Q[Q.length-1].index,startIndex:Q[0].index})),tt(q6),On(0)));ce(fe,h.scrollSeekRangeChanged),ce(V(A,Te(b,x,z,E),re(([Q,ve,_e,$e,ot])=>{const Se=J6(Q),{align:ke,behavior:ye,offset:Ze}=Se;let Ye=Se.index;Ye==="LAST"&&(Ye=$e-1),Ye=tc(0,Ye,F0($e-1,Ye));let Xe=N0(ve,ot,_e,Ye);return ke==="end"?Xe=Sx(Xe-ve.height+_e.height):ke==="center"&&(Xe=Sx(Xe-ve.height/2+_e.height/2)),Ze&&(Xe+=Ze),{behavior:ye,top:Xe}})),c);const Ue=_t(V(m,re(Q=>Q.offsetBottom+Q.bottom)),0);return ce(V(C,re(Q=>({height:Q.visibleHeight,width:Q.visibleWidth}))),b),{customScrollParent:k,data:D,deviation:U,footerHeight:s,gap:E,headerHeight:a,increaseViewportBy:e,initialItemCount:T,itemDimensions:x,overscan:r,restoreStateFrom:M,scrollBy:o,scrollContainerState:i,scrollHeight:I,scrollTo:c,scrollToIndex:A,scrollTop:l,smoothScrollTargetReached:u,totalCount:z,useWindowScroll:v,viewportDimensions:b,windowScrollContainerState:w,windowScrollTo:S,windowViewportRect:C,...h,gridState:m,horizontalDirection:J,initialTopMostItemIndex:L,totalListHeight:Ue,...p,endReached:be,propsReady:g,rangeChanged:fe,startReached:ie,stateChanged:P,stateRestoreInProgress:B,..._}},et(P0,zt,Qi,dx,as,U0,ns));function Px(e,t,r){return tc(1,Eu((e+r)/(Eu(t)+r)))}function Ix(e,t,r,n){const{height:s}=r;if(s===void 0||n.length===0)return{bottom:0,top:0};const a=N0(e,t,r,n[0].index);return{bottom:N0(e,t,r,n[n.length-1].index)+s,top:a}}function N0(e,t,r,n){const s=Px(e.width,r.width,t.column),a=Eu(n/s),o=a*r.height+tc(0,a-1)*t.row;return o>0?o+t.row:o}const NG=He(()=>{const e=Y(d=>`Item ${d}`),t=Y({}),r=Y(null),n=Y("virtuoso-grid-item"),s=Y("virtuoso-grid-list"),a=Y(_0),o=Y("div"),i=Y(Xa),c=(d,p=null)=>_t(V(t,re(h=>h[d]),tt()),p),l=Y(!1),u=Y(!1);return ce(me(u),l),{components:t,computeItemKey:a,context:r,FooterComponent:c("Footer"),HeaderComponent:c("Header"),headerFooterTag:o,itemClassName:n,ItemComponent:c("Item","div"),itemContent:e,listClassName:s,ListComponent:c("List","div"),readyStateChanged:l,reportReadyState:u,ScrollerComponent:c("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),zG=He(([e,t])=>({...e,...t}),et(FG,NG)),LG=F.memo(function(){const e=at("gridState"),t=at("listClassName"),r=at("itemClassName"),n=at("itemContent"),s=at("computeItemKey"),a=at("isSeeking"),o=wr("scrollHeight"),i=at("ItemComponent"),c=at("ListComponent"),l=at("ScrollSeekPlaceholder"),u=at("context"),d=wr("itemDimensions"),p=wr("gap"),h=at("log"),y=at("stateRestoreInProgress"),g=wr("reportReadyState"),k=Ys(F.useMemo(()=>v=>{const w=v.parentElement.parentElement.scrollHeight;o(w);const S=v.firstChild;if(S){const{height:C,width:_}=S.getBoundingClientRect();d({height:C,width:_})}p({column:Ox("column-gap",getComputedStyle(v).columnGap,h),row:Ox("row-gap",getComputedStyle(v).rowGap,h)})},[o,d,p,h]),!0,!1);return yx(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),y?null:O.jsx(c,{className:t,ref:k,...Dt(c,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const w=s(v.index,v.data,u);return a?O.jsx(l,{...Dt(l,u),height:e.itemHeight,index:v.index,width:e.itemWidth},w):F.createElement(i,{...Dt(i,u),className:r,"data-index":v.index,key:w},n(v.index,v.data,u))})})}),RG=F.memo(function(){const e=at("HeaderComponent"),t=wr("headerHeight"),r=at("headerFooterTag"),n=Ys(F.useMemo(()=>a=>{t(ss(a,"height"))},[t]),!0,!1),s=at("context");return e?O.jsx(r,{ref:n,children:O.jsx(e,{...Dt(e,s)})}):null}),HG=F.memo(function(){const e=at("FooterComponent"),t=wr("footerHeight"),r=at("headerFooterTag"),n=Ys(F.useMemo(()=>a=>{t(ss(a,"height"))},[t]),!0,!1),s=at("context");return e?O.jsx(r,{ref:n,children:O.jsx(e,{...Dt(e,s)})}):null}),$G=({children:e})=>{const t=F.useContext(bx),r=wr("itemDimensions"),n=wr("viewportDimensions"),s=Ys(F.useMemo(()=>a=>{n(a.getBoundingClientRect())},[n]),!0,!1);return F.useEffect(()=>{t&&(n({height:t.viewportHeight,width:t.viewportWidth}),r({height:t.itemHeight,width:t.itemWidth}))},[t,n,r]),O.jsx("div",{ref:s,style:ku(!1),children:e})},GG=({children:e})=>{const t=F.useContext(bx),r=wr("windowViewportRect"),n=wr("itemDimensions"),s=at("customScrollParent"),a=R6(r,s,!1);return F.useEffect(()=>{t&&(n({height:t.itemHeight,width:t.itemWidth}),r({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,r,n]),O.jsx("div",{ref:a,style:ku(!1),children:e})},jG=F.memo(function({...e}){const t=at("useWindowScroll"),r=at("customScrollParent"),n=r||t?WG:VG,s=r||t?GG:$G,a=at("context");return O.jsx(n,{...e,...Dt(n,a),children:O.jsxs(s,{children:[O.jsx(RG,{}),O.jsx(LG,{}),O.jsx(HG,{})]})})}),{useEmitter:Ux,useEmitterValue:at,usePublisher:wr}=hx(zG,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},jG),VG=kx({useEmitter:Ux,useEmitterValue:at,usePublisher:wr}),WG=Ex({useEmitter:Ux,useEmitterValue:at,usePublisher:wr});function Ox(e,t,r){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&r(`${e} was not resolved to pixel value correctly`,t,Kt.WARN),t==="normal"?0:parseInt(t??"0",10)}var z0={},Bx;function qG(){if(Bx)return z0;Bx=1;var e=du.GenIcon;return z0.AiFillQuestionCircle=function(r){return e({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"}}]})(r)},z0}var YG=qG();function KG({logo:e,className:t="",style:r={},alt:n="Token logo"}){const[s,a]=F.useState(!1);return F.useEffect(()=>{a(!1)},[e]),e&&!s?O.jsx("img",{alt:n,style:r,onError:()=>a(!0),className:`twap-token-logo ${t}`,src:e}):O.jsx(YG.AiFillQuestionCircle,{style:{width:20,height:20},className:"twap-token-svg"})}const ZG=()=>O.jsx("div",{className:"twap-orders__loader",children:O.jsx("p",{children:"Loading..."})}),XG=()=>{const{isLoading:e}=pu(),t=A6(),r=K(a=>a.state.orderIdsToCancel),n=K(a=>a.state.cancelOrdersMode),s=P6();return O.jsx(O.Fragment,{children:e?O.jsx(ZG,{}):t!=null&&t.length?O.jsx("div",{className:`twap-orders__list ${n?"twap-orders__list-select-mode":""}`,children:O.jsx(BG,{style:{height:"100%"},data:t,itemContent:(a,o)=>O.jsx(QG,{cancelOrdersMode:!!n,selected:(r==null?void 0:r.includes(o.id))||!1,selectOrder:s,order:o},a)})}):O.jsx(JG,{})})},QG=({order:e,selectOrder:t,selected:r,cancelOrdersMode:n})=>{const s=K(i=>i.updateState),a=mt.useCallback(()=>{s({selectedOrderID:e==null?void 0:e.id})},[s,e==null?void 0:e.id]),o=mt.useCallback(()=>{n?t(e==null?void 0:e.id):a()},[n,t,a,e==null?void 0:e.id]);return O.jsx("div",{className:`twap-orders__list-item twap-orders__list-item-${e.status} ${n?"twap-orders__list-item-select-mode":""} ${r?"twap-orders__list-item-selected":""}`,onClick:o,children:O.jsxs("div",{className:"twap-orders__list-item-content",children:[O.jsx(ej,{order:e}),O.jsx(tj,{value:e.progress||0}),O.jsxs("div",{className:"twap-orders__list-item-tokens",children:[O.jsx(Mx,{address:e.srcTokenAddress}),O.jsx(k$.HiArrowRight,{className:"twap-orders__list-item-tokens-arrow"}),O.jsx(Mx,{address:e.dstTokenAddress})]})]})})},JG=()=>{const e=K(n=>n.state.orderHistoryStatusFilter),t=Fe(),r=mt.useMemo(()=>e||"",[e]);return O.jsx("div",{className:"twap-orders__list-empty",children:O.jsx("p",{children:t("noOrders",{status:r})})})},ej=({order:e})=>{const t=e&&e.status,r=T6(e),n=r0(e.createdAt);return O.jsxs("div",{className:"twap-orders__list-item-header",children:[O.jsxs("p",{className:"twap-orders__list-item-header-title",children:[r," ",O.jsx("span",{children:`(${n})`})]}),O.jsx("p",{className:"twap-orders__list-item-header-status",children:t})]})},Mx=e=>{const{useToken:t,components:r}=oe(),n=t==null?void 0:t(e.address);return O.jsx("div",{className:"twap-orders__list-item-token",children:n?O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"twap-orders__list-item-token-logo",children:r.TokenLogo?O.jsx(r.TokenLogo,{token:n}):O.jsx(KG,{logo:n==null?void 0:n.logoUrl})}),O.jsx("p",{className:"twap-orders__list-item-token-symbol",children:n==null?void 0:n.symbol})]}):O.jsx("div",{})})};function tj(e){return O.jsxs("div",{className:"twap-orders__list-item-progress",children:[O.jsx("div",{className:"twap-orders__list-item-progress-bar",children:O.jsx("div",{className:"twap-orders__list-item-progress-bar-filled",style:{width:`${e.value}%`}})}),O.jsx("div",{className:"twap-orders__list-item-token-progress-label",children:O.jsx("p",{children:`${Math.round(e.value)}%`})})]})}const rj=()=>{const e=K(r=>r.state.selectedOrderID),t=e!==void 0;return O.jsx("div",{className:`twap-orders ${e!==void 0?"twap-orders__show-selected":""}`,children:t?O.jsx(t$,{}):O.jsx(XG,{})})},nj=()=>{const{srcToken:e,dstToken:t,marketPrice:r}=oe(),[n,s]=F.useState(!1),a=F.useMemo(()=>{if(ue(r||"0").isZero()||!t)return"0";const o=R.amountUi(t==null?void 0:t.decimals,r);return n?ue(1).div(o||0).toFixed():o},[n,r,e==null?void 0:e.decimals,t==null?void 0:t.decimals]);return{fromToken:n?t:e,toToken:n?e:t,price:Ge({value:a}),priceWei:cu(t==null?void 0:t.decimals,r),onInvert:F.useCallback(()=>s(!n),[n])}},sj=()=>{const e=K(s=>s.state.isMarketOrder),{module:t}=oe(),r=Fe(),n=t===R.Module.STOP_LOSS||t===R.Module.TAKE_PROFIT;return F.useMemo(()=>{if(!n)return{text:r(e?"marketOrderWarning":"limitPriceMessage"),url:"https://www.orbs.com/dtwap-and-dlimit-faq/"}},[e,r,n])},_x=()=>{const{srcBalance:e}=oe(),t=Fe(),r=Nr().amountWei;return F.useMemo(()=>{if(e&&ue(r).gt(e))return{type:Ot.INSUFFICIENT_BALANCE,message:t("insufficientFunds"),value:e||""}},[e,r,t])};function Dx(){const{marketPrice:e,marketPriceLoading:t}=oe(),r=K(u=>u.state.typedSrcAmount),n=_x(),{error:s}=Ws(),{error:a}=uu(),{error:o}=Qr(),{error:i}=Vs(),{error:c}=c0(),l=F.useMemo(()=>{var u;return(u=new URLSearchParams(window.location.search))==null?void 0:u.get("ignore-errors")},[]);if(!(ue(e||0).isZero()||ue(r||0).isZero()||t||l))return s||a||o||i||c||n}const Fx=()=>{const{srcToken:e,dstToken:t,chainId:r,account:n,slippage:s,config:a}=oe(),o=Qr().amountPerTradeWei,i=Nr().amountWei,c=l0(),l=Ws().pricePerChunkWei,u=s0().amountWei,d=Vs().fillDelay,p=Qr().totalTrades,h=s*100,y=!p||p===1?0:d.unit*d.value;return F.useMemo(()=>{var k;const g=R.isNativeAddress((e==null?void 0:e.address)||"")?(k=R.getNetwork(r))==null?void 0:k.wToken.address:e==null?void 0:e.address;if(!(!g||!t||!r||!n||!c||!i||!a))return R.buildRePermitOrderData({chainId:r,srcToken:g,dstToken:t.address,srcAmount:i,deadlineMillis:c,fillDelayMillis:y,slippage:h,account:n,srcAmountPerTrade:o,dstMinAmountPerTrade:u,triggerAmountPerTrade:l,config:a})},[e,t,r,n,i,c,o,l,h,u,d,p,a])},aj=()=>{var c;const{account:e,walletClient:t,overrides:r,refetchBalances:n,callbacks:s,chainId:a}=oe(),o=(c=$i())==null?void 0:c.wToken,i=d0();return on({mutationFn:async({onHash:l,srcAmountWei:u})=>{var h,y;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!o)throw new Error("tokenAddress is not defined");let d;R.analytics.onWrapRequest(),(h=s==null?void 0:s.onWrapRequest)==null||h.call(s),r!=null&&r.wrap?d=await r.wrap(BigInt(u)):d=await t.writeContract({abi:R.IWETH_ABI,functionName:"deposit",account:e,address:o.address,value:BigInt(u),chain:t.chain}),l==null||l(d);const p=await i(d);if(!p)throw new Error("failed to get transaction receipt");if(p.status==="reverted")throw new Error("failed to wrap token");return R.analytics.onWrapSuccess(d),(y=s==null?void 0:s.onWrapSuccess)==null||y.call(s,{txHash:p.transactionHash,explorerUrl:Ii(p.transactionHash,a),amount:R.amountUi(o.decimals,u)}),n==null||n(),p},onError:l=>{throw R.analytics.onWrapError(l),l}})},oj=()=>{const{account:e,walletClient:t,chainId:r,callbacks:n}=oe(),s=Fx(),a=YH();return on({mutationFn:async()=>{var y,g,k,v;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!r)throw new Error("missing chainId");if(!s)throw new Error("rePermitOrderData is not defined");const{order:o,domain:i,types:c,primaryType:l}=s;R.analytics.onSignOrderRequest(o),(y=n==null?void 0:n.onSignOrderRequest)==null||y.call(n),console.log({domain:i,types:c,primaryType:l,message:o,account:e}),console.log("Using domain:",i),console.log("Using types:",c),console.log("Order data to sign:",JSON.stringify(o,null,2)),console.log(`Account address: ${e}`);let u;try{u=await(t==null?void 0:t.signTypedData({domain:i,types:c,primaryType:l,message:o,account:e}))}catch(w){throw(g=n==null?void 0:n.onSignOrderError)==null||g.call(n,w.message),R.analytics.onSignOrderError(w),w}R.analytics.onSignOrderSuccess(u),(k=n==null?void 0:n.onSignOrderSuccess)==null||k.call(n,u);const d=m7(u),p={v:W(d.v||0),r:d.r,s:d.s},h=await R.submitOrder(o,p);return(v=n==null?void 0:n.onOrderCreated)==null||v.call(n,h),a(h),h}})},Nx=()=>{const{account:e,publicClient:t,config:r}=oe();return on({mutationFn:async({tokenAddress:n,srcAmountWei:s})=>{if(!t)throw new Error("missing publicClient");if(!e)throw new Error("missing account");if(!r)throw new Error("missing config");const a=await t.readContract({address:n,abi:H1,functionName:"allowance",args:[e,r.repermit]}).then(i=>i.toString()),o=ue(a||"0").lt(ue(s).toString());return{allowance:a,approvalRequired:o}}})},ij=()=>{const{account:e,walletClient:t,overrides:r,config:n,chainId:s,callbacks:a}=oe(),o=d0(),{mutateAsync:i}=Nx();return on({onError:c=>{R.analytics.onApproveError(c)},mutationFn:async({token:c,onHash:l,srcAmountWei:u})=>{var y,g;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!n)throw new Error("missing config");(y=a==null?void 0:a.onApproveRequest)==null||y.call(a),R.analytics.onApproveRequest();let d;if(r!=null&&r.approveOrder?d=await r.approveOrder({tokenAddress:c.address,spenderAddress:n.repermit,amount:Ps}):d=await t.writeContract({abi:H1,functionName:"approve",account:e,address:c.address,args:[n.repermit,Ps],chain:t.chain}),!d)throw new Error("failed to approve token");l(d);const p=await o(d);if(!p)throw new Error("failed to get transaction receipt");if(p.status==="reverted")throw new Error("failed to approve token");let h=!1;for(let k=0;k<3;k++){const{approvalRequired:v}=await i({tokenAddress:c.address,srcAmountWei:u});if(!v){h=!0;break}k<2&&await new Promise(w=>setTimeout(w,3e3))}if(!h)throw new Error(`Insufficient ${c.symbol} allowance to perform the swap. Please approve the token first.`);return R.analytics.onApproveSuccess(p.transactionHash),(g=a==null?void 0:a.onApproveSuccess)==null||g.call(a,{txHash:p.transactionHash,explorerUrl:Ii(p.transactionHash,s),token:c,amount:R.amountUi(c.decimals,u)}),p}})},cj=()=>{const{account:e,chainId:t,srcToken:r,dstToken:n,module:s,slippage:a}=oe(),o=Ws(),i=Nr().amountWei,c=Qr().amountPerTradeWei,l=l0(),u=Vs().fillDelay,d=s0().amountWei,p=K(h=>h.state.isMarketOrder);return on({mutationFn:async()=>{R.analytics.onRequestOrder({account:e,chainId:t,module:s,srcToken:r,dstToken:n,fromTokenAmount:i,srcChunkAmount:c,triggerPricePerTrade:o.pricePerChunkWei,deadline:l,fillDelay:u.unit*u.value,minDstAmountOutPerTrade:d,slippage:a,isMarketOrder:p||!1})}})};function lj(e){const t=e.match(/,\s*code\s*:\s*(\d+)/i);return{message:e.replace(/^error\s*:/i,"").replace(/,\s*code\s*:\s*\d+/i,"").trim()||"",code:t?Number(t[1]):0}}const uj=()=>{const{srcToken:e,dstToken:t,chainId:r,callbacks:n}=oe(),s=ij().mutateAsync,a=aj().mutateAsync,o=oj().mutateAsync,{mutateAsync:i}=Nx(),c=K(d=>d.updateSwapExecution),{amountWei:l}=Nr(),u=cj().mutate;return on({mutationFn:async()=>{var p,h;const d=R.isNativeAddress((e==null?void 0:e.address)||" ");try{if(!e)throw new Error("missing srcToken");if(!t)throw new Error("missing dstToken");if(!r)throw new Error("missing chainId");const y=og(e,r);c({allowanceLoading:!0});const{approvalRequired:g}=await i({tokenAddress:y.address,srcAmountWei:l});let k=0,v=1;d&&v++,g&&v++,c({totalSteps:v,stepIndex:k,allowanceLoading:!1,status:gt.LOADING}),u(),d&&(c({step:Ls.WRAP}),await a({onHash:S=>c({wrapTxHash:S}),srcAmountWei:l}),k++,c({stepIndex:k})),g&&(c({step:Ls.APPROVE}),await s({token:y,onHash:S=>c({approveTxHash:S}),srcAmountWei:l}),k++,c({stepIndex:k})),c({step:Ls.CREATE});const w=await o();return c({status:gt.SUCCESS,orderId:w.id}),w}catch(y){if(hp(y))(p=n==null?void 0:n.onSubmitOrderRejected)==null||p.call(n),c({step:void 0,status:void 0,stepIndex:void 0});else{const g=lj(y.message);(h=n==null?void 0:n.onSubmitOrderFailed)==null||h.call(n,{message:g.message||"",code:g.code||0}),c({status:gt.FAILED,error:{message:g.message||"",code:g.code||0}})}}}})},dj=()=>{const{marketPrice:e,srcToken:t,dstToken:r,marketPriceLoading:n,srcBalance:s,srcUsd1Token:a,noLiquidity:o}=oe(),i=Fe(),c=uj(),l=K(m=>m.updateState),{amountUI:u,amountWei:d}=Nr(),p=K(m=>m.resetState),h=K(m=>m.state.swapExecution),y=K(m=>m.state.typedSrcAmount),g=n||ue(a||"0").isZero()||s===void 0||ue(e||"0").isZero(),k=!!(t&&r&&y&&g),v=Dx(),w=F.useMemo(()=>o?i("noLiquidity"):ue(y||"0").isZero()?i("enterAmount"):(v==null?void 0:v.type)===Ot.INSUFFICIENT_BALANCE?i("insufficientFunds"):i("placeOrder"),[v,i,y,o]),S=F.useCallback(()=>{(h==null?void 0:h.status)===gt.SUCCESS&&(l({typedSrcAmount:""}),setTimeout(()=>{p()},1e3))},[h==null?void 0:h.status,p,l]),C=F.useCallback(()=>{(h==null?void 0:h.status)!==gt.LOADING&&l({acceptedSrcAmount:void 0,acceptedMarketPrice:void 0,swapExecution:{srcToken:t,dstToken:r}})},[l,t,r]),_=on({mutationFn:async()=>(l({acceptedSrcAmount:u,acceptedMarketPrice:e}),await c.mutateAsync())}),z=F.useCallback(()=>_.mutateAsync(),[_]),T=x6();return F.useMemo(()=>({resetSwap:p,onCloseModal:S,onOpenModal:C,onSubmitOrder:z,...h,swapLoading:(h==null?void 0:h.status)===gt.LOADING||(h==null?void 0:h.allowanceLoading),swapSubmitted:!!(h!=null&&h.status),order:T,srcAmountWei:d,srcAmount:d,openSubmitModalButton:{disabled:!!(v||o||k||ue(y||"0").isZero()||!t||!r),text:w,loading:k}}),[h,t,r,T,p,S,C,z,w,k,v,o,y])},zx=(e,t)=>{const{marketPriceLoading:r,srcToken:n,dstToken:s,srcBalance:a,dstBalance:o}=oe(),i=K(C=>C.state.typedSrcAmount),c=K(C=>C.updateState),{srcUsd1Token:l,dstUsd1Token:u}=oe(),d=js(i,l),p=js(t,u),h=YR(),y=e?n:s,g=Fr(y==null?void 0:y.decimals,e?a:o),k=_x(),v=F.useCallback(C=>{e&&c({typedSrcAmount:C})},[c,e]),w=F.useCallback(()=>{e&&c({typedSrcAmount:Pi(g,8)})},[c,e,g]),S=h||e?i:Pi(t||"",8);return{balance:g,usd:e||h?d:p,value:S||"",valueWei:cu(y==null?void 0:y.decimals,S),onChange:v,onMax:w,isLoading:i?e?!1:r:!1,token:y,isInsufficientBalance:e?k:void 0}},fj=()=>zx(!0),pj=()=>{const e=Gi().amountUI,t=K(r=>r.state.typedSrcAmount);return zx(!1,t?e:"")},hj=()=>{const e=K(n=>n.state.isMarketOrder),t=K(n=>n.updateState),r=F.useCallback(()=>{t({isMarketOrder:!e})},[t,e]);return{isMarketPrice:!e,togglePrice:r}},mj={SubmitOrderPanel:HH,Orders:rj};R.setUIVersion(l2.version);const bj=()=>{const e=K(t=>t.updateState);return{amount:K(t=>t.state.typedSrcAmount),reset:F.useCallback(()=>e({typedSrcAmount:""}),[e])}};Object.defineProperty(Z,"Configs",{enumerable:!0,get:()=>R.Configs}),Object.defineProperty(Z,"DISCLAIMER_URL",{enumerable:!0,get:()=>R.DISCLAIMER_URL}),Object.defineProperty(Z,"Module",{enumerable:!0,get:()=>R.Module}),Object.defineProperty(Z,"ORBS_LOGO",{enumerable:!0,get:()=>R.ORBS_LOGO}),Object.defineProperty(Z,"ORBS_WEBSITE_URL",{enumerable:!0,get:()=>R.ORBS_WEBSITE_URL}),Object.defineProperty(Z,"OrderStatus",{enumerable:!0,get:()=>R.OrderStatus}),Object.defineProperty(Z,"OrderType",{enumerable:!0,get:()=>R.OrderType}),Object.defineProperty(Z,"Partners",{enumerable:!0,get:()=>R.Partners}),Object.defineProperty(Z,"eqIgnoreCase",{enumerable:!0,get:()=>R.eqIgnoreCase}),Object.defineProperty(Z,"isNativeAddress",{enumerable:!0,get:()=>R.isNativeAddress}),Z.Components=mj,Z.DEFAULT_DURATION_OPTIONS=jH,Z.InputErrors=Ot,Z.PRICE_PROTECTION_SETTINGS=VH,Z.Steps=Ls,Z.SwapStatus=gt,Z.TWAP=PF,Z.copy=yF,Z.ensureWrappedToken=og,Z.fillDelayText=ng,Z.formatDecimals=Pi,Z.getExplorerUrl=Ii,Z.getMinNativeBalance=xF,Z.getOrderExcecutionRate=sg,Z.getOrderLimitPriceRate=ag,Z.getOrderType=wF,Z.isTxRejected=hp,Z.makeElipsisAddress=pp,Z.millisToDays=ig,Z.millisToMinutes=mp,Z.parseError=gF,Z.removeCommas=bF,Z.shouldUnwrapOnly=yp,Z.shouldWrapOnly=bp,Z.useBuildRePermitOrderDataCallback=Fx,Z.useDisclaimerPanel=sj,Z.useDstTokenPanel=pj,Z.useDurationPanel=IH,Z.useFillDelayPanel=eH,Z.useFormatNumber=Ge,Z.useInputErrors=Dx,Z.useInvertTradePanel=lu,Z.useLimitPricePanel=lH,Z.useMarketPricePanel=nj,Z.useOrderHistoryPanel=e$,Z.useSrcTokenPanel=fj,Z.useSubmitSwapPanel=dj,Z.useTogglePricePanel=hj,Z.useTradesPanel=rH,Z.useTriggerPricePanel=oH,Z.useTypedSrcAmount=bj,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})}));
|
|
63
|
+
`),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function rH(e){e=tH(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,r=e.allowNegative,n=e.allowLeadingZeros,s=e.onKeyDown;s===void 0&&(s=n0);var a=e.onBlur;a===void 0&&(a=n0);var o=e.thousandSeparator,i=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l="");var u=e.defaultValue,d=e.value,p=e.valueIsNumericString,h=e.onValueChange,y=RR(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),g=cu(e),k=g.decimalSeparator,v=g.allowedDecimalSeparators,w=function(P){return b6(P,e)},S=function(P,_){return JR(P,_,e)},C=Ka(d)?u:d,U=p??QR(C,l,t);Ka(d)?Ka(u)||(U=U||typeof u=="number"):U=U||typeof d=="number";var z=function(P){return u6(P)?P:(typeof P=="number"&&(P=h6(P)),U&&typeof i=="number"?m6(P,i,!!c):P)},T=KR(z(d),z(u),!!U,w,S,h),m=T[0],b=m.numAsString,x=m.formattedValue,A=T[1],I=function(P){var _=P.target,M=P.key,L=_.selectionStart,H=_.selectionEnd,G=_.value;if(G===void 0&&(G=""),(M==="Backspace"||M==="Delete")&&H<l.length){P.preventDefault();return}if(L!==H){s(P);return}M==="Backspace"&&G[0]==="-"&&L===l.length+1&&r&&Hi(_,1),i&&c&&(M==="Backspace"&&G[L-1]===k?(Hi(_,L-1),P.preventDefault()):M==="Delete"&&G[L]===k&&P.preventDefault()),v!=null&&v.includes(M)&&G[L]===k&&Hi(_,L+1);var J=o===!0?",":o;M==="Backspace"&&G[L-1]===J&&Hi(_,L-1),M==="Delete"&&G[L]===J&&Hi(_,L+1),s(P)},O=function(P){var _=b;if(_.match(/\d/g)||(_=""),n||(_=WR(_)),c&&i&&(_=m6(_,i,c)),_!==b){var M=b6(_,e);A({formattedValue:M,value:_,floatValue:parseFloat(_)},{event:P,source:r0.event})}a(P)},D=function(P){return P===k?!0:l6(P)},E=function(P){var _=P.currentValue,M=P.lastValue,L=P.formattedValue,H=P.currentValueIndex,G=P.formattedValueIndex,J=_[H],pe=L[G],be=qR(M,_),ie=be.to,fe=function(Oe){return S(Oe).indexOf(".")+l.length};return d===0&&c&&i&&_[ie.start]===k&&fe(_)<H&&fe(L)>G?!1:H>=ie.start&&H<ie.end&&v&&v.includes(J)&&pe===k?!0:J===pe};return Object.assign(Object.assign({},y),{value:x,valueIsNumericString:!1,isValidInputCharacter:D,isCharacterSame:E,onValueChange:A,format:w,removeFormatting:S,getCaretBoundary:function(P){return eH(P,e)},onKeyDown:I,onBlur:O})}const lu=(e,t)=>F.useMemo(()=>R.amountBN(e,t),[e,t]),Fr=(e,t)=>F.useMemo(()=>R.amountUi(e,t),[e,t]),$i=()=>{const{chainId:e}=oe();return F.useMemo(()=>R.getNetwork(e),[e])},a0=e=>{const t=$i();return F.useMemo(()=>{if(!(!e||!t))return Ii(e,t.id)},[e,t])},js=(e,t)=>F.useMemo(()=>!e||!t||ue(e||"0").isZero()||ue(t||"0").isZero()?"":ue(e||"0").times(t).toFixed(),[e,t]),nH=()=>{const{srcToken:e,dstToken:t,chainId:r}=oe();return F.useMemo(()=>bp(e,t,r),[e,t,r])},sH=()=>{const{srcToken:e,dstToken:t,chainId:r}=oe();return F.useMemo(()=>yp(e,t,r),[e,t,r])},aH=()=>{const e=nH(),t=sH();return e||t},o0=e=>{const{overrides:t}=oe();return F.useMemo(()=>t!=null&&t.dateFormat?t.dateFormat(e||0):te(e).format("DD/MM/YYYY HH:mm"),[e,t==null?void 0:t.dateFormat])};function oH(){const{callbacks:e}=oe();return F.useCallback(async t=>{var r;try{await navigator.clipboard.writeText(t),(r=e==null?void 0:e.onCopy)==null||r.call(e)}catch(n){console.error("Copy failed:",n)}},[e==null?void 0:e.onCopy])}const iH=(e,t)=>F.useMemo(()=>Pi(e==null?void 0:e.toString(),t),[e,t]),Ge=({value:e,decimalScale:t=3,prefix:r,suffix:n})=>{var c;const s=iH(e,t),{overrides:a}=oe(),o=a==null?void 0:a.numberFormat,i=rH({allowLeadingZeros:!0,thousandSeparator:",",displayType:"text",value:s||"",decimalScale:18,prefix:r,suffix:n});return o?o(e||""):(c=i.value)==null?void 0:c.toString()},cH={deadlineTooltip:"This is the date and time marking the end of the period which you have selected for your order to be executed.",tradeSizeTooltip:"The number of input tokens that will be removed from your balance and swapped for the output token in each individual trade.",totalTradesTooltip:"The total number of individual trades that will be scheduled as part of your order. Note that in limit orders, not all trades that are scheduled will be executed.",minDstAmountTooltip:" This is the minimum number of tokens that may be received. NOTE: This minimum only refers to executed trades. Some trades may not be executed if the limit price is higher than the available market prices and your order may only be partially filled.",marketPriceTooltip:"You have the option to set a “limit price” for your order. If you do not select this option, each trade in your order will execute at the available market price.",limitPriceTooltip:"Trades will only execute if the available market price is better than the limit price, potentially resulting in partial fills or orders remaining unfilled upon expiration.",outAmountLoading:"Fetching Quote...",maxDurationTooltip:"This is the time period during which the order will be active. Please note that orders may be completed earlier than this time, partially filled, or remain unfilled based on the specified parameters.",tradeIntervalTootlip:"The estimated time that will elapse between each trade in your order. Note that as this time includes an allowance of two minutes for bidder auction and block settlement, which cannot be predicted exactly, actual time may vary.",triggerPriceTooltip:"The price at which the order will be executed. If the market price is higher than the trigger price, the order will be executed at the market price.",placeOrder:"Place order",enterAmount:"Enter an amount",emptyLimitPrice:"Limit price is required",insufficientFunds:"Insufficient Balance",every:"Every",over:"Over",tradeInterval:"Trade interval",deadline:"Deadline",limitPrice:"Limit Price",finalExcecutionPrice:"Final execution price",marketPrice:"Market price",from:"From",to:"To (estimated)",Open:"Open",Completed:"Completed",Expired:"Expired",Canceled:"Canceled",minReceivedPerTrade:"Min. received per trade",triggerPricePerChunk:"Trigger Price per trade",maxChunksError:"Max. trades amount is {maxChunks}",minChunksError:"Min. trades amount is",minTradeSizeError:"Min. trade size is ${minTradeSize}",allOrders:"All",minFillDelayError:"Min. trade interval is {fillDelay}",maxFillDelayError:"Max. trade interval is {fillDelay}",recipient:"Recipient",marketOrderWarning:"Each individual trade in this order will be filled at the current market price at the time of execution.",limitPriceMessage:"Limit orders may not execute when the token's price is equal or close to the limit price, due to gas and standard swap fees.",limit:"Limit",maxDurationError:"Max. expiry is {duration}",minDurationError:"Min. expiry is {duration}",expiry:"Expiry",individualTradeSize:"Individual trade size",numberOfTrades:"No. of trades",AverageExecutionPrice:"Avg. execution price",twapMarket:"TWAP-market",twapLimit:"TWAP-limit",stopLoss:"Stop-loss",triggerPriceMarket:"Trigger Market Price ",triggerPriceLimit:"Trigger Limit Price ",takeProfit:"Take-profit",minReceived:"Min. received",minReceivedPerChunk:"Min. received per trade",noOrders:"No {status} Orders",noLiquidity:"No liquidity for this pair",excecutionSummary:"Execution summary",orderInfo:"Order info",wrapAction:"Wrap {symbol}",approveAction:"Approve {symbol}",createOrderAction:"Create {name} order",amountReceived:"Amount received",createdAt:"Created at",amountOut:"Amount out",status:"Status",progress:"Progress",minutes:"minutes",days:"days",tradeIntervalTitle:"Every",tradesAmountTitle:"Over",stopLossTooltip:"The trigger price at which your stop-loss order will be activated.",takeProfitTooltip:"The trigger price at which your take-profit order will be activated.",stopLossLabel:"Trigger Price",StopLossTriggerPriceError:"Trigger price must be less than market price",TakeProfitTriggerPriceError:"Trigger price must be greater than market price",triggerLimitPriceError:"Limit price must be less than trigger price",triggerPrice:"Trigger Price",tradePrice:"Trade Price",triggerMarketPriceDisclaimer:" In extreme market movements, slippage may occur and the executed price of the market order may be worse than the specified trigger price.",stopLossLimitPriceTooltip:"The stop loss order will execute at the specified limit price or better, once the stop price is triggered.",stopLossDurationTooltip:"This is the time period during which the order will be active. Please note that orders may be completed earlier than this time, or remain unfilled based on the specified parameters.",emptyTriggerPrice:"Trigger price is required",id:"ID",fees:"Fees {value}",version:"Version",maxOrderSizeError:"Max. trade size is {maxOrderSize} USD",viewOnExplorer:"View on explorer",proceedInWallet:"Proceed in wallet",wrapMsg:"Note: {symbol} was wrapped to {wSymbol}",createOrderActionSuccess:"{name} order placed"};function lH(e){let t=e;const r=/\{[^{}]*\}/g;for(;r.test(t);)t=t.replace(r,"");return t}const Fe=()=>{const e=oe();return F.useCallback((r,n)=>{var o,i;const s=(o=e.getTranslation)==null?void 0:o.call(e,r,n);if(s&&s!==r)return s;const a=((i=e.translations)==null?void 0:i[r])||cH[r];return lH(a.replace(/{(\w+)}/g,(c,l)=>(n==null?void 0:n[l])||c))},[e.getTranslation,e.translations])},uu=({value:e})=>{const t=Ge({value:e,decimalScale:2});return t?B.jsx("small",{className:"twap-order-details__detail-row-value-usd",children:` ($${t})`}):null},uH=({deadline:e,label:t,tooltip:r})=>{const n=o0(e);return B.jsx(ir,{title:t,tooltip:r,children:n})},dH=({price:e,dstToken:t,label:r,tooltip:n,usd:s})=>{const a=Ge({value:e});return ue(e||0).isZero()?null:B.jsx(ir,{title:r,tooltip:n,children:B.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[`${a||"-"} ${t==null?void 0:t.symbol}`,B.jsx(uu,{value:s})]})})},fH=({price:e,dstToken:t,percentage:r,isMarketOrder:n})=>{const s=Ge({value:e}),a=Fe();return n?null:B.jsx(ir,{title:a("limitPrice")||"",tooltip:a("limitPriceTooltip")||"",children:B.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[`${s||"-"} ${t==null?void 0:t.symbol}`,r&&B.jsx("small",{children:`(${r}%)`})]})})},pH=({tradeSize:e,srcToken:t,trades:r,label:n,tooltip:s})=>r===1?null:B.jsx(ir,{title:n,tooltip:s,children:`${e||"-"} ${(t==null?void 0:t.symbol)||""}`}),hH=({dstToken:e,dstMinAmountOut:t,label:r,tooltip:n,usd:s})=>{const a=Ge({value:t});return ue(t||0).isZero()?null:B.jsxs(ir,{title:r,tooltip:n,children:[`${t?a:"-"} ${e==null?void 0:e.symbol}`,B.jsx(uu,{value:s})]})},mH=({trades:e,label:t,tooltip:r})=>e===1?null:B.jsx(ir,{title:t,tooltip:r,children:e}),bH=()=>{var s;const e=Fe(),{account:t}=oe(),r=(s=$i())==null?void 0:s.explorer,n=pp(t);return B.jsx(ir,{title:e("recipient")||"",children:r?B.jsx("a",{href:`${r}/address/${t}`,target:"_blank",children:n}):n})},yH=({fillDelayMillis:e,chunks:t=0,label:r,tooltip:n})=>{const s=F.useMemo(()=>ng(e),[e]);return t===1?null:B.jsx(ir,{title:r,tooltip:n,children:s})},ir=({title:e,tooltip:t,children:r,className:n="",onClick:s,style:a})=>{const{components:o}=oe(),i=o.Tooltip;return B.jsxs("div",{className:`${n} twap-order-details__detail-row`,onClick:s,style:a,children:[B.jsxs("div",{className:"twap-order-details__detail-row-label",children:[B.jsx("p",{className:"twap-order-details__detail-row-label-value",children:e}),t&&i&&B.jsx(i,{tooltipText:t})]}),B.jsx("div",{className:"twap-order-details__detail-row-value",children:r})]})},gH=({id:e})=>{const{components:t}=oe(),r=t==null?void 0:t.Tooltip,n=oH();return e.startsWith("0x")?B.jsx(ir,{title:"ID",onClick:()=>n(e),style:{cursor:"pointer"},children:r&&B.jsx(r,{tooltipText:e,children:B.jsxs("div",{className:"twap-order-details__detail-row-value-id",children:[B.jsx("p",{children:pp(e)}),B.jsx(LF.AiOutlineCopy,{})]})})}):B.jsx(ir,{title:"ID",children:e})},xH=({version:e})=>B.jsx(ir,{title:"Version",children:e});function we({children:e,className:t=""}){return B.jsx("div",{className:`${t} twap-order-details`,children:e})}const wH=({children:e})=>e,vH=({fees:e,label:t,usd:r,dstTokenSymbol:n})=>{const s=Ge({value:e});return B.jsxs(ir,{title:t,children:[`${e?s:"-"} ${n}`,B.jsx(uu,{value:r})]})};we.Deadline=uH,we.Fees=vH,we.TradeSize=pH,we.MinDestAmount=hH,we.TradesAmount=mH,we.Recipient=bH,we.TradeInterval=yH,we.DetailRow=ir,we.TriggerPrice=dH,we.LimitPrice=fH,we.OrderID=gH,we.Container=wH,we.OrderVersion=xH,we.USD=uu;const i0=()=>{const{publicClient:e}=oe();return on({mutationFn:async t=>{if(!e)throw new Error("publicClient is not defined");const r=10;let n=0,s=1e3;for(;n<r;)try{return await e.waitForTransactionReceipt({hash:t,confirmations:2,retryDelay:s})}catch(a){if(n++,n>=r)throw new Error(`Failed after ${r} attempts: ${a}`);await new Promise(o=>setTimeout(o,s)),s*=2}}}).mutateAsync},y6=e=>{var c,l,u,d,p;const t=Fe(),r=Ge({value:Fr((c=e.srcToken)==null?void 0:c.decimals,e.srcAmount)}),n=Ge({value:Fr((l=e.srcToken)==null?void 0:l.decimals,e.srcAmountPerTrade)}),s=Ge({value:Fr((u=e.dstToken)==null?void 0:u.decimals,e.minDestAmountPerTrade&&ue(e.minDestAmountPerTrade).lte(1)?"":e.minDestAmountPerTrade)}),a=Ge({value:Fr((d=e.dstToken)==null?void 0:d.decimals,e.triggerPricePerTrade)}),o=lu((p=e.dstToken)==null?void 0:p.decimals,e.limitPrice),i=Ge({value:e.limitPrice});return F.useMemo(()=>({data:{srcToken:e.srcToken,dstToken:e.dstToken,limitPrice:o,deadline:e.deadline,srcAmount:e.srcAmount,srcAmountPerTrade:e.srcAmountPerTrade,totalTrades:e.totalTrades,minDestAmountPerTrade:e.minDestAmountPerTrade,tradeInterval:e.tradeInterval,triggerPricePerTrade:e.triggerPricePerTrade,maker:e.maker},display:{limitPrice:{label:t("limitPrice"),value:i||""},deadline:{tooltip:t("deadlineTooltip"),label:t("deadline"),value:e.deadline||0},srcAmount:{label:t("amountOut"),value:r||"",token:e.srcToken},tradeSize:{tooltip:t("tradeSizeTooltip"),label:t("individualTradeSize"),value:n||"",token:e.srcToken},totalTrades:{tooltip:t("totalTradesTooltip"),label:t("numberOfTrades"),value:e.totalTrades||0},minDestAmountPerTrade:{tooltip:t("minDstAmountTooltip"),label:e.totalTrades&&e.totalTrades>1?t("minReceivedPerTrade"):t("minReceived"),value:s||"",token:e.dstToken},tradeInterval:{tooltip:t("tradeIntervalTootlip"),label:t("tradeInterval"),value:e.tradeInterval||0},triggerPricePerTrade:{tooltip:t("triggerPriceTooltip"),label:e.totalTrades&&e.totalTrades>1?t("triggerPricePerChunk"):t("triggerPrice"),value:a||"",token:e.dstToken},recipient:{label:t("recipient"),value:e.maker||""}}}),[e,t,r,n,s,a,i])},g6=e=>{const{orders:t}=du(),{config:r,useToken:n}=oe(),s=Fe(),a=F.useMemo(()=>t==null?void 0:t.all.find(g=>g.id===e),[t,e])||{},o=x6(a),i=n==null?void 0:n(a==null?void 0:a.srcTokenAddress),c=n==null?void 0:n(a==null?void 0:a.dstTokenAddress),l=SH(i,c,a),u=Ge({value:AH(i,c,a)}),d=Ge({value:Fr(i==null?void 0:i.decimals,a==null?void 0:a.srcAmountFilled)}),p=Ge({value:Fr(c==null?void 0:c.decimals,a==null?void 0:a.dstAmountFilled)}),h=Ge({value:a==null?void 0:a.progress,decimalScale:2}),y=y6({srcToken:i,dstToken:c,limitPrice:l,deadline:a==null?void 0:a.deadline,srcAmount:a==null?void 0:a.srcAmount,srcAmountPerTrade:a==null?void 0:a.srcAmountPerTrade,totalTrades:a==null?void 0:a.totalTradesAmount,minDestAmountPerTrade:a==null?void 0:a.dstMinAmountPerTrade,tradeInterval:(a==null?void 0:a.totalTradesAmount)===1||!a||!(r!=null&&r.twapConfig)?void 0:R.getOrderFillDelayMillis(a,r.twapConfig),triggerPricePerTrade:a==null?void 0:a.triggerPricePerTrade,maker:a==null?void 0:a.maker});return F.useMemo(()=>({original:a,...y,title:o,createdAt:{label:s("createdAt"),value:a==null?void 0:a.createdAt},id:{label:s("id"),value:a==null?void 0:a.id},amountInFilled:{label:s("amountOut"),value:d,token:i},amountOutFilled:{label:s("amountReceived"),value:p,token:c},progress:{label:s("progress"),value:h},excecutionPrice:{label:(a==null?void 0:a.totalTradesAmount)===1?s("finalExcecutionPrice"):s("AverageExecutionPrice"),value:u,sellToken:i,buyToken:c},version:{label:s("version"),value:a==null?void 0:a.version}}),[a,s,u,d,p,h,o,i,c,y])},x6=e=>{const t=Fe();return F.useMemo(()=>e?e.type===R.OrderType.TRIGGER_PRICE_MARKET?t("triggerPriceMarket"):e.type===R.OrderType.TRIGGER_PRICE_LIMIT?t("triggerPriceLimit"):e.type===R.OrderType.TWAP_MARKET?t("twapMarket"):e.type===R.OrderType.TWAP_LIMIT?t("twapLimit"):t("twapMarket"):t("twapMarket"),[t,e==null?void 0:e.type])},c0=()=>{const{account:e,config:t,chainId:r}=oe();return F.useMemo(()=>["useTwapOrderHistoryManager",e,t==null?void 0:t.partner,r],[e,t,r])},w6=()=>{const{account:e,config:t,chainId:r}=oe(),n=`cancelled-orders-${e}-${t==null?void 0:t.partner}-${r}`,s=F.useCallback(()=>{const i=localStorage.getItem(n);return i?JSON.parse(i):[]},[n]),a=F.useCallback(i=>{const c=s();c.includes(i)||(c.push(i),localStorage.setItem(n,JSON.stringify(c)))},[s,n]),o=F.useCallback(i=>{const c=s().filter(l=>l!==i);localStorage.setItem(n,JSON.stringify(c))},[s,n]);return{getCancelledOrderIds:s,addCancelledOrderId:a,deleteCancelledOrderId:o}},kH=()=>{const e=mo(),{account:t}=oe(),r=c0();return F.useCallback(n=>{e.setQueryData(r,s=>s?s!=null&&s.some(a=>a.id===n.id)?s:[n,...s]:[n])},[e,r,t])},EH=()=>{const e=mo(),t=c0(),r=w6();return F.useCallback(n=>{n.forEach(s=>{r.addCancelledOrderId(s)}),e.setQueryData(t,s=>s?s.map(a=>n.includes(a.id)?{...a,status:R.OrderStatus.Canceled}:a):[])},[e,t,r.addCancelledOrderId])},CH=()=>{const{getCancelledOrderIds:e,deleteCancelledOrderId:t}=w6();return F.useCallback(r=>{const n=new Set(e());r.forEach((s,a)=>{n.has(s.id)&&(s.status!==R.OrderStatus.Canceled?(console.log(`Marking order as cancelled: ${s.id}`),r[a]={...s,status:R.OrderStatus.Canceled}):(console.log(`Removing cancelled ID for already-cancelled order: ${s.id}`),t(s.id)))})},[e,t])},TH=()=>{const{account:e,config:t,chainId:r,callbacks:n,refetchBalances:s}=oe(),a=c0(),o=mo(),i=CH(),c=V2({enabled:!!(e&&r&&t),refetchInterval:IF,refetchOnWindowFocus:!0,retry:!1,staleTime:1/0,queryKey:a,queryFn:async({signal:l})=>{var y;const u=await R.getAccountOrders({signal:l,chainId:r,config:t==null?void 0:t.twapConfig,account:e});i(u);let d=!1;const p=o.getQueryData(a),h=[];return p&&p.forEach(g=>{var v;const k=u.find(w=>w.id===g.id);k&&k.progress!==g.progress&&(d=!0,h.push(k),k.status===R.OrderStatus.Completed&&((v=n==null?void 0:n.onOrderFilled)==null||v.call(n,k)))}),d&&((y=n==null?void 0:n.onOrdersProgressUpdate)==null||y.call(n,h),s==null||s()),u.map(g=>t!=null&&t.twapConfig?{...g,fillDelayMillis:R.getOrderFillDelayMillis(g,t.twapConfig)}:g)}});return{...c,isLoading:!!(e&&c.isLoading)}},du=()=>{const{data:e,isLoading:t,error:r,refetch:n,isRefetching:s}=TH(),{mutateAsync:a}=l0();return F.useMemo(()=>({orders:{all:e??[],open:fu(e??[],R.OrderStatus.Open),completed:fu(e??[],R.OrderStatus.Completed),expired:fu(e??[],R.OrderStatus.Expired),canceled:fu(e??[],R.OrderStatus.Canceled)},isLoading:t,error:r,refetch:()=>n().then(o=>o.data),cancelOrder:a,isRefetching:s}),[e,t,r,n,a,s])},v6=()=>{const e=K(r=>r.state.orderHistoryStatusFilter),{orders:t}=du();return F.useMemo(()=>e?t.all.filter(r=>r.status.toLowerCase()===e.toLowerCase())||[]:t.all,[e,t])},fu=(e,t)=>e.filter(r=>r.status===t).sort((r,n)=>n.createdAt-r.createdAt),SH=(e,t,r)=>F.useMemo(()=>{if(!(!e||!t||!r||r!=null&&r.isMarketPrice))return ag(r,e==null?void 0:e.decimals,t==null?void 0:t.decimals)},[r,e,t]),AH=(e,t,r)=>F.useMemo(()=>{if(!(!e||!t||!r))return sg(r,e.decimals,t.decimals)},[r,e,t]),k6=()=>{const e=K(r=>r.updateState),t=K(r=>r.state.orderIdsToCancel);return F.useCallback(r=>{t!=null&&t.includes(r)?e({orderIdsToCancel:t==null?void 0:t.filter(n=>n!==r)}):e({orderIdsToCancel:[...t||[],r]})},[e,t])},PH=()=>{var T,m;const e=Fe(),{orders:t,isLoading:r,refetch:n,isRefetching:s}=du(),{mutateAsync:a,isPending:o}=l0(),i=v6(),c=K(b=>b.updateState),l=K(b=>b.state.orderHistoryStatusFilter),u=K(b=>b.state.cancelOrdersMode),d=K(b=>b.state.orderIdsToCancel),p=F.useCallback(b=>c({cancelOrdersMode:b,orderIdsToCancel:[]}),[c]),h=F.useCallback(()=>c({selectedOrderID:void 0}),[c]),y=F.useCallback(b=>a({orders:b}),[a]),g=F.useCallback(b=>c({orderHistoryStatusFilter:b}),[]),k=F.useMemo(()=>{const b=Object.keys(R.OrderStatus).map(x=>({text:x,value:x}));return[{text:e("allOrders"),value:""},...b]},[e]),v=k6(),w=K(b=>b.state.selectedOrderID),S=g6(w),C=F.useMemo(()=>t.all.filter(b=>d==null?void 0:d.includes(b.id)),[t,d]),U=F.useCallback(()=>c({orderIdsToCancel:t.open.map(b=>b.id)}),[c,t]),z=F.useCallback(b=>a({orders:[b]}).then(x=>(x==null?void 0:x[0])||""),[a]);return{refetch:n,onHideSelectedOrder:h,onCancelOrders:y,onCancelOrder:z,onSelectStatus:g,onToggleCancelOrdersMode:p,onSelectOrder:v,isRefetching:s,orders:t,ordersToDisplay:i,isLoading:r,selectedOrder:w?S:void 0,openOrdersCount:((T=t==null?void 0:t.open)==null?void 0:T.length)||0,isCancelOrdersLoading:o,selectedStatus:l||((m=k[0])==null?void 0:m.value)||"",statuses:k,cancelOrdersMode:u,ordersToCancel:C,onSelectAllOrdersToCancel:U}},l0=()=>{const{account:e,walletClient:t,publicClient:r,config:n,callbacks:s,chainId:a}=oe(),o=i0(),i=K(d=>d.updateState),c=EH(),l=async d=>{R.analytics.onCancelOrderRequest(d.map(p=>p.id.toString()),1);try{return(await Promise.all(d.map(h=>t.writeContract({account:e,address:h.twapAddress,abi:R.TWAP_ABI,functionName:"cancel",args:[h.id],chain:t.chain}))))[0]}catch(p){throw R.analytics.onCancelOrderError(p),p}},u=async d=>{var p;try{R.analytics.onCancelOrderRequest(d.map(g=>g.hash),2);const h=await t.writeContract({account:e,address:n.repermit,abi:R.REPERMIT_ABI,functionName:"cancel",args:[d.map(g=>g.hash)],chain:t.chain}),y=await o(h);if(!y)throw new Error("failed to get transaction receipt");if(y.status==="reverted")throw new Error("failed to cancel order");return R.analytics.onCancelOrderSuccess(h),(p=s==null?void 0:s.onCancelOrderSuccess)==null||p.call(s,{orders:d,txHash:h,explorerUrl:Ii(h,a)}),y.transactionHash}catch(h){throw R.analytics.onCancelOrderError(h),h}};return on({mutationFn:async({orders:d})=>{var p,h;if(!e||!t||!r||!n)throw new Error("missing required parameters");try{(p=s==null?void 0:s.onCancelOrderRequest)==null||p.call(s,d),i({cancelOrderStatus:wt.LOADING,cancelOrderTxHash:void 0,cancelOrderError:void 0});const y=d.filter(w=>w.version===1),g=d.filter(w=>w.version===2),[k,v]=await Promise.all([y.length?l(y):Promise.resolve(""),g.length?u(g):Promise.resolve("")]);return i({cancelOrderStatus:wt.SUCCESS,orderIdsToCancel:[]}),c(d.map(w=>w.id)),[...k||[],v]}catch(y){console.error("cancel order error",y),(h=s==null?void 0:s.onCancelOrderFailed)==null||h.call(s,y.message),hp(y)?i({cancelOrderStatus:void 0}):(i({cancelOrderStatus:wt.FAILED}),R.analytics.onCancelOrderError(y))}}})},E6=F.createContext({}),_t=()=>F.useContext(E6),IH=()=>{const e=K(c=>c.state.selectedOrderID),t=g6(e),r=Fe(),[n,s]=F.useState("panel1"),{components:a}=oe(),o=a.TokenLogo;F.useEffect(()=>{s("panel1")},[t.id.value]);const i=c=>{s(n===c?!1:c)};return t?B.jsx(E6.Provider,{value:{order:t},children:B.jsxs("div",{className:"twap-orders__selected-order",children:[B.jsx(rg,{SrcTokenLogo:o&&B.jsx(o,{token:t.data.srcToken}),DstTokenLogo:o&&B.jsx(o,{token:t.data.dstToken}),fromTitle:r("from"),inToken:t.data.srcToken,toTitle:r("to"),outToken:t.data.dstToken}),B.jsx(we.Container,{children:B.jsxs("div",{className:"twap-orders__selected-order-bottom",children:[B.jsxs("div",{className:"twap-orders__selected-order-accordions",children:[B.jsx(C6,{title:r("excecutionSummary"),onClick:()=>i("panel1"),expanded:n==="panel1",children:B.jsx(zH,{})}),B.jsx(C6,{title:r("orderInfo"),expanded:n==="panel2",onClick:()=>i("panel2"),children:B.jsx(OH,{})})]}),B.jsx(RH,{})]})})]})}):null},C6=({expanded:e,onClick:t,children:r,title:n})=>B.jsxs("div",{className:"twap-orders__selected-order-accordion",children:[B.jsxs("div",{onClick:t,className:"twap-orders__selected-order-accordion-trigger",children:[B.jsx("p",{children:n}),B.jsx(NF.IoIosArrowDown,{style:{transform:e?"rotate(180deg)":"rotate(0deg)"}})]}),e&&B.jsx("div",{className:"twap-orders__selected-order-accordion-details",children:r})]}),OH=()=>B.jsxs(we,{children:[B.jsx(NH,{}),B.jsx(HH,{}),B.jsx(UH,{}),B.jsx($H,{}),B.jsx(BH,{}),B.jsx(MH,{}),B.jsx(_H,{}),B.jsx(DH,{}),B.jsx(FH,{}),B.jsx(qH,{}),B.jsx(we.Recipient,{})]}),BH=()=>{const{order:e}=_t();return B.jsx(we.TradeSize,{tradeSize:e.display.tradeSize.value,srcToken:e.data.srcToken,label:e.display.tradeSize.label,tooltip:e.display.tradeSize.tooltip,trades:e.display.totalTrades.value})},MH=()=>{const{order:e}=_t();return B.jsx(we.TradesAmount,{trades:e.display.totalTrades.value,label:e.display.totalTrades.label,tooltip:e.display.totalTrades.tooltip})},_H=()=>{const{order:e}=_t();return B.jsx(we.MinDestAmount,{dstToken:e.data.dstToken,dstMinAmountOut:e.display.minDestAmountPerTrade.value,label:e.display.minDestAmountPerTrade.label,tooltip:e.display.minDestAmountPerTrade.tooltip})},UH=()=>{const{order:e}=_t();return B.jsx(we.Deadline,{deadline:e.display.deadline.value,label:e.display.deadline.label,tooltip:e.display.deadline.tooltip})},DH=()=>{const{order:e}=_t();return B.jsx(we.TradeInterval,{fillDelayMillis:e.display.tradeInterval.value,chunks:e.display.totalTrades.value,label:e.display.tradeInterval.label,tooltip:e.display.tradeInterval.tooltip})},FH=()=>{const{order:e}=_t();return B.jsx(we.TriggerPrice,{dstToken:e.data.dstToken,price:e.display.triggerPricePerTrade.value,label:e.display.triggerPricePerTrade.label,tooltip:e.display.triggerPricePerTrade.tooltip})},NH=()=>{const{order:e}=_t();return B.jsx(we.OrderID,{id:e.id.value||""})},zH=()=>B.jsxs(we,{children:[B.jsx(VH,{}),B.jsx(GH,{}),B.jsx(LH,{}),B.jsx(WH,{}),B.jsx(YH,{})]}),LH=()=>{var r;const{order:e}=_t(),t=Ge({value:e.amountOutFilled.value,decimalScale:3});return e.amountOutFilled.value?B.jsx(we.DetailRow,{title:e.amountOutFilled.label,children:B.jsxs("p",{children:[t||"-"," ",(r=e.data.dstToken)==null?void 0:r.symbol]})}):null},RH=()=>{const{order:e}=_t(),{mutateAsync:t,isPending:r}=l0(),{components:n}=oe(),s=n.Button,a=F.useCallback(async()=>{},[t,e]);return!e||e.original.status!==R.OrderStatus.Open||!s?null:B.jsx(s,{loading:r,onClick:a,disabled:r,className:"twap-cancel-order",children:"Cancel"})},HH=()=>{const{order:e}=_t(),t=Fe(),r=o0(e.createdAt.value);return B.jsx(we.DetailRow,{title:t("createdAt")||"",children:B.jsx("p",{children:r})})},$H=()=>{var n;const{order:e}=_t(),t=Fe(),r=Ge({value:e.display.srcAmount.value,decimalScale:3});return B.jsx(we.DetailRow,{title:t("amountOut")||"",children:B.jsxs("p",{children:[r||0," ",(n=e.data.srcToken)==null?void 0:n.symbol]})})},GH=()=>{var r;const{order:e}=_t(),t=Ge({value:e.amountInFilled.value,decimalScale:3});return B.jsx(we.DetailRow,{title:e.amountInFilled.label,children:B.jsxs("p",{children:[t||"-"," ",(r=e.data.srcToken)==null?void 0:r.symbol]})})},jH=()=>{const{order:e}=_t(),t=Fe();return F.useMemo(()=>{switch(e.original.status){case R.OrderStatus.Open:return t("Open")||"";case R.OrderStatus.Completed:return t("Completed")||"";case R.OrderStatus.Expired:return t("Expired")||"";case R.OrderStatus.Canceled:return t("Canceled")||""}},[e.original.status,t])},VH=()=>{const e=Fe(),t=jH();return B.jsx(we.DetailRow,{title:e("status")||"",children:B.jsx("p",{children:t})})},WH=()=>{const{order:e}=_t(),t=Ge({value:e.progress.value,decimalScale:2});return B.jsx(we.DetailRow,{title:e.progress.label,children:B.jsxs("p",{children:[t||0,"%"]})})},qH=()=>{const{order:e}=_t(),t=Fe();return e.display.limitPrice.value?B.jsx(T6,{title:t("limitPrice")||"",price:e.display.limitPrice.value,srcToken:e.data.srcToken,dstToken:e.data.dstToken}):null},YH=()=>{const{order:e}=_t();return e.excecutionPrice.value?B.jsx(T6,{title:e.excecutionPrice.label,price:e.excecutionPrice.value,srcToken:e.data.srcToken,dstToken:e.data.dstToken}):null},T6=({price:e,srcToken:t,dstToken:r,title:n})=>{const s=Ge({value:e,decimalScale:3});return B.jsx(we.DetailRow,{title:n,children:ue(e||0).isZero()?B.jsx("p",{children:"-"}):B.jsxs("p",{children:["1 ",t==null?void 0:t.symbol," = ",s," ",r==null?void 0:r.symbol]})})};var u0={},S6;function KH(){if(S6)return u0;S6=1;var e=Rl.GenIcon;return u0.HiArrowRight=function(r){return e({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z",clipRule:"evenodd"}}]})(r)},u0}var ZH=KH();const pu=0,rs=1,Za=2,A6=4;function P6(e){return()=>e}function XH(e){e()}function I6(e,t){return r=>e(t(r))}function O6(e,t){return()=>e(t)}function QH(e,t){return r=>e(t,r)}function d0(e){return e!==void 0}function JH(...e){return()=>{e.map(XH)}}function Xa(){}function hu(e,t){return t(e),e}function e$(e,t){return t(e)}function et(...e){return e}function je(e,t){return e(rs,t)}function Ce(e,t){e(pu,t)}function f0(e){e(Za)}function st(e){return e(A6)}function ce(e,t){return je(e,QH(t,pu))}function Nr(e,t){const r=e(rs,n=>{r(),t(n)});return r}function B6(e){let t,r;return n=>s=>{t=s,r&&clearTimeout(r),r=setTimeout(()=>{n(t)},e)}}function M6(e,t){return e===t}function tt(e=M6){let t;return r=>n=>{e(t,n)||(t=n,r(n))}}function he(e){return t=>r=>{e(r)&&t(r)}}function re(e){return t=>I6(t,e)}function Qr(e){return t=>()=>{t(e)}}function V(e,...t){const r=t$(...t);return(n,s)=>{switch(n){case Za:f0(e);return;case rs:return je(e,r(s))}}}function Jr(e,t){return r=>n=>{r(t=e(t,n))}}function Vs(e){return t=>r=>{e>0?e--:t(r)}}function Bn(e){let t=null,r;return n=>s=>{t=s,!r&&(r=setTimeout(()=>{r=void 0,n(t)},e))}}function Te(...e){const t=new Array(e.length);let r=0,n=null;const s=Math.pow(2,e.length)-1;return e.forEach((a,o)=>{const i=Math.pow(2,o);je(a,c=>{const l=r;r=r|i,t[o]=c,l!==s&&r===s&&n&&(n(),n=null)})}),a=>o=>{const i=()=>{a([o].concat(t))};r===s?i():n=i}}function t$(...e){return t=>e.reduceRight(e$,t)}function r$(e){let t,r;const n=()=>t==null?void 0:t();return function(s,a){switch(s){case rs:return a?r===a?void 0:(n(),r=a,t=je(e,a),t):(n(),Xa);case Za:n(),r=null;return}}}function Y(e){let t=e;const r=Me();return(n,s)=>{switch(n){case pu:t=s;break;case rs:{s(t);break}case A6:return t}return r(n,s)}}function Ut(e,t){return hu(Y(t),r=>ce(e,r))}function Me(){const e=[];return(t,r)=>{switch(t){case pu:e.slice().forEach(n=>{n(r)});return;case Za:e.splice(0,e.length);return;case rs:return e.push(r),()=>{const n=e.indexOf(r);n>-1&&e.splice(n,1)}}}}function cr(e){return hu(Me(),t=>ce(e,t))}function He(e,t=[],{singleton:r}={singleton:!0}){return{constructor:e,dependencies:t,id:n$(),singleton:r}}const n$=()=>Symbol();function s$(e){const t=new Map,r=({constructor:n,dependencies:s,id:a,singleton:o})=>{if(o&&t.has(a))return t.get(a);const i=n(s.map(c=>r(c)));return o&&t.set(a,i),i};return r(e)}function yt(...e){const t=Me(),r=new Array(e.length);let n=0;const s=Math.pow(2,e.length)-1;return e.forEach((a,o)=>{const i=Math.pow(2,o);je(a,c=>{r[o]=c,n=n|i,n===s&&Ce(t,r)})}),function(a,o){switch(a){case Za:{f0(t);return}case rs:return n===s&&o(r),je(t,o)}}}function me(e,t=M6){return V(e,tt(t))}function p0(...e){return function(t,r){switch(t){case Za:return;case rs:return JH(...e.map(n=>je(n,r)))}}}var Kt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Kt||{});const a$={0:"debug",3:"error",1:"log",2:"warn"},o$=()=>typeof globalThis>"u"?window:globalThis,ns=He(()=>{const e=Y(3);return{log:Y((t,r,n=1)=>{var s;const a=(s=o$().VIRTUOSO_LOG_LEVEL)!=null?s:st(e);n>=a&&console[a$[n]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,r)}),logLevel:e}},[],{singleton:!0});function Ws(e,t,r){return h0(e,t,r).callbackRef}function h0(e,t,r){const n=F.useRef(null);let s=o=>{};const a=F.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(o=>{const i=()=>{const c=o[0].target;c.offsetParent!==null&&e(c)};r?i():requestAnimationFrame(i)}):null,[e,r]);return s=o=>{o&&t?(a==null||a.observe(o),n.current=o):(n.current&&(a==null||a.unobserve(n.current)),n.current=null)},{callbackRef:s,ref:n}}function i$(e,t,r,n,s,a,o,i,c){const l=F.useCallback(u=>{const d=c$(u.children,t,i?"offsetWidth":"offsetHeight",s);let p=u.parentElement;for(;!p.dataset.virtuosoScroller;)p=p.parentElement;const h=p.lastElementChild.dataset.viewportType==="window";let y;h&&(y=p.ownerDocument.defaultView);const g=o?i?o.scrollLeft:o.scrollTop:h?i?y.scrollX||y.document.documentElement.scrollLeft:y.scrollY||y.document.documentElement.scrollTop:i?p.scrollLeft:p.scrollTop,k=o?i?o.scrollWidth:o.scrollHeight:h?i?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight:i?p.scrollWidth:p.scrollHeight,v=o?i?o.offsetWidth:o.offsetHeight:h?i?y.innerWidth:y.innerHeight:i?p.offsetWidth:p.offsetHeight;n({scrollHeight:k,scrollTop:Math.max(g,0),viewportHeight:v}),a==null||a(i?_6("column-gap",getComputedStyle(u).columnGap,s):_6("row-gap",getComputedStyle(u).rowGap,s)),d!==null&&e(d)},[e,t,s,a,o,n,i]);return h0(l,r,c)}function c$(e,t,r,n){const s=e.length;if(s===0)return null;const a=[];for(let o=0;o<s;o++){const i=e.item(o);if(i.dataset.index===void 0)continue;const c=parseInt(i.dataset.index),l=parseFloat(i.dataset.knownSize),u=t(i,r);if(u===0&&n("Zero-sized element, this should not happen",{child:i},Kt.ERROR),u===l)continue;const d=a[a.length-1];a.length===0||d.size!==u||d.endIndex!==c-1?a.push({endIndex:c,size:u,startIndex:c}):a[a.length-1].endIndex++}return a}function _6(e,t,r){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&r(`${e} was not resolved to pixel value correctly`,t,Kt.WARN),t==="normal"?0:parseInt(t??"0",10)}function U6(e,t,r){const n=F.useRef(null),s=F.useCallback(c=>{if(!(c!=null&&c.offsetParent))return;const l=c.getBoundingClientRect(),u=l.width;let d,p;if(t){const h=t.getBoundingClientRect(),y=l.top-h.top;p=h.height-Math.max(0,y),d=y+t.scrollTop}else{const h=o.current.ownerDocument.defaultView;p=h.innerHeight-Math.max(0,l.top),d=l.top+h.scrollY}n.current={offsetTop:d,visibleHeight:p,visibleWidth:u},e(n.current)},[e,t]),{callbackRef:a,ref:o}=h0(s,!0,r),i=F.useCallback(()=>{s(o.current)},[s,o]);return F.useEffect(()=>{var c;if(t){t.addEventListener("scroll",i);const l=new ResizeObserver(()=>{requestAnimationFrame(i)});return l.observe(t),()=>{t.removeEventListener("scroll",i),l.unobserve(t)}}else{const l=(c=o.current)==null?void 0:c.ownerDocument.defaultView;return l==null||l.addEventListener("scroll",i),l==null||l.addEventListener("resize",i),()=>{l==null||l.removeEventListener("scroll",i),l==null||l.removeEventListener("resize",i)}}},[i,t,o]),a}const zt=He(()=>{const e=Me(),t=Me(),r=Y(0),n=Me(),s=Y(0),a=Me(),o=Me(),i=Y(0),c=Y(0),l=Y(0),u=Y(0),d=Me(),p=Me(),h=Y(!1),y=Y(!1),g=Y(!1);return ce(V(e,re(({scrollTop:k})=>k)),t),ce(V(e,re(({scrollHeight:k})=>k)),o),ce(t,s),{deviation:r,fixedFooterHeight:l,fixedHeaderHeight:c,footerHeight:u,headerHeight:i,horizontalDirection:y,scrollBy:p,scrollContainerState:e,scrollHeight:o,scrollingInProgress:h,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:n,statefulScrollTop:s,viewportHeight:a}},[],{singleton:!0}),Gi={lvl:0};function D6(e,t){const r=e.length;if(r===0)return[];let{index:n,value:s}=t(e[0]);const a=[];for(let o=1;o<r;o++){const{index:i,value:c}=t(e[o]);a.push({end:i-1,start:n,value:s}),n=i,s=c}return a.push({end:1/0,start:n,value:s}),a}function qe(e){return e===Gi}function ji(e,t){if(!qe(e))return t===e.k?e.v:t<e.k?ji(e.l,t):ji(e.r,t)}function zr(e,t,r="k"){if(qe(e))return[-1/0,void 0];if(Number(e[r])===t)return[e.k,e.v];if(Number(e[r])<t){const n=zr(e.r,t,r);return n[0]===-1/0?[e.k,e.v]:n}return zr(e.l,t,r)}function lr(e,t,r){return qe(e)?z6(t,r,1):t===e.k?kt(e,{k:t,v:r}):t<e.k?L6(kt(e,{l:lr(e.l,t,r)})):L6(kt(e,{r:lr(e.r,t,r)}))}function Qa(){return Gi}function Ja(e,t,r){if(qe(e))return[];const n=zr(e,t)[0];return l$(b0(e,n,r))}function m0(e,t){if(qe(e))return Gi;const{k:r,l:n,r:s}=e;if(t===r){if(qe(n))return s;if(qe(s))return n;{const[a,o]=N6(n);return mu(kt(e,{k:a,l:F6(n),v:o}))}}else return t<r?mu(kt(e,{l:m0(n,t)})):mu(kt(e,{r:m0(s,t)}))}function qs(e){return qe(e)?[]:[...qs(e.l),{k:e.k,v:e.v},...qs(e.r)]}function b0(e,t,r){if(qe(e))return[];const{k:n,l:s,r:a,v:o}=e;let i=[];return n>t&&(i=i.concat(b0(s,t,r))),n>=t&&n<=r&&i.push({k:n,v:o}),n<=r&&(i=i.concat(b0(a,t,r))),i}function mu(e){const{l:t,lvl:r,r:n}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(y0(t))return R6(kt(e,{lvl:r-1}));if(!qe(t)&&!qe(t.r))return kt(t.r,{l:kt(t,{r:t.r.l}),lvl:r,r:kt(e,{l:t.r.r,lvl:r-1})});throw new Error("Unexpected empty nodes")}else{if(y0(e))return g0(kt(e,{lvl:r-1}));if(!qe(n)&&!qe(n.l)){const s=n.l,a=y0(s)?n.lvl-1:n.lvl;return kt(s,{l:kt(e,{lvl:r-1,r:s.l}),lvl:s.lvl+1,r:g0(kt(n,{l:s.r,lvl:a}))})}else throw new Error("Unexpected empty nodes")}}function kt(e,t){return z6(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function F6(e){return qe(e.r)?e.l:mu(kt(e,{r:F6(e.r)}))}function y0(e){return qe(e)||e.lvl>e.r.lvl}function N6(e){return qe(e.r)?[e.k,e.v]:N6(e.r)}function z6(e,t,r,n=Gi,s=Gi){return{k:e,l:n,lvl:r,r:s,v:t}}function L6(e){return g0(R6(e))}function R6(e){const{l:t}=e;return!qe(t)&&t.lvl===e.lvl?kt(t,{r:kt(e,{l:t.r})}):e}function g0(e){const{lvl:t,r}=e;return!qe(r)&&!qe(r.r)&&r.lvl===t&&r.r.lvl===t?kt(r,{l:kt(e,{r:r.l}),lvl:t+1}):e}function l$(e){return D6(e,({k:t,v:r})=>({index:t,value:r}))}function H6(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Vi(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const x0=He(()=>({recalcInProgress:Y(!1)}),[],{singleton:!0});function $6(e,t,r){return e[bu(e,t,r)]}function bu(e,t,r,n=0){let s=e.length-1;for(;n<=s;){const a=Math.floor((n+s)/2),o=e[a],i=r(o,t);if(i===0)return a;if(i===-1){if(s-n<2)return a-1;s=a-1}else{if(s===n)return a;n=a+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function u$(e,t,r,n){const s=bu(e,t,n),a=bu(e,r,n,s);return e.slice(s,a+1)}function ss(e,t){return Math.round(e.getBoundingClientRect()[t])}function yu(e){return!qe(e.groupOffsetTree)}function w0({index:e},t){return t===e?0:t<e?-1:1}function d$(){return{groupIndices:[],groupOffsetTree:Qa(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Qa()}}function f$(e,t){let r=qe(e)?0:1/0;for(const n of t){const{endIndex:s,size:a,startIndex:o}=n;if(r=Math.min(r,o),qe(e)){e=lr(e,0,a);continue}const i=Ja(e,o-1,s+1);if(i.some(x$(n)))continue;let c=!1,l=!1;for(const{end:u,start:d,value:p}of i)c?(s>=d||a===p)&&(e=m0(e,d)):(l=p!==a,c=!0),u>s&&s>=d&&p!==a&&(e=lr(e,s+1,p));l&&(e=lr(e,o,a))}return[e,r]}function p$(e){return typeof e.groupIndex<"u"}function h$({offset:e},t){return t===e?0:t<e?-1:1}function Wi(e,t,r){if(t.length===0)return 0;const{index:n,offset:s,size:a}=$6(t,e,w0),o=e-n,i=a*o+(o-1)*r+s;return i>0?i+r:i}function G6(e,t){if(!yu(t))return e;let r=0;for(;t.groupIndices[r]<=e+r;)r++;return e+r}function j6(e,t,r){if(p$(e))return t.groupIndices[e.groupIndex]+1;{const n=e.index==="LAST"?r:e.index;let s=G6(n,t);return s=Math.max(0,s,Math.min(r,s)),s}}function m$(e,t,r,n=0){return n>0&&(t=Math.max(t,$6(e,n,w0).offset)),D6(u$(e,t,r,h$),g$)}function b$(e,[t,r,n,s]){t.length>0&&n("received item sizes",t,Kt.DEBUG);const a=e.sizeTree;let o=a,i=0;if(r.length>0&&qe(a)&&t.length===2){const p=t[0].size,h=t[1].size;o=r.reduce((y,g)=>lr(lr(y,g,p),g+1,h),o)}else[o,i]=f$(o,t);if(o===a)return e;const{lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d}=v0(e.offsetTree,i,o,s);return{groupIndices:r,groupOffsetTree:r.reduce((p,h)=>lr(p,h,Wi(h,d,s)),Qa()),lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d,sizeTree:o}}function y$(e){return qs(e).map(({k:t,v:r},n,s)=>{const a=s[n+1];return{endIndex:a?a.k-1:1/0,size:r,startIndex:t}})}function V6(e,t){let r=0,n=0;for(;r<e;)r+=t[n+1]-t[n]-1,n++;return n-(r===e?0:1)}function v0(e,t,r,n){let s=e,a=0,o=0,i=0,c=0;if(t!==0){c=bu(s,t-1,w0),i=s[c].offset;const l=zr(r,t-1);a=l[0],o=l[1],s.length&&s[c].size===zr(r,t)[1]&&(c-=1),s=s.slice(0,c+1)}else s=[];for(const{start:l,value:u}of Ja(r,t,1/0)){const d=l-a,p=d*o+i+d*n;s.push({index:l,offset:p,size:u}),a=l,i=p,o=u}return{lastIndex:a,lastOffset:i,lastSize:o,offsetTree:s}}function g$(e){return{index:e.index,value:e}}function x$(e){const{endIndex:t,size:r,startIndex:n}=e;return s=>s.start===n&&(s.end===t||s.end===1/0)&&s.value===r}const w$={offsetHeight:"height",offsetWidth:"width"},en=He(([{log:e},{recalcInProgress:t}])=>{const r=Me(),n=Me(),s=Ut(n,0),a=Me(),o=Me(),i=Y(0),c=Y([]),l=Y(void 0),u=Y(void 0),d=Y(void 0),p=Y(void 0),h=Y((T,m)=>ss(T,w$[m])),y=Y(void 0),g=Y(0),k=d$(),v=Ut(V(r,Te(c,e,g),Jr(b$,k),tt()),k),w=Ut(V(c,tt(),Jr((T,m)=>({current:m,prev:T.current}),{current:[],prev:[]}),re(({prev:T})=>T)),[]);ce(V(c,he(T=>T.length>0),Te(v,g),re(([T,m,b])=>{const x=T.reduce((A,I,O)=>lr(A,I,Wi(I,m.offsetTree,b)||O),Qa());return{...m,groupIndices:T,groupOffsetTree:x}})),v),ce(V(n,Te(v),he(([T,{lastIndex:m}])=>T<m),re(([T,{lastIndex:m,lastSize:b}])=>[{endIndex:m,size:b,startIndex:T}])),r),ce(l,u);const S=Ut(V(l,re(T=>T===void 0)),!0);ce(V(u,he(T=>T!==void 0&&qe(st(v).sizeTree)),re(T=>{const m=st(d),b=st(c).length>0;return m?b?[{endIndex:0,size:m,startIndex:0},{endIndex:1,size:T,startIndex:1}]:[]:[{endIndex:0,size:T,startIndex:0}]})),r),ce(V(p,he(T=>T!==void 0&&T.length>0&&qe(st(v).sizeTree)),re(T=>{const m=[];let b=T[0],x=0;for(let A=1;A<T.length;A++){const I=T[A];I!==b&&(m.push({endIndex:A-1,size:b,startIndex:x}),b=I,x=A)}return m.push({endIndex:T.length-1,size:b,startIndex:x}),m})),r),ce(V(c,Te(d,u),he(([,T,m])=>T!==void 0&&m!==void 0),re(([T,m,b])=>{const x=[];for(let A=0;A<T.length;A++){const I=T[A],O=T[A+1];x.push({startIndex:I,endIndex:I,size:m}),O!==void 0&&x.push({startIndex:I+1,endIndex:O-1,size:b})}return x})),r);const C=cr(V(r,Te(v),Jr(({sizes:T},[m,b])=>({changed:b!==T,sizes:b}),{changed:!1,sizes:k}),re(T=>T.changed)));je(V(i,Jr((T,m)=>({diff:T.prev-m,prev:m}),{diff:0,prev:0}),re(T=>T.diff)),T=>{const{groupIndices:m}=st(v);if(T>0)Ce(t,!0),Ce(a,T+V6(T,m));else if(T<0){const b=st(w);b.length>0&&(T-=V6(-T,b)),Ce(o,T)}}),je(V(i,Te(e)),([T,m])=>{T<0&&m("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:i},Kt.ERROR)});const U=cr(a);ce(V(a,Te(v),re(([T,m])=>{const b=m.groupIndices.length>0,x=[],A=m.lastSize;if(b){const I=ji(m.sizeTree,0);let O=0,D=0;for(;O<T;){const P=m.groupIndices[D],_=m.groupIndices.length===D+1?1/0:m.groupIndices[D+1]-P-1;x.push({endIndex:P,size:I,startIndex:P}),x.push({endIndex:P+1+_-1,size:A,startIndex:P+1}),D++,O+=_+1}const E=qs(m.sizeTree);return O!==T&&E.shift(),E.reduce((P,{k:_,v:M})=>{let L=P.ranges;return P.prevSize!==0&&(L=[...P.ranges,{endIndex:_+T-1,size:P.prevSize,startIndex:P.prevIndex}]),{prevIndex:_+T,prevSize:M,ranges:L}},{prevIndex:T,prevSize:0,ranges:x}).ranges}return qs(m.sizeTree).reduce((I,{k:O,v:D})=>({prevIndex:O+T,prevSize:D,ranges:[...I.ranges,{endIndex:O+T-1,size:I.prevSize,startIndex:I.prevIndex}]}),{prevIndex:0,prevSize:A,ranges:[]}).ranges})),r);const z=cr(V(o,Te(v,g),re(([T,{offsetTree:m},b])=>{const x=-T;return Wi(x,m,b)})));return ce(V(o,Te(v,g),re(([T,m,b])=>{if(m.groupIndices.length>0){if(qe(m.sizeTree))return m;let x=Qa();const A=st(w);let I=0,O=0,D=0;for(;I<-T;){D=A[O];const E=A[O+1]-D-1;O++,I+=E+1}if(x=qs(m.sizeTree).reduce((E,{k:P,v:_})=>lr(E,Math.max(0,P+T),_),x),I!==-T){const E=ji(m.sizeTree,D);x=lr(x,0,E);const P=zr(m.sizeTree,-T+1)[1];x=lr(x,1,P)}return{...m,sizeTree:x,...v0(m.offsetTree,0,x,b)}}else{const x=qs(m.sizeTree).reduce((A,{k:I,v:O})=>lr(A,Math.max(0,I+T),O),Qa());return{...m,sizeTree:x,...v0(m.offsetTree,0,x,b)}}})),v),{beforeUnshiftWith:U,data:y,defaultItemSize:u,firstItemIndex:i,fixedItemSize:l,fixedGroupSize:d,gap:g,groupIndices:c,heightEstimates:p,itemSize:h,listRefresh:C,shiftWith:o,shiftWithOffset:z,sizeRanges:r,sizes:v,statefulTotalCount:s,totalCount:n,trackItemSizes:S,unshiftWith:a}},et(ns,x0),{singleton:!0});function v$(e){return e.reduce((t,r)=>(t.groupIndices.push(t.totalCount),t.totalCount+=r+1,t),{groupIndices:[],totalCount:0})}const W6=He(([{groupIndices:e,sizes:t,totalCount:r},{headerHeight:n,scrollTop:s}])=>{const a=Me(),o=Me(),i=cr(V(a,re(v$)));return ce(V(i,re(c=>c.totalCount)),r),ce(V(i,re(c=>c.groupIndices)),e),ce(V(yt(s,t,n),he(([c,l])=>yu(l)),re(([c,l,u])=>zr(l.groupOffsetTree,Math.max(c-u,0),"v")[0]),tt(),re(c=>[c])),o),{groupCounts:a,topItemsIndexes:o}},et(en,zt)),as=He(([{log:e}])=>{const t=Y(!1),r=cr(V(t,he(n=>n),tt()));return je(t,n=>{n&&st(e)("props updated",{},Kt.DEBUG)}),{didMount:r,propsReady:t}},et(ns),{singleton:!0}),k$=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function q6(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!k$)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const qi=He(([{gap:e,listRefresh:t,sizes:r,totalCount:n},{fixedFooterHeight:s,fixedHeaderHeight:a,footerHeight:o,headerHeight:i,scrollingInProgress:c,scrollTo:l,smoothScrollTargetReached:u,viewportHeight:d},{log:p}])=>{const h=Me(),y=Me(),g=Y(0);let k=null,v=null,w=null;function S(){k&&(k(),k=null),w&&(w(),w=null),v&&(clearTimeout(v),v=null),Ce(c,!1)}return ce(V(h,Te(r,d,n,g,i,o,p),Te(e,a,s),re(([[C,U,z,T,m,b,x,A],I,O,D])=>{const E=q6(C),{align:P,behavior:_,offset:M}=E,L=T-1,H=j6(E,U,L);let G=Wi(H,U.offsetTree,I)+b;P==="end"?(G+=O+zr(U.sizeTree,H)[1]-z+D,H===L&&(G+=x)):P==="center"?G+=(O+zr(U.sizeTree,H)[1]-z+D)/2:G-=m,M&&(G+=M);const J=pe=>{S(),pe?(A("retrying to scroll to",{location:C},Kt.DEBUG),Ce(h,C)):(Ce(y,!0),A("list did not change, scroll successful",{},Kt.DEBUG))};if(S(),_==="smooth"){let pe=!1;w=je(t,be=>{pe=pe||be}),k=Nr(u,()=>{J(pe)})}else k=Nr(V(t,E$(150)),J);return v=setTimeout(()=>{S()},1200),Ce(c,!0),A("scrolling from index to",{behavior:_,index:H,top:G},Kt.DEBUG),{behavior:_,top:G}})),l),{scrollTargetReached:y,scrollToIndex:h,topListHeight:g}},et(en,zt,ns),{singleton:!0});function E$(e){return t=>{const r=setTimeout(()=>{t(!1)},e);return n=>{n&&(t(!0),clearTimeout(r))}}}function k0(e,t){e==0?t():requestAnimationFrame(()=>{k0(e-1,t)})}function E0(e,t){const r=t-1;return typeof e=="number"?e:e.index==="LAST"?r:e.index}const Yi=He(([{defaultItemSize:e,listRefresh:t,sizes:r},{scrollTop:n},{scrollTargetReached:s,scrollToIndex:a},{didMount:o}])=>{const i=Y(!0),c=Y(0),l=Y(!0);return ce(V(o,Te(c),he(([u,d])=>!!d),Qr(!1)),i),ce(V(o,Te(c),he(([u,d])=>!!d),Qr(!1)),l),je(V(yt(t,o),Te(i,r,e,l),he(([[,u],d,{sizeTree:p},h,y])=>u&&(!qe(p)||d0(h))&&!d&&!y),Te(c)),([,u])=>{Nr(s,()=>{Ce(l,!0)}),k0(4,()=>{Nr(n,()=>{Ce(i,!0)}),Ce(a,u)})}),{initialItemFinalLocationReached:l,initialTopMostItemIndex:c,scrolledToInitialItem:i}},et(en,zt,qi,as),{singleton:!0});function Y6(e,t){return Math.abs(e-t)<1.01}const Ki="up",Zi="down",C$="none",T$={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},S$=0,Xi=He(([{footerHeight:e,headerHeight:t,scrollBy:r,scrollContainerState:n,scrollTop:s,viewportHeight:a}])=>{const o=Y(!1),i=Y(!0),c=Me(),l=Me(),u=Y(4),d=Y(S$),p=Ut(V(p0(V(me(s),Vs(1),Qr(!0)),V(me(s),Vs(1),Qr(!1),B6(100))),tt()),!1),h=Ut(V(p0(V(r,Qr(!0)),V(r,Qr(!1),B6(200))),tt()),!1);ce(V(yt(me(s),me(d)),re(([w,S])=>w<=S),tt()),i),ce(V(i,Bn(50)),l);const y=cr(V(yt(n,me(a),me(t),me(e),me(u)),Jr((w,[{scrollHeight:S,scrollTop:C},U,z,T,m])=>{const b=C+U-S>-m,x={scrollHeight:S,scrollTop:C,viewportHeight:U};if(b){let I,O;return C>w.state.scrollTop?(I="SCROLLED_DOWN",O=w.state.scrollTop-C):(I="SIZE_DECREASED",O=w.state.scrollTop-C||w.scrollTopDelta),{atBottom:!0,atBottomBecause:I,scrollTopDelta:O,state:x}}let A;return x.scrollHeight>w.state.scrollHeight?A="SIZE_INCREASED":U<w.state.viewportHeight?A="VIEWPORT_HEIGHT_DECREASING":C<w.state.scrollTop?A="SCROLLING_UPWARDS":A="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:A,state:x}},T$),tt((w,S)=>w&&w.atBottom===S.atBottom))),g=Ut(V(n,Jr((w,{scrollHeight:S,scrollTop:C,viewportHeight:U})=>{if(Y6(w.scrollHeight,S))return{changed:!1,jump:0,scrollHeight:S,scrollTop:C};{const z=S-(C+U)<1;return w.scrollTop!==C&&z?{changed:!0,jump:w.scrollTop-C,scrollHeight:S,scrollTop:C}:{changed:!0,jump:0,scrollHeight:S,scrollTop:C}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),he(w=>w.changed),re(w=>w.jump)),0);ce(V(y,re(w=>w.atBottom)),o),ce(V(o,Bn(50)),c);const k=Y(Zi);ce(V(n,re(({scrollTop:w})=>w),tt(),Jr((w,S)=>st(h)?{direction:w.direction,prevScrollTop:S}:{direction:S<w.prevScrollTop?Ki:Zi,prevScrollTop:S},{direction:Zi,prevScrollTop:0}),re(w=>w.direction)),k),ce(V(n,Bn(50),Qr(C$)),k);const v=Y(0);return ce(V(p,he(w=>!w),Qr(0)),v),ce(V(s,Bn(100),Te(p),he(([w,S])=>!!S),Jr(([w,S],[C])=>[S,C],[0,0]),re(([w,S])=>S-w)),v),{atBottomState:y,atBottomStateChange:c,atBottomThreshold:u,atTopStateChange:l,atTopThreshold:d,isAtBottom:o,isAtTop:i,isScrolling:p,lastJumpDueToItemResize:g,scrollDirection:k,scrollVelocity:v}},et(zt)),Qi="top",Ji="bottom",K6="none";function Z6(e,t,r){return typeof e=="number"?r===Ki&&t===Qi||r===Zi&&t===Ji?e:0:r===Ki?t===Qi?e.main:e.reverse:t===Ji?e.main:e.reverse}function X6(e,t){var r;return typeof e=="number"?e:(r=e[t])!=null?r:0}const C0=He(([{deviation:e,fixedHeaderHeight:t,headerHeight:r,scrollTop:n,viewportHeight:s}])=>{const a=Me(),o=Y(0),i=Y(0),c=Y(0),l=Ut(V(yt(me(n),me(s),me(r),me(a,Vi),me(c),me(o),me(t),me(e),me(i)),re(([u,d,p,[h,y],g,k,v,w,S])=>{const C=u-w,U=k+v,z=Math.max(p-C,0);let T=K6;const m=X6(S,Qi),b=X6(S,Ji);return h-=w,h+=p+v,y+=p+v,y-=w,h>u+U-m&&(T=Ki),y<u-z+d+b&&(T=Zi),T!==K6?[Math.max(C-p-Z6(g,Qi,T)-m,0),C-z-v+d+Z6(g,Ji,T)+b]:null}),he(u=>u!=null),tt(Vi)),[0,0]);return{increaseViewportBy:i,listBoundary:a,overscan:c,topListHeight:o,visibleRange:l}},et(zt),{singleton:!0});function A$(e,t,r){if(yu(t)){const n=G6(e,t);return[{index:zr(t.groupOffsetTree,n)[0],offset:0,size:0},{data:r==null?void 0:r[0],index:n,offset:0,size:0}]}return[{data:r==null?void 0:r[0],index:e,offset:0,size:0}]}const T0={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function gu(e,t,r,n,s,a){const{lastIndex:o,lastOffset:i,lastSize:c}=s;let l=0,u=0;if(e.length>0){l=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=r-o,p=i+d*c+(d-1)*n,h=l,y=p-u;return{bottom:u,firstItemIndex:a,items:J6(e,s,a),offsetBottom:y,offsetTop:l,top:h,topItems:J6(t,s,a),topListHeight:t.reduce((g,k)=>k.size+g,0),totalCount:r}}function Q6(e,t,r,n,s,a){let o=0;if(r.groupIndices.length>0)for(const u of r.groupIndices){if(u-o>=e)break;o++}const i=e+o,c=E0(t,i),l=Array.from({length:i}).map((u,d)=>({data:a[d+c],index:d+c,offset:0,size:0}));return gu(l,[],i,s,r,n)}function J6(e,t,r){if(e.length===0)return[];if(!yu(t))return e.map(l=>({...l,index:l.index+r,originalIndex:l.index}));const n=e[0].index,s=e[e.length-1].index,a=[],o=Ja(t.groupOffsetTree,n,s);let i,c=0;for(const l of e){(!i||i.end<l.index)&&(i=o.shift(),c=t.groupIndices.indexOf(i.start));let u;l.index===i.start?u={index:c,type:"group"}:u={groupIndex:c,index:l.index-(c+1)+r},a.push({...u,data:l.data,offset:l.offset,originalIndex:l.index,size:l.size})}return a}function ex(e,t){var r;return e===void 0?0:typeof e=="number"?e:(r=e[t])!=null?r:0}const Ys=He(([{data:e,firstItemIndex:t,gap:r,sizes:n,totalCount:s},a,{listBoundary:o,topListHeight:i,visibleRange:c},{initialTopMostItemIndex:l,scrolledToInitialItem:u},{topListHeight:d},p,{didMount:h},{recalcInProgress:y}])=>{const g=Y([]),k=Y(0),v=Me(),w=Y(0);ce(a.topItemsIndexes,g);const S=Ut(V(yt(h,y,me(c,Vi),me(s),me(n),me(l),u,me(g),me(t),me(r),me(w),e),he(([T,m,,b,,,,,,,,x])=>{const A=x&&x.length!==b;return T&&!m&&!A}),re(([,,[T,m],b,x,A,I,O,D,E,P,_])=>{var M,L,H,G;const J=x,{offsetTree:pe,sizeTree:be}=J,ie=st(k);if(b===0)return{...T0,totalCount:b};if(T===0&&m===0)return ie===0?{...T0,totalCount:b}:Q6(ie,A,x,D,E,_||[]);if(qe(be))return ie>0?null:gu(A$(E0(A,b),J,_),[],b,E,J,D);const fe=[];if(O.length>0){const Se=O[0],ke=O[O.length-1];let ye=0;for(const Ze of Ja(be,Se,ke)){const Ye=Ze.value,Xe=Math.max(Ze.start,Se),kr=Math.min(Ze.end,ke);for(let Pt=Xe;Pt<=kr;Pt++)fe.push({data:_==null?void 0:_[Pt],index:Pt,offset:ye,size:Ye}),ye+=Ye}}if(!I)return gu([],fe,b,E,J,D);const Oe=O.length>0?O[O.length-1]+1:0,Q=m$(pe,T,m,Oe);if(Q.length===0)return null;const ve=b-1,Ue=hu([],Se=>{for(const ke of Q){const ye=ke.value;let Ze=ye.offset,Ye=ke.start;const Xe=ye.size;if(ye.offset<T){Ye+=Math.floor((T-ye.offset+E)/(Xe+E));const Pt=Ye-ke.start;Ze+=Pt*Xe+Pt*E}Ye<Oe&&(Ze+=(Oe-Ye)*Xe,Ye=Oe);const kr=Math.min(ke.end,ve);for(let Pt=Ye;Pt<=kr&&!(Ze>=m);Pt++)Se.push({data:_==null?void 0:_[Pt],index:Pt,offset:Ze,size:Xe}),Ze+=Xe+E}}),$e=ex(P,Qi),ot=ex(P,Ji);if(Ue.length>0&&($e>0||ot>0)){const Se=Ue[0],ke=Ue[Ue.length-1];if($e>0&&Se.index>Oe){const ye=Math.min($e,Se.index-Oe),Ze=[];let Ye=Se.offset;for(let Xe=Se.index-1;Xe>=Se.index-ye;Xe--){const kr=(L=(M=Ja(be,Xe,Xe)[0])==null?void 0:M.value)!=null?L:Se.size;Ye-=kr+E,Ze.unshift({data:_==null?void 0:_[Xe],index:Xe,offset:Ye,size:kr})}Ue.unshift(...Ze)}if(ot>0&&ke.index<ve){const ye=Math.min(ot,ve-ke.index);let Ze=ke.offset+ke.size+E;for(let Ye=ke.index+1;Ye<=ke.index+ye;Ye++){const Xe=(G=(H=Ja(be,Ye,Ye)[0])==null?void 0:H.value)!=null?G:ke.size;Ue.push({data:_==null?void 0:_[Ye],index:Ye,offset:Ze,size:Xe}),Ze+=Xe+E}}}return gu(Ue,fe,b,E,J,D)}),he(T=>T!==null),tt()),T0);ce(V(e,he(d0),re(T=>T==null?void 0:T.length)),s),ce(V(S,re(T=>T.topListHeight)),d),ce(d,i),ce(V(S,re(T=>[T.top,T.bottom])),o),ce(V(S,re(T=>T.items)),v);const C=cr(V(S,he(({items:T})=>T.length>0),Te(s,e),he(([{items:T},m])=>T[T.length-1].originalIndex===m-1),re(([,T,m])=>[T-1,m]),tt(Vi),re(([T])=>T))),U=cr(V(S,Bn(200),he(({items:T,topItems:m})=>T.length>0&&T[0].originalIndex===m.length),re(({items:T})=>T[0].index),tt())),z=cr(V(S,he(({items:T})=>T.length>0),re(({items:T})=>{let m=0,b=T.length-1;for(;T[m].type==="group"&&m<b;)m++;for(;T[b].type==="group"&&b>m;)b--;return{endIndex:T[b].index,startIndex:T[m].index}}),tt(H6)));return{endReached:C,initialItemCount:k,itemsRendered:v,listState:S,minOverscanItemCount:w,rangeChanged:z,startReached:U,topItemsIndexes:g,...p}},et(en,W6,C0,Yi,qi,Xi,as,x0),{singleton:!0}),tx=He(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:r,headerHeight:n},{listState:s}])=>{const a=Me(),o=Ut(V(yt(r,e,n,t,s),re(([i,c,l,u,d])=>i+c+l+u+d.offsetBottom+d.bottom)),0);return ce(me(o),a),{totalListHeight:o,totalListHeightChanged:a}},et(zt,Ys),{singleton:!0}),P$=He(([{viewportHeight:e},{totalListHeight:t}])=>{const r=Y(!1),n=Ut(V(yt(r,e,t),he(([s])=>s),re(([,s,a])=>Math.max(0,s-a)),Bn(0),tt()),0);return{alignToBottom:r,paddingTopAddition:n}},et(zt,tx),{singleton:!0}),rx=He(()=>({context:Y(null)})),I$=({itemBottom:e,itemTop:t,locationParams:{align:r,behavior:n,...s},viewportBottom:a,viewportTop:o})=>t<o?{...s,align:r??"start",behavior:n}:e>a?{...s,align:r??"end",behavior:n}:null,nx=He(([{gap:e,sizes:t,totalCount:r},{fixedFooterHeight:n,fixedHeaderHeight:s,headerHeight:a,scrollingInProgress:o,scrollTop:i,viewportHeight:c},{scrollToIndex:l}])=>{const u=Me();return ce(V(u,Te(t,c,r,a,s,n,i),Te(e),re(([[d,p,h,y,g,k,v,w],S])=>{const{align:C,behavior:U,calculateViewLocation:z=I$,done:T,...m}=d,b=j6(d,p,y-1),x=Wi(b,p.offsetTree,S)+g+k,A=x+zr(p.sizeTree,b)[1],I=w+k,O=w+h-v,D=z({itemBottom:A,itemTop:x,locationParams:{align:C,behavior:U,...m},viewportBottom:O,viewportTop:I});return D?T&&Nr(V(o,he(E=>!E),Vs(st(o)?1:2)),T):T&&T(),D}),he(d=>d!==null)),l),{scrollIntoView:u}},et(en,zt,qi,Ys,ns),{singleton:!0});function sx(e){return e?e==="smooth"?"smooth":"auto":!1}const O$=(e,t)=>typeof e=="function"?sx(e(t)):t&&sx(e),B$=He(([{listRefresh:e,totalCount:t,fixedItemSize:r,data:n},{atBottomState:s,isAtBottom:a},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:c,propsReady:l},{log:u},{scrollingInProgress:d},{context:p},{scrollIntoView:h}])=>{const y=Y(!1),g=Me();let k=null;function v(U){Ce(o,{align:"end",behavior:U,index:"LAST"})}je(V(yt(V(me(t),Vs(1)),c),Te(me(y),a,i,d),re(([[U,z],T,m,b,x])=>{let A=z&&b,I="auto";return A&&(I=O$(T,m||x),A=A&&!!I),{followOutputBehavior:I,shouldFollow:A,totalCount:U}}),he(({shouldFollow:U})=>U)),({followOutputBehavior:U,totalCount:z})=>{k&&(k(),k=null),st(r)?requestAnimationFrame(()=>{st(u)("following output to ",{totalCount:z},Kt.DEBUG),v(U)}):k=Nr(e,()=>{st(u)("following output to ",{totalCount:z},Kt.DEBUG),v(U),k=null})});function w(U){const z=Nr(s,T=>{U&&!T.atBottom&&T.notAtBottomBecause==="SIZE_INCREASED"&&!k&&(st(u)("scrolling to bottom due to increased size",{},Kt.DEBUG),v("auto"))});setTimeout(z,100)}je(V(yt(me(y),t,l),he(([U,,z])=>U&&z),Jr(({value:U},[,z])=>({refreshed:U===z,value:z}),{refreshed:!1,value:0}),he(({refreshed:U})=>U),Te(y,t)),([,U])=>{st(i)&&w(U!==!1)}),je(g,()=>{w(st(y)!==!1)}),je(yt(me(y),s),([U,z])=>{U&&!z.atBottom&&z.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&v("auto")});const S=Y(null),C=Me();return ce(p0(V(me(n),re(U=>{var z;return(z=U==null?void 0:U.length)!=null?z:0})),V(me(t))),C),je(V(yt(V(C,Vs(1)),c),Te(me(S),i,d,p),re(([[U,z],T,m,b,x])=>z&&m&&(T==null?void 0:T({context:x,totalCount:U,scrollingInProgress:b}))),he(U=>!!U),Bn(0)),U=>{k&&(k(),k=null),st(r)?requestAnimationFrame(()=>{st(u)("scrolling into view",{}),Ce(h,U)}):k=Nr(e,()=>{st(u)("scrolling into view",{}),Ce(h,U),k=null})}),{autoscrollToBottom:g,followOutput:y,scrollIntoViewOnChange:S}},et(en,Xi,qi,Yi,as,ns,zt,rx,nx)),M$=He(([{data:e,firstItemIndex:t,gap:r,sizes:n},{initialTopMostItemIndex:s},{initialItemCount:a,listState:o},{didMount:i}])=>(ce(V(i,Te(a),he(([,c])=>c!==0),Te(s,n,t,r,e),re(([[,c],l,u,d,p,h=[]])=>Q6(c,l,u,d,p,h))),o),{}),et(en,Yi,Ys,as),{singleton:!0}),_$=He(([{didMount:e},{scrollTo:t},{listState:r}])=>{const n=Y(0);return je(V(e,Te(n),he(([,s])=>s!==0),re(([,s])=>({top:s}))),s=>{Nr(V(r,Vs(1),he(a=>a.items.length>1)),()=>{requestAnimationFrame(()=>{Ce(t,s)})})}),{initialScrollTop:n}},et(as,zt,Ys),{singleton:!0}),ax=He(([{scrollVelocity:e}])=>{const t=Y(!1),r=Me(),n=Y(!1);return ce(V(e,Te(n,t,r),he(([s,a])=>!!a),re(([s,a,o,i])=>{const{enter:c,exit:l}=a;if(o){if(l(s,i))return!1}else if(c(s,i))return!0;return o}),tt()),t),je(V(yt(t,e,r),Te(n)),([[s,a,o],i])=>{s&&i&&i.change&&i.change(a,o)}),{isSeeking:t,scrollSeekConfiguration:n,scrollSeekRangeChanged:r,scrollVelocity:e}},et(Xi),{singleton:!0}),S0=He(([{scrollContainerState:e,scrollTo:t}])=>{const r=Me(),n=Me(),s=Me(),a=Y(!1),o=Y(void 0);return ce(V(yt(r,n),re(([{scrollHeight:i,scrollTop:c,viewportHeight:l},{offsetTop:u}])=>({scrollHeight:i,scrollTop:Math.max(0,c-u),viewportHeight:l}))),e),ce(V(t,Te(n),re(([i,{offsetTop:c}])=>({...i,top:i.top+c}))),s),{customScrollParent:o,useWindowScroll:a,windowScrollContainerState:r,windowScrollTo:s,windowViewportRect:n}},et(zt)),U$=He(([{sizeRanges:e,sizes:t},{headerHeight:r,scrollTop:n},{initialTopMostItemIndex:s},{didMount:a},{useWindowScroll:o,windowScrollContainerState:i,windowViewportRect:c}])=>{const l=Me(),u=Y(void 0),d=Y(null),p=Y(null);return ce(i,d),ce(c,p),je(V(l,Te(t,n,o,d,p,r)),([h,y,g,k,v,w,S])=>{const C=y$(y.sizeTree);k&&v!==null&&w!==null&&(g=v.scrollTop-w.offsetTop),g-=S,h({ranges:C,scrollTop:g})}),ce(V(u,he(d0),re(D$)),s),ce(V(a,Te(u),he(([,h])=>h!==void 0),tt(),re(([,h])=>h.ranges)),e),{getState:l,restoreStateFrom:u}},et(en,zt,Yi,as,S0));function D$(e){return{align:"start",index:0,offset:e.scrollTop}}const F$=He(([{topItemsIndexes:e}])=>{const t=Y(0);return ce(V(t,he(r=>r>=0),re(r=>Array.from({length:r}).map((n,s)=>s))),e),{topItemCount:t}},et(Ys));function ox(e){let t=!1,r;return()=>(t||(t=!0,r=e()),r)}const N$=ox(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),z$=He(([{deviation:e,scrollBy:t,scrollingInProgress:r,scrollTop:n},{isAtBottom:s,isScrolling:a,lastJumpDueToItemResize:o,scrollDirection:i},{listState:c},{beforeUnshiftWith:l,gap:u,shiftWithOffset:d,sizes:p},{log:h},{recalcInProgress:y}])=>{const g=cr(V(c,Te(o),Jr(([,v,w,S],[{bottom:C,items:U,offsetBottom:z,totalCount:T},m])=>{const b=C+z;let x=0;return w===T&&v.length>0&&U.length>0&&(U[0].originalIndex===0&&v[0].originalIndex===0||(x=b-S,x!==0&&(x+=m))),[x,U,T,b]},[0,[],0,0]),he(([v])=>v!==0),Te(n,i,r,s,h,y),he(([,v,w,S,,,C])=>!C&&!S&&v!==0&&w===Ki),re(([[v],,,,,w])=>(w("Upward scrolling compensation",{amount:v},Kt.DEBUG),v))));function k(v){v>0?(Ce(t,{behavior:"auto",top:-v}),Ce(e,0)):(Ce(e,0),Ce(t,{behavior:"auto",top:-v}))}return je(V(g,Te(e,a)),([v,w,S])=>{S&&N$()?Ce(e,w-v):k(-v)}),je(V(yt(Ut(a,!1),e,y),he(([v,w,S])=>!v&&!S&&w!==0),re(([v,w])=>w),Bn(1)),k),ce(V(d,re(v=>({top:-v}))),t),je(V(l,Te(p,u),re(([v,{groupIndices:w,lastSize:S,sizeTree:C},U])=>{function z(T){return T*(S+U)}if(w.length===0)return z(v);{let T=0;const m=ji(C,0);let b=0,x=0;for(;b<v;){b++,T+=m;let A=w.length===x+1?1/0:w[x+1]-w[x]-1;b+A>v&&(T-=m,A=v-b+1),b+=A,T+=z(A),x++}return T}})),v=>{Ce(e,v),requestAnimationFrame(()=>{Ce(t,{top:v}),requestAnimationFrame(()=>{Ce(e,0),Ce(y,!1)})})}),{deviation:e}},et(zt,Xi,Ys,en,ns,x0)),L$=He(([e,t,r,n,s,a,o,i,c,l,u])=>({...e,...t,...r,...n,...s,...a,...o,...i,...c,...l,...u}),et(C0,M$,as,ax,tx,_$,P$,S0,nx,ns,rx)),ix=He(([{data:e,defaultItemSize:t,firstItemIndex:r,fixedItemSize:n,fixedGroupSize:s,gap:a,groupIndices:o,heightEstimates:i,itemSize:c,sizeRanges:l,sizes:u,statefulTotalCount:d,totalCount:p,trackItemSizes:h},{initialItemFinalLocationReached:y,initialTopMostItemIndex:g,scrolledToInitialItem:k},v,w,S,C,{scrollToIndex:U},z,{topItemCount:T},{groupCounts:m},b])=>{const{listState:x,minOverscanItemCount:A,topItemsIndexes:I,rangeChanged:O,...D}=C;return ce(O,b.scrollSeekRangeChanged),ce(V(b.windowViewportRect,re(E=>E.visibleHeight)),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:r,fixedItemHeight:n,fixedGroupHeight:s,gap:a,groupCounts:m,heightEstimates:i,initialItemFinalLocationReached:y,initialTopMostItemIndex:g,scrolledToInitialItem:k,sizeRanges:l,topItemCount:T,topItemsIndexes:I,totalCount:p,...S,groupIndices:o,itemSize:c,listState:x,minOverscanItemCount:A,scrollToIndex:U,statefulTotalCount:d,trackItemSizes:h,rangeChanged:O,...D,...b,...v,sizes:u,...w}},et(en,Yi,zt,U$,B$,Ys,qi,z$,F$,W6,L$));function R$(e,t){const r={},n={};let s=0;const a=e.length;for(;s<a;)n[e[s]]=1,s+=1;for(const o in t)Object.hasOwn(n,o)||(r[o]=t[o]);return r}const xu=typeof document<"u"?F.useLayoutEffect:F.useEffect;function cx(e,t,r){const n=Object.keys(t.required||{}),s=Object.keys(t.optional||{}),a=Object.keys(t.methods||{}),o=Object.keys(t.events||{}),i=F.createContext({});function c(k,v){k.propsReady&&Ce(k.propsReady,!1);for(const w of n){const S=k[t.required[w]];Ce(S,v[w])}for(const w of s)if(w in v){const S=k[t.optional[w]];Ce(S,v[w])}k.propsReady&&Ce(k.propsReady,!0)}function l(k){return a.reduce((v,w)=>(v[w]=S=>{const C=k[t.methods[w]];Ce(C,S)},v),{})}function u(k){return o.reduce((v,w)=>(v[w]=r$(k[t.events[w]]),v),{})}const d=F.forwardRef((k,v)=>{const{children:w,...S}=k,[C]=F.useState(()=>hu(s$(e),T=>{c(T,S)})),[U]=F.useState(O6(u,C));xu(()=>{for(const T of o)T in S&&je(U[T],S[T]);return()=>{Object.values(U).map(f0)}},[S,U,C]),xu(()=>{c(C,S)}),F.useImperativeHandle(v,P6(l(C)));const z=r;return B.jsx(i.Provider,{value:C,children:r?B.jsx(z,{...R$([...n,...s,...o],S),children:w}):w})}),p=k=>{const v=F.useContext(i);return F.useCallback(w=>{Ce(v[k],w)},[v,k])},h=k=>{const v=F.useContext(i)[k],w=F.useCallback(S=>je(v,S),[v]);return F.useSyncExternalStore(w,()=>st(v),()=>st(v))},y=k=>{const v=F.useContext(i)[k],[w,S]=F.useState(O6(st,v));return xu(()=>je(v,C=>{C!==w&&S(P6(C))}),[v,w]),w},g=F.version.startsWith("18")?h:y;return{Component:d,useEmitter:(k,v)=>{const w=F.useContext(i)[k];xu(()=>je(w,v),[v,w])},useEmitterValue:g,usePublisher:p}}const lx=F.createContext(void 0),ux=F.createContext(void 0),dx=typeof document<"u"?F.useLayoutEffect:F.useEffect;function A0(e){return"self"in e}function H$(e){return"body"in e}function fx(e,t,r,n=Xa,s,a){const o=F.useRef(null),i=F.useRef(null),c=F.useRef(null),l=F.useCallback(p=>{let h,y,g;const k=p.target;if(H$(k)||A0(k)){const w=A0(k)?k:k.defaultView;g=a?w.scrollX:w.scrollY,h=a?w.document.documentElement.scrollWidth:w.document.documentElement.scrollHeight,y=a?w.innerWidth:w.innerHeight}else g=a?k.scrollLeft:k.scrollTop,h=a?k.scrollWidth:k.scrollHeight,y=a?k.offsetWidth:k.offsetHeight;const v=()=>{e({scrollHeight:h,scrollTop:Math.max(g,0),viewportHeight:y})};p.suppressFlushSync?v():Pu.flushSync(v),i.current!==null&&(g===i.current||g<=0||g===h-y)&&(i.current=null,t(!0),c.current&&(clearTimeout(c.current),c.current=null))},[e,t,a]);F.useEffect(()=>{const p=s||o.current;return n(s||o.current),l({suppressFlushSync:!0,target:p}),p.addEventListener("scroll",l,{passive:!0}),()=>{n(null),p.removeEventListener("scroll",l)}},[o,l,r,n,s]);function u(p){const h=o.current;if(!h||(a?"offsetWidth"in h&&h.offsetWidth===0:"offsetHeight"in h&&h.offsetHeight===0))return;const y=p.behavior==="smooth";let g,k,v;A0(h)?(k=Math.max(ss(h.document.documentElement,a?"width":"height"),a?h.document.documentElement.scrollWidth:h.document.documentElement.scrollHeight),g=a?h.innerWidth:h.innerHeight,v=a?window.scrollX:window.scrollY):(k=h[a?"scrollWidth":"scrollHeight"],g=ss(h,a?"width":"height"),v=h[a?"scrollLeft":"scrollTop"]);const w=k-g;if(p.top=Math.ceil(Math.max(Math.min(w,p.top),0)),Y6(g,k)||p.top===v){e({scrollHeight:k,scrollTop:v,viewportHeight:g}),y&&t(!0);return}y?(i.current=p.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,i.current=null,t(!0)},1e3)):i.current=null,a&&(p={behavior:p.behavior,left:p.top}),h.scrollTo(p)}function d(p){a&&(p={behavior:p.behavior,left:p.top}),o.current.scrollBy(p)}return{scrollByCallback:d,scrollerRef:o,scrollToCallback:u}}const P0="-webkit-sticky",px="sticky",I0=ox(()=>{if(typeof document>"u")return px;const e=document.createElement("div");return e.style.position=P0,e.style.position===P0?P0:px});function O0(e){return e}const $$=He(()=>{const e=Y(i=>`Item ${i}`),t=Y(i=>`Group ${i}`),r=Y({}),n=Y(O0),s=Y("div"),a=Y(Xa),o=(i,c=null)=>Ut(V(r,re(l=>l[i]),tt()),c);return{components:r,computeItemKey:n,EmptyPlaceholder:o("EmptyPlaceholder"),FooterComponent:o("Footer"),GroupComponent:o("Group","div"),groupContent:t,HeaderComponent:o("Header"),HeaderFooterTag:s,ItemComponent:o("Item","div"),itemContent:e,ListComponent:o("List","div"),ScrollerComponent:o("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:o("ScrollSeekPlaceholder"),TopItemListComponent:o("TopItemList")}}),G$=He(([e,t])=>({...e,...t}),et(ix,$$)),j$=({height:e})=>B.jsx("div",{style:{height:e}}),V$={overflowAnchor:"none",position:I0(),zIndex:1},hx={overflowAnchor:"none"},W$={...hx,display:"inline-block",height:"100%"},mx=F.memo(function({showTopList:e=!1}){const t=ge("listState"),r=xr("sizeRanges"),n=ge("useWindowScroll"),s=ge("customScrollParent"),a=xr("windowScrollContainerState"),o=xr("scrollContainerState"),i=s||n?a:o,c=ge("itemContent"),l=ge("context"),u=ge("groupContent"),d=ge("trackItemSizes"),p=ge("itemSize"),h=ge("log"),y=xr("gap"),g=ge("horizontalDirection"),{callbackRef:k}=i$(r,p,d,e?Xa:i,h,y,s,g,ge("skipAnimationFrameInResizeObserver")),[v,w]=F.useState(0);B0("deviation",D=>{v!==D&&w(D)});const S=ge("EmptyPlaceholder"),C=ge("ScrollSeekPlaceholder")||j$,U=ge("ListComponent"),z=ge("ItemComponent"),T=ge("GroupComponent"),m=ge("computeItemKey"),b=ge("isSeeking"),x=ge("groupIndices").length>0,A=ge("alignToBottom"),I=ge("initialItemFinalLocationReached"),O=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:A?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:A?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...I?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&S?B.jsx(S,{...Dt(S,l)}):B.jsx(U,{...Dt(U,l),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:k,style:O,children:(e?t.topItems:t.items).map(D=>{const E=D.originalIndex,P=m(E+t.firstItemIndex,D.data,l);return b?F.createElement(C,{...Dt(C,l),height:D.size,index:D.index,key:P,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?F.createElement(T,{...Dt(T,l),"data-index":E,"data-item-index":D.index,"data-known-size":D.size,key:P,style:V$},u(D.index,l)):F.createElement(z,{...Dt(z,l),...Z$(z,D.data),"data-index":E,"data-item-group-index":D.groupIndex,"data-item-index":D.index,"data-known-size":D.size,key:P,style:g?W$:hx},x?c(D.index,D.groupIndex,D.data,l):c(D.index,D.data,l))})})}),q$={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Y$={outline:"none",overflowX:"auto",position:"relative"},wu=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),K$={position:I0(),top:0,width:"100%",zIndex:1};function Dt(e,t){if(typeof e!="string")return{context:t}}function Z$(e,t){return{item:typeof e=="string"?void 0:t}}const X$=F.memo(function(){const e=ge("HeaderComponent"),t=xr("headerHeight"),r=ge("HeaderFooterTag"),n=Ws(F.useMemo(()=>a=>{t(ss(a,"height"))},[t]),!0,ge("skipAnimationFrameInResizeObserver")),s=ge("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...Dt(e,s)})}):null}),Q$=F.memo(function(){const e=ge("FooterComponent"),t=xr("footerHeight"),r=ge("HeaderFooterTag"),n=Ws(F.useMemo(()=>a=>{t(ss(a,"height"))},[t]),!0,ge("skipAnimationFrameInResizeObserver")),s=ge("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...Dt(e,s)})}):null});function bx({useEmitter:e,useEmitterValue:t,usePublisher:r}){return F.memo(function({children:n,style:s,context:a,...o}){const i=r("scrollContainerState"),c=t("ScrollerComponent"),l=r("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:h,scrollToCallback:y}=fx(i,l,c,u,void 0,d);return e("scrollTo",y),e("scrollBy",p),B.jsx(c,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:h,style:{...d?Y$:q$,...s},tabIndex:0,...o,...Dt(c,a),children:n})})}function yx({useEmitter:e,useEmitterValue:t,usePublisher:r}){return F.memo(function({children:n,style:s,context:a,...o}){const i=r("windowScrollContainerState"),c=t("ScrollerComponent"),l=r("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),p=t("customScrollParent"),h=F.useRef(null),y=t("scrollerRef"),{scrollByCallback:g,scrollerRef:k,scrollToCallback:v}=fx(i,l,c,y,p);return dx(()=>{var w;return k.current=p||((w=h.current)==null?void 0:w.ownerDocument.defaultView),()=>{k.current=null}},[k,p]),e("windowScrollTo",v),e("scrollBy",g),B.jsx(c,{ref:h,"data-virtuoso-scroller":!0,style:{position:"relative",...s,...u!==0?{height:u+d}:{}},...o,...Dt(c,a),children:n})})}const J$=({children:e})=>{const t=F.useContext(lx),r=xr("viewportHeight"),n=xr("fixedItemHeight"),s=ge("alignToBottom"),a=ge("horizontalDirection"),o=F.useMemo(()=>I6(r,c=>ss(c,a?"width":"height")),[r,a]),i=Ws(o,!0,ge("skipAnimationFrameInResizeObserver"));return F.useEffect(()=>{t&&(r(t.viewportHeight),n(t.itemHeight))},[t,r,n]),B.jsx("div",{"data-viewport-type":"element",ref:i,style:wu(s),children:e})},eG=({children:e})=>{const t=F.useContext(lx),r=xr("windowViewportRect"),n=xr("fixedItemHeight"),s=ge("customScrollParent"),a=U6(r,s,ge("skipAnimationFrameInResizeObserver")),o=ge("alignToBottom");return F.useEffect(()=>{t&&(n(t.itemHeight),r({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,r,n]),B.jsx("div",{"data-viewport-type":"window",ref:a,style:wu(o),children:e})},tG=({children:e})=>{const t=ge("TopItemListComponent")||"div",r=ge("headerHeight"),n={...K$,marginTop:`${r}px`},s=ge("context");return B.jsx(t,{style:n,...Dt(t,s),children:e})},rG=F.memo(function(e){const t=ge("useWindowScroll"),r=ge("topItemsIndexes").length>0,n=ge("customScrollParent"),s=ge("context");return B.jsxs(n||t?aG:sG,{...e,context:s,children:[r&&B.jsx(tG,{children:B.jsx(mx,{showTopList:!0})}),B.jsxs(n||t?eG:J$,{children:[B.jsx(X$,{}),B.jsx(mx,{}),B.jsx(Q$,{})]})]})}),{Component:nG,useEmitter:B0,useEmitterValue:ge,usePublisher:xr}=cx(G$,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},rG),sG=bx({useEmitter:B0,useEmitterValue:ge,usePublisher:xr}),aG=yx({useEmitter:B0,useEmitterValue:ge,usePublisher:xr}),oG=nG;et(ix,He(()=>{const e=Y(l=>B.jsxs("td",{children:["Item $",l]})),t=Y(null),r=Y(l=>B.jsxs("td",{colSpan:1e3,children:["Group ",l]})),n=Y(null),s=Y(null),a=Y({}),o=Y(O0),i=Y(Xa),c=(l,u=null)=>Ut(V(a,re(d=>d[l]),tt()),u);return{components:a,computeItemKey:o,context:t,EmptyPlaceholder:c("EmptyPlaceholder"),FillerRow:c("FillerRow"),fixedFooterContent:s,fixedHeaderContent:n,itemContent:e,groupContent:r,ScrollerComponent:c("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder"),TableBodyComponent:c("TableBody","tbody"),TableComponent:c("Table","table"),TableFooterComponent:c("TableFoot","tfoot"),TableHeadComponent:c("TableHead","thead"),TableRowComponent:c("TableRow","tr"),GroupComponent:c("Group","tr")}})),I0();const gx={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},iG={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:xx,floor:vu,max:ec,min:M0,round:wx}=Math;function vx(e,t,r){return Array.from({length:t-e+1}).map((n,s)=>({data:r===null?null:r[s+e],index:s+e}))}function cG(e){return{...iG,items:e}}function ku(e,t){return e&&e.width===t.width&&e.height===t.height}function lG(e,t){return e&&e.column===t.column&&e.row===t.row}const uG=He(([{increaseViewportBy:e,listBoundary:t,overscan:r,visibleRange:n},{footerHeight:s,headerHeight:a,scrollBy:o,scrollContainerState:i,scrollTo:c,scrollTop:l,smoothScrollTargetReached:u,viewportHeight:d},p,h,{didMount:y,propsReady:g},{customScrollParent:k,useWindowScroll:v,windowScrollContainerState:w,windowScrollTo:S,windowViewportRect:C},U])=>{const z=Y(0),T=Y(0),m=Y(gx),b=Y({height:0,width:0}),x=Y({height:0,width:0}),A=Me(),I=Me(),O=Y(0),D=Y(null),E=Y({column:0,row:0}),P=Me(),_=Me(),M=Y(!1),L=Y(0),H=Y(!0),G=Y(!1),J=Y(!1);je(V(y,Te(L),he(([Q,ve])=>!!ve)),()=>{Ce(H,!1)}),je(V(yt(y,H,x,b,L,G),he(([Q,ve,Ue,$e,,ot])=>Q&&!ve&&Ue.height!==0&&$e.height!==0&&!ot)),([,,,,Q])=>{Ce(G,!0),k0(1,()=>{Ce(A,Q)}),Nr(V(l),()=>{Ce(t,[0,0]),Ce(H,!0)})}),ce(V(_,he(Q=>Q!=null&&Q.scrollTop>0),Qr(0)),T),je(V(y,Te(_),he(([,Q])=>Q!=null)),([,Q])=>{Q&&(Ce(b,Q.viewport),Ce(x,Q.item),Ce(E,Q.gap),Q.scrollTop>0&&(Ce(M,!0),Nr(V(l,Vs(1)),ve=>{Ce(M,!1)}),Ce(c,{top:Q.scrollTop})))}),ce(V(b,re(({height:Q})=>Q)),d),ce(V(yt(me(b,ku),me(x,ku),me(E,(Q,ve)=>Q&&Q.column===ve.column&&Q.row===ve.row),me(l)),re(([Q,ve,Ue,$e])=>({gap:Ue,item:ve,scrollTop:$e,viewport:Q}))),P),ce(V(yt(me(z),n,me(E,lG),me(x,ku),me(b,ku),me(D),me(T),me(M),me(H),me(L)),he(([,,,,,,,Q])=>!Q),re(([Q,[ve,Ue],$e,ot,Se,ke,ye,,Ze,Ye])=>{const{column:Xe,row:kr}=$e,{height:Pt,width:L0}=ot,{width:Zx}=Se;if(ye===0&&(Q===0||Zx===0))return gx;if(L0===0){const t2=E0(Ye,Q),gj=t2+Math.max(ye-1,0);return cG(vx(t2,gj,ke))}const Tu=kx(Zx,L0,Xe);let po,ia;Ze?ve===0&&Ue===0&&ye>0?(po=0,ia=ye-1):(po=Tu*vu((ve+kr)/(Pt+kr)),ia=Tu*xx((Ue+kr)/(Pt+kr))-1,ia=M0(Q-1,ec(ia,Tu-1)),po=M0(ia,ec(0,po))):(po=0,ia=-1);const Xx=vx(po,ia,ke),{bottom:Qx,top:Jx}=Ex(Se,$e,ot,Xx),e2=xx(Q/Tu),yj=e2*Pt+(e2-1)*kr-Qx;return{bottom:Qx,itemHeight:Pt,items:Xx,itemWidth:L0,offsetBottom:yj,offsetTop:Jx,top:Jx}})),m),ce(V(D,he(Q=>Q!==null),re(Q=>Q.length)),z),ce(V(yt(b,x,m,E),he(([Q,ve,{items:Ue}])=>Ue.length>0&&ve.height!==0&&Q.height!==0),re(([Q,ve,{items:Ue},$e])=>{const{bottom:ot,top:Se}=Ex(Q,$e,ve,Ue);return[Se,ot]}),tt(Vi)),t);const pe=Y(!1);ce(V(l,Te(pe),re(([Q,ve])=>ve||Q!==0)),pe);const be=cr(V(yt(m,z),he(([{items:Q}])=>Q.length>0),Te(pe),he(([[Q,ve],Ue])=>{const $e=Q.items[Q.items.length-1].index===ve-1;return(Ue||Q.bottom>0&&Q.itemHeight>0&&Q.offsetBottom===0&&Q.items.length===ve)&&$e}),re(([[,Q]])=>Q-1),tt())),ie=cr(V(me(m),he(({items:Q})=>Q.length>0&&Q[0].index===0),Qr(0),tt())),fe=cr(V(me(m),Te(M),he(([{items:Q},ve])=>Q.length>0&&!ve),re(([{items:Q}])=>({endIndex:Q[Q.length-1].index,startIndex:Q[0].index})),tt(H6),Bn(0)));ce(fe,h.scrollSeekRangeChanged),ce(V(A,Te(b,x,z,E),re(([Q,ve,Ue,$e,ot])=>{const Se=q6(Q),{align:ke,behavior:ye,offset:Ze}=Se;let Ye=Se.index;Ye==="LAST"&&(Ye=$e-1),Ye=ec(0,Ye,M0($e-1,Ye));let Xe=_0(ve,ot,Ue,Ye);return ke==="end"?Xe=wx(Xe-ve.height+Ue.height):ke==="center"&&(Xe=wx(Xe-ve.height/2+Ue.height/2)),Ze&&(Xe+=Ze),{behavior:ye,top:Xe}})),c);const Oe=Ut(V(m,re(Q=>Q.offsetBottom+Q.bottom)),0);return ce(V(C,re(Q=>({height:Q.visibleHeight,width:Q.visibleWidth}))),b),{customScrollParent:k,data:D,deviation:O,footerHeight:s,gap:E,headerHeight:a,increaseViewportBy:e,initialItemCount:T,itemDimensions:x,overscan:r,restoreStateFrom:_,scrollBy:o,scrollContainerState:i,scrollHeight:I,scrollTo:c,scrollToIndex:A,scrollTop:l,smoothScrollTargetReached:u,totalCount:z,useWindowScroll:v,viewportDimensions:b,windowScrollContainerState:w,windowScrollTo:S,windowViewportRect:C,...h,gridState:m,horizontalDirection:J,initialTopMostItemIndex:L,totalListHeight:Oe,...p,endReached:be,propsReady:g,rangeChanged:fe,startReached:ie,stateChanged:P,stateRestoreInProgress:M,...U}},et(C0,zt,Xi,ax,as,S0,ns));function kx(e,t,r){return ec(1,vu((e+r)/(vu(t)+r)))}function Ex(e,t,r,n){const{height:s}=r;if(s===void 0||n.length===0)return{bottom:0,top:0};const a=_0(e,t,r,n[0].index);return{bottom:_0(e,t,r,n[n.length-1].index)+s,top:a}}function _0(e,t,r,n){const s=kx(e.width,r.width,t.column),a=vu(n/s),o=a*r.height+ec(0,a-1)*t.row;return o>0?o+t.row:o}const dG=He(()=>{const e=Y(d=>`Item ${d}`),t=Y({}),r=Y(null),n=Y("virtuoso-grid-item"),s=Y("virtuoso-grid-list"),a=Y(O0),o=Y("div"),i=Y(Xa),c=(d,p=null)=>Ut(V(t,re(h=>h[d]),tt()),p),l=Y(!1),u=Y(!1);return ce(me(u),l),{components:t,computeItemKey:a,context:r,FooterComponent:c("Footer"),HeaderComponent:c("Header"),headerFooterTag:o,itemClassName:n,ItemComponent:c("Item","div"),itemContent:e,listClassName:s,ListComponent:c("List","div"),readyStateChanged:l,reportReadyState:u,ScrollerComponent:c("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),fG=He(([e,t])=>({...e,...t}),et(uG,dG)),pG=F.memo(function(){const e=at("gridState"),t=at("listClassName"),r=at("itemClassName"),n=at("itemContent"),s=at("computeItemKey"),a=at("isSeeking"),o=wr("scrollHeight"),i=at("ItemComponent"),c=at("ListComponent"),l=at("ScrollSeekPlaceholder"),u=at("context"),d=wr("itemDimensions"),p=wr("gap"),h=at("log"),y=at("stateRestoreInProgress"),g=wr("reportReadyState"),k=Ws(F.useMemo(()=>v=>{const w=v.parentElement.parentElement.scrollHeight;o(w);const S=v.firstChild;if(S){const{height:C,width:U}=S.getBoundingClientRect();d({height:C,width:U})}p({column:Tx("column-gap",getComputedStyle(v).columnGap,h),row:Tx("row-gap",getComputedStyle(v).rowGap,h)})},[o,d,p,h]),!0,!1);return dx(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),y?null:B.jsx(c,{className:t,ref:k,...Dt(c,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const w=s(v.index,v.data,u);return a?B.jsx(l,{...Dt(l,u),height:e.itemHeight,index:v.index,width:e.itemWidth},w):F.createElement(i,{...Dt(i,u),className:r,"data-index":v.index,key:w},n(v.index,v.data,u))})})}),hG=F.memo(function(){const e=at("HeaderComponent"),t=wr("headerHeight"),r=at("headerFooterTag"),n=Ws(F.useMemo(()=>a=>{t(ss(a,"height"))},[t]),!0,!1),s=at("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...Dt(e,s)})}):null}),mG=F.memo(function(){const e=at("FooterComponent"),t=wr("footerHeight"),r=at("headerFooterTag"),n=Ws(F.useMemo(()=>a=>{t(ss(a,"height"))},[t]),!0,!1),s=at("context");return e?B.jsx(r,{ref:n,children:B.jsx(e,{...Dt(e,s)})}):null}),bG=({children:e})=>{const t=F.useContext(ux),r=wr("itemDimensions"),n=wr("viewportDimensions"),s=Ws(F.useMemo(()=>a=>{n(a.getBoundingClientRect())},[n]),!0,!1);return F.useEffect(()=>{t&&(n({height:t.viewportHeight,width:t.viewportWidth}),r({height:t.itemHeight,width:t.itemWidth}))},[t,n,r]),B.jsx("div",{ref:s,style:wu(!1),children:e})},yG=({children:e})=>{const t=F.useContext(ux),r=wr("windowViewportRect"),n=wr("itemDimensions"),s=at("customScrollParent"),a=U6(r,s,!1);return F.useEffect(()=>{t&&(n({height:t.itemHeight,width:t.itemWidth}),r({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,r,n]),B.jsx("div",{ref:a,style:wu(!1),children:e})},gG=F.memo(function({...e}){const t=at("useWindowScroll"),r=at("customScrollParent"),n=r||t?wG:xG,s=r||t?yG:bG,a=at("context");return B.jsx(n,{...e,...Dt(n,a),children:B.jsxs(s,{children:[B.jsx(hG,{}),B.jsx(pG,{}),B.jsx(mG,{})]})})}),{useEmitter:Cx,useEmitterValue:at,usePublisher:wr}=cx(fG,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},gG),xG=bx({useEmitter:Cx,useEmitterValue:at,usePublisher:wr}),wG=yx({useEmitter:Cx,useEmitterValue:at,usePublisher:wr});function Tx(e,t,r){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&r(`${e} was not resolved to pixel value correctly`,t,Kt.WARN),t==="normal"?0:parseInt(t??"0",10)}var U0={},Sx;function vG(){if(Sx)return U0;Sx=1;var e=Rl.GenIcon;return U0.AiFillQuestionCircle=function(r){return e({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"}}]})(r)},U0}var kG=vG();function EG({logo:e,className:t="",style:r={},alt:n="Token logo"}){const[s,a]=F.useState(!1);return F.useEffect(()=>{a(!1)},[e]),e&&!s?B.jsx("img",{alt:n,style:r,onError:()=>a(!0),className:`twap-token-logo ${t}`,src:e}):B.jsx(kG.AiFillQuestionCircle,{style:{width:20,height:20},className:"twap-token-svg"})}const CG=()=>B.jsx("div",{className:"twap-orders__loader",children:B.jsx("p",{children:"Loading..."})}),TG=()=>{const{isLoading:e}=du(),t=v6(),r=K(a=>a.state.orderIdsToCancel),n=K(a=>a.state.cancelOrdersMode),s=k6();return B.jsx(B.Fragment,{children:e?B.jsx(CG,{}):t!=null&&t.length?B.jsx("div",{className:`twap-orders__list ${n?"twap-orders__list-select-mode":""}`,children:B.jsx(oG,{style:{height:"100%"},data:t,itemContent:(a,o)=>B.jsx(SG,{cancelOrdersMode:!!n,selected:(r==null?void 0:r.includes(o.id))||!1,selectOrder:s,order:o},a)})}):B.jsx(AG,{})})},SG=({order:e,selectOrder:t,selected:r,cancelOrdersMode:n})=>{const s=K(i=>i.updateState),a=mt.useCallback(()=>{s({selectedOrderID:e==null?void 0:e.id})},[s,e==null?void 0:e.id]),o=mt.useCallback(()=>{n?t(e==null?void 0:e.id):a()},[n,t,a,e==null?void 0:e.id]);return B.jsx("div",{className:`twap-orders__list-item twap-orders__list-item-${e.status} ${n?"twap-orders__list-item-select-mode":""} ${r?"twap-orders__list-item-selected":""}`,onClick:o,children:B.jsxs("div",{className:"twap-orders__list-item-content",children:[B.jsx(PG,{order:e}),B.jsx(IG,{value:e.progress||0}),B.jsxs("div",{className:"twap-orders__list-item-tokens",children:[B.jsx(Ax,{address:e.srcTokenAddress}),B.jsx(ZH.HiArrowRight,{className:"twap-orders__list-item-tokens-arrow"}),B.jsx(Ax,{address:e.dstTokenAddress})]})]})})},AG=()=>{const e=K(n=>n.state.orderHistoryStatusFilter),t=Fe(),r=mt.useMemo(()=>e||"",[e]);return B.jsx("div",{className:"twap-orders__list-empty",children:B.jsx("p",{children:t("noOrders",{status:r})})})},PG=({order:e})=>{const t=e&&e.status,r=x6(e),n=o0(e.createdAt);return B.jsxs("div",{className:"twap-orders__list-item-header",children:[B.jsxs("p",{className:"twap-orders__list-item-header-title",children:[r," ",B.jsx("span",{children:`(${n})`})]}),B.jsx("p",{className:"twap-orders__list-item-header-status",children:t})]})},Ax=e=>{const{useToken:t,components:r}=oe(),n=t==null?void 0:t(e.address);return B.jsx("div",{className:"twap-orders__list-item-token",children:n?B.jsxs(B.Fragment,{children:[B.jsx("div",{className:"twap-orders__list-item-token-logo",children:r.TokenLogo?B.jsx(r.TokenLogo,{token:n}):B.jsx(EG,{logo:n==null?void 0:n.logoUrl})}),B.jsx("p",{className:"twap-orders__list-item-token-symbol",children:n==null?void 0:n.symbol})]}):B.jsx("div",{})})};function IG(e){return B.jsxs("div",{className:"twap-orders__list-item-progress",children:[B.jsx("div",{className:"twap-orders__list-item-progress-bar",children:B.jsx("div",{className:"twap-orders__list-item-progress-bar-filled",style:{width:`${e.value}%`}})}),B.jsx("div",{className:"twap-orders__list-item-token-progress-label",children:B.jsx("p",{children:`${Math.round(e.value)}%`})})]})}const OG=()=>{const e=K(r=>r.state.selectedOrderID),t=e!==void 0;return B.jsx("div",{className:`twap-orders ${e!==void 0?"twap-orders__show-selected":""}`,children:t?B.jsx(IH,{}):B.jsx(TG,{})})},BG=e=>{const t=Fe(),{marketPrice:r}=oe(),n=K(a=>a.state.typedSrcAmount);return F.useMemo(()=>{const{isError:a,value:o}=R.getMinFillDelayError(e);if(!(!a||ue(n||"0").isZero()||!r))return{type:Bt.MIN_FILL_DELAY,value:o,message:t("minFillDelayError",{fillDelay:`${mp(o)} ${t("minutes")}`})}},[e,t,n,r])},Ks=()=>{const e=K(s=>s.state.typedFillDelay),t=K(s=>s.updateState),r=F.useMemo(()=>e||R.DEFAULT_FILL_DELAY,[e]),n=BG(r);return{fillDelay:r,onChange:F.useCallback(s=>t({typedFillDelay:s}),[t]),error:n}},MG=()=>{const{onChange:e,fillDelay:t,error:r}=Ks(),n=Fe(),s=F.useCallback(o=>e({unit:t.unit,value:Number(o)}),[e,t]),a=F.useCallback(o=>e({unit:o,value:t.value}),[e,t]);return{onInputChange:s,onUnitSelect:a,onChange:e,milliseconds:t.unit*t.value,fillDelay:t,error:r,label:n("tradeIntervalTitle"),tooltip:n("tradeIntervalTootlip")}},Lr=()=>{const{srcToken:e}=oe(),t=Fe(),r=K(a=>a.state.typedSrcAmount),s=K(a=>a.state.acceptedSrcAmount)||r;return{amountWei:lu(e==null?void 0:e.decimals,s),amountUI:s,error:ue(s||0).isZero()?t("enterAmount"):void 0}},_G=(e,t)=>{const{module:r,srcUsd1Token:n,marketPrice:s,minChunkSizeUsd:a}=oe(),o=Fe(),i=K(c=>c.state.typedSrcAmount);return F.useMemo(()=>{if(ue(i||"0").isZero()||!s)return;if(!e)return{type:Bt.MIN_CHUNKS,value:1,message:`${o("minChunksError")} 1`};const{isError:c}=R.getMaxChunksError(e,t,r);if(c)return{type:Bt.MAX_CHUNKS,value:t,message:o("maxChunksError",{maxChunks:`${t}`})};const{isError:l,value:u}=R.getMinTradeSizeError(i||"",n||"",a||0);if(l)return{type:Bt.MIN_TRADE_SIZE,value:u,message:o("minTradeSizeError",{minTradeSize:`${u}`})}},[e,t,r,i,n,a,o,s])},tn=()=>{const{srcToken:e,srcUsd1Token:t,module:r,minChunkSizeUsd:n}=oe(),s=K(g=>g.state.typedChunks),a=Ks().fillDelay,o=K(g=>g.updateState),{amountWei:i,amountUI:c}=Lr(),l=F.useMemo(()=>R.getMaxPossibleChunks(a,c||"",t||"",n||0),[c,t,n,a]),u=F.useMemo(()=>R.getChunks(l,r,s),[l,s,r]),d=F.useCallback(g=>o({typedChunks:g}),[o]),p=F.useMemo(()=>R.getSrcTokenChunkAmount(i||"",u),[i,u]),h=Fr(e==null?void 0:e.decimals,p),y=F.useMemo(()=>t?ue(h||"0").times(t||0).toString():"0",[h,t]);return{totalTrades:u,maxTrades:l,amountPerTradeUI:h,amountPerTradeWei:p,amountPerTradeUsd:y,onChange:d,error:_G(u,l)}},UG=()=>{const{srcToken:e,dstToken:t}=oe(),r=Fe(),{onChange:n,totalTrades:s,amountPerTradeUsd:a,amountPerTradeUI:o,error:i,maxTrades:c,amountPerTradeWei:l}=tn(),u=Ge({value:o}),d=Ge({value:a});return{error:i,maxTrades:c,totalTrades:s,amountPerTrade:u,amountPerTradeWei:l,onChange:n,label:r("tradesAmountTitle"),tooltip:r("totalTradesTooltip"),amountPerTradeUsd:d,fromToken:e,toToken:t}},DG=()=>{const{srcToken:e,dstToken:t,marketPrice:r}=oe(),[n,s]=F.useState(!1),a=F.useMemo(()=>{if(ue(r||"0").isZero()||!t)return"0";const o=R.amountUi(t==null?void 0:t.decimals,r);return n?ue(1).div(o||0).toFixed():o},[n,r,e==null?void 0:e.decimals,t==null?void 0:t.decimals]);return{fromToken:n?t:e,toToken:n?e:t,price:Ge({value:a}),priceWei:lu(t==null?void 0:t.decimals,r),onInvert:F.useCallback(()=>s(!n),[n])}},FG=e=>{const{module:t,marketPrice:r}=oe(),n=Fe();return F.useMemo(()=>{const s=R.getMaxOrderDurationError(t,e),a=R.getMinOrderDurationError(e);if(r){if(s.isError)return{type:Bt.MAX_ORDER_DURATION,value:s.value,message:n("maxDurationError",{duration:`${Math.floor(ig(s.value)).toFixed(0)} ${n("days")}`})};if(a.isError)return{type:Bt.MIN_ORDER_DURATION,value:a.value,message:n("minDurationError",{duration:`${Math.floor(mp(a.value)).toFixed(0)} ${n("minutes")}`})}}},[e,n,t,r])},D0=()=>{const{module:e}=oe(),t=K(i=>i.state.typedDuration),r=K(i=>i.updateState),n=tn().totalTrades,s=Ks().fillDelay,a=F.useMemo(()=>R.getDuration(e,n,s,t),[n,s,t,e]),o=FG(a);return{duration:a,setDuration:F.useCallback(i=>r({typedDuration:i}),[r]),error:o}},NG=()=>{const{module:e}=oe(),t=Fe(),{duration:r,setDuration:n,error:s}=D0(),a=F.useCallback(c=>{n({unit:r.unit,value:Number(c)})},[n,r]),o=F.useCallback(c=>{n({unit:c,value:r.value})},[n,r]),i=F.useMemo(()=>e===R.Module.STOP_LOSS?t("stopLossDurationTooltip"):t("maxDurationTooltip"),[t,e]);return{duration:r,onChange:n,milliseconds:r.unit*r.value,onInputChange:a,onUnitSelect:o,label:t("expiry"),tooltip:i,error:s}},zG=()=>{const e=K(s=>s.state.isMarketOrder),{module:t}=oe(),r=Fe(),n=t===R.Module.STOP_LOSS||t===R.Module.TAKE_PROFIT;return F.useMemo(()=>{if(!n)return{text:r(e?"marketOrderWarning":"limitPriceMessage"),url:"https://www.orbs.com/dtwap-and-dlimit-faq/"}},[e,r,n])},F0=()=>{const e=K(r=>r.state.currentTime),t=D0().duration;return F.useMemo(()=>R.getDeadline(e,t),[e,t])},Eu=()=>{const{srcToken:e,dstToken:t,marketPriceLoading:r}=oe(),n=K(l=>l.updateState),s=K(l=>l.state.isInvertedTrade),a=K(l=>l.state.typedTriggerPrice),o=K(l=>l.state.typedLimitPrice),i=K(l=>l.state.isMarketOrder);return{onInvert:F.useCallback(()=>{r||(a!==void 0&&n({typedTriggerPrice:ue(1).div(a).toFixed()}),o!==void 0&&n({typedLimitPrice:ue(1).div(o).toFixed()}),n({isInvertedTrade:!s}))},[n,s,a,o,r]),isInverted:s,fromToken:s?t:e,toToken:s?e:t,isMarketPrice:i}},Px=({typedValue:e,tokenDecimals:t=18,initialPrice:r="0",percentage:n,setValue:s,setPercentage:a})=>{const{srcUsd1Token:o,dstUsd1Token:i}=oe(),{isInverted:c}=Eu(),l=F.useMemo(()=>{if(e!==void 0){const g=c?ue(e).isZero()?ue(0):ue(1).div(e):ue(e);return R.amountBN(t,g.toFixed())}if(n!==void 0&&ue(r||"0").gt(0)&&!ue(r||"0").isNaN()){const g=ue(r||"0"),k=ue(n||0).div(100);return g.plus(g.multipliedBy(k)).decimalPlaces(0).toFixed()}return ue(r).gt(0)?r:""},[e,n,t,r,c]),u=F.useCallback(g=>{s(g),a(null)},[s,a]),d=F.useCallback(g=>{s(void 0),a(g)},[s,a]),p=F.useMemo(()=>{if(!r||ue(r).isZero())return"";if(n!=null)return n;if(l){const g=ue(r),v=ue(l).minus(g).div(g).multipliedBy(100).decimalPlaces(2).toString();return ue(v||"0").isZero()?"":v}return""},[l,r,n]),h=F.useMemo(()=>{let g="";if(e!==void 0)g=e;else{const k=R.amountUi(t,l);if(ue(k||"0").isZero())return"";g=c?ue(1).div(k).toFixed():k}return Pi(g,6,t)},[e,t,l,c]),y=js(c?o:i,h||"0");return{amountWei:ue(l).isNaN()?"":l,amountUI:ue(h).isNaN()?"":h,selectedPercentage:p,onChange:u,onPercentageChange:d,isInverted:c,usd:ue(y).isNaN()?"":y}},LG=()=>{const{module:e}=oe();return F.useMemo(()=>e===R.Module.STOP_LOSS?R.DEFAULT_STOP_LOSS_PERCENTAGE:R.DEFAULT_TAKE_PROFIT_PERCENTAGE,[e])},N0=()=>{const{module:e}=oe(),t=K(r=>r.state.isMarketOrder);return F.useMemo(()=>e!==R.Module.STOP_LOSS&&e!==R.Module.TAKE_PROFIT||t?void 0:e===R.Module.STOP_LOSS?R.DEFAULT_STOP_LOSS_LIMIT_PERCENTAGE:R.DEFAULT_TAKE_PROFIT_LIMIT_PERCENTAGE,[e,t])},RG=(e="")=>{const{module:t,marketPrice:r}=oe(),n=Fe(),s=K(a=>a.state.typedSrcAmount);return F.useMemo(()=>{if(ue(s||"0").isZero()||!r||t!==R.Module.STOP_LOSS&&t!==R.Module.TAKE_PROFIT)return;const a=R.getStopLossPriceError(r||"",e||"",t);if(a!=null&&a.isError)return{type:Bt.STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE,value:a.value,message:n("StopLossTriggerPriceError")||""};const o=R.getTakeProfitPriceError(r||"",e||"",t);if(o!=null&&o.isError)return{type:Bt.TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE,value:o.value,message:n("TakeProfitTriggerPriceError")||""};if(!e||ue(e||0).isZero())return{type:Bt.EMPTY_TRIGGER_PRICE,value:e,message:n("emptyTriggerPrice")||""}},[r,e,t,n,s])},HG=e=>{const{srcToken:t,dstToken:r,module:n}=oe(),s=tn().amountPerTradeWei,a=K(i=>i.state.isMarketOrder),o=F.useMemo(()=>R.getTriggerPricePerChunk(n,s,e,(t==null?void 0:t.decimals)||0),[e,s,a,t==null?void 0:t.decimals,n]);return{amountWei:o,amountUI:Fr((r==null?void 0:r.decimals)||0,o)}},Zs=()=>{const{dstToken:e,marketPrice:t,module:r}=oe(),n=K(h=>h.updateState),s=LG(),a=K(h=>h.state.triggerPricePercent),o=F.useCallback(h=>{n({triggerPricePercent:h})},[n]),i=a===void 0?s:a,c=r===R.Module.STOP_LOSS||r===R.Module.TAKE_PROFIT,l=Px({typedValue:K(h=>h.state.typedTriggerPrice),percentage:i,tokenDecimals:e==null?void 0:e.decimals,initialPrice:c?t:void 0,setValue:F.useCallback(h=>n({typedTriggerPrice:h}),[n]),setPercentage:o}),u=RG(l.amountWei),{amountWei:d,amountUI:p}=HG(l.amountWei);return F.useMemo(()=>({...l,error:u,pricePerChunkWei:d,pricePerChunkUI:p}),[l,u,d,p])},$G=()=>{const{module:e,marketPrice:t,marketPriceLoading:r}=oe(),n=Fe(),{amountUI:s,onChange:a,onPercentageChange:o,usd:i,selectedPercentage:c,error:l}=Zs(),u=K(w=>w.state.isMarketOrder),d=K(w=>w.updateState),{isInverted:p,onInvert:h,fromToken:y,toToken:g}=Eu(),k=F.useCallback(()=>{d({triggerPricePercent:void 0,typedTriggerPrice:void 0})},[d]),v=e!==R.Module.STOP_LOSS&&e!==R.Module.TAKE_PROFIT;return{price:s,error:l,label:n("stopLossLabel"),tooltip:e===R.Module.STOP_LOSS?n("stopLossTooltip"):n("takeProfitTooltip"),onChange:a,onPercentageChange:o,percentage:c,isActive:!u,onReset:k,usd:i,fromToken:y,toToken:g,prefix:"",isLoading:r||!t,isInverted:p,hide:v,onInvert:h}},GG=e=>{const{module:t,marketPrice:r}=oe(),n=Fe(),{amountWei:s}=Zs(),a=K(i=>i.state.isMarketOrder),o=K(i=>i.state.typedSrcAmount);return F.useMemo(()=>{if(ue(o||"0").isZero()||!s||!r)return;const i=R.getStopLossLimitPriceError(s,e,a,t),c=R.getTakeProfitLimitPriceError(s,e,a,t);if(i!=null&&i.isError)return{type:Bt.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE,message:n("triggerLimitPriceError")||"",value:i.value};if(c!=null&&c.isError)return{type:Bt.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE,message:n("triggerLimitPriceError")||"",value:c.value};if(e&&ue(e||0).isZero())return{type:Bt.MISSING_LIMIT_PRICE,message:n("emptyLimitPrice")||"",value:e||""}},[e,n,s,t,a,o,r])},Cu=()=>{const{dstToken:e,marketPrice:t,module:r}=oe(),n=K(l=>l.updateState),s=N0(),a=K(l=>l.state.limitPricePercent),o=a===void 0?s:a,i=Px({typedValue:K(l=>l.state.typedLimitPrice),percentage:o,tokenDecimals:e==null?void 0:e.decimals,initialPrice:t,setValue:F.useCallback(l=>n({typedLimitPrice:l}),[n]),setPercentage:F.useCallback(l=>{n({limitPricePercent:l})},[n,r])}),c=GG(i.amountWei);return F.useMemo(()=>({...i,error:c}),[i,c])},jG=()=>{const{module:e}=oe(),t=K(i=>i.updateState),r=K(i=>i.state.isMarketOrder),n=N0(),s=K(i=>i.state.triggerPricePercent)||0,a=e===R.Module.LIMIT,o=F.useCallback(()=>{!r&&e===R.Module.STOP_LOSS&&t({limitPricePercent:n}),t({isMarketOrder:!r})},[t,s,e,r,n]);return{isLimitPrice:!r,toggleLimitPrice:o,hide:a}},VG=()=>{const{module:e,marketPriceLoading:t}=oe(),r=Fe(),{amountUI:n,onChange:s,onPercentageChange:a,usd:o,selectedPercentage:i,error:c}=Cu(),l=K(z=>z.state.isMarketOrder),u=K(z=>z.updateState),d=N0(),{isLimitPrice:p,toggleLimitPrice:h}=jG(),{triggerPricePercent:y}=K(z=>z.state),{isInverted:g,onInvert:k,fromToken:v,toToken:w}=Eu(),S=F.useMemo(()=>{if(!(e!==R.Module.STOP_LOSS&&e!==R.Module.TAKE_PROFIT||!l))return{text:r("triggerMarketPriceDisclaimer"),url:R.ORBS_TWAP_FAQ_URL}},[y,r,e,l]),C=F.useCallback(()=>{u({typedLimitPrice:void 0}),u({limitPricePercent:d})},[u,e,d]),U=F.useMemo(()=>e===R.Module.STOP_LOSS?r("stopLossLimitPriceTooltip"):r("limitPriceTooltip"),[r,e]);return{price:n,error:c,warning:S,label:r("limitPrice"),tooltip:U,onChange:s,onPercentageChange:a,onReset:C,usd:o,fromToken:v,toToken:w,percentage:i,isInverted:g,isLoading:t,isLimitPrice:p,toggleLimitPrice:h,onInvert:k}},Ix=()=>{const{module:e,marketPrice:t}=oe(),r=Cu().amountWei,n=Zs().amountWei,s=K(a=>a.state.isMarketOrder);return e===R.Module.LIMIT||!s?r||"":e===R.Module.STOP_LOSS||e===R.Module.TAKE_PROFIT?n||"":t||""},tc=()=>{const{srcToken:e,dstToken:t}=oe(),r=Ix(),n=Lr().amountWei,s=F.useMemo(()=>R.getDestTokenAmount(n||"",r,(e==null?void 0:e.decimals)||0),[n,r,e==null?void 0:e.decimals]);return{amountWei:s,amountUI:Fr(t==null?void 0:t.decimals,s)}},z0=()=>{const{srcToken:e,dstToken:t,dstUsd1Token:r}=oe(),n=Ix(),s=tn().amountPerTradeWei,a=K(c=>c.state.isMarketOrder),o=F.useMemo(()=>R.getDestTokenMinAmountPerChunk(s,n,!!a,(e==null?void 0:e.decimals)||0),[s,n,a,e==null?void 0:e.decimals]),i=Fr(t==null?void 0:t.decimals,o);return{amountWei:o,amountUI:i,usd:js(i,r)}},WG=()=>{const{srcUsd1Token:e,dstUsd1Token:t}=oe(),r=Lr().amountUI,n=tc().amountUI,s=js(r,e),a=js(n,t);return{srcAmountUsd:s,dstAmountUsd:a}},qG=()=>{const{fees:e,dstUsd1Token:t}=oe(),{amountUI:r}=tc(),n=F.useMemo(()=>!e||!r?"":ue(r).multipliedBy(e).dividedBy(100).toFixed(),[r]);return{amount:Ge({value:n}),percent:Ge({value:e}),usd:js(n,t)}},YG=()=>{const e=Lr().amountUI,t=tc().amountUI,r=F.useMemo(()=>ue(t||0).dividedBy(e||0).toString(),[t,e]);return Ge({value:r,decimalScale:4})},Ox=()=>{const{srcToken:e,dstToken:t,account:r}=oe(),n=Fe(),{amountWei:s}=Lr(),{amountWei:a,usd:o}=z0(),{totalTrades:i,amountPerTradeWei:c}=tn(),{amountWei:l,usd:u}=Zs(),{fillDelay:d}=Ks(),p=F0(),{amountUI:h,usd:y}=Cu(),{amount:g,percent:k,usd:v}=qG(),w=Ge({value:YG(),decimalScale:4}),{srcAmountUsd:S,dstAmountUsd:C}=WG(),U=y6({srcToken:e,dstToken:t,srcAmount:s,minDestAmountPerTrade:a,totalTrades:i,triggerPricePerTrade:l,deadline:p,srcAmountPerTrade:c,maker:r,tradeInterval:d.unit*d.value,limitPrice:h});return F.useMemo(()=>({...U,srcAmountUsd:S,dstAmountUsd:C,fee:{label:n("fees",{value:`${k}%`}),value:g,usd:v},display:{...U.display,minDestAmountPerTrade:{...U.display.minDestAmountPerTrade,usd:o},triggerPricePerTrade:{...U.display.triggerPricePerTrade,usd:u},limitPrice:{...U.display.limitPrice,usd:y}}}),[U,k,g,n,w,e,t,S,C,o,u,v,y])},Bx=()=>{const{srcBalance:e}=oe(),t=Fe(),r=Lr().amountWei;return F.useMemo(()=>{if(e&&ue(r).gt(e))return{type:Bt.INSUFFICIENT_BALANCE,message:t("insufficientFunds"),value:e||""}},[e,r,t])};function Mx(){const{marketPrice:e,marketPriceLoading:t}=oe(),r=K(u=>u.state.typedSrcAmount),n=Bx(),{error:s}=Zs(),{error:a}=Cu(),{error:o}=tn(),{error:i}=Ks(),{error:c}=D0(),l=F.useMemo(()=>R.getQueryParam("ignore-errors"),[]);if(!(ue(e||0).isZero()||ue(r||0).isZero()||t||l))return s||a||o||i||c||n}const _x=()=>{const{srcToken:e,dstToken:t,chainId:r,account:n,slippage:s,config:a}=oe(),o=tn().amountPerTradeWei,i=Lr().amountWei,c=F0(),l=Zs().pricePerChunkWei,u=z0().amountWei,d=Ks().fillDelay,p=tn().totalTrades,h=s*100,y=!p||p===1?0:d.unit*d.value;return F.useMemo(()=>{var k;const g=R.isNativeAddress((e==null?void 0:e.address)||"")?(k=R.getNetwork(r))==null?void 0:k.wToken.address:e==null?void 0:e.address;if(!(!g||!t||!r||!n||!c||!i||!a))return R.buildRePermitOrderData({chainId:r,srcToken:g,dstToken:t.address,srcAmount:i,deadlineMillis:c,fillDelayMillis:y,slippage:h,account:n,srcAmountPerTrade:o,dstMinAmountPerTrade:u,triggerAmountPerTrade:l,config:a})},[e,t,r,n,i,c,o,l,h,u,d,p,a])},KG=()=>{var c;const{account:e,walletClient:t,overrides:r,refetchBalances:n,callbacks:s,chainId:a}=oe(),o=(c=$i())==null?void 0:c.wToken,i=i0();return on({mutationFn:async({onHash:l,srcAmountWei:u})=>{var h,y;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!o)throw new Error("tokenAddress is not defined");let d;R.analytics.onWrapRequest(),(h=s==null?void 0:s.onWrapRequest)==null||h.call(s),r!=null&&r.wrap?d=await r.wrap(BigInt(u)):d=await t.writeContract({abi:R.IWETH_ABI,functionName:"deposit",account:e,address:o.address,value:BigInt(u),chain:t.chain}),l==null||l(d);const p=await i(d);if(!p)throw new Error("failed to get transaction receipt");if(p.status==="reverted")throw new Error("failed to wrap token");return R.analytics.onWrapSuccess(d),(y=s==null?void 0:s.onWrapSuccess)==null||y.call(s,{txHash:p.transactionHash,explorerUrl:Ii(p.transactionHash,a),amount:R.amountUi(o.decimals,u)}),n==null||n(),p},onError:l=>{throw R.analytics.onWrapError(l),l}})},ZG=()=>{const{account:e,walletClient:t,chainId:r,callbacks:n}=oe(),s=_x(),a=kH();return on({mutationFn:async()=>{var y,g,k,v;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!r)throw new Error("missing chainId");if(!s)throw new Error("rePermitOrderData is not defined");const{order:o,domain:i,types:c,primaryType:l}=s;R.analytics.onSignOrderRequest(o),(y=n==null?void 0:n.onSignOrderRequest)==null||y.call(n),console.log({domain:i,types:c,primaryType:l,message:o,account:e}),console.log("Using domain:",i),console.log("Using types:",c),console.log("Order data to sign:",JSON.stringify(o,null,2)),console.log(`Account address: ${e}`);let u;try{u=await(t==null?void 0:t.signTypedData({domain:i,types:c,primaryType:l,message:o,account:e}))}catch(w){throw(g=n==null?void 0:n.onSignOrderError)==null||g.call(n,w.message),R.analytics.onSignOrderError(w),w}R.analytics.onSignOrderSuccess(u),(k=n==null?void 0:n.onSignOrderSuccess)==null||k.call(n,u);const d=JC(u),p={v:W(d.v||0),r:d.r,s:d.s},h=await R.submitOrder(o,p);return(v=n==null?void 0:n.onOrderCreated)==null||v.call(n,h),a(h),h}})},Ux=()=>{const{account:e,publicClient:t,config:r}=oe();return on({mutationFn:async({tokenAddress:n,srcAmountWei:s})=>{if(!t)throw new Error("missing publicClient");if(!e)throw new Error("missing account");if(!r)throw new Error("missing config");const a=await t.readContract({address:n,abi:U1,functionName:"allowance",args:[e,r.repermit]}).then(i=>i.toString()),o=ue(a||"0").lt(ue(s).toString());return{allowance:a,approvalRequired:o}}})},XG=()=>{const{account:e,walletClient:t,overrides:r,config:n,chainId:s,callbacks:a}=oe(),o=i0(),{mutateAsync:i}=Ux();return on({onError:c=>{R.analytics.onApproveError(c)},mutationFn:async({token:c,onHash:l,srcAmountWei:u})=>{var y,g;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!n)throw new Error("missing config");(y=a==null?void 0:a.onApproveRequest)==null||y.call(a),R.analytics.onApproveRequest();let d;if(r!=null&&r.approveOrder?d=await r.approveOrder({tokenAddress:c.address,spenderAddress:n.repermit,amount:Ps}):d=await t.writeContract({abi:U1,functionName:"approve",account:e,address:c.address,args:[n.repermit,Ps],chain:t.chain}),!d)throw new Error("failed to approve token");l(d);const p=await o(d);if(!p)throw new Error("failed to get transaction receipt");if(p.status==="reverted")throw new Error("failed to approve token");let h=!1;for(let k=0;k<3;k++){const{approvalRequired:v}=await i({tokenAddress:c.address,srcAmountWei:u});if(!v){h=!0;break}k<2&&await new Promise(w=>setTimeout(w,3e3))}if(!h)throw new Error(`Insufficient ${c.symbol} allowance to perform the swap. Please approve the token first.`);return R.analytics.onApproveSuccess(p.transactionHash),(g=a==null?void 0:a.onApproveSuccess)==null||g.call(a,{txHash:p.transactionHash,explorerUrl:Ii(p.transactionHash,s),token:c,amount:R.amountUi(c.decimals,u)}),p}})},QG=()=>{const{account:e,chainId:t,srcToken:r,dstToken:n,module:s,slippage:a}=oe(),o=Zs(),i=Lr().amountWei,c=tn().amountPerTradeWei,l=F0(),u=Ks().fillDelay,d=z0().amountWei,p=K(h=>h.state.isMarketOrder);return on({mutationFn:async()=>{R.analytics.onRequestOrder({account:e,chainId:t,module:s,srcToken:r,dstToken:n,fromTokenAmount:i,srcChunkAmount:c,triggerPricePerTrade:o.pricePerChunkWei,deadline:l,fillDelay:u.unit*u.value,minDstAmountOutPerTrade:d,slippage:a,isMarketOrder:p||!1})}})};function JG(e){const t=e.match(/,\s*code\s*:\s*(\d+)/i);return{message:e.replace(/^error\s*:/i,"").replace(/,\s*code\s*:\s*\d+/i,"").trim()||"",code:t?Number(t[1]):0}}const ej=()=>{const{srcToken:e,dstToken:t,chainId:r,callbacks:n}=oe(),s=XG().mutateAsync,a=KG().mutateAsync,o=ZG().mutateAsync,{mutateAsync:i}=Ux(),c=K(d=>d.updateSwapExecution),{amountWei:l}=Lr(),u=QG().mutate;return on({mutationFn:async()=>{var p,h;const d=R.isNativeAddress((e==null?void 0:e.address)||" ");try{if(!e)throw new Error("missing srcToken");if(!t)throw new Error("missing dstToken");if(!r)throw new Error("missing chainId");const y=og(e,r);c({allowanceLoading:!0});const{approvalRequired:g}=await i({tokenAddress:y.address,srcAmountWei:l});let k=0,v=1;d&&v++,g&&v++,c({totalSteps:v,stepIndex:k,allowanceLoading:!1,status:wt.LOADING}),u(),d&&(c({step:Ls.WRAP}),await a({onHash:S=>c({wrapTxHash:S}),srcAmountWei:l}),k++,c({stepIndex:k})),g&&(c({step:Ls.APPROVE}),await s({token:y,onHash:S=>c({approveTxHash:S}),srcAmountWei:l}),k++,c({stepIndex:k})),c({step:Ls.CREATE});const w=await o();return c({status:wt.SUCCESS,orderId:w.id}),w}catch(y){if(hp(y))(p=n==null?void 0:n.onSubmitOrderRejected)==null||p.call(n),c({step:void 0,status:void 0,stepIndex:void 0});else{const g=JG(y.message);(h=n==null?void 0:n.onSubmitOrderFailed)==null||h.call(n,{message:g.message||"",code:g.code||0}),c({status:wt.FAILED,error:{message:g.message||"",code:g.code||0}})}}}})},tj=()=>{const{marketPrice:e,srcToken:t,dstToken:r,marketPriceLoading:n,srcBalance:s,srcUsd1Token:a,noLiquidity:o}=oe(),i=Fe(),c=ej(),l=K(m=>m.updateState),{amountUI:u,amountWei:d}=Lr(),p=K(m=>m.resetState),h=K(m=>m.state.swapExecution),y=K(m=>m.state.typedSrcAmount),g=n||ue(a||"0").isZero()||s===void 0||ue(e||"0").isZero(),k=!!(t&&r&&y&&g),v=Mx(),w=F.useMemo(()=>o?i("noLiquidity"):ue(y||"0").isZero()?i("enterAmount"):(v==null?void 0:v.type)===Bt.INSUFFICIENT_BALANCE?i("insufficientFunds"):i("placeOrder"),[v,i,y,o]),S=F.useCallback(()=>{(h==null?void 0:h.status)===wt.SUCCESS&&(l({typedSrcAmount:""}),setTimeout(()=>{p()},1e3))},[h==null?void 0:h.status,p,l]),C=F.useCallback(()=>{(h==null?void 0:h.status)!==wt.LOADING&&l({acceptedSrcAmount:void 0,acceptedMarketPrice:void 0,swapExecution:{srcToken:t,dstToken:r}})},[l,t,r]),U=on({mutationFn:async()=>(l({acceptedSrcAmount:u,acceptedMarketPrice:e}),await c.mutateAsync())}),z=F.useCallback(()=>U.mutateAsync(),[U]),T=Ox();return F.useMemo(()=>({resetSwap:p,onCloseModal:S,onOpenModal:C,onSubmitOrder:z,...h,swapLoading:(h==null?void 0:h.status)===wt.LOADING||(h==null?void 0:h.allowanceLoading),swapSubmitted:!!(h!=null&&h.status),order:T,srcAmountWei:d,srcAmount:d,openSubmitModalButton:{disabled:!!(v||o||k||ue(y||"0").isZero()||!t||!r),text:w,loading:k}}),[h,t,r,T,p,S,C,z,w,k,v,o,y])},Dx=(e,t)=>{const{marketPriceLoading:r,srcToken:n,dstToken:s,srcBalance:a,dstBalance:o}=oe(),i=K(C=>C.state.typedSrcAmount),c=K(C=>C.updateState),{srcUsd1Token:l,dstUsd1Token:u}=oe(),d=js(i,l),p=js(t,u),h=aH(),y=e?n:s,g=Fr(y==null?void 0:y.decimals,e?a:o),k=Bx(),v=F.useCallback(C=>{e&&c({typedSrcAmount:C})},[c,e]),w=F.useCallback(()=>{e&&c({typedSrcAmount:Pi(g,8)})},[c,e,g]),S=h||e?i:Pi(t||"",8);return{balance:g,usd:e||h?d:p,value:S||"",valueWei:lu(y==null?void 0:y.decimals,S),onChange:v,onMax:w,isLoading:i?e?!1:r:!1,token:y,isInsufficientBalance:e?k:void 0}},rj=()=>Dx(!0),nj=()=>{const e=tc().amountUI,t=K(r=>r.state.typedSrcAmount);return Dx(!1,t?e:"")},sj=()=>{const e=K(n=>n.state.isMarketOrder),t=K(n=>n.updateState),r=F.useCallback(()=>{t({isMarketOrder:!e})},[t,e]);return{isMarketPrice:!e,togglePrice:r}},Fx=F.createContext({}),aj=({children:e,...t})=>B.jsx(Fx.Provider,{value:t,children:e}),oj=()=>F.useContext(Fx),Nx=()=>{var s,a;const e=Fe(),{wrapTxHash:t,srcToken:r}=K(o=>o.state.swapExecution),n=(a=(s=$i())==null?void 0:s.wToken)==null?void 0:a.symbol;return t?B.jsx("p",{className:"twap-error-wrap-msg",children:e("wrapMsg",{symbol:(r==null?void 0:r.symbol)||"",wSymbol:n||""})}):null},ij=(e=!1,t=1)=>{const{module:r}=oe(),n=Fe();return F.useMemo(()=>r===R.Module.STOP_LOSS?n("stopLoss"):r===R.Module.TAKE_PROFIT?n("takeProfit"):n(e?"twapMarket":t===1?"limit":"twapLimit"),[n,r,e,t])},cj=({price:e,dstTokenSymbol:t,label:r,usd:n})=>B.jsxs(we.DetailRow,{title:r,children:[`${e||"-"} ${t||""}`,B.jsx(we.USD,{value:n})]}),zx=()=>{const e=Fe(),t=K(a=>a.state.isMarketOrder),r=K(a=>a.state.swapExecution.status),{totalTrades:n}=tn(),s=ij(t,n);return r===wt.SUCCESS?e("createOrderActionSuccess",{name:s}):e("createOrderAction",{name:s})},lj=()=>{const e=K(y=>y.state.swapExecution.srcToken),t=Fe(),{step:r,wrapTxHash:n,approveTxHash:s}=K(y=>y.state.swapExecution),a=$i(),o=a0(n),i=a0(n),c=a0(s),l=K(y=>y.state.swapExecution.status),d=R.isNativeAddress((e==null?void 0:e.address)||"")?(a==null?void 0:a.native.symbol)||"":(e==null?void 0:e.symbol)||"",p=a==null?void 0:a.wToken.symbol,h=zx();return F.useMemo(()=>r===Ls.WRAP?{title:t("wrapAction",{symbol:d}),footerLink:o,footerText:t(o?"viewOnExplorer":"proceedInWallet")}:r===Ls.APPROVE?{title:t("approveAction",{symbol:d}),footerLink:c,footerText:t(c?"viewOnExplorer":"proceedInWallet")}:{title:h,footerText:l===wt.LOADING?t("proceedInWallet"):void 0},[r,c,d,h,t,o,i,p,l])},uj=({error:e})=>B.jsxs("div",{className:"twap-error",children:[B.jsx("h2",{className:"twap-error-title",children:"Transaction failed"}),(e==null?void 0:e.code)&&B.jsxs("p",{className:"twap-error-code",children:["Error code: ",e==null?void 0:e.code]}),B.jsx(Nx,{})]});function dj({error:e}){const{components:t}=oe(),r=Fe(),n=K(o=>{var i;return(i=o.state.swapExecution)==null?void 0:i.wrapTxHash}),s=t.SubmitOrderErrorView,a=B.jsx(Xn.Failed,{error:B.jsx(uj,{error:e}),footerLink:R.ORBS_TWAP_FAQ_URL,footerText:r("viewOnExplorer")});return s?B.jsx(s,{wrapTxHash:n,error:e,children:a}):a}const fj=()=>{const{components:e}=oe(),t=K(p=>p.state.swapExecution.srcToken),r=K(p=>p.state.swapExecution.dstToken),{reviewDetails:n}=oj(),s=Fe(),a=K(p=>{var h;return!!((h=p.state.swapExecution)!=null&&h.status)}),o=Ox(),i=Ge({value:o.srcAmountUsd,decimalScale:2}),c=Ge({value:o.dstAmountUsd,decimalScale:2}),l=e.USD,u=e.SubmitOrderMainView,d=B.jsxs(B.Fragment,{children:[B.jsx(Xn.Main,{fromTitle:s("from"),toTitle:s("to"),inUsd:l?B.jsx(l,{value:o.srcAmountUsd,isLoading:!1}):`$${i}`,outUsd:l?B.jsx(l,{value:o.dstAmountUsd,isLoading:!1}):`$${c}`}),!a&&B.jsxs("div",{className:"twap-create-order-bottom",children:[B.jsx(we.Container,{children:B.jsxs("div",{className:"twap-create-order-details",children:[B.jsx(we.Deadline,{deadline:o.display.deadline.value,label:o.display.deadline.label,tooltip:o.display.deadline.tooltip||""}),B.jsx(we.TriggerPrice,{price:o.display.triggerPricePerTrade.value,dstToken:r,label:o.display.triggerPricePerTrade.label,tooltip:o.display.triggerPricePerTrade.tooltip||"",usd:o.display.triggerPricePerTrade.usd}),B.jsx(cj,{price:o.display.limitPrice.value,dstTokenSymbol:r==null?void 0:r.symbol,label:o.display.limitPrice.label,usd:o.display.limitPrice.usd}),B.jsx(we.MinDestAmount,{dstToken:r,dstMinAmountOut:o.display.minDestAmountPerTrade.value,label:o.display.minDestAmountPerTrade.label,tooltip:o.display.minDestAmountPerTrade.tooltip||"",usd:o.display.minDestAmountPerTrade.usd}),B.jsx(we.TradeSize,{tradeSize:o.display.tradeSize.value,trades:o.display.totalTrades.value,srcToken:t,label:o.display.tradeSize.label,tooltip:o.display.tradeSize.tooltip}),B.jsx(we.TradesAmount,{trades:o.display.totalTrades.value,label:o.display.totalTrades.label,tooltip:o.display.totalTrades.tooltip}),B.jsx(we.TradeInterval,{chunks:o.display.totalTrades.value,fillDelayMillis:o.display.tradeInterval.value,label:o.display.tradeInterval.label,tooltip:o.display.tradeInterval.tooltip}),B.jsx(we.Recipient,{}),o.fee.value&&B.jsx(we.Fees,{fees:o.fee.value,label:o.fee.label,usd:o.fee.usd,dstTokenSymbol:r==null?void 0:r.symbol})]})}),n]})]});return u?B.jsx(u,{children:d}):d},pj=e=>{const{status:t,stepIndex:r,totalSteps:n,error:s}=K(w=>w.state.swapExecution),{components:a}=oe(),o=a.Spinner,i=a.SuccessIcon,c=a.ErrorIcon,l=a.TokenLogo,{srcToken:u,dstToken:d}=oe(),p=Lr().amountUI,h=tc().amountUI,y=Ge({value:p,decimalScale:2}),g=Ge({value:h,decimalScale:2}),k=F.useMemo(()=>({symbol:u==null?void 0:u.symbol,logoUrl:u==null?void 0:u.logoUrl}),[u]),v=F.useMemo(()=>({symbol:d==null?void 0:d.symbol,logoUrl:d==null?void 0:d.logoUrl}),[d]);return B.jsx(aj,{...e,children:B.jsx(Xn,{inAmount:y,outAmount:g,swapStatus:t,totalSteps:n,currentStep:lj(),currentStepIndex:r,inToken:k,outToken:v,components:{SrcTokenLogo:l&&B.jsx(l,{token:u}),DstTokenLogo:l&&B.jsx(l,{token:d}),Failed:B.jsx(dj,{error:s}),Success:B.jsx(hj,{}),Main:B.jsx(fj,{}),Loader:o,SuccessIcon:i,FailedIcon:c}})})},hj=()=>{const e=zx(),{components:t}=oe(),r=K(a=>a.state.swapExecution.orderId),n=t.SubmitOrderSuccessView,s=B.jsxs(B.Fragment,{children:[B.jsx(Xn.Success,{title:e}),B.jsx(Nx,{})]});return n?B.jsx(n,{newOrderId:r,children:s}):s};R.setUIVersion(l2.version);const mj=()=>{const e=K(t=>t.updateState);return{amount:K(t=>t.state.typedSrcAmount),reset:F.useCallback(()=>e({typedSrcAmount:""}),[e])}},bj={SubmitOrderPanel:pj,Orders:OG};Object.defineProperty(Z,"Configs",{enumerable:!0,get:()=>R.Configs}),Object.defineProperty(Z,"DISCLAIMER_URL",{enumerable:!0,get:()=>R.DISCLAIMER_URL}),Object.defineProperty(Z,"Module",{enumerable:!0,get:()=>R.Module}),Object.defineProperty(Z,"ORBS_LOGO",{enumerable:!0,get:()=>R.ORBS_LOGO}),Object.defineProperty(Z,"ORBS_WEBSITE_URL",{enumerable:!0,get:()=>R.ORBS_WEBSITE_URL}),Object.defineProperty(Z,"OrderStatus",{enumerable:!0,get:()=>R.OrderStatus}),Object.defineProperty(Z,"OrderType",{enumerable:!0,get:()=>R.OrderType}),Object.defineProperty(Z,"Partners",{enumerable:!0,get:()=>R.Partners}),Object.defineProperty(Z,"eqIgnoreCase",{enumerable:!0,get:()=>R.eqIgnoreCase}),Object.defineProperty(Z,"isNativeAddress",{enumerable:!0,get:()=>R.isNativeAddress}),Z.Components=bj,Z.DEFAULT_DURATION_OPTIONS=OF,Z.InputErrors=Bt,Z.PRICE_PROTECTION_SETTINGS=BF,Z.SpotProvider=PF,Z.Steps=Ls,Z.SwapStatus=wt,Z.copy=yF,Z.ensureWrappedToken=og,Z.fillDelayText=ng,Z.formatDecimals=Pi,Z.getExplorerUrl=Ii,Z.getMinNativeBalance=xF,Z.getOrderExcecutionRate=sg,Z.getOrderLimitPriceRate=ag,Z.getOrderType=wF,Z.isTxRejected=hp,Z.makeElipsisAddress=pp,Z.millisToDays=ig,Z.millisToMinutes=mp,Z.parseError=gF,Z.removeCommas=bF,Z.shouldUnwrapOnly=yp,Z.shouldWrapOnly=bp,Z.useBuildRePermitOrderDataCallback=_x,Z.useDisclaimerPanel=zG,Z.useDstTokenPanel=nj,Z.useDurationPanel=NG,Z.useFillDelayPanel=MG,Z.useFormatNumber=Ge,Z.useInputErrors=Mx,Z.useInvertTradePanel=Eu,Z.useLimitPricePanel=VG,Z.useMarketPricePanel=DG,Z.useOrderHistoryPanel=PH,Z.useSrcTokenPanel=rj,Z.useSubmitSwapPanel=tj,Z.useTogglePricePanel=sj,Z.useTradesPanel=UG,Z.useTriggerPricePanel=$G,Z.useTypedSrcAmount=mj,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})}));
|